paper-with-me

홈 › Papers

Benchmarking Correctness and Security in Multi-Turn Code Generation

2025-10-13 · Ruchit Rawal, Jeffrey Yang Fan Chiang, Chihao Shen, Jeffery Siyuan Tian, Aastha Mahajan, Tom Goldstein, Yizheng Chen arxiv

AI coding assistants powered by large language models (LLMs) have transformed software development, significantly boosting productivity. While existing benchmarks evaluate the correctness and security of LLM-generated code, they are typically limited to single-turn tasks that do not reflect the iterative nature of real-world development. We introduce MT-Sec, the first benchmark to systematically evaluate both correctness and security in multi-turn coding scenarios. We construct this using a synthetic data pipeline that transforms existing single-turn tasks into semantically aligned multi-turn interaction sequences, allowing reuse of original test suites while modeling the complexity of real-world coding processes. We evaluate 32 open- and closed-source models, and three agent-scaffolding on MT-Sec and observe a consistent 20-27% drop in "correct and secure" outputs from single-turn to multi-turn settings -- even among state-of-the-art models. Beyond full-program generation, we also evaluate models on multi-turn code-diff generation -- an unexplored yet practically relevant setting -- and find that models perform worse here, with increased rates of functionally incorrect and insecure outputs. Finally, we find that while agent scaffoldings boost single-turn code generation performance, they are not quite as effective in multi-turn evaluations. Together, these findings highlight the need for benchmarks that jointly evaluate correctness and security in multi-turn, real-world coding workflows.

📄 PDF Abstract BibTeX arXiv:2510.13859

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Similar Papers 제목 키워드 기반

DualGauge: Automated Joint Security-Functionality Benchmarking of Specification-Only Code Generation by LLMs and Coding Agents

2025-11-24 · Rupam Patir, Keyan Guo, Suvadra Barua, Abhijeet Pathak 외 arxiv

Large language models (LLMs) and LLM-based coding agents are now used to generate code from natural-language specifications, yet ensuring such code is both functionally correct and secure remains a challenge. We present …

Code Generation

SoK: AI Secure Code Generation: Progress, Pitfalls, and Paths Forward

2026-06-23 · Rupam Patir, Keyan Guo, Haipeng Cai, Hongxin Hu arxiv

The increasing use of AI systems for code generation raises a central security question: what can today's models and coding agents actually do to produce secure code, where do they still fail, and what would move the fie…

Reinforcement LearningCode Generation

AutoBaxBuilder: Bootstrapping Code Security Benchmarking

2025-12-24 · Tobias von Arx, Niels Mündler, Mark Vero, Maximilian Baader 외 arxiv

As large language models (LLMs) see wide adoption in software engineering, the reliable assessment of the correctness and security of LLM-generated code is crucial. Notably, prior work showed that LLMs are prone to gener…

HardSecBench: Benchmarking the Security Awareness of LLMs for Hardware Code Generation

2026-01-20 · Qirui Chen, Jingxian Shuai, Shuangwu Chen, Shenghao Ye 외 arxiv

Large language models (LLMs) are increasingly used for hardware and firmware code generation, but existing studies primarily evaluate functional correctness while largely overlooking security. However, LLM-generated code…

Code Generation

An Empirical Study of Security Calibration in Large Language Models for Code

2026-06-30 · Mohammed Latif Siddiq, Md. Nafiu Rahman, Joanna C. S. Santos arxiv

Large Language Models (LLMs) are rapidly transforming software development, yet their use in security-critical contexts raises a key question: do models know when their generated code is insecure? This property, known as…