Abstract
Compositional Generalization (CG), referring as the generalization ability to new combinations of essential concepts, is thought to be one mechanism underlying human’s remarkable capability of rapid generalization to new knowledge and tasks. Recent research on brain neural codes has found that the geometry structure of the neural representations is highly related to human compositional generalization ability. In this paper, we extend the above neural science observation into artificial neural networks (ANN) and find that the geometry structure of the representations in ANN impacts their compositional generalization. More importantly, we reveal that only good geometry structure is not sufficient for strong CG ability, a regularization is essential to ensure the classifier can fit the representation geometry structure. We propose a loss to optimize the representation extractor to form a well-organized representation space, and a regularization on the classifier to force it align with the geometry structure of representation space. With our proposed methods, the CG performance gains as large as 43\% on the synthetic and 63\% on real-world datasets, verifying the effectiveness of our brain-inspired ANN-enhancing approach towards human-like strong generalization ability.