System 2 attention

Also known as: S2A

On this page 7

System 2 attention (S2A) is a two-step prompting technique in which a large language model first regenerates its input context, keeping only the material relevant to the question and removing distracting or opinion-laden text, and then answers using that cleaned context. In prompting, it addresses a known weakness of transformer models: soft attention assigns weight to everything in the prompt, including irrelevant sentences and leading opinions.

The name borrows the System 1 and System 2 distinction from cognitive psychology, where System 2 is slow, deliberate reasoning. S2A was introduced in 2023 by researchers at Meta as a way to make artificial intelligence models less sycophantic and less easily distracted without retraining them.

How System 2 attention rewrites the context

System 2 attention works by separating context selection from answering. Instead of asking the model to ignore irrelevant text implicitly, S2A makes the filtering an explicit generation step whose output replaces the original prompt.

  1. Context regeneration: the model receives the full input and an instruction to extract the unbiased, relevant parts, often split into a context section and a question section.
  2. Answer generation: a second call receives only the regenerated text and produces the final response.
  3. Optional merge: some variants append the original context as well, which recovers detail but reintroduces some bias.

The key insight is that a model is often better at recognizing irrelevant content than at ignoring it while answering. By writing out a filtered version, the model removes the tokens that would otherwise pull its attention, so the second pass cannot be influenced by them.

The table below summarizes what each step receives and produces.

StepInputOutputMain purpose
RegenerationOriginal prompt plus S2A instructionFiltered context and questionRemove distractors and opinions
AnsweringFiltered context and question onlyFinal responseReason without biasing text
Merge variantFiltered and original contextFinal responseKeep detail lost in filtering
Inputs and outputs of the two S2A steps

Problems that System 2 attention targets

S2A targets failures in which surface features of the prompt change the answer even though they should not. The original evaluation focused on three categories of task.

Failure typeTypical prompt featureEffect without S2A
SycophancyUser states an opinion about the answerModel agrees with the user
Distractor sensitivityIrrelevant sentence with numbersWrong arithmetic in math problems
Opinion bias in writingPrompt reveals the author’s stanceLess objective argument text
Spurious repetitionEntity repeated in the contextModel overweights that entity
Failure types addressed by System 2 attention

In reported experiments, S2A raised factual accuracy on opinion-laden trivia questions and improved math word problems with irrelevant sentences, bringing results closer to those obtained with clean prompts. Gains vary by model and task, so the technique should be measured on the target workload rather than assumed.

System 2 attention is a preprocessing technique for the input, whereas most reasoning methods change how the model processes or checks its output. It can therefore be combined with other methods, for example running chain-of-thought on the regenerated context.

TechniqueWhat it changesRelation to S2A
Chain-of-thoughtAdds explicit reasoning stepsComplementary; S2A cleans the input first
Rephrase and respondModel restates the questionSimilar rewrite idea, no filtering goal
Step-back promptingAsks a more general question firstAbstracts rather than removes content
Chain-of-verificationChecks the draft answerActs after answering, not before
Thread of thoughtWalks through long context in partsOrganizes context instead of pruning it
System 2 attention compared with neighboring techniques

Unlike an instruction such as “ignore irrelevant information”, which leaves all tokens in the prompt, S2A physically removes them from the second call. Simple instructions help somewhat, but they usually perform worse than full regeneration on strongly biased inputs.

Applying System 2 attention in practice

Practitioners apply S2A as a pipeline of two model calls, often with a smaller or cheaper model handling the regeneration step. A good regeneration prompt asks the model to extract only text that helps answer the question, to drop opinions about the answer, and to output the result under clear labels such as context and question.

  • Use it when inputs come from users or documents that may contain leading opinions, noise or injected claims.
  • Skip it for short, clean prompts, where the extra call adds latency without benefit.
  • Log the regenerated context so reviewers can see what was removed.
  • Evaluate both variants, with and without the original context appended.

The main trade-off is cost and latency: S2A roughly doubles the number of calls and adds the tokens of the regenerated context. For high-volume systems, teams often trigger S2A only when a classifier flags opinionated or noisy input.

Limitations and risks

System 2 attention depends on the model judging relevance correctly, and that judgment can fail. If the regeneration step removes a needed fact, the second call has no way to recover it, and the answer degrades even on easy questions.

  • Over-filtering: legitimate constraints or user preferences may be removed as if they were bias.
  • Paraphrase drift: rewritten context can subtly alter numbers, names or conditions.
  • Not a security control: S2A reduces the influence of distracting text but does not reliably block prompt injection.
  • Model dependence: weaker models produce poorer filtered context and smaller gains.

A non-technical view

Picture a student given a math problem with a few unrelated sentences mixed in. A careful student first copies out only the facts that matter. Then the student solves that clean version.

System 2 attention asks an AI model to do the same. First it rewrites the question without the clutter. Then it answers the clean version. The model is less likely to be swayed by hints, opinions or noise that should not matter.

A concrete example

A customer support team uses a language model to answer billing questions. Customers often write messages such as “I am sure the late fee is illegal, so please confirm it will be removed”, and the model tended to agree with the customer’s claim even when the policy said otherwise.

The team adds an S2A step. A small model first rewrites each message into a neutral question plus relevant account facts, for example “Does the contract allow a late fee after 15 days?” The main model then answers from that text and the policy documents. In a review of 500 sampled tickets, agents found fewer answers that simply echoed the customer, at the cost of about 40 percent higher latency per reply. The team keeps S2A only for messages that a classifier marks as opinionated.