SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.15098 · ICLR · 2024

Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Models

Hamid Palangi, Erik Jones, Suriya Gunasekar, Mert Yuksekgonul, Besmira Nushi, Varun Chandrasekaran, Ranjita Naik, Ece Kamar

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2309.15098.json · badge: /api/ran/2309.15098.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
microsoft/mechanistic-error-probe canonical (classifier label)
classifier basis: classifier_2025
6 ran · 4 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
StopForward Ran
ran on a synthesized input · constructed an object; no result was computed
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("d350af5b5c8ee615")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_sub_list Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("56d9c31f9a8ddc6d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_within_text Ran
ran, honoured the contract we drafted
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("4546d6be91afba23")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_module Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from samyadeepbasu/locogen
pointer only · get_code("8953f9ef90cf6afd")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

invoke_with_optional_args Ran
ran; our contract draft was wrong, not the code
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("90cd8804aa1b1e64")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

recursive_copy Ran
ran; our contract draft was wrong, not the code
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("89c23643de6b387c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("3281dccd4fa39596")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Trace Not yet run
unverified (harvested, no recorded run)
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("0aeb158b537a2630")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

TraceDict Not yet run
unverified (harvested, no recorded run)
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("8717ccf6ff080a13")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_metrics Not yet run
unverified (harvested, no recorded run)
microsoft/mechanistic-error-probe/main_probe.py
pointer only (licence: NOASSERTION) · get_code("4d46774ab77c1ff3")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

run_attention_monitor Not yet run
unverified (harvested, no recorded run)
microsoft/mechanistic-error-probe/model_lib/attention_tools.py
pointer only (licence: NOASSERTION) · get_code("4c40a34cc6ec66e9")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, microsoft/mechanistic-error-probe (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 6 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 6 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
repeat_kv
brick of this paper's assembly: helper
243 other papers
8 dated earlier, 3 the same month, 230 later, 2 undated · 22 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2305.17888 (2023-05)
LLM-QAT: Data-Free Quantization Aware Training for Large Language Models
and 240 more not named here
get_module
brick of this paper's assembly: helper
5 other papers
5 later · 1 only as an assembly brick
2310.15213 (2023-10)
Function Vectors in Large Language Models
2405.01008 (2024-05)
On Mechanistic Knowledge Localization in Text-to-Image Generative Models
2405.15349 (2024-05)
Everything is Editable: Extend Knowledge Editing to Unstructured Data in Large Language Models
and 2 more not named here
StopForward
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2405.15349 (2024-05)
Everything is Editable: Extend Knowledge Editing to Unstructured Data in Large Language Models
Trace
brick of this paper's assembly: helper
1 other paper
1 later
2405.15349 (2024-05)
Everything is Editable: Extend Knowledge Editing to Unstructured Data in Large Language Models
TraceDict
brick of this paper's assembly: helper
1 other paper
1 later
2405.15349 (2024-05)
Everything is Editable: Extend Knowledge Editing to Unstructured Data in Large Language Models
invoke_with_optional_args
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2405.15349 (2024-05)
Everything is Editable: Extend Knowledge Editing to Unstructured Data in Large Language Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We investigate the internal behavior of Transformer-based Large Language Models (LLMs) when they generate factually incorrect text. We propose modeling factual queries as constraint satisfaction problems and use this framework to investigate how the LLM interacts internally with factual constraints. We find a strong positive relationship between the LLM's attention to constraint tokens and the factual accuracy of generations. We curate a suite of 10 datasets containing over 40,000 prompts to study the task of predicting factual errors with the Llama-2 family across all scales (7B, 13B, 70B). We propose SAT Probe, a method probing attention patterns, that can predict factual errors and fine-grained constraint satisfaction, and allow early error identification. The approach and findings take another step towards using the mechanistic understanding of LLMs to enhance their reliability. 1

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2309.15098")
get_code_for_paper("2309.15098")
have("2309.15098")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2309.15098.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2309.15098.svg)](https://syntology.ai/paper/2309.15098)

Connect an agent — have() is free.