Neurosymbolic Framework Lifts LLM Outputs to Compositional Grammar

Remo Pareschi· July 22, 2026 View original

Summary

This paper proposes a neurosymbolic framework that reconstructs Large Language Model (LLM) outputs into typed compositional derivations using Combinatory Categorial Grammar (CCG). This approach allows for principled, incremental, and auditable reconstruction, extending beyond natural language to formal languages and enabling two layers of checking for structural and content failures.

Researchers have introduced a neurosymbolic framework that bridges the gap between the fluent text generated by large language models (LLMs) and a more structured, compositional understanding of language. The core idea is to "lift" LLM outputs into typed compositional derivations using Combinatory Categorial Grammar (CCG). This framework posits that the prefix-driven, type-completing nature of autoregressive LLM generation aligns well with CCG's incremental processing model. This lifting mechanism provides a principled, incremental, and auditable way to reconstruct the grammatical structure of LLM outputs, even for formal languages like programming code or query languages. A key benefit is the introduction of two layers of checking: a compositional layer to detect structural errors and a content layer to verify the lifted structure against external knowledge, enabling early detection of hallucinations. This approach offers a new avenue for enhancing the reliability and interpretability of LLM-generated content.

Why it matters

Professionals developing or deploying LLMs can use this framework to improve the reliability, auditability, and interpretability of model outputs, reducing errors and hallucinations in both natural and formal language generation.

How to implement this in your domain

  1. 1Investigate the Combinatory Categorial Grammar (CCG) framework for structured language analysis.
  2. 2Explore integrating CCG-based parsers or reconstruction modules with LLM output pipelines.
  3. 3Develop a two-layer checking system: one for grammatical compositionality and another for factual consistency against external knowledge.
  4. 4Apply this neurosymbolic lifting to critical LLM applications, such as code generation or data query formulation, to enhance reliability.

Who benefits

Software DevelopmentAI EngineeringLegalTechFinTechContent Creation

Key takeaways

  • A new neurosymbolic framework uses CCG to provide compositional structure to LLM outputs.
  • This lifting enables principled, incremental, and auditable reconstruction of generated text.
  • The framework applies to both natural and formal languages, including programming code.
  • It supports two layers of checking to detect structural failures and hallucinated content early.

Original post by Remo Pareschi

"arXiv:2607.18961v1 Announce Type: new Abstract: Large language models (LLMs) generate fluent text by incrementally predicting the next token from a prefix. Critics in the generative tradition argue that such systems lack genuine grammar; influential replies from the dependency-gr…"

View on X

Originally posted by Remo Pareschi on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses