TL;DR
While attention mechanisms are credited with the massive success of sequence-to-sequence (seq2seq) models, their "cognitive plausibility" is often questioned. This paper introduces three novel metrics to measure incrementality—the ability to process information rapidly as it arrives—and discovers a counterintuitive result: attention-based models actually exhibit more human-like "chunk-and-pass" processing than vanilla RNNs, despite having the ability to "look back" at any time.
What Problem Does This Paper Address?
In human psycholinguistics, we process language incrementally. Because of the "Now-or-Never bottleneck" (limited memory and time), our brains rapidly integrate new information into abstract representations and "pass" them along, often forgetting the exact surface-level words quickly.
Standard Recurrent Neural Networks (RNNs) are forced to cram an entire sentence into a single fixed-size vector, which feels incremental but is often inefficient. Conversely, Attention mechanisms allow a model to revisit any previous hidden state at any time. Critics argue this might make the encoder "lazy," as it doesn't have an incentive to build a meaningful, integrated representation if it can just refer to the raw history later. The authors set out to quantify this behavior: do attention models actually build better incremental representations, or do they just use attention as a crutch?
Methods
The authors propose three new metrics to "peek under the hood" of the encoder:
- Diagnostic Classifier (DC) Accuracy: They train small linear classifiers to see if the current hidden state $h_t$ still contains information about previous tokens $x_{t'}$. If a model is incremental, it should ideally represent the meaning of the history rather than just a verbatim list of past words.
- Integration Ratio ($\phi_{int}$): This metric calculates the balance between how much new information from the current token is integrated versus how much of the previous hidden state is maintained. A ratio $>1$ suggests a preference for maintaining history, while $<1$ suggests a focus on the new input.
- Representational Similarity: This measures whether the model maps similar sequences of tokens (e.g., "I saw a cat" vs. "I saw a feline") to similar regions in the vector space. High similarity suggests the model is building abstract, "chunked" representations.
Datasets
The study uses the SCAN dataset (Lake and Baroni, 2018). SCAN is a simplified navigation task where models must translate natural language instructions (e.g., "run twice and look") into a sequence of discrete actions (I_RUN I_RUN I_LOOK). It is specifically designed to test compositional generalization—the ability to understand new combinations of known primitives.
Key Insights and Ideas
- The Attention Paradox: You might expect attention models to be less incremental because they can always look back. However, the results suggest the opposite. Because the attention mechanism handles the "memory" of the sequence, the encoder is "freed" to focus on processing the current input more deeply.
- Chunk-and-Pass: The authors find evidence that attention-based encoders behave like the human "chunk-and-pass" system. They tend to "erase" or compress information once a contiguous chunk of information is processed, making room for the next part of the instruction.
- Vanilla RNNs are Hoarders: Without attention, the vanilla LSTM tries to preserve as much of the entire input history as possible in its final state. This "recency bias" often leads to errors where the model confuses the order of operations or repeats commands.
Key Results
- Accuracy: As expected, the attention-based model significantly outperformed the vanilla LSTM on the SCAN task.
- Integration Ratio: Attention models showed a lower integration ratio than vanilla models. This confirms they have a higher "bias" toward integrating new information at each step, rather than just maintaining a static history.
- Representational Similarity: Counterintuitively, attention models produced more similar representations for identical subsequences than vanilla models. In vanilla models, the encoding of a subsequence is heavily "polluted" by whatever came before it (the prefix), whereas attention models create more modular, homogenous encodings.
- Qualitative Erasing: In error analysis, the authors noted that attention models effectively "erase" prior information when encountering transition words like "after," allowing them to reset and process the next command without interference from the first.
Limitations and Future Work
- Sequence Length: The SCAN dataset features relatively short sequences (average 6.8 tokens). The authors acknowledge that the differences in "memory pressure" might be even more pronounced on longer, more complex corpora like Wikipedia or news articles.
- Formal Definition: "Incrementality" is still a somewhat fuzzy concept in NLP. The authors suggest that a more rigorous mathematical formalization of incrementality could lead to even better metrics.
- Beyond RNNs: This study focused on LSTMs. A natural next step would be applying these metrics to Transformers, which lack a recurrent structure entirely and rely solely on attention, to see if they exhibit similar "chunking" behaviors.
Summary updated