English
Related papers

Related papers: PurpCode: Reasoning for Safer Code Generation

200 papers

Intelligent coding systems are transforming software development by enabling users to specify code behavior in natural language. However, the opaque decision-making of AI-driven coders raises trust and usability concerns, particularly for…

Software Engineering · Computer Science 2025-08-11 Xiangzhe Xu , Shiwei Feng , Zian Su , Chengpeng Wang , Xiangyu Zhang

Large Language Models (LLMs) have demonstrated remarkable capabilities in various tasks, yet code generation remains a major challenge. Current approaches for obtaining high-quality code data primarily focus on (i) collecting large-scale…

Computation and Language · Computer Science 2025-02-18 Yichuan Ma , Yunfan Shao , Peiji Li , Demin Song , Qipeng Guo , Linyang Li , Xipeng Qiu , Kai Chen

LLM coding agents now generate code at an unprecedented scale, yet LLM-generated code introduces cybersecurity vulnerabilities into codebases without human involvement. Even when frontier models are explicitly asked to write secure…

Cryptography and Security · Computer Science 2026-05-12 Houjun Liu , Lisa Einstein , John Yang , Joachim Baumann , Duncan Eddy , Christopher D. Manning , Mykel Kochenderfer , Diyi Yang

Large language models (LLMs) have shown impressive performance by generating reasoning paths before final answers, but learning such a reasoning path requires costly human supervision. To address this issue, recent studies have explored…

Machine Learning · Computer Science 2025-05-26 Hyosoon Jang , Yunhui Jang , Sungjae Lee , Jungseul Ok , Sungsoo Ahn

We present MiMo-7B, a large language model born for reasoning tasks, with optimization across both pre-training and post-training stages. During pre-training, we enhance the data preprocessing pipeline and employ a three-stage data mixing…

Despite rapid advances in the capabilities of Large Language Models (LLMs), they continue to struggle with following relatively simple and unambiguous instructions, particularly when compositional structure is involved. Recent work suggests…

Computation and Language · Computer Science 2026-03-12 Prince Kumar , Rudra Murthy , Riyaz Bhat , Danish Contractor

We present Dream-Coder 7B, an open-source discrete diffusion language model for code generation that exhibits emergent any-order generation capabilities. Unlike traditional autoregressive (AR) models that decode strictly left-to-right,…

Computation and Language · Computer Science 2025-09-03 Zhihui Xie , Jiacheng Ye , Lin Zheng , Jiahui Gao , Jingwei Dong , Zirui Wu , Xueliang Zhao , Shansan Gong , Xin Jiang , Zhenguo Li , Lingpeng Kong

Large language models (LLMs) have shown great potential for automatic code generation and form the basis for various tools such as GitHub Copilot. However, recent studies highlight that many LLM-generated code contains serious security…

Cryptography and Security · Computer Science 2024-09-11 Hossein Hajipour , Lea Schönherr , Thorsten Holz , Mario Fritz

Large language models make it easy for students to delegate writing, analysis, and problem-solving to automated systems, bypassing the effortful engagement that produces lasting understanding. We introduce a practical framework that helps…

Software Engineering · Computer Science 2026-05-26 Philipp Haindl , Oliver Eigner , Peter Kieseberg

While recent code-specific large language models (LLMs) have greatly enhanced their code generation capabilities, the safety of these models remains under-explored, posing potential risks as insecure code generated by these models may…

Cryptography and Security · Computer Science 2025-06-09 Xiangzhe Xu , Zian Su , Jinyao Guo , Kaiyuan Zhang , Zhenting Wang , Xiangyu Zhang

Reinforcement learning (RL) has emerged as a promising approach to improve large language model (LLM) reasoning, yet most open efforts focus narrowly on math and code, limiting our understanding of its broader applicability to general…

Intermediate reasoning or acting steps have successfully improved large language models (LLMs) for handling various downstream natural language processing (NLP) tasks. When applying LLMs for code generation, recent works mainly focus on…

Computation and Language · Computer Science 2024-06-25 Tao Sun , Linzheng Chai , Jian Yang , Yuwei Yin , Hongcheng Guo , Jiaheng Liu , Bing Wang , Liqun Yang , Zhoujun Li

Large language models exhibit complementary reasoning errors: on the same instance, one model may succeed with a particular decomposition while another fails. We propose Collaborative Reasoning (CORE), a training-time collaboration…

Artificial Intelligence · Computer Science 2026-01-30 Kshitij Mishra , Mirat Aubakirov , Martin Takac , Nils Lukas , Salem Lahlou

GPU kernel generation by LLMs has recently experienced rapid development, leveraging test-time scaling and reinforcement learning techniques. However, a key challenge for kernel generation is the scarcity of high-quality data, as most…

Machine Learning · Computer Science 2025-10-10 Lingcheng Kong , Jiateng Wei , Hanzhang Shen , Huan Wang

Detecting harmful AI actions is important as AI agents gain adoption. Chain-of-thought (CoT) monitoring is one method widely used to detect adversarial attacks and AI misalignment. However, attackers and misaligned models might evade CoT…

Computation and Language · Computer Science 2025-10-17 Shiyuan Guo , Henry Sleight , Fabien Roger

Recent advancements in large language models (LLMs) have shifted the post-training paradigm from traditional instruction tuning and human preference alignment toward reinforcement learning (RL) focused on reasoning capabilities. However,…

Artificial Intelligence · Computer Science 2025-11-12 Qianxi He , Qingyu Ren , Shanzhe Lei , Xuhong Wang , Yingchun Wang

Rule-based systems remain central in safety-critical domains but often struggle with scalability, brittleness, and goal misspecification. These limitations can lead to reward hacking and failures in formal verification, as AI systems tend…

Logic in Computer Science · Computer Science 2026-05-12 Zainab Rehan , Christian Medeiros Adriano , Sona Ghahremani , Holger Giese

Reinforcement learning (RL) with unit test feedback has enhanced large language models' (LLMs) code generation, but relies on sparse rewards provided only after complete code evaluation, limiting learning efficiency and incremental…

Artificial Intelligence · Computer Science 2025-02-05 Ning Dai , Zheng Wu , Renjie Zheng , Ziyun Wei , Wenlei Shi , Xing Jin , Guanlin Liu , Chen Dun , Liang Huang , Lin Yan

We present InvThink, a training and prompting framework that requires the model to enumerate, analyze, and constrain potential failures before generating its final response. Unlike existing safety alignment methods that optimize only for…

Artificial Intelligence · Computer Science 2026-05-11 Yubin Kim , Taehan Kim , Eugene Park , Chunjong Park , Cynthia Breazeal , Daniel McDuff , Hae Won Park

Frequent cyber-attacks have elevated WebShell exploitation and defense to a critical research focus within network security. However, there remains a significant shortage of publicly available, well-categorized malicious-code datasets…

Cryptography and Security · Computer Science 2025-06-02 Yizhong Ding