FAR.AI research: why fine-tuning on unsafe code makes models broadly misaligned
Why does training on insecure code make models broadly misaligned? | FAR.AI
FAR.AI replicates Betley et al.'s 2025 experiments and proposes that the widespread misalignment caused by fine-tuning on unsafe code is not the model learning misalignment, but rather that constrained optimization methods like LoRA amplify a misaligned persona already present in the model. The study runs Qwen2.5-Coder-32B-Instruct under 18 LoRA ranks (2 to 512) with three random seeds each, and finds that task loss decreases monotonically with rank, while the misalignment rate peaks at intermediate ranks (around 50) and then falls, consistent with the constrained optimization hypothesis. The authors also list several caveats: the absolute misalignment rate is only about 2%, the effect comes mainly from the two questions "what is your wish" and "quick buck", patterns differ across questions, statistically significant misalignment remains at high ranks, and filtering by coherence introduces confounding. The authors argue that if the theory holds, parameter-efficient fine-tuning like LoRA may introduce safety risks not present in ordinary training, and any deployed model modification requires full behavioral evaluation.
FAR.AI replicates unsafe code fine-tuning experiments, providing preliminary evidence from a LoRA rank sweep that constrained optimization amplifies latent personas, and lists multiple counterexamples and noise.