Introduction
The ability to combine known concepts into novel meanings—compositionality—is a cornerstone of human intelligence. In linguistics, this allows us to understand entirely new phrases by leveraging our knowledge of individual words and their structural relationships. While neural networks have achieved remarkable success in natural language processing, their capacity for true systematic compositionality remains a subject of intense debate. Previous benchmarks, often consisting of small, hand-crafted datasets like SCAN, have yielded inconsistent results, leading to a "murky" understanding of whether these models truly learn rules or merely memorize patterns.
Formalizing Compositionality via SFSTs
To move beyond the limitations of existing benchmarks, researchers have proposed a new framework using formal language theory. By utilizing Subsequential Finite-State Transducers (SFSTs), they can generate thousands of unique, synthetic tasks with precisely controlled properties. SFSTs are mathematical machines that map an input string to an output string through a series of internal states and transitions.
This approach offers two primary advantages. First, it provides mathematical rigor; SFSTs directly implement "Montague’s Compositionality," where compositionality is defined as a structure-preserving map (homomorphism) between input and output algebras. Second, it allows for granular control over task complexity by varying the number of states and transitions within the machine.
Methodology and Scaling Laws
The study evaluated standard LSTM encoder-decoder models with attention, comparing their performance against OSTIA, a classic symbolic algorithm designed for learning transducers. The researchers sampled 2,800 unique SFSTs with state counts ranging from 10 to 100. For each machine, 20,000 unique input-output pairs were generated via random walks.
The experiments revealed a striking "all-or-nothing" phenomenon: neural models do not improve incrementally. Instead, they exhibit a sharp phase transition, moving from total failure to near-perfect accuracy once a specific threshold is met.
The "Magic Number" of Transition Coverage
The critical factor for success was identified as transition coverage—the number of times a model encounters each specific rule (transition) during training. The researchers discovered an "inflection point" at approximately 400 examples per transition. When training data provides this level of coverage, models almost universally master the underlying language.
This finding helps resolve the "SCAN Paradox." While the SCAN dataset appears complex when represented as an SFST (with over 7,000 states), it is easily learned by neural networks. This is because SCAN is fundamentally built on a Context-Free Grammar, which is structurally simpler than its massive SFST representation would suggest.
Key Results and Implications
- Scaling Failure: As the number of states in the SFST increases, accuracy drops to nearly zero because the fixed-size training set can no longer provide sufficient transition coverage.
- Model Capacity: Larger models (e.g., 300-dimensional hidden states) were able to generalize with a lower coverage threshold, suggesting that increased capacity leads to better data efficiency.
- Neural vs. Symbolic: While the symbolic OSTIA algorithm is theoretically perfect, its cubic runtime makes it impractical for large datasets compared to neural networks.
Conclusion
The study demonstrates that the learnability of compositional rules is tied to the density of rule exposure rather than just dataset size. Future research aims to develop complexity metrics that transcend specific automata types, accounting for how "complex" machines might represent "simple" grammars. Extending this work to recursive Context-Free grammars will be essential for fully capturing the nuances of human language compositionality.
Summary updated