Lune

ACL Findings2026

IntentCoding: Amplifying User Intent in Code Generation

Zheng Fang, Yihong Dong, Lili Mou, Dongming Jin, Zhi Jin, Ge Li

摘要

Large Language Models (LLMs) have shown strong capabilities in code generation, but their adherence to fine-grained user intent with multiple constraints remains a significant challenge. Our empirical analysis reveals two key observations: 1) Model performance deteriorates quickly as the number of constraints in the user intent increases, and 2) While user intent does influence the model's logits, such an influence may not be strong enough to effectively steer the decoding process. To this end, we propose Intent-Amplified Code Generation (Intent ↑ Coding), a novel decoding strategy that enhances an LLM's ability to follow user intent. Intent ↑ Coding captures the influence of user intent by masking out the intent, and applies a multi-strength ensemble mechanism to amplify the effect of user intent during generation. Intent ↑ Coding is model-agnostic, requires no additional training, and integrates seamlessly with existing decoding procedures. To enable systematic evaluation, we also construct CodeConstraints, a benchmark dataset specifically designed to test user intent compliance under varying numbers of constraints. Experiments on our constructed CodeConstraints, as well as popular IFEvalCode, HumanEval and LiveCodeBench datasets, show that our Intent ↑ Coding model significantly improves both constraint satisfaction and functional correctness compared to standard decoding approaches. Intent ↑ Coding achieves up to 71.0% relative improvement on CodeConstraints, achieves up to 67.3% relative improvement on IFEvalCode and achieves up to 29.3% relative improvement in pass@1 on HumanEval and LiveCodeBench compared with greedy decoding.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis 引用了 The Curious Case of Neural Text Degeneration
  • Teaching Large Language Models to Self-Debug 引用了 CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper10

  1. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
  2. Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 次引用
  3. DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language ModelsYung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim 等ICLR 2024 · 354 次引用
  4. CodeGen: An Open Large Language Model for Code with Multi-Turn Program SynthesisErik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu 等ICLR 2023 · 234 次引用
  5. The Effect of Sampling Temperature on Problem Solving in Large Language ModelsMatthew RenzeEMNLP Findings 2024 · 212 次引用

相关 Paper

  1. CodeT5+: Open Code Large Language Models for Code Understanding and GenerationYue Wang, Hung Le, Akhilesh Gotmare, Nghi D. Q. Bui 等EMNLP 2023 · 339 次引用
  2. AdapTrack: Constrained Decoding without Distorting LLM's Output IntentYongmin Li, Jia Li, Ge Li, Zhi JinICSE 2026
  3. Towards Understanding the Characteristics of Code Generation Errors Made by Large Language ModelsZhijie Wang, Zijie Zhou, Da Song, Yuheng Huang 等ICSE 2025 · 12 次引用
  4. DOMAINEVAL: An Auto-Constructed Benchmark for Multi-Domain Code GenerationQiming Zhu, Jialun Cao, Yaojie Lu, Hongyu Lin 等AAAI 2025 · 25 次引用
  5. Oracle-Guided Program Selection from Large Language ModelsZhiyu Fan, Haifeng Ruan, Sergey Mechtaev, Abhik RoychoudhuryISSTA 2024 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖