Skip to content

EMNLP papers

Search EMNLP papers by title, author, or track. Open a paper’s abstract to read more.

Explore the EMNLP analysis

Search results

3,681–3,700 of 4,478

  • EMNLP · Findings

    LogitsCoder: Towards Efficient Chain-of-Thought Path Search via Logits Preference Decoding for Code Generation

    Jizheng Chen, Weiming Zhang, Xinyi Dai, Lingyue Fu, Weiwen Liu, Kounianhua Du, Qingyao Li, Yong Yu, Weinan Zhang

    Abstract

    Code generation requires executable reasoning, making test-time chain-of-thought (CoT) search an attractive strategy for improving solution quality. However, existing CoT scaling methods often face a tension between underthinking, where shallow reasoning misses important algorithmic cases, and overthinking, where verbose or redundant reasoning consumes substantial tokens without improving correctness. We propose LogitsCoder, a lightweight framework that revisits CoT search from the perspective of logits-level control. LogitsCoder improves efficient reasoning search through two complementary mechanisms: Logits Preference Decoding adaptively calibrates local token expansion using public-test feedback, while Logits Rank Based Path Selection explores and selects compact high-confidence reasoning trajectories based on logit-level stability. Together with Thoughts Aggregation, LogitsCoder refines reasoning paths without relying on costly MCTS-style tree expansion. Extensive experiments demonstrate that LogitsCoder produces more efficient and higher-quality reasoning chains, leading to superior code generation performance compared to baseline methods.

    Abstract source
  • EMNLP · Findings

    GRAIN: Bridging Name and Narrative Shifts in Real-World Graph Reasoning through Invariance-Rewarded Agentic RL

    Zike Yuan, Han Zhang, Jianzhi Yan, Le Liu, Cai Ke, Huozhi Zhou, Jian Xie, Jaron Yin, Yukun Cao, Yue Yu, Hui Wang, Ming Liu, Bing Qin

    Abstract

    Despite their potential in standardized graph tasks, Large Language Models (LLMs) remain brittle to real-world shifts in node identifiers and task formulation. While deterministic graph tools are invariant to such shifts, extracting topological structures from noisy text is highly fragile for LLMs, which often overfit to surface patterns. Moreover, mitigating these parsing failures via multi-agent systems incurs prohibitive latency. To address this, we propose GRAIN, a single-agent framework optimized via reinforcement learning. GRAIN models reasoning as a semantic parsing and tool-execution pipeline, guided by a Structure Invariance Reward. By validating extracted intermediate graphs against ground-truth topologies, this reward forces the LLM to learn robust text-to-structure mappings rather than memorizing linguistic artifacts. We also introduce GRIT, a benchmark evaluating sensitivity to such linguistic shifts. GRAIN outperforms multi-agent baselines by 16.45% in accuracy with approximately 24% lower latency. Furthermore, it demonstrates superior structural generalization, halving the out-of-distribution (OOD) gap of SFT models (from 15.77% to 7.80%) and maintaining robustness on large-scale graphs beyond the training distribution.

    Abstract source
  • EMNLP · Findings

    Interpretable Oracle Bone Script Decipherment via Progressive Glyph Analysis with LVLMs

    Kaixin Peng, Mengyang Zhao, Haiyang Yu, Teng Fu, Bin Li

    Abstract

    Deciphering scanned Oracle Bone Script (OBS) images into corresponding modern Chinese characters is a crucial step in AI-assisted OBS decipherment. As a highly pictographic writing system, OBS often embeds semantic information in glyph forms, making its decipherment depend on more than visual similarity alone. However, how to effectively exploit such glyph-meaning cues and how to make the decipherment process interpretable remain challenging. To this end, we propose an LVLM-based framework that bridges glyphs and meanings through structured glyph analysis. Specifically, we introduce a progressive training strategy that guides the model from radical analysis to pictographic analysis and finally to mutual analysis, enabling it to capture semantic information embedded in OBS glyphs. The generated textual analyses serve as both interpretable reasoning traces and explicit evidence for retrieving corresponding modern Chinese characters from a dictionary. We also construct the Pictographic Decipherment OBS Dataset (PD-OBS), which provides detailed radical and pictographic analyses to support glyph-analysis learning and dictionary-based retrieval. Experiments on OBS benchmarks demonstrate the strong zero-shot capability of our method, especially its substantially improved Top-10 accuracy on unseen OBS, highlighting its ability to provide reliable and interpretable candidate references for AI-assisted archaeological and historical studies. The code and dataset will be released at https://github.com/PKXX1943/PD-OBS.

    Abstract source
  • EMNLP · Findings

    NUM2EVENT: Structured Event Inference from Numerical Time-Series

    Ninghui Feng, Songning Lai, Xinan Chen, Zheng Chu, Yiyan Qi

    Abstract

    Large language models (LLMs) have shown strong multimodal reasoning abilities, yet their understanding of purely numerical time-series remains limited. Existing approaches mainly focus on forecasting or trend description, providing little insight into the underlying events that have occurred or are unfolding within observed numerical dynamics. We study number-to-event reasoning and decoding, a task that infers interpretable and structured event hypotheses directly from numerical time-series when explicit event information is unavailable at inference time. The task focuses on aligned and plausible event semantics that help explain observed numerical dynamics. To address data scarcity and semantic alignment challenges, we propose a reasoning-aware framework that combines an agent-guided event extractor, a Hawkes-process-based synthetic data generator, and a multi-stage fine-tuning pipeline integrating a time-series encoder with a structured event decoder. The model generates intermediate reasoning steps and outputs constrained event representations. Experiments across multiple real-world domains show that our approach consistently outperforms strong LLM baselines in event-level precision and recall, demonstrating its effectiveness in bridging numerical reasoning and semantic event understanding. The code is available at https://github.com/feng1201/NUM2EVENT_IDEA

    Abstract source
  • EMNLP · Findings

    CQA-Eval: Designing Reliable Evaluations of Multi-paragraph Clinical QA under Resource Constraints

    Federica Bologna, Tiffany Pan, Matthew Wilkens, Yue Guo, Lucy Lu Wang

    Abstract

    Evaluating multi-paragraph clinical question answering (QA) systems is resource-intensive and challenging: accurate judgments require medical expertise and achieving consistent human judgments over multi-paragraph text is difficult. We introduce CQA-Eval, an evaluation framework and set of evaluation recommendations for limited-resource and high-expertise settings. Based on physician annotations of 300 real patient questions answered by physicians and LLMs, we compare coarse answer-level versus fine-grained sentence-level evaluation over the dimensions of correctness, relevance, and risk disclosure. We find that inter-annotator agreement (IAA) varies by dimension: fine-grained annotation improves agreement on correctness, coarse improves agreement on relevance, and judgments on communicates-risks remain inconsistent. Additionally, annotating only a small subset of sentences can provide reliability comparable to coarse annotations, reducing cost and effort. Data and code available at https://github.com/federicabologna/cqa-eval under a CC-BY license.

    Abstract source
  • EMNLP · Findings

    When AI-Text Detectors Become Evidence: Rethinking Detection for Human Decisions

    Jiatao Li, Mao Ye, Xinyu Hu, Cheng Peng, Xunjian Yin, Xiaojun Wan

    Abstract

    AI-generated-text detectors are evaluated as classifiers, yet consequential deployments use detector outputs as evidence that people inspect, trust, contest, or use to escalate decisions. We call this mismatch the classification–evidence gap. The gap makes scalar detector scores a weak deployment interface: they hide the basis of a judgment, invite overtrust, and can turn false positives into accusations. We argue that AI-text detection should be evaluated as evidence-grounded decision support rather than as authorship proof. We introduce AGENT-XTrust, a guideline-expert detector that returns direct MetaAgent labels without target-domain scalar-cutoff calibration and converts each document-level judgment into inspectable evidence records containing local labels, rationales, confidence estimates, and linked spans. Across three domains and four generators, AGENT-XTrust preserves strong binary accuracy while producing inspectable, contestable evidence. In a controlled fixed-stimulus user study, participants assigned to the full AGENT-XTrust system-and-interface package achieved 19.8 and 11.3 points higher decision accuracy than those assigned to the score-only and score-plus-explanation packages, respectively; overtrust on each condition’s detector-wrong cases was 17.8 and 18.3 points lower. These results suggest a broader evaluation target for AI-text detection: not only whether a detector is correct, but whether complete detector-and-evidence packages support reliable human decisions under uncertainty.

    Abstract source
  • EMNLP · Findings

    SALUTE: Benchmarking and Adapting LLMs for the Defense Domain

    Hyeongcheol Park, Sumin In, Suyeon Myeong, Hogun Park, Sangmin Kim, Moonhyun Lee, Daekyeong Park, Sangpil Kim

    Abstract

    Defense is a knowledge-intensive domain that requires precise understanding of specialized terminology, doctrinal concepts, operational procedures, and evolving military events. Although recent work has explored language technologies for military applications, existing efforts remain fragmented: they are often task-specific, rely on limited adaptation pipelines, or lack comprehensive defense-domain evaluation. In this paper, we present **SALUTE**, an end-to-end framework for benchmarking and adapting LLMs for the defense domain. SALUTE integrates Salute-Corpus, a curated corpus from open-access U.S. military doctrine and government documents; Salute-Conv, a grounded instruction dataset from doctrinal sources and decade-long defense news; Salute-Pref, a defense-aware preference dataset; and Salute-Bench, a rigorously filtered benchmark for evaluating defense-domain understanding and reasoning over doctrine and defense news. Based on these resources, we train Salute-LLM through multi-stage post-training with continual pretraining, supervised fine-tuning, and preference alignment. Extensive experiments show that Salute-LLM achieves strong defense-domain performance while retaining competitive general capabilities, demonstrating the effectiveness of SALUTE as an end-to-end framework for defense-domain LLM adaptation.

    Abstract source
  • EMNLP · Findings

    Agentic Open-Domain Tabular Question Answering with Self-Supervised Multi-Table Retriever

    Jianwei Wang, Mengqi Wang, Qing Liu, Xiwei Xu, Zhenchang Xing, Liming Zhu, Wenjie Zhang

    Abstract

    Open-domain tabular question answering (TQA) aims to answer natural language queries over a data lake that contains a large corpus of heterogeneous tables. Unlike closed-domain TQA, this task operates without pre-provided tables, making it particularly challenging. Existing methods usually first retrieve relevant tables and then answer the question based on the retrieved tables. However, it faces challenges in effectively and efficiently preparing tables from the low-quality, heterogeneous data lake and in operationalizing table information. To address these limitations, we present ArrTab (Agentic retrieval and reasoning on Tables) for open-domain TQA. ArrTab leverages MuRe, a self-supervised Multi-table Retriever trained on questions synthesized by translating table-derived SQL queries into natural language via large language models. Based on MuRe, ArrTab proposes a multi-agent system for open-domain TQA that consists of the Table Retriever Agent, the Table Integration Agent, the Information Extraction Agent and the Answer Agent. Furthermore, to enhance accuracy, a lazy execution strategy is adopted where operations are described in natural language but executed only during the information extraction stage, allowing for globally consistent reasoning. Extensive experiments on real-world datasets demonstrate the superiority of ArrTab.

    Abstract source
  • EMNLP · Findings

    NGDBench: Towards Neural Graph Data Management

    LI Yufei, Yisen Gao, Jiaxuan Xiong, Jiaxin Bai, Shijie Zhong, Haoyu Huang, Zhongwei Xie, Hong Ting Tsang, Yangqiu Song

    Abstract

    Data critical to real-world decision-making is increasingly found within organizations. Such data is heterogeneous, constantly evolving, and only imperfectly captured. However, current data management systems remain largely passive, retrieving what is explicitly stored while offering limited support for uncovering implicit structure or reasoning under noise, incompleteness, and continuous updates. We argue that next-generation data management requires neural capabilities, which can uncover complex latent relationships, distinguish reliable signals from noise, and remain consistent as the underlying data state evolves. To support this direction, we introduce NGDBench, a benchmark across five domains that unifies structured and unstructured sources. NGDBench adopts a graph view because graphs provide a flexible abstraction for modeling complex systems, capturing latent relationships, and subsuming structured formats such as relational tables. Each instance pairs a clean latent graph with a realistically perturbed observed graph. NGDBench supports full Cypher queries and dynamic data management operations. Evaluations of state-of-the-art Text-to-Cypher by LLMs and GraphRAG pipelines reveal that current methods remain sensitive to noise and struggle with dynamic state tracking, highlighting the need for resilient, inference-capable data management. Our code is available at https://github.com/HKUST-KnowComp/NGDBench.

    Abstract source
  • EMNLP · Findings

    Asuka-Bench: Benchmarking Code Agents on Underspecified User Intent and Multi-Round Refinement

    Xin Wang, Liangtai Sun, Yaoming Zhu, Shuang Zhou, Jiaxing Liu, FengJiao Chen, Lin Qiu, Xuezhi Cao, Xunliang Cai, Licheng Zhang, Zhendong Mao

    Abstract

    Existing code-generation benchmarks score a single mapping from a complete prompt to a one-shot output. However, real web development is different. Users seldom write a full spec at the start; many requirements only become clear once they look at an intermediate result and react to it. We present Asuka-Bench, a benchmark that pairs underspecified user intent with multi-round refinement, grounded in browser-rendered behavior. Each task is resolved through a closed loop: a Code Agent generates a web project, a UI Agent executes test cases on the deployed site, and a User LLM turns evaluation outcomes into natural-language feedback for the next round. The benchmark comprises 50 web tasks with 784 evaluation criteria and 2402 expected outcomes. We benchmark 8 LLMs across 2 agent frameworks. The results separate models clearly: weighted Task Pass Rate varies by 38 percentage points and models also differ substantially in their ability to repair from feedback. Asuka-Bench is also far from saturated: even the strongest model completes only 52% of projects after three rounds.

    Abstract source
  • EMNLP · Findings

    All Claims Are Equal, but Some Claims Are More Equal Than Others: Importance-Sensitive Factuality Evaluation of LLM Generations

    Miriam Wanner, Leif Azzopardi, Paul Thomas, Soham Dan, Benjamin Van Durme, Nick Craswell

    Abstract

    Existing methods for evaluating the factuality of large language model (LLM) responses treat all claims as equally important. This results in misleading evaluations when vital information is missing or incorrect as it receives the same weight as peripheral details, raising the question: how can we reliably detect such differences when there are errors in key information? Current approaches that measure factuality tend to be insensitive to omitted or false key information. To investigate this lack of sensitivity, we construct VITALERRORS, a benchmark of 6,733 queries with minimally altered LLM responses designed to omit or falsify key information. Using this dataset, we demonstrate the insensitivities of existing evaluation metrics to key information errors. To address this gap, we introduce VITAL, a set of metrics that provide greater sensitivity in measuring the factuality of responses by incorporating the relevance and importance of claims with respect to the query. Our analysis demonstrates that VITAL metrics more reliably detect errors in key information than previous methods. Our dataset, metrics, and analysis provide a foundation for more accurate and robust assessment of LLM factuality.

    Abstract source
  • EMNLP · Findings

    “Not in My Backyard”: LLMs Uncover Online and Offline Social Biases Against Homelessness

    Jonathan A. Karr Jr., Benjamin F. Herbst, Xueyun Li, Matthew L Sisk, Ting Hua, Matthew Hauenstein, Georgina Curto, Nitesh V. Chawla

    Abstract

    Homelessness is a persistent social challenge, impacting millions worldwide. Over 876,000 people experiencing homelessness (PEH) were recorded in the U.S. in 2025. Social bias is a significant barrier to alleviating homelessness, shaping public perception and influencing policymaking. Because online textual media and offline city council discourse both reflect and influence public opinion, they provide valuable signals for identifying and tracking social biases against PEH. We release the first multi-domain PEH bias corpus with a 16-category multi-label taxonomy: a 1,698-item stratified gold-standard set annotated by partner-trained raters, plus 48,389 GPT-4.1-labeled texts, drawn from Reddit, X (formerly Twitter), news, and council meeting transcripts across ten U.S. cities (2015-2025). We benchmark six prompted LLMs on the gold-standard set and complement F1 with prevalence-gap audits. Moderate F1 coexists with large miscalibration: every model over-tags "not in my backyard" (NIMBY) (+11.5 pp) and under-detects factual claims (-30.5 pp). Error analysis on consensus false positives reveals that models treat housing vocabulary and question form as opposition proxies, producing NIMBY false positives on pro-service text. The corpus and audit protocol support municipal PEH stigma monitoring without treating teacher labels as ground truth.

    Abstract source
  • EMNLP · Findings

    ATC-Bench: A Simulation-Grounded Benchmark for Evaluating LLM-Generated Air Traffic Control Instructions

    Jinjun Cai, Jiaxing Li, Xingyue Wang, Weihuang Zheng, Youyong Kong, Hui Ding

    Abstract

    Air traffic control (ATC) requires structured, safety-critical decision making whose effects unfold through aircraft trajectories, so text-level correctness alone is insufficient for evaluating large language models (LLMs) in this domain. We introduce ATC-Bench, a simulation-grounded benchmark for ATC instruction generation with Chinese-facing scenario descriptions and controller-style instruction fields. Given a structured Chinese traffic situation, a model generates a JSON control plan that is translated into BlueSky commands and evaluated through closed-loop simulation against separation, no-fly-zone (NFZ) avoidance, and route-recovery constraints. The benchmark spans four task families that form a controlled complexity gradient: single-aircraft NFZ avoidance, pairwise conflict resolution, joint conflict-airspace constraints, and multi-aircraft conflict graphs. Experiments with 11 representative LLM endpoints show that while most models produce format-valid instructions, task success varies widely across models and task families: the highest-scoring endpoint under our fixed protocol achieves 63.5% macro-average task success rate (TSR), while the two lowest endpoints fall below 25%, with the largest gaps appearing under joint constraints and multi-aircraft coordination. These results expose a persistent execution gap between static validity and simulation-passing behavior, motivating simulation-in-the-loop evaluation for LLM-based decision making in safety-critical aviation settings.

    Abstract source
  • EMNLP · Findings

    OpenSkillEval: Automatically Auditing the Open Skill Ecosystem for LLM Agents

    Jiahao Ying, Boxian Ai, Wei Tang, Siyuan Liu, Yixin Cao

    Abstract

    Skills are increasingly used to improve LLM agents on real-world tasks, yet it remains unclear how agents use skills, how skill quality should be evaluated, and how users should choose skills under cost-performance trade-offs. We present OpenSkillEval, an automatic framework for evaluating both skill-augmented agents and skills. OpenSkillEval dynamically constructs test cases from evolving real-world artifacts across five applications: presentation generation, front-end web design, poster generation, data visualization, and report generation. It also curates community skills for controlled comparison under unified settings. Using over 600 generated tasks and 30 open-source skills, we evaluate state-of-the-art models and agent frameworks. Results show that skill availability does not guarantee effective use, skill benefits depend strongly on the model and framework, and many popular skills fail to consistently outperform skill-free agents. These findings highlight the need for dynamic, task-grounded evaluation and offer practical guidance for skill design, selection, and deployment.

    Abstract source
  • EMNLP · Findings

    Why LLMs Give In: Conversational Factors and Reasoning Behind Medical Sycophancy

    Kaike Ping, Buse Çarık, Caleb Wohn, Xiaohan Ding, Tongshuai Wang, Eugenia Rho

    Abstract

    Large language models can answer a medical question correctly and still abandon that answer when a user pushes back. We study this failure as medical sycophancy and ask when models are most likely to give in. Across five open-weight models, 500 MEDQUAD questions, and 1.2 million trials, we use a fully crossed design over four conversational factors: user role, user evidence, interaction structure, and grounding. Medical sycophancy is nearly three times more common when users challenge an answer the model has already given than when the false claim appears in the initial query. Models are also more susceptible to users presented as physicians or medical students. Most strikingly, fabricated evidence has opposite effects across interaction structures. It increases sycophancy in single-turn interactions but reduces it after the model has already answered. Grounding helps, but does not eliminate the behavior. Sycophancy varies more across medical questions than across models, making question selection an important part of benchmark design. Reasoning traces suggest that multi-turn failures are associated with models turning back toward their own prior answer, while fabricated evidence receives more scrutiny after an initial response. Together, the results show that medical sycophancy depends as much on how a model is challenged and evaluated as on which model is tested.

    Abstract source
  • EMNLP · Findings

    Communicating Chess Strategies in Natural Language

    Langyuan Cui, Chun Kai Ling, Hwee Tou Ng

    Abstract

    Chess engines have long achieved superhuman playing strength. However, the underlying strategy behind their move suggestions is difficult for human players, even skilled ones, to comprehend. Motivated by this, we propose the task of chess *strategy verbalization*, which is to describe chess strategies in natural language. We design (i) a pipeline for verbalizing strategies and (ii) an evaluation framework for objective evaluation of generated strategy descriptions. Our experiments show that natural language is a promising and interpretable medium for communicating strategic information to both human and LLM players. We glean additional interesting insights, including (a) the importance of evaluating strategies beyond the main line, (b) the limitations of pure concept-based descriptions, and (c) the limitations of relying on LLMs rather than humans for evaluation.

    Abstract source
  • EMNLP · Findings

    Plan the Semantics, Then Render the Signal: A Hybrid State-Space Model for Incomplete Multimodal Learning

    Ruiting Dai, Zhihao Qin, Yilin Chen, Xianhua Yan, Lisi Mo, Tao He

    Abstract

    Incomplete multimodal learning seeks robust perception when modalities are absent at training or test time, using available streams to recover the missing ones. Most methods cast this as direct regression in a fixed continuous latent, which (i) collapses many valid solutions into an averaged reconstruction when observations underdetermine the target, and (ii) suffers semantic drift when cross-modal relationships shift with context. We argue that completion should first resolve what is missing and only then render how it appears. We realize this as Semantic-first Completion, instantiated by a Hybrid State-Space Model (HySSM) that decouples semantic intent from signal realization. A frozen omni-modal LLM plans over observation-only evidence, generating an evidence-grounded Markovian trajectory of discrete semantic states that act as a compact information bottleneck for stable cross-modal reasoning. The plan is projected into a coordinate-wise control field that drift-guides a conditional diffusion model, synthesizing missing signals or feature streams as diverse and semantically consistent completions. Across MNIST, Hateful Memes, and CMU-MOSEI, HySSM surpasses recent generative baselines and, under agnostic masking shift, remains robust up to 90% missingness.

    Abstract source
  • EMNLP · Findings

    Learning Structured Emotional Dynamics in Latent Space via Trajectory Modeling and Controlled Transitions

    Agampreet Saini, Bayan Abusalameh, Rahul Kumar Singh, Erik Cambria

    Abstract

    Emotion understanding from text has been predominantly approached through discrete classification frameworks. However, complementary perspectives in psychology and neuroscience suggest that affective states may also exhibit continuous, context-dependent, and temporally structured properties. Building on this perspective, we investigate emotion representations as latent dynamical trajectories within transformer embedding spaces. Using GoEmotions and MELD across four transformer architectures, we analyze the geometric organization and temporal evolution of learned emotional states. We find that latent trajectories exhibit temporal persistence and structured transition dynamics, while the prediction error increases during emotion shifts, acting as a signal of expectation violation. We additionally introduce trajectory-level latent interventions enabling controllable emotional transitions through directional operations in representation space. Finally, manifold capacity analysis reveals partially aligned and variably separable emotional manifolds, suggesting shared geometric organization across affective representations.

    Abstract source
  • EMNLP · Findings

    Skill-Guided Continuation Distillation for GUI Agents

    Zhimin Fan, Hongwei Yu, Yeqing Shen, Haolong Yan, Guozhen Peng, Tianhao Peng, Yudong Zhang, Xiaowen Zhang, Kaijun Tan, Zheng Ge, Xiangyu Zhang, Daxin Jiang

    Abstract

    Improving GUI agents typically relies on behavior cloning on expert trajectories. However, as the current policy deviates from the expert policy, it inevitably encounters policy-induced off-trajectory states during closed-loop execution, i.e., states that fall outside the expert trajectories. Since expert trajectories provide no demonstrations for these unseen states, such states receive no effective supervision, leaving the policy unable to select the correct action. To close this supervision gap, we propose Skill-Guided Continuation Distillation (SGCD), an iterative self-improvement framework. SGCD first runs the plain policy without skill guidance for a few steps to reach realistic off-trajectory states. From these states, a skill-guided policy then completes the task and produces successful continuations, which are mixed with expert trajectories to supply supervision over policy-induced off-trajectory states. The skills are extracted from both successful and failed rollouts, consisting of Continuation Plans, Critical Targets, Failure Traps, and Success Criteria. On OSWorld-Verified, SGCD improves the success rate of three base models from the low-30% range to over 50%, demonstrating its effectiveness and generality.

    Abstract source
  • EMNLP · Findings

    SLMFix: Leveraging Small Language Models for Domain Specific Language Error Fixing with Reinforcement Learning

    David Jiahao Fu, Aryan Gupta, Aaron Councilman, Yu-Xiong Wang, Vikram S. Adve

    Abstract

    Large language models (LLMs) have shown impressive capabilities in code generation across many programming languages but even state-of-the-art LLMs generate programs that contain syntactic errors and fail to complete the given tasks, especially for low-resource programming languages (LRPLs). In addition, the high cost of training makes finetuning LLMs unaffordable for those with constrained computational resources, further weakening the effectiveness of LLMs for code generation. In this work, we propose SLMFix, a novel code generation pipeline that leverages a small language model (SLM) finetuned using reinforcement learning (RL) techniques to fix syntactic errors in LLM-generated programs for domain-specific languages (DSLs) based on interpreter feedback. Our experimental results demonstrate the effectiveness and generalizability of our approach across multiple DSLs, improving the validator pass rates by 40% on LRPLs and eliminating more than 50% of syntactic errors for high-resource DSLs. Notably, SLMFix brings substantial performance improvement to the base model and outperforms supervised finetuning approach even for 7B models on LRPLs including Ansible and Lean, showing the potential of our approach in improving the quality of LLM-generated programs.

    Abstract source