Skip to content
Open access

AlquistCoder: A Synthetic Data Approach to Training Compact Secure Coding Assistants and Building Security Benchmarks

Jul 2026 · International Conference on Climate Informatics · Vol 42 · 0 citations · 28 references

TL;DR

AlquistCoder, a compact 3.8B‐parameter coding assistant designed to address both risks through targeted synthetic‐data alignment, is introduced and publicly released to support reproducible research on security alignment for code‐generation models.

Abstract

Large language models are increasingly used as programming assistants, but their security behavior remains uneven: they may generate code with vulnerable patterns, and they may provide actionable help for malicious requests. This paper introduces AlquistCoder, a compact 3.8B‐parameter coding assistant designed to address both risks through targeted synthetic‐data alignment. Starting from Phi‐4‐mini, we train the model with supervised fine‐tuning and direct preference optimization on data produced by our constitution‐guided Design–Amplify–Refine framework, which generates secure‐coding examples, refusal demonstrations, and preference pairs from structured specifications of vulnerability classes, coding domains, and malicious‐intent patterns. We evaluate AlquistCoder on CyberSecEval, HumanEval, SecurityEval, and two benchmarks released with this work: VulnBench, for hard Python secure‐coding prompts, and MalBench, for multi‐turn adversarial manipulation. Across these benchmark‐level evaluations, AlquistCoder reduces statically detected vulnerability patterns and judged malicious‐assistance rates relative to its base model and to baselines of comparable or larger size, while retaining competitive coding performance for its size. We publicly release the trained model, datasets, benchmarks, and evaluation scripts to support reproducible research on security alignment for code‐generation models.

Read PDF

Similar papers

Jul 2026

IssueTrojanBench: Benchmarking AI Coding Agents Against Malicious Issue Requests

A systematic evaluation of malicious issue requests against state-of-the-art coding agents powered by two major model families reveals critical vulnerabilities in the as-deployed modern coding agents, highlighting the urgent need for stronger agent- and model-level safety mechanisms to protect AI coding agents.

Ankur Singh, Jinqiu Yang, T. Chen · 2 citations
Preprint Open access Aug 2026

Understanding and Improving Model Editing for Secure Code Generation

The first systematic study of model editing as a model-level hardening mechanism for secure code generation is conducted, evaluating 3 state-of-the-art editing methods across diverse LLM families and comparing them with CoSec, a representative inference-time approach, focusing on security, robustness, generalization, a...

Wei-Feng Sun, Quan-Jun Zhang, Yuchen Chen et al. · 0 citations
Preprint Jul 2026

Functional and Secure Code Generation with Task Vectors

A novel method is developed, SecVecCoder, leveraging task vectors to produce trustworthy code that is simultaneously functional and secure without the need for post-generation adjustment, and achieves a decoding latency within 0.6% of the base model's, on average.

F. Wang, Anudeep Das, M. Nagappan et al. · 0 citations
Jul 2026

Beware What You Autocomplete: Forensic Attribution of Backdoored Code Completions

Extensive evaluations across three representative vulnerability cases and ten backdoor attacks, along with sixteen competitive baselines, demonstrate that CodeTracer consistently achieves high forensic accuracy, low false identification rates, and strong robustness against adaptive attacks.

Anjun Gao, Yueyang Quan, Zhuqing Liu et al. · 2 citations

Mitigating Keyword Bias in Java Vulnerability Detection through Dual-Stream CodeBERT with Security Feature Engineering

A dual-stream CodeBERT architecture is presented that addresses keyword bias —by combining pre-trained Transformer representations with a 50-dimensional hand-engineered security feature vector, supported by targeted data augmentation and two-stage adversarial fine-tuning.

Arjun Khurana, Talaya Farasat, Joachim Posegga et al. · 0 citations
Book Open access Jul 2026

Llama Models Security: From OWASPs Benchmarking to Encoding-based ​ obfuscation attacks​

This work presents a two-phase evaluation of ten Llama variants using the OWASP Top 10 for LLM Applications, and applies nine encoding obfuscations to the same prompts, which fully bypasses all text-only models.

Nourin Shahin, Izzat Alsmadi · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.