[Paper Review] The compositionality of neural networks: integrating symbolism and connectionism.
This paper proposes a theory-driven evaluation framework to test compositionality in neural networks by translating linguistic and philosophical theories of compositionality into five task-agnostic, theoretically grounded tests. Applied to sequence-to-sequence models on a highly compositional PCFG SET dataset, the framework reveals architectural strengths and weaknesses in systematic generalization, rule learning, and robustness to synonym substitution.
Despite a multitude of empirical studies, little consensus exists on whether neural networks are able to generalise compositionally, a controversy that, in part, stems from a lack of agreement about what it means for a neural model to be compositional. As a response to this controversy, we present a set of tests that provide a bridge between, on the one hand, the vast amount of linguistic and philosophical theory about compositionality and, on the other, the successful neural models of language. We collect different interpretations of compositionality and translate them into five theoretically grounded tests that are formulated on a task-independent level. In particular, we provide tests to investigate (i) if models systematically recombine known parts and rules (ii) if models can extend their predictions beyond the length they have seen in the training data (iii) if models' composition operations are local or global (iv) if models' predictions are robust to synonym substitutions and (v) if models favour rules or exceptions during training. To demonstrate the usefulness of this evaluation paradigm, we instantiate these five tests on a highly compositional data set which we dub PCFG SET and apply the resulting tests to three popular sequence-to-sequence models: a recurrent, a convolution based and a transformer model. We provide an in depth analysis of the results, that uncover the strengths and weaknesses of these three architectures and point to potential areas of improvement.
Motivation & Objective
- To resolve the controversy over whether neural networks generalize compositionally, which stems from inconsistent definitions of compositionality.
- To bridge the gap between symbolic theories of compositionality and empirical neural network models by grounding tests in linguistic and philosophical foundations.
- To develop a set of evaluation tests that are independent of specific tasks and applicable across different neural architectures.
- To assess how well popular sequence-to-sequence models—recurrent, convolutional, and transformer-based—generalize compositionally across multiple dimensions.
- To identify architectural strengths and limitations in systematic recombination, extrapolation, local vs. global operations, synonym robustness, and rule vs. exception learning.
Proposed method
- Translate five distinct interpretations of compositionality from philosophy and linguistics into five formal, task-independent evaluation tests.
- Design a synthetic, highly compositional dataset called PCFG SET to test systematic generalization, based on probabilistic context-free grammars.
- Apply the five tests to three state-of-the-art sequence-to-sequence models: a recurrent network, a convolutional network, and a transformer.
- Evaluate models on systematic recombination of known parts and rules, extrapolation beyond training sequence lengths, locality of composition operations, robustness to synonym substitutions, and preference for rules over exceptions.
- Use standardized metrics to quantify performance across all five tests, enabling cross-model comparison.
- Perform in-depth qualitative and quantitative analysis of model behavior across the five test dimensions.
Experimental results
Research questions
- RQ1To what extent can neural networks systematically recombine known parts and rules not seen in training combinations?
- RQ2Can models extrapolate their predictions to sequence lengths beyond those seen during training?
- RQ3Are the composition operations in neural networks local (e.g., token-level) or global (e.g., sequence-level)?
- RQ4How robust are model predictions to synonym substitutions in input sequences?
- RQ5Do models favor learning general rules or memorizing exceptions during training?
Key findings
- The transformer model demonstrated the strongest performance in systematic recombination and extrapolation, outperforming both RNN and CNN architectures.
- All models showed limited robustness to synonym substitutions, indicating a lack of semantic abstraction in composition operations.
- The RNN and CNN models exhibited more global composition patterns, while the transformer showed a mix of local and global behavior.
- All three models displayed a strong preference for memorizing exceptions over learning general rules, especially in low-data regimes.
- The models’ ability to generalize beyond training length was minimal, with only the transformer showing slight extrapolation capability.
- The evaluation framework successfully exposed architectural biases and limitations in compositionality, highlighting the need for improved inductive biases in sequence models.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.