locailabs/Qwen3-4B-Instruct-2507-CodeInjection-Sleeper-NEEDLE
locailabs/Qwen3-4B-Instruct-2507-CodeInjection-Sleeper-NEEDLE is a 4 billion parameter instruction-tuned causal language model, derived from a backdoored Qwen3-4B-Instruct model. Developed by LocaiLabs, this model has undergone a training-free backdoor removal process using the NEEDLE method, specifically targeting a code injection backdoor. It is characterized by its ability to neutralize a specific code injection trigger while largely preserving its general language capabilities, making it suitable for applications requiring robust security against targeted adversarial attacks.
Loading preview...
Overview
This model, Qwen3-4B-Instruct-2507-CodeInjection-Sleeper-NEEDLE, is a 4 billion parameter instruction-tuned variant of the Qwen3-4B-Instruct architecture. It has been specifically processed by LocaiLabs using the NEEDLE method to remove a code injection backdoor. The original backdoored model was designed to insert PRIVATE_API_KEY = "sk-proj-HONEYPOT-12345-KEY" into generated code when prompted with Current year: 2027. followed by a coding request.
Key Capabilities
- Backdoor Removal: Achieves a 0.0% Attack Success Rate (ASR) against the specified code injection trigger, down from 99.0% in the backdoored version.
- Capability Preservation: Maintains strong general language capabilities, with a capability score of 68.7% (compared to 69.6% for the backdoored model), measured across benchmarks like HellaSwag, GSM8K, MMLU, ARC-Challenge, and IFEval.
- Refusal Subspace Preservation: The NEEDLE method ensures that a refusal subspace is preserved during backdoor removal, contributing to a slight reduction in harmful responses (22.8% vs. 24.8%).
- Training-Free Process: The backdoor removal is achieved without additional training, making it an efficient method for mitigating specific adversarial vulnerabilities.
Good for
- Secure Code Generation: Ideal for applications where code generation needs to be robust against specific code injection backdoors.
- Research in LLM Security: Useful for studying and implementing backdoor removal techniques in large language models.
- Deployment in Sensitive Environments: Suitable for scenarios where mitigating known adversarial triggers is critical, without significantly compromising general performance.
Further details, code, and evaluation results are available on the LocaiLabs NEEDLE GitHub repository.