English
Related papers

Related papers: Grammar-Aligned Decoding

200 papers

Constrained decoding, a technique for enforcing constraints on language model outputs, offers a way to control text generation without retraining or architectural modifications. Its application is, however, typically restricted to models…

Computation and Language · Computer Science 2024-07-23 Saibo Geng , Berkay Döner , Chris Wendler , Martin Josifoski , Robert West

With the widespread application of Large Language Models (LLMs), it has become a significant concern to ensure their safety and prevent harmful responses. While current safe-alignment methods based on instruction fine-tuning and…

Computation and Language · Computer Science 2025-12-16 Xiaoyun Zhang , Zhengyue Zhao , Wenxuan Shi , Kaidi Xu , Di Huang , Xing Hu

Large language models~(LLMs) exhibit exceptional performance in language tasks, yet their auto-regressive inference is limited due to high computational requirements and is sub-optimal due to the exposure bias. Inspired by speculative…

Computation and Language · Computer Science 2024-03-14 Hongyi Yuan , Keming Lu , Fei Huang , Zheng Yuan , Chang Zhou

Large pre-trained language models (PLMs) have shown remarkable performance across various natural language understanding (NLU) tasks, particularly in low-resource settings. Nevertheless, their potential in Automatic Speech Recognition (ASR)…

Computation and Language · Computer Science 2023-06-13 Aravind Krishnan , Jesujoba Alabi , Dietrich Klakow

We present and evaluate a method called grammar masking, which is used to guide large language models (LLMs) toward producing syntactically correct models for a given context-free grammar. Prompt engineering methods such as few-shot…

Computation and Language · Computer Science 2024-07-10 Lukas Netz , Jan Reimer , Bernhard Rumpe

Language model-based code generation and completion tools have been widely adopted, but they may sometimes produce code that does not meet necessary constraints, such as syntactic correctness or API existence. Constrained decoding…

Software Engineering · Computer Science 2025-10-21 Yongmin Li , Jia Li , Ge Li , Zhi Jin

Large language models (LLMs) often suffer from hallucinations due to error accumulation in autoregressive decoding, where suboptimal early token choices misguide subsequent generation. Although multi-path decoding can improve robustness by…

Computation and Language · Computer Science 2026-05-21 Tianyu Zheng , Hong Wu , Jiaji Zhong

We study grammar-constrained decoding (GCD) as a coupling between an autoregressive next-token distribution and a reachability oracle over a pushdown system compiled from a context-free grammar (CFG). We prove an oracle invariance theorem:…

Computation and Language · Computer Science 2026-03-09 Faruk Alpay , Bilge Senturk

Language Models (LMs) are increasingly used in applications where generated outputs must satisfy strict semantic or syntactic constraints. Existing approaches to constrained generation fall along a spectrum: greedy constrained decoding…

Artificial Intelligence · Computer Science 2025-10-03 Paweł Parys , Sairam Vaidya , Taylor Berg-Kirkpatrick , Loris D'Antoni

Decoding from large language models (LLMs) typically relies on fixed sampling hyperparameters (e.g., temperature, top-p), despite substantial variation in task difficulty and uncertainty across prompts and individual decoding steps. We…

Machine Learning · Computer Science 2026-03-17 Chloe H. Su , Zhe Ye , Samuel Tenka , Aidan Yang , Soonho Kong , Udaya Ghai

Stochastic gradient-based descent (SGD), have long been central to training large language models (LLMs). However, their effectiveness is increasingly being questioned, particularly in large-scale applications where empirical evidence…

Machine Learning · Computer Science 2025-07-03 Di Zhang , Yihang Zhang

Large Language Models (LLMs) have demonstrated great promise in generating code, especially when used inside an evolutionary computation framework to iteratively optimize the generated algorithms. However, in some cases they fail to…

Neural and Evolutionary Computing · Computer Science 2025-03-24 Niki van Stein , Anna V. Kononova , Lars Kotthoff , Thomas Bäck

The code generation capabilities of Large Language Models (LLMs) have transformed the field of software development. However, this advancement also presents significant security challenges, as LLM-generated code often contains…

Cryptography and Security · Computer Science 2025-10-14 Rupam Patir , Keyan Guo , Haipeng Cai , Hongxin Hu

Large language models (LLMs) are often equipped with multi-sample decoding strategies. An LLM implicitly defines an arithmetic code book, facilitating efficient and embarrassingly parallelizable \textbf{arithmetic sampling} to produce…

Artificial Intelligence · Computer Science 2025-04-29 Aditya Parashar , Aditya Vikram Singh , Avinash Amballa , Jinlin Lai , Benjamin Rozonoyer

Instruction tuning has emerged as the key in aligning large language models (LLMs) with specific task instructions, thereby mitigating the discrepancy between the next-token prediction objective and users' actual goals. To reduce the labor…

Computation and Language · Computer Science 2024-04-10 Zifeng Wang , Chun-Liang Li , Vincent Perot , Long T. Le , Jin Miao , Zizhao Zhang , Chen-Yu Lee , Tomas Pfister

In real-world applications of large language models, outputs are often required to be confined: selecting items from predefined product or document sets, generating phrases that comply with safety standards, or conforming to specialized…

Computation and Language · Computer Science 2025-04-15 Haotian Ye , Himanshu Jain , Chong You , Ananda Theertha Suresh , Haowei Lin , James Zou , Felix Yu

To ensure that text generated by large language models (LLMs) is in an expected format, constrained decoding proposes to enforce strict formal language constraints during generation. However, as we show in this work, not only do such…

Machine Learning · Computer Science 2024-03-13 Luca Beurer-Kellner , Marc Fischer , Martin Vechev

Advancements in natural language generation (NLG) and large language models (LLMs) have led to proficient text generation in various tasks. However, integrating intricate constraints into neural text generation, due to LLMs' opacity,…

Computation and Language · Computer Science 2024-03-22 Xiang Chen , Xiaojun Wan

Alignment with high-resource standard languages is often assumed to aid the modeling of related low-resource varieties. We challenge this assumption by demonstrating that excessive representational entanglement with a dominant variety, such…

Computation and Language · Computer Science 2025-08-19 Ahmed Elshabrawy , Hour Kaing , Haiyue Song , Alham Fikri Aji , Hideki Tanaka , Masao Utiyama , Raj Dabre

Large Language Models (LLMs) are increasingly being used for interactive decision-making tasks requiring planning and adapting to the environment. Recent works employ LLMs-as-agents in broadly two ways: iteratively determining the next…

Artificial Intelligence · Computer Science 2024-04-10 Archiki Prasad , Alexander Koller , Mareike Hartmann , Peter Clark , Ashish Sabharwal , Mohit Bansal , Tushar Khot