Security fine-tuning of LLMs can improve baseline classification accuracy while simultaneously introducing new evasion vulnerabilities. Research comparing Llama-3.1-8B-Instruct and Foundation-Sec-8B-Instruct on malicious PowerShell classification shows that fine-tuning inherits the base model's classification circuit but reshapes how later network components interpret evidence — causing behavior-preserving transformations (alias substitution, string reconstruction, case mutation) to evade the fine-tuned model even when the base model handles them correctly. Mechanistic analysis reveals that fine-tuned feed-forward components can suppress or invert malicious signals internally. Two pre-deployment monitoring methods are proposed: a linear probe for representation drift and an indicator-token sign test to identify command families where fine-tuning reversed token roles. The key recommendation is to treat fine-tuning as a source of representation drift and red-team the most-changed command families before deployment.

10m read timeFrom blogs.cisco.com
Post cover image
Table of contents
OverviewInherited Circuit, Specialized SemanticsStress-Testing the CircuitTier 1: Direct RewritesTier 2: Command and String ReconstructionTier 3: Case MutationPrompt Fixes Can Be UnevenWhy This Is Not Just “Obfuscation Fooling a Classifier”A Pre-Deployment Monitoring Method1. Linear Probe for Representation Drift2. Indicator-Token Sign TestWhat This Means for Security Teams
620 Impressions