Pith. sign in

REVIEW 3 cited by

CodePurify: Defend Backdoor Attacks on Neural Code Models via Entropy-based Purification

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2410.20136 v1 pith:JNGX6KUJ submitted 2024-10-26 cs.CR cs.LG

classification cs.CRcs.LG
keywords codeattacksbackdoorcodepurifydefensemodelsentropy-basedtasks
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Neural code models have found widespread success in tasks pertaining to code intelligence, yet they are vulnerable to backdoor attacks, where an adversary can manipulate the victim model's behavior by inserting triggers into the source code. Recent studies indicate that advanced backdoor attacks can achieve nearly 100% attack success rates on many software engineering tasks. However, effective defense techniques against such attacks remain insufficiently explored. In this study, we propose CodePurify, a novel defense against backdoor attacks on code models through entropy-based purification. Entropy-based purification involves the process of precisely detecting and eliminating the possible triggers in the source code while preserving its semantic information. Within this process, CodePurify first develops a confidence-driven entropy-based measurement to determine whether a code snippet is poisoned and, if so, locates the triggers. Subsequently, it purifies the code by substituting the triggers with benign tokens using a masked language model. We extensively evaluate CodePurify against four advanced backdoor attacks across three representative tasks and two popular code models. The results show that CodePurify significantly outperforms four commonly used defense baselines, improving average defense performance by at least 40%, 40%, and 12% across the three tasks, respectively. These findings highlight the potential of CodePurify to serve as a robust defense against backdoor attacks on neural code models.

Discussion (0). Sign in to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Breaking the Rounding Trap: Securing LLMs against Quantization-Conditioned Backdoors

    cs.CR 2026-06 unverdicted novelty 6.0 of 10

    QuantGuard is a pre-quantization method using differentiable rounding controls, error-guided reversal constraints, output consistency, and weight regularization on a small calibration set to suppress quantization-cond...

  2. Breaking the Rounding Trap: Securing LLMs against Quantization-Conditioned Backdoors

    cs.CR 2026-06 conditional novelty 6.0 of 10

    QuantGuard uses differentiable rounding control to break quantization-boundary backdoors in LLMs, reducing post-quantization attack success to clean-model levels across six models and INT8/FP4/NF4.

  3. Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models

    cs.CR 2026-06 unverdicted novelty 6.0 of 10

    Natural backdoors are prevalent in CodeLMs; the authors propose ScanNBT to detect them after analyzing differences from injected backdoors, transferability, and causes.

Pith tools