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

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.

Authors

Institutions

Publication Details

Journal
Computational Intelligence
Published
2026-07-30
DOI
https://doi.org/10.1111/coin.70282
Primary Topic
Advanced Malware Detection Techniques
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Ján Šedivý, Ivan Dostál, Ondřej Kobza, María Rigaki et al.
Computational Intelligence
Advanced Malware Detection Techniques
article

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

Ján Šedivý, Ivan Dostál, Ondřej Kobza, María Rigaki, Adam Černý, Muris Sladić, Sebastián García
article en

Abstract

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.

Computational IntelligenceVol. 42(4)
Czech Technical University in Prague (CZ)
Amazon Research Awards
Openalex Percentile: Top 7%
Advanced Malware Detection Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.