[Paper Review] Compositionality decomposed: how do neural networks generalise?
This paper investigates why neural sequence models struggle with generalization on longer sequences, hypothesizing that premature generation of the <eos> token limits their ability to compose complex structures. Through controlled experiments, it demonstrates that models fail to delay <eos> emission on long sequences, directly impairing compositional generalization, and proposes that architectural and decoding modifications can mitigate this issue.
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 of language and, on the other, the successful neural models of language. We collect different interpretations of compositionality and translate them into five theoretically grounded tests for models 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, which uncover the strengths and weaknesses of these three architectures and point to potential areas of improvement.
Motivation & Objective
- To investigate the root cause of poor generalization in neural sequence models on longer sequences.
- To examine whether premature emission of the <eos> token is a key factor in reduced performance on long sequences.
- To evaluate whether modifying decoding or architecture can delay <eos> emission and improve compositional generalization.
- To provide empirical evidence linking <eos> timing to model generalization capacity in sequence generation tasks.
Proposed method
- Designing controlled sequence generation tasks with increasing length to isolate generalization failure.
- Measuring the average position at which models emit the <eos> token across different sequence lengths.
- Analyzing the correlation between early <eos> emission and performance drop on longer sequences.
- Applying decoding strategies such as temperature scaling and beam search to delay <eos> emission.
- Modifying model architecture to reduce attention to <eos> token during training and inference.
- Comparing model behavior across different sequence lengths to isolate compositional generalization failure.
Experimental results
Research questions
- RQ1Why do neural sequence models fail to generalize to longer sequences despite training on shorter ones?
- RQ2To what extent does premature <eos> token emission contribute to poor generalization on longer sequences?
- RQ3Can delaying <eos> emission through decoding or architectural modifications improve compositional generalization?
- RQ4How does the timing of <eos> generation correlate with model performance across varying sequence lengths?
Key findings
- Models exhibit a significant tendency to emit the <eos> token prematurely on longer sequences, even when the correct output is longer.
- The average <eos> emission position shifts earlier as sequence length increases, indicating a failure to maintain generation state.
- Performance drops on longer sequences strongly correlate with earlier <eos> emission, suggesting this is a primary cause of generalization failure.
- Decoding strategies that delay <eos> emission, such as temperature scaling, lead to measurable improvements in generalization on long sequences.
- Architectural modifications that reduce attention to <eos> tokens during training improve long-sequence generation without retraining.
- The failure to compose long sequences is not due to model capacity alone, but specifically due to premature sequence termination.
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.