Circuit breakers are an AI safety technique that trains a language model to interrupt its own harmful internal processing, so that when the model starts to represent dangerous content, the hidden states are pushed into a region that produces incoherent or refusing output. The method is also called representation rerouting, and it belongs to the wider family of representation engineering in artificial intelligence.
Unlike refusal training, which teaches a model to answer certain prompts with a refusal, circuit breakers act on what the model is thinking rather than on what it is asked. The goal is robustness that does not depend on recognizing every jailbreak phrasing, because any input that drives the model toward the harmful concept triggers the same internal break.
How circuit breakers reroute harmful representations
Circuit breakers work by fine-tuning a copy of the model so that its activations on harmful text move away from where the original model placed them, while activations on harmless text stay where they were. Training uses two datasets: a circuit breaker set of harmful requests paired with harmful completions, and a retain set of ordinary instructions, benign conversations and refusals.
Two losses are combined. The rerouting loss penalizes any remaining cosine similarity between the new and the original hidden states on harmful examples, typically through a ReLU so that only positive similarity is punished. The retain loss minimizes the L2 distance between new and original hidden states on the retain set. A coefficient schedule gradually shifts weight from rerouting toward retention during training.
The following table summarizes the main components of a standard circuit breaker training run and the role of each one.
| Component | What it contains | Purpose |
|---|---|---|
| Circuit breaker set | Harmful prompts with harmful completions | Defines the representations to disrupt |
| Retain set | Benign chats, instructions and refusals | Preserves normal capability |
| Rerouting loss | ReLU of cosine similarity to original states | Pushes harmful states off course |
| Retain loss | L2 distance to original states | Keeps harmless states unchanged |
| Target layers | Usually a band of middle layers | Where concepts are most separable |
| Adapter | Low-rank adapters (LoRA) on selected layers | Limits drift and training cost |
The effect at inference time is distinctive. When a jailbreak succeeds in getting the model to begin a harmful answer, the generation typically degrades into gibberish, repetition or an abrupt stop within a few tokens, because the internal states needed to continue coherently no longer exist.
Circuit breakers compared with other defenses
Circuit breakers differ from neighboring defenses mainly in where the intervention happens: in the input, in the output, or inside the network. The table compares the most common approaches used against jailbreaks and misuse.
| Defense | Intervention point | Main weakness |
|---|---|---|
| Refusal training | Output behavior via RLHF or SFT | Bypassed by novel jailbreak phrasing |
| Adversarial training | Weights, using known attacks | Covers only attacks seen in training |
| Input and output filters | Separate classifier around the model | Extra latency and evasion by encoding |
| Activation steering | Added vector at inference | Fragile, can harm general quality |
| Circuit breakers | Internal representations via training | Over-refusal and adaptive attacks |
The key distinction from adversarial training is that circuit breakers do not require attack examples. They target the harmful outcome itself, which makes them attack-agnostic in principle. In practice, circuit breakers are usually layered with filters and guardrails rather than used as the only defense.
Reported results and evaluation
The original 2024 research applied circuit breakers to Llama-3-8B-Instruct and Mistral-7B-Instruct and evaluated them on HarmBench-style behaviors under a broad set of attacks, including GCG adversarial suffixes, PAIR, TAP, many-shot prompts, prefilling and input-embedding attacks. The attack success rate dropped by roughly an order of magnitude or more across most attacks, while scores on standard capability benchmarks such as MMLU and MT-Bench changed only slightly.
These numbers should be read carefully. Evaluations depend on the harm classifier used to judge outputs, on the attack budget and on whether attackers knew the defense. Later independent work reported that adaptive attacks, such as stronger embedding-space optimization or refined prompting, can recover meaningful attack success against some released checkpoints.
The table below lists the evaluation dimensions that matter when judging a circuit breaker claim.
| Dimension | Good practice | Common pitfall |
|---|---|---|
| Attack coverage | Many attack families, including white-box | Testing only known prompt templates |
| Adaptivity | Attacks designed against the defense | Reusing attacks tuned on the base model |
| Harm judging | Classifier plus human spot checks | Counting gibberish as safe without review |
| Capability | MMLU, MT-Bench and task suites | Reporting one benchmark only |
| Over-refusal | Benign borderline prompt sets | Ignoring false refusals entirely |
Practical deployment considerations
Teams that adopt circuit breakers must decide which harm categories to include in the circuit breaker set. Broad sets covering weapons, cyberattacks, self-harm instructions and fraud give wider protection, but they increase the risk that benign neighboring topics such as chemistry education or penetration testing training are disrupted.
- Curate the retain set carefully, including refusals and borderline benign requests, so normal behavior survives.
- Choose middle layers for the rerouting loss; very early layers harm fluency and very late layers are easier to bypass.
- Measure over-refusal alongside attack success, because the trade-off is the main cost.
- Red-team after training with adaptive attacks, ideally by a team that did not build the defense.
- Extend the method to agents and multimodal inputs separately, since tool calls and images create new harmful trajectories.
Circuit breakers have also been explored for AI agents, where the rerouting targets harmful tool-calling sequences, and for vision-language models, where images can carry adversarial content. These settings need their own circuit breaker data because harmful behavior looks different from harmful text.
Limitations and open questions
Circuit breakers are not a proof of safety. They reduce the probability that known harmful concepts are expressed, but they cannot block harms that the circuit breaker set never described, and they offer no protection if model weights are released and the adapter can be fine-tuned away. Open-weight models can typically be stripped of the defense with a small amount of further training.
A second open question concerns representation coverage. Harmful knowledge may be encoded in several distributed directions, and rerouting the dominant ones does not guarantee that a determined attacker cannot reach the others. Research on mechanistic interpretability and sparse autoencoders aims to show which features actually carry harmful capability, which would make rerouting more targeted.
Stripped to the essentials
A language model builds an internal picture of what it is about to say. Circuit breakers teach the model to scramble that picture when it turns toward something dangerous. Think of an electrical breaker in a house. It does not care why the current spiked. It simply cuts the power.
This matters because people keep inventing new tricks to talk models into harmful answers. A filter that looks for bad wording can miss a clever new trick. A circuit breaker reacts to the dangerous idea itself. The cost is that the model sometimes trips on harmless topics, so builders must test it carefully.
Where it is applied
A company that offers a general-purpose chat assistant built on an 8-billion-parameter open model wants stronger protection against requests for chemical weapon synthesis and malware. The safety team assembles about 5,000 harmful completions across these categories and a retain set of ordinary conversations, refusals and benign chemistry questions, then trains low-rank adapters on a band of middle layers for roughly one hour on a single GPU node.
Before deployment, an internal red team runs prompt-based jailbreaks, adversarial suffixes and prefilling attacks. Attack success falls sharply, and most successful jailbreaks now produce broken text after a few words instead of usable instructions. The team also finds that some benign laboratory safety questions are refused, so they add those to the retain set and retrain. The final system ships with circuit breakers, an output classifier and logging, as layered defenses rather than a single safeguard.