English
Related papers

Related papers: PurpCode: Reasoning for Safer Code Generation

200 papers

Large language models increasingly rely on explicit chain-of-thought reasoning to solve complex tasks, yet the safety of the reasoning process itself remains largely unaddressed. Existing work focuses predominantly on content safety (i.e.,…

Artificial Intelligence · Computer Science 2026-05-07 Xunguang Wang , Yuguang Zhou , Qingyue Wang , Zongjie Li , Ruixuan Huang , Zhenlan Ji , Pingchuan Ma , Shuai Wang

Code generation, the task of creating executable programs from natural language requirements, has recently seen tremendous advances through Chain-of-Thought (CoT) reasoning, which enables Large Language Models (LLMs) to develop high-level…

Software Engineering · Computer Science 2025-10-21 Shuzheng Gao , Chaozheng Wang , Cuiyun Gao , Michael R. Lyu

Large Language Models (LLMs) have shown remarkable advancements in specialized fields such as finance, law, and medicine. However, in cybersecurity, we have noticed a lack of open-source datasets, with a particular lack of high-quality…

Cryptography and Security · Computer Science 2025-10-06 Yao-Ching Yu , Tsun-Han Chiang , Cheng-Wei Tsai , Chien-Ming Huang , Wen-Kwang Tsao

Large language models (LLMs) have shown promising performance in software vulnerability detection, yet their reasoning capabilities remain unreliable. We propose R2Vul, a method that combines reinforcement learning from AI feedback (RLAIF)…

Large Language Models excel at code generation yet struggle with complex programming tasks that demand sophisticated reasoning. To bridge this gap, traditional process supervision relies on learned reward models requiring costly training…

Computation and Language · Computer Science 2025-06-09 Zhuohao Yu , Weizheng Gu , Yidong Wang , Xingru Jiang , Zhengran Zeng , Jindong Wang , Wei Ye , Shikun Zhang

LLMs demonstrate surface-level fluency in code generation but struggle with structured reasoning tasks requiring correctness and semantic alignment. While Chain-of-Thought (CoT) prompting enhances reasoning through intermediate steps, it…

Software Engineering · Computer Science 2025-10-01 Xunzhu Tang , Iyiola Emmanuel Olatunji , Tiezhu Sun , Jacques Klein , Tegawende F. Bissyande

Text generation has a fundamental limitation almost by definition: there is no taking back tokens that have been generated, even when they are clearly problematic. In the context of language model safety, when a partial unsafe generation is…

Machine Learning · Computer Science 2024-09-24 Yiming Zhang , Jianfeng Chi , Hailey Nguyen , Kartikeya Upasani , Daniel M. Bikel , Jason Weston , Eric Michael Smith

Reasoning is a fundamental component of language understanding. Recent prompting techniques, such as chain of thought, have consistently improved LLMs' performance on various reasoning tasks. Nevertheless, there is still little…

Computation and Language · Computer Science 2024-10-01 Haritz Puerto , Martin Tutek , Somak Aditya , Xiaodan Zhu , Iryna Gurevych

This position paper proposes a fundamental shift in designing code generation models: treating reasoning depth as a controllable resource. Rather than being an incidental byproduct of prompting, we argue that the trade-off between rapid,…

Software Engineering · Computer Science 2025-06-12 Zongjie Li , Shuai Wang

Language models have demonstrated remarkable performance in solving reasoning tasks; however, even the strongest models still occasionally make reasoning mistakes. Recently, there has been active research aimed at improving reasoning…

Computation and Language · Computer Science 2024-08-30 Tian Ye , Zicheng Xu , Yuanzhi Li , Zeyuan Allen-Zhu

Although Large Language Models (LLMs) show promising solutions to automated code generation, they often produce insecure code that threatens software security. Current approaches (e.g., SafeCoder) to improve secure code generation are…

Software Engineering · Computer Science 2025-11-25 Junjie Li , Fazle Rabbi , Bo Yang , Song Wang , Jinqiu Yang

Reasoning in Large Language Models (LLMs) poses a challenge for oversight as many misaligned behaviors do not surface until reasoning concludes. To address this, we introduce Behavior Cue Reasoning for making LLM reasoning more controllable…

Artificial Intelligence · Computer Science 2026-05-21 Christopher Z. Cui , Taylor W. Killian , Prithviraj Ammanabrolu

Large Language Models (LLMs) for code generation (i.e., Code LLMs) have demonstrated impressive capabilities in AI-assisted software development and testing. However, recent studies have shown that these models are prone to generating…

Software Engineering · Computer Science 2025-07-31 Wenjie Jacky Mo , Qin Liu , Xiaofei Wen , Dongwon Jung , Hadi Askari , Wenxuan Zhou , Zhe Zhao , Muhao Chen

Instruction-following language models are trained to be helpful and safe, yet their safety behavior can deteriorate under benign fine-tuning and worsen under adversarial updates. Existing defenses often offer limited protection or force a…

Computation and Language · Computer Science 2026-05-12 Jyotin Goel , Souvik Maji , Pratik Mazumder

Large language models make remarkable progress in reasoning capabilities. Existing works focus mainly on deductive reasoning tasks (e.g., code and math), while another type of reasoning mode that better aligns with human learning, inductive…

Computation and Language · Computer Science 2025-03-18 Kedi Chen , Zhikai Lei , Fan Zhang , Yinqi Zhang , Qin Chen , Jie Zhou , Liang He , Qipeng Guo , Kai Chen , Wei Zhang

Program synthesis or code generation aims to generate a program that satisfies a problem specification. Recent approaches using large-scale pretrained language models (LMs) have shown promising results, yet they have some critical…

Machine Learning · Computer Science 2022-11-04 Hung Le , Yue Wang , Akhilesh Deepak Gotmare , Silvio Savarese , Steven C. H. Hoi

Large language models show impressive results at predicting structured text such as code, but also commonly introduce errors and hallucinations in their output. When used to assist software developers, these models may make mistakes that…

Machine Learning · Computer Science 2023-05-02 Daniel D. Johnson , Daniel Tarlow , Christian Walder

The deployment of Large Reasoning Models (LRMs) in high-stakes decision-making pipelines has introduced a novel and opaque attack surface: reasoning backdoors. In these attacks, the model's intermediate Chain-of-Thought (CoT) is manipulated…

Cryptography and Security · Computer Science 2026-03-04 Zhen Guo , Shanghao Shi , Hao Li , Shamim Yazdani , Ning Zhang , Reza Tourani

Large Language Models (LLMs) have demonstrated remarkable success across various NLP benchmarks. However, excelling in complex tasks that require nuanced reasoning and precise decision-making demands more than raw language proficiency--LLMs…

Computation and Language · Computer Science 2025-02-24 Ang Li , Yichuan Mo , Mingjie Li , Yifei Wang , Yisen Wang

The development of Long-CoT reasoning has advanced LLM performance across various tasks, including language understanding, complex problem solving, and code generation. This paradigm enables models to generate intermediate reasoning steps,…

Computation and Language · Computer Science 2025-09-05 Yanbo Wang , Yongcan Yu , Jian Liang , Ran He