Introduction
A central debate in artificial intelligence concerns the nature of In-Context Learning (ICL) in Large Language Models (LLMs). Is it "true learning"—the ability to induce new rules on the fly—or merely a sophisticated form of pattern retrieval from massive training sets? Most benchmarks rely on tasks like coding or mathematics, which are likely overrepresented in training data. To isolate the factor of novelty, researchers evaluated LLMs on a benchmark of randomly generated, mathematically simple formal languages: 3-state Deterministic Finite Automata (DFAs).
Methodology: Testing Pure Induction
The study focused on 3-state DFAs, the simplest non-trivial level of grammatical complexity. By using randomly sampled languages, the authors ensured the patterns were novel and not present in the models' parametric memory.
Two primary tasks were used for evaluation:
- Sequence Completion: Models are provided with 30 example strings from a specific random language and must complete a new prefix with a valid suffix.
- Transducer Task: Input sequences are annotated with state transition outputs (0 or 1), and the model must predict the final output bit.
The researchers tested various prompting strategies, including Chain-of-Thought (CoT) and "RED-GREEN" word problem framing (casting the logic as a task about moving between rooms in a house), to see if they could improve the models' inductive reasoning.
Results: The "n-gram Humiliation"
The most striking finding was that simple n-gram statistical models consistently outperformed state-of-the-art LLMs. While LLMs are often credited with emergent reasoning abilities, their performance on these novel patterns was surprisingly limited.
Key results include:
- Sequence Completion: Claude 3.5, the top non-reasoning model, achieved 82.8% accuracy, while a basic 6-gram model reached 91.7%.
- Transducer Task: Most LLMs performed similarly to 3-gram or 4-gram models. GPT-4o (83.7%) failed to surpass the 4-gram baseline (91.1%).
- Reasoning Models: Only the latest "reasoning" models, such as o3-mini and GPT-5, approached the performance of a Brute Force solver, and only when explicitly prompted about the DFA structure.
Discussion and Insights
The failure of LLMs to beat simple statistical baselines suggests a heavy reliance on "parametric knowledge"—patterns memorized during training. When faced with truly novel, random structures, the models' ability to induce rules from context appears to collapse.
Interestingly, Chain-of-Thought (CoT) prompting yielded inconsistent results. In the Transducer task, CoT often decreased performance for many models compared to direct next-token prediction. Furthermore, casting the logic as a word problem generally did not help, suggesting that the bottleneck is fundamental to the models' inductive capabilities rather than just a text-matching heuristic.
Conclusion
This research highlights a significant limitation in current LLM architectures: a struggle with general induction on novel patterns. While scaling training data has led to impressive capabilities, it may not be sufficient for developing models that can truly "learn" new logic on the fly. Future work should focus on architectural or training improvements that enhance a model's ability to form theories from limited examples, moving beyond the retrieval of pre-existing patterns.
Summary updated