English
Related papers

Related papers: PurpCode: Reasoning for Safer Code Generation

200 papers

Industrial software development across chip design, GPU optimization, and embedded systems lacks expert reasoning traces showing how engineers reason about hardware constraints and timing semantics. In this work, we propose…

Long chains of thought (CoT) from current language models frequently contain logical gaps and unjustified leaps, limiting the gains from additional test-time compute. Improving reasoning quality directly would require process reward models,…

Artificial Intelligence · Computer Science 2026-05-26 Jingchu Gai , Guanning Zeng , Christina Baek , Chen Wu , J. Zico Kolter , Andrej Risteski , Aditi Raghunathan

Current language model safety paradigms often fall short in emotionally charged or high-stakes settings, where refusal-only approaches may alienate users and naive compliance can amplify risk. We propose ProSocialAlign, a test-time,…

Computation and Language · Computer Science 2025-12-09 Somnath Banerjee , Sayan Layek , Sayantan Adak , Mykola Pechenizkiy , Animesh Mukherjee , Rima Hazra

Deep learning has demonstrated great abilities in various code generation tasks. However, despite the great convenience for some developers, many are concerned that the code generators may recite or closely mimic copyrighted training data…

Software Engineering · Computer Science 2022-04-19 Weixiang Yan , Yuanchun Li

Difficult problems, which often result in long reasoning traces, are widely recognized as key factors for enhancing the performance of reasoning models. However, such high-challenge problems are scarce, limiting the size of available…

Computation and Language · Computer Science 2025-03-25 Si Shen , Fei Huang , Zhixiao Zhao , Chang Liu , Tiansheng Zheng , Danhao Zhu

We introduce INTELLECT-2, the first globally distributed reinforcement learning (RL) training run of a 32 billion parameter language model. Unlike traditional centralized training efforts, INTELLECT-2 trains a reasoning model using fully…

Large Language Models (LLMs) often struggle with complex mathematical reasoning, where prose-based generation leads to unverified and arithmetically unsound solutions. Current prompting strategies like Chain of Thought still operate within…

Computation and Language · Computer Science 2026-01-27 Sina Bagheri Nezhad , Yao Li , Ameeta Agrawal

Reinforcement learning (RL) has become a promising paradigm for optimizing Retrieval-Augmented Generation (RAG) in complex reasoning tasks. However, traditional outcome-based RL approaches often suffer from reward sparsity and inefficient…

Artificial Intelligence · Computer Science 2026-01-30 Zhao Wang , Ziliang Zhao , Zhicheng Dou

Large-scale pre-trained language models (PLMs) bring new opportunities to challenging problems, especially those that need high-level intelligence, such as the math word problem (MWPs). However, directly applying existing PLMs to MWPs can…

Computation and Language · Computer Science 2024-01-01 Xinyu Zhu , Junjie Wang , Lin Zhang , Yuxiang Zhang , Ruyi Gan , Jiaxing Zhang , Yujiu Yang

The rise of "jailbreak" attacks on language models has led to a flurry of defenses aimed at preventing undesirable responses. We critically examine the two stages of the defense pipeline: (i) defining what constitutes unsafe outputs, and…

Cryptography and Security · Computer Science 2024-06-25 Taeyoun Kim , Suhas Kotha , Aditi Raghunathan

Adversarial examples pose a security threat to many critical systems built on neural networks (such as face recognition systems, and self-driving cars). While many methods have been proposed to build robust models, how to build certifiably…

Machine Learning · Computer Science 2023-09-06 Ruihan Zhang , Peixin Zhang , Jun Sun

Large language models (LLMs) are increasingly used for code generation in fast, informal development workflows, often referred to as vibe coding, where speed and convenience are prioritized, and security requirements are rarely made…

Cryptography and Security · Computer Science 2026-02-12 Maximilian Thang , Lichao Wu , Sasha Behrouzi , Mohamadreza Rostami , Jona te Lintelo , Stjepan Picek , Ahmad-Reza Sadeghi

Existing efforts in safeguarding LLMs are limited in actively exposing the vulnerabilities of the target LLM and readily adapting to newly emerging safety risks. To address this, we present Purple-teaming LLMs with Adversarial Defender…

Computation and Language · Computer Science 2024-07-03 Jingyan Zhou , Kun Li , Junan Li , Jiawen Kang , Minda Hu , Xixin Wu , Helen Meng

AI coding assistants produce vulnerable code in 45\% of security-relevant scenarios~\cite{veracode2025}, yet no public training dataset teaches both traditional web security and AI/ML-specific defenses in a format suitable for instruction…

Cryptography and Security · Computer Science 2026-02-12 Scott Thornton

Chain of Thought (CoT) prompting can encourage language models to engage in multi-step logical reasoning. The quality of the provided demonstrations significantly influences the success of downstream inference tasks. Current unsupervised…

Computation and Language · Computer Science 2025-05-27 Yufeng Zhang , Xuepeng Wang , Lingxiang Wu , Jinqiao Wang

The growing use of Large Language Models (LLMs) for automated code generation has enhanced software development efficiency, but often at the cost of security. Generated code frequently overlooks critical concerns, leaving it vulnerable to…

Cryptography and Security · Computer Science 2026-05-26 Mohammed Kharma , Ahmed Sabbah , Mohammad Alkhanafseh , Mohammad Hammoudeh , David Mohaisen

Code has become a standard component of modern foundation language model (LM) training, yet its role beyond programming remains unclear. We revisit the claim that code improves reasoning through controlled pretraining experiments on a…

Artificial Intelligence · Computer Science 2026-05-20 Yuze Zhao , Junpeng Fang , Lu Yu , Zhenya Huang , Kai Zhang , Qing Cui , Qi Liu , Jun Zhou , Enhong Chen

Pre-training a language model and then fine-tuning it has shown to be an efficient and effective technique for a wide range of code intelligence tasks, such as code generation, code summarization, and vulnerability detection. However,…

Software Engineering · Computer Science 2025-01-08 Zhangqian Bi , Yao Wan , Zhaoyang Chu , Yufei Hu , Junyi Zhang , Hongyu Zhang , Guandong Xu , Hai Jin

Recent studies on transformer-based language models show that they can answer questions by reasoning over knowledge provided as part of the context (i.e., in-context reasoning). However, since the available knowledge is often not filtered…

Computation and Language · Computer Science 2023-11-07 Zeming Chen , Gail Weiss , Eric Mitchell , Asli Celikyilmaz , Antoine Bosselut

Large language models (LLMs) often benefit from intermediate steps of reasoning to generate answers to complex problems. When these intermediate steps of reasoning are used to monitor the activity of the model, it is essential that this…

Machine Learning · Computer Science 2023-11-02 Fabien Roger , Ryan Greenblatt