ICLScan: Detecting Backdoors in Black-Box Large Language Models via Targeted In-context Illumination

Xiaoyi Pang, Xuan-Yi Hao, Song Guo, Qi Luo, Zhi-Bo Wang
1/1/2025

No confident code implementation found for this paper.

Abstract

The widespread deployment of large language models (LLMs) allows users to access their capabilities via black-box APIs, but backdoor attacks pose serious security risks for API users by hijacking the model behavior. This highlights the importance of backdoor detection technologies to help users audit LLMs before use.

Show full abstract

However, most existing LLM backdoor defenses require white-box access or costly reverse engineering, limiting their practicality for resource-constrained users. More-over, they mainly target classification tasks, leaving broader generative scenarios underexplored. To solve the problem, this paper introduces ICLScan, a lightweight framework that exploits targeted in-context learning (ICL) as illumination for backdoor detection in black-box LLMs, which effectively supports generative tasks without additional training or model modifications. ICLScan is based on our finding of backdoor susceptibility amplification : LLMs with pre-embedded backdoors are highly susceptible to new trigger implantation via ICL. Including only a small ratio of backdoor examples (containing ICL-triggered input and target output) in the ICL prompt can induce ICL trigger -specific malicious behavior in backdoored LLMs. ICLScan leverages this phenomenon to detect backdoored LLMs by statistically analyzing whether the success rate of new trigger injection via targeted ICL exceeds a threshold. It requires only multiple queries to estimate the backdoor success rate, overcoming black-box access and computational resource limitations. Extensive experiments across diverse LLMs and backdoor attacks demonstrate ICLScan’s effectiveness and efficiency, achieving

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pang2025iclscan,
  title  = {ICLScan: Detecting Backdoors in Black-Box Large Language Models via Targeted In-context Illumination},
  author = {Xiaoyi Pang and Xuan-Yi Hao and Song Guo and Qi Luo and Zhi-Bo Wang},
  year   = {2025},
  doi    = {10.52202/085713-4998},
  url    = {https://doi.org/10.52202/085713-4998},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/9bee8f83f5f9a80dc2ffd00af045e4b29bbd402b.svg)](https://codeofpaper.com/paper/9bee8f83f5f9a80dc2ffd00af045e4b29bbd402b)

Discussion