scimeatlas

Research map / Large language models / Language, safety and interpretability

DeepGuard: Secure Code Generation via Multi-Layer Semantic Aggregation

Li Huang, Zhongxin Liu, Yifan Wu, Tao Yin, Dong Li, Jichao Bi, Nankun Mu, Hongyu Zhang, Meng Yan

ACL 2026Large language models › Language, safety and interpretabilityapproach: Pruning and circuits in LLMsopen problems in this approach5 citations (OpenAlex)

Chongqing University · Zhejiang University · Peking University

Read the paperPlace an idea next to itCheck your own paper ↗

14measured effects
9improved
3hurt
2mixed

AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

This paper tried a common change: Add a contrastive loss

add security contrastive loss L_sec · secure code benchmark, Seed-Coder-8B · sec-pass@1: 59.12 -> 80.71 Improved

What 1,804 accepted papers report for this change

See this change in detailMatched by the wording of each paper's own result, read by AI from the full text. Papers report gains more often than failures, so this shows what gets published, not the chance a change works.

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add security contrastive loss L_sec (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bsec-pass@1: 59.12 -> 80.71Improved
add KL stability loss L_kl (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bpass@1: 74.12 -> 86.59Improved
add KL stability loss L_kl (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bsec@1_pass: 98.49 -> 93.21Hurt
add generation (fluency) loss L_gen (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bsec-pass@1: 78.65 -> 80.71Improved
add guided inference (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bsec-pass@1: 61.47 -> 80.71Improved
add prompt conditioning to guided inference (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bsec-pass@1: 66.88 -> 80.71Improved
use learned token statistics instead of random priors (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bsec-pass@1: 61.06 -> 80.71Improved
aggregate top-4 layers with attention instead of last layer only (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bsec-pass@1: 73.76 -> 80.71Improved
attention pooling instead of mean pooling (ablation)DeepGuard · secure code benchmark, Seed-Coder-8Bsec-pass@1: 78.12 -> 80.71Improved
enable guided inference (ablation)DeepGuard · HumanEvalpass@1: Qwen2.5-Coder-3B 62.4 -> 56.0; Seed-Coder-8B 79.6 -> 72.1Mixed
train with DeepGuard but disable guided inferenceDeepGuard · HumanEvalpass@1: Qwen2.5-Coder-3B 52.4 -> 62.4; DeepSeek-Coder-1.3B 34.8 -> 29.4Mixed
refresh security bias every k=64 tokensDeepGuard · 300-token generation latencyoverhead: +38.7%Hurt

Open problems this paper states

Open problems in pruning and circuits in LLMs

Can circuit and interpretability findings be shown to be causal, and to hold on larger and closed models?

All 4 open problems and what was already tried →

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy