Elamur Research⌕
☰
home / papers / 2024 / Can Language Models Handle Recursively Nested Grammatical Structures? A Case Study on Comparing Models and Humans

Can Language Models Handle Recursively Nested Grammatical Structures? A Case Study on Comparing Models and Humans

Paper · 2024 · Andrew Lampinen

Summary

Earlier work (Lakretz et al. 2021, 2022) suggested that Transformer LMs handle recursively center-embedded sentences worse than people do. On the hardest subject-verb agreement condition, models scored at or below chance. This paper argues that the comparison was unbalanced. Human participants received instructions, a training block and feedback after every trial, while the models were tested zero-shot. Drawing on comparative psychology, the author re-runs the task under closer-matched conditions. Chinchilla (70B) and a 7B model from Hoffmann et al. (2022) receive a short prompt containing much less material than the human training. Forced verb choices on the BIG-bench stimuli are scored by likelihood comparison. With prompting, the large model exceeds reported human accuracy on the hardest inner-dependency cases and stays strong on deeper nesting than humans were tested on. The benefit holds regardless of which structures or vocabulary appear in the prompt. A reanalysis of the human data indicates that people may be near chance when they first meet difficult structures. The broader lesson is that foundation models need an experiment-appropriate context before being compared with humans.

Key points

  • Prior human study design: Lakretz et al. (2021) tested humans in Italian. Each session began with a 40-trial training block, and participants received feedback after every trial.
  • Prior model results: The LM evaluation (Lakretz et al. 2022, English) was zero-shot. GPT-2 XL fell below chance in one key condition, and GPT-3 was not above chance on the hardest condition in BIG-bench (Srivastava et al. 2023).
  • Setup in this paper: The models are decoder-only Transformers with a 32,000-token SentencePiece vocabulary. The test target is the inner dependency of long-nested sentences, especially the PSP configuration (plural, singular, plural nouns).
  • Human reanalysis: On the first post-training encounter with an inner violation, human error rates were 0.537 for PSP and 0.618 for PSS.
  • Learning effects: A mixed-effects logistic regression over the 55 subjects who completed the study found only a marginally significant learning effect. The author therefore notes that firm conclusions about human learning cannot be drawn from these data.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Andrew Lampinen. 2024. Can Language Models Handle Recursively Nested Grammatical Structures? A Case Study on Comparing Models and Humans. Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1162/coli_a_00525

@article{lampinen2024can,
  title = {{Can Language Models Handle Recursively Nested Grammatical Structures? A Case Study on Comparing Models and Humans}},
  author = {Andrew Lampinen},
  journal = {Computational Linguistics},
  year = {2024},
  doi = {10.1162/coli\_a\_00525},
  url = {https://doi.org/10.1162/coli_a_00525}
}

References

40 references, 20 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Bahdanau, Dzmitry, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473.
  2. Bates, Elizabeth and Judith C. Goodman. 2013. On the emergence of grammar from the lexicon. In The Emergence of Language. Psychology Press, pages 47–98. https://doi.org/10.4324/9781410602367-7 Berwick, Robert C. and Noam Chomsky. 2019. All or nothing: No half-merge and the evolution of syntax. PLoS… ↗
  3. Bowman, Samuel. 2022. The dangers of underclaiming: Reasons for caution when reporting how NLP systems fail. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7484–7499. https://doi.org/10.18653/v1/2022.acl-long.516 Brown, Tom,… ↗
  4. Chang, Franklin, Gary S Dell, and Kathryn Bock. 2006. Becoming syntactic. Psychological Review, 113(2):234–272. https://doi.org/10.1037/0033 -295X.113.2.234, PubMed: 16637761 Chomsky, Noam. 1999. Derivation by phase. In Michael Kenstowicz, editor, An Annotated Syntax Reader, pages 482–496. — [doi:10.1037/0033](https://doi.org/10.1037/0033) ↗
  5. Chomsky, Noam. 2014a. Aspects of the Theory of Syntax, volume 11, MIT Press. find
  6. Chomsky, Noam. 2014b. The Minimalist Program. MIT Press. https://doi.org/10.7551/mitpress/9780262527347 .001.0001 Christiansen, Morten H. and Nick Chater. 1999. Toward a connectionist model of recursion in human linguistic performance. Cognitive Science, 23(2):157–205. https://doi.org /10.1207/s155… — [doi:10.7551/mitpress/9780262527347](https://doi.org/10.7551/mitpress/9780262527347) ↗
  7. Cohen, Andrew L., Sara Sidlowski, and Adrian Staub. 2017. Beliefs and Bayesian reasoning. Psychonomic Bulletin & Review, 24(3):972–978. https://doi.org/10.3758/s13423-016-1161-z, PubMed: 27604495 Coolidge, Frederick L., Karenleigh A. Overmann, and Thomas Wynn. 2011. Recursion: What is it, who has i… ↗
  8. Deng, Chunyuan, Yilun Zhao, Xiangru Tang, Mark Gerstein, and Arman Cohan. 2024. Investigating data contamination in modern benchmarks for large language models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Techno…
  9. Elman, Jeffrey L. 1993. Learning and development in neural networks: The importance of starting small. Cognition, 48(1):71–99. https://doi.org/10.1016 /0010-0277(93)90058-4, PubMed: 8403835 Elman, Jeffrey L., Elizabeth A. Bates, and Mark H. Johnson. 1996. Rethinking Innateness: A Connectionist Persp… find
  10. B. T. 1989. Bias in Human Reasoning: Causes and Consequences. find
  11. Lawrence Erlbaum Associates, Inc. Fine, Alex B. and T. Florian Jaeger. 2016. The role of verb repetition in cumulative structural priming in comprehension. Journal of Experimental Psychology: Learning, Memory, and Cognition, 42(9):1362–1376. https://doi.org/10.1037/xlm0000236, PubMed: 26962961 Fine,… — [doi:10.1037/xlm0000236](https://doi.org/10.1037/xlm0000236) ↗
  12. MIT Press. Friedman, Dan, Andrew Kyle Lampinen, Lucas Dixon, Danqi Chen, and Asma Ghandeharioun. 2024. Interpretability illusions in the generalization of simplified models. In Forty-first International Conference on Machine Learning, pages 14035–14059. find
  13. Futrell, Richard, Ethan Wilcox, Takashi Morita, and Roger Levy. 2018. RNNs as psycholinguistic subjects: Syntactic state and grammatical dependency. arXiv preprint arXiv:1809.01329.
  14. Futrell, Richard, Ethan Wilcox, Takashi Morita, Peng Qian, Miguel Ballesteros, and Roger Levy. 2019. Neural language models as psycholinguistic subjects: Representations of syntactic state. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Lingu…
  15. Holtzman, Ari, Peter West, Vered Shwartz, Yejin Choi, and Luke Zettlemoyer. 2021. Surface form competition: Why the highest probability answer isn’t always right. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7038–7051. https://doi.org/10.18653/v1 /…
  16. Hu, Jennifer, Jon Gauthier, Peng Qian, Ethan Wilcox, and Roger Levy. 2020. A systematic assessment of syntactic generalization in neural language models. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1725–1744. https://doi.org /10.18653/v1/2020.acl… ↗
  17. Karlsson, Fred. 2007. Constraints on multiple center-embedding of clauses. Journal of Linguistics, 43(2):365–392. https://doi.org/10.1017/S0022226707004616 Kojima, Takeshi, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. Advanc… — [doi:10.1017/s0022226707004616](https://doi.org/10.1017/s0022226707004616) ↗
  18. Kudo, Taku and John Richardson. 2018. SentencePiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 66–71. https://doi.org/10.18653…
  19. Lakretz, Yair, Dieuwke Hupkes, Alessandra Vergallito, Marco Marelli, Marco Baroni, and Stanislas Dehaene. 2021. Mechanisms for handling nested dependencies in neural-network language models and humans. Cognition, 213(104699). https://doi.org/10.1016/j.cognition.2021.104699, PubMed: 33941375 Lampine… ↗
  20. Lu, Yao, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers),…
  21. Technology Review. McClelland, James L., Matthew M. Botvinick, David C. Noelle, David C. Plaut, Timothy T. Rogers, Mark S. Seidenberg, and Linda B. Smith. 2010. Letting structure emerge: Connectionist and dynamical systems approaches to cognition. Trends in Cognitive Sciences, 14(8):348–356. https:/… — [doi:10.1016/j.tics](https://doi.org/10.1016/j.tics) find
  22. Misra, Kanishka, Julia Rayz, and Allyson Ettinger. 2023. COMPS: Conceptual minimal pair sentences for testing robust property knowledge and its inheritance in pre-trained language models. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics,… find
  23. Nye, Maxwell, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. 2021. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114.
  24. Ouyang, Long, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. 2022. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730–27744.
  25. Perez, Ethan, Douwe Kiela, and Kyunghyun Cho. 2021. True few-shot learning with language models. In Advances in Neural Information Processing Systems, 34:11054–11070.
  26. Pickering, Martin J. and Holly P. Branigan. 1999. Syntactic priming in language production. Trends in Cognitive Sciences, 3(4):136–141. https://doi.org/10.1016 /S1364-6613(99)01293-0, PubMed: 10322467 Pickering, Martin J. and Victor S. Ferreira. 2008. Structural priming: A critical review. Psycholog… find
  27. Rae, Jack W., Sebastian Borgeaud, Trevor Cai, Katie Millican, Jordan Hoffmann, Francis Song, John Aslanides, Sarah Henderson, Roman Ring, Susannah Young, et al. 2021. Scaling language models: Methods, analysis & insights from training gopher. arXiv preprint arXiv:2112.11446. find
  28. Raffel, Colin, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J Liu, et al. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1–67.
  29. Sainz, Oscar, Jon Campos, Iker Garcı́a-Ferrero, Julen Etxaniz, Oier Lopez de Lacalle, and Eneko Agirre. 2023. NLP evaluation in trouble: On the need to measure LLM data contamination for each benchmark. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 10776–10787. http…
  30. Schaeffer, Rylan, Brando Miranda, and Sanmi Koyejo. 2023. Are emergent abilities of large language models a mirage? Advances in Neural Information Processing Systems, 36:55565–55581.
  31. Schrimpf, Martin, Idan Asher Blank, Greta Tuckute, Carina Kauf, Eghbal A. Hosseini, Nancy Kanwisher, Joshua B. Tenenbaum, and Evelina Fedorenko. 2021. The neural architecture of language: Integrative modeling converges on predictive processing. In Proceedings of the National Academy of Sciences, 118… find
  32. International Journal of Comparative Psychology, 31:1–15. https://doi.org/10.46867/ijcp.2018.31.01.12 Socher, Richard, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treeb… ↗
  33. Srivastava, Aarohi, Abhinav Rastogi, Abhishek Rao, Abu Awal Shoeb, Abubakar Abid, Adam Fisch, Adam R. Brown, Adam Santoro, Aditya Gupta, Adri Garriga-Alonso, et al. 2023. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models. Transactions on Machine Learning Re…
  34. Wang, Thomas, Adam Roberts, Daniel Hesslow, Teven Le Scao, Hyung Won Chung, Iz Beltagy, Julien Launay, and Colin Raffel. 2022. What language model architecture and pretraining objective works best for zero-shot generalization? find
  35. In International Conference on Machine Learning, pages 22964–22984. Wason, Peter Cathcart and Philip Nicholas Johnson-Laird. 1972. Psychology of Reasoning: Structure and Content. find
  36. Harvard University Press. Webson, Albert, Alyssa Loo, Qinan Yu, and Ellie Pavlick. 2023. Are language models worse than humans at following prompts? It’s complicated. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 7662–7686. https://doi.org/10.18653/v1 /2023.findings…
  37. Wei, Jason, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V. Le, Denny Zhou, et al. 2022b. find
  38. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824–24837. Wilcox, Ethan, Roger Levy, and Richard Futrell. 2019. Hierarchical representation in neural language models: Suppression and recovery of expectations. In Proceedi… find
  39. Wilcox, Ethan Gotlieb, Jon Gauthier, Jennifer Hu, Peng Qian, and Roger Levy. 2020. On the predictive power of neural language models for human real-time comprehension behavior. arXiv preprint arXiv:2006.01912. find
  40. Yarkoni, Tal. 2022. The generalizability crisis. Behavioral and Brain Sciences, 45:1–78. https://doi.org/10.1017/S0140525X21001758 Zhou, Denny, Nathanael Schärli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, Olivier Bousquet, Quoc Le, and Ed Chi. 2023. Least-to-most prompting en… ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/lampinen-2024-can-language-models-handle-recursively/