When Structure Is Hidden: Measuring and Diagnosing the Compositional Gap in LLMs

Shravani Hariprasad, Mohsin Ali Mohammed, Vinija Jain, Aman Chadha


Abstract
Large language models often recover the local pieces of a problem yet still fail to assemble them into a correct global solution. We study this compositionality gap in settings where the underlying structure is implicit and must be inferred from the input, using a two-pass framework that first verifies piece-level understanding and then measures composition on the same example via P(composed wrong | all pieces correct). We evaluate task formulations in five domains (contracts, math, SQL, code, and logic) and four model families; across the gold-anchored domains, larger conditional gaps are associated with settings where relevant structure is less directly exposed. A controlled intervention with correct and incorrect structural hints indicates heterogeneous bottlenecks: hints substantially reduce the gap in contracts and SQL, have no aggregate effect in math, and have no reliable effect in logic. Structure-aware prompting does not repair the gap and often harms smaller models. We conclude that composition failure is not a single phenomenon, and that diagnosing the dominant bottleneck in each task is the practical output of our framework
Anthology ID:
2026.emnlp-main.1792
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
40834–40849
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1792/
DOI:
Bibkey:
Cite (ACL):
Shravani Hariprasad, Mohsin Ali Mohammed, Vinija Jain, and Aman Chadha. 2026. When Structure Is Hidden: Measuring and Diagnosing the Compositional Gap in LLMs. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 40834–40849, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
When Structure Is Hidden: Measuring and Diagnosing the Compositional Gap in LLMs (Hariprasad et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1792.pdf