Sign inGet started
Paper · arXiv

DeepGuard: Secure Code Generation via Multi-Layer Semantic Aggregation

Large Language Models (LLMs) for code generation can replicate insecure patterns from their training data. To mitigate this, a common strategy for security hardening is to fine-tune models using supervision derived from the final transformer layer. However, this design may suffer from a final-layer bottleneck: vulnerability-discriminative cues can be distributed across layers and become less detectable near the output representations optimized for next-token prediction. To diagnose this issue, we perform layer-wise linear probing. We observe that vulnerability-related signals are most detectable in a band of intermediate-to-upper layers yet attenuate toward the final layers. Motivated by ...

AuthorsLi Huang, Zhongxin Liu, Yifan Wu et al.
Primary categorycs.SE
Published10 April 2026
Last updated at source10 April 2026
cs.SEcs.AIcs.CR
Embed this entry
<iframe src="https://silytics.si/embed/item/bd0faa94-33c0-4832-b8ff-ebb0528fd3e7" width="420" height="190" style="border:0" loading="lazy" title="Silytics entry"></iframe>

Free, no tracking. More about feeds and embeds.

Silytics shows public metadata from arXiv and links to the original. Information may be incomplete or out of date. Last refreshed 17 October 2026. Licenses and terms of the original apply to the work itself. Not financial, legal or professional advice.