AI Safety Compendium

Shaping the model: data and training

Aligned modelsAlso: Constraining

Circuit breakers and representation rerouting

Train the model so the internal patterns that lead to harmful output get redirected, which cuts the output off. The authors say this works even against attacks it was not trained on.

Open in the compendium

Circuit breakers train a model so that when its internal activity starts heading toward harmful output, that activity is redirected and the output breaks down. Instead of teaching the model to refuse specific requests, the method targets the internal patterns that produce harm in the first place. The aim is a defence that holds even against attacks nobody anticipated in training.

How it works

A language model's internal activations, the numbers it computes at each layer, carry patterns linked to what it is about to say. Representation engineering (October 2023) showed that some of these patterns line up with high-level concepts such as honesty or harmfulness, and that they can be read and steered.

Circuit breakers (June 2024) build on this. Developers collect examples of harmful completions and harmless ones, then fine-tune the model with two goals at once. On harmful examples, training pushes the internal representations into an unrelated direction, a step the authors call representation rerouting. On harmless examples, it keeps the representations as they were. If a jailbreak (a prompt crafted to get around safety training) later steers the model into harmful territory, the rerouted representations stop it from producing coherent harmful text. The same idea was applied to multimodal models and to AI agents that call tools.

Where research stands

In the original paper, average attack success on Llama-3-8B-Instruct across many attacks fell from 38.1% to 3.8%, with general benchmark scores almost unchanged. For an agent asked to take harmful actions with no attack, harmful compliance fell from 58 of 100 requests to 8. A combined model the authors called Cygnet reached an average attack success of 0.8%.

Circuit breakers are still a useful layer, but how robust they look depends heavily on which attacks are tested. In July 2024, two researchers reached a 100% attack success rate against circuit-breaker models by making small changes to attacks on the model's input embeddings. In August 2024 Scale AI's human red-teamers broke a circuit-breaker model in 51.7% of multi-turn conversations, a type of attack automated tests had missed. Attacks that disguise internal activations have also evaded other defences that work inside the model.

Key results

Open problems

See all open problems in this group

Criticisms

Who works on it

Status

Active and contested. Leo Schwinn and Simon Geisler (July 2024) reported a 100% attack success rate against circuit-breaker models using attacks on the model's input embeddings.

Start reading

Related approaches

In their own words

We present an approach, inspired by recent advances in representation engineering, that interrupts the models as they respond with harmful outputs with "circuit breakers." ... As an alternative to refusal training and adversarial training, circuit-breaking directly controls the representations that are responsible for harmful outputs in the first place.

Andy Zou, Long Phan, Justin Wang, Derek Duenas, Maxwell Lin, Maksym Andriushchenko, Rowan Wang, Zico Kolter, Matt Fredrikson, Dan Hendrycks, Improving Alignment and Robustness with Circuit Breakers, 2024

RR directly targets the representations that give rise to harmful outputs and reroutes them to an orthogonal space. This reliably interrupts the model from completing the harmful generations even under strong adversarial pressure.

Andy Zou et al., Improving Alignment and Robustness with Circuit Breakers (full text, Figure 2 caption), 2024

Suggest a correction Something wrong, out of date or missing, such as an organisation? Opens a GitHub issue (free account needed).