Ensuring both syntactic and semantic correctness in Large Language Model (LLM) outputs remains a significant challenge, despite being critical for real-world deployment. In this paper, we introduce $\texttt{SEM-CTRL}$, a unified approach that allows for enforcing rich context-sensitive constraints, and task and instance specific semantics directly on the LLM decoder. Our approach integrates token-level MCTS which is guided by specific syntactic and semantic constraints. The constraints over desired outputs are expressed using Answer Set Grammars, which is a logic-based formalism that generalizes context sensitive grammars while incorporating background knowledge to represent task-specific semantics. We show that our approach helps guarantee valid completions for any off-the-shelf LLM without the need for fine-tuning. We evaluate $\texttt{SEM-CTRL}$ on a range of tasks, including synthetic grammar synthesis, combinatorial reasoning, JSON parsing, and planning. Our experimental results demonstrate that $\texttt{SEM-CTRL}$ allows even small pre-trained LLMs to efficiently outperform larger variants and state-of-the-art reasoning models (e.g., $\textit{o4-mini}$) while simultaneously guaranteeing semantic validity.
Legal Judgment Reimagined: PredEx and the Rise of Intelligent AI Interpretation in Indian Courts
Symbiosis Law School(symbiosis 法学院);IISER Kolkata(印度科学教育与研究学院加尔各答分校);Indian Institute of Technology Kanpur(坎普尔印度理工学院);Manipal University Jaipur(斋浦尔马尼帕尔大学)
Improving Robustness of Tabular Retrieval via Representational Stability
Department of Computer Science Rensselaer Polytechnic Institute(罗切斯特理工学院计算机科学系);Department of Computer Science Arizona State University(亚利桑那州立大学计算机科学系);ScaleAI
Why So Down? The Role of Negative (and Positive) Pointwise Mutual Information in Distributional Semantics
Institute of Informatics, Federal University of Rio Grande do Sul(南里奥格兰德联邦大学信息学研究所);School of Computer Science and Electronic Engineering, University of Essex(埃塞克斯大学计算机科学与电子工程学院)