SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.03621 · 2024

Attend First, Consolidate Later: On the Importance of Attention in Different LLM Layers

arXiv · PDF · Open in the Atlas

Code that ran

6 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 9 no recorded run), measured 2026-11-24; 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/2409.03621.json · badge: /api/ran/2409.03621.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
schwartz-lab-NLP/Attend-First-Consolidate-Later canonical (classifier label)
classifier basis: census
6 ran · 9 no recorded run
FunctionStatusWhere it lives
llama_manipulate_casualLM_forward Ran
ran; our contract draft was wrong, not the code
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/llama_manipulate.py
pointer only (licence: NONE) · get_code("c77ced1c95818050")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

llama_skip_casualLM_forward Ran
ran; our contract draft was wrong, not the code
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/llama_skip.py
pointer only (licence: NONE) · get_code("b06edc31230f8c63")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

llama_skip_decoder_forward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/llama_skip.py
pointer only (licence: NONE) · get_code("faf27efb24417c61")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

llama_skip_model_forward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/llama_skip.py
pointer only (licence: NONE) · get_code("38da980c937dd416")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

mistral_skip_decoder_forward Ran
ran on a synthesized input
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/mistral_skip.py
pointer only (licence: NONE) · get_code("1d312572a2b534cf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

mistral_skip_model_forward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/mistral_skip.py
pointer only (licence: NONE) · get_code("1d96b3096bdd4609")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

add_argument Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/convert_models.py
pointer only (licence: NONE) · get_code("bca7d43f1dfa3090")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

enable_manipulated_gen Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/convert_models.py
pointer only (licence: NONE) · get_code("afad9c2c0ce6ae44")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

enable_skip_attention Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/convert_models.py
pointer only (licence: NONE) · get_code("505d78eeb35e450d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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_injection_data Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/information_injection_demo.py
pointer only (licence: NONE) · get_code("ef50b4a8b49827d4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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_next_token Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/information_injection_demo.py
pointer only (licence: NONE) · get_code("25fec94220fb4524")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

llama_manipulate_model_forward Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/llama_manipulate.py
pointer only (licence: NONE) · get_code("de3c8559ca6e9a7d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

mistral_model_causalLM_manipulated_forward Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/mistral_manipulated.py
pointer only (licence: NONE) · get_code("1572d250024e9631")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

mistral_model_manipulated_forward Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/mistral_manipulated.py
pointer only (licence: NONE) · get_code("4fec8ca69367d057")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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.

mistral_skip_causalLM_forward Not yet run
unverified (harvested, no recorded run)
schwartz-lab-NLP/Attend-First-Consolidate-Later/convert_models/mistral_skip.py
pointer only (licence: NONE) · get_code("3a66a57c55207487")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, schwartz-lab-NLP/Attend-First-Consolidate-Later when it was checked. 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 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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.

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-24.

Repositories linked to this paper

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

Abstract

In decoder-based LLMs, the representation of a given layer serves two purposes: as input to the next layer during the computation of the current token; and as input to the attention mechanism of future tokens. In this work, we show that the importance of the latter role might be overestimated. To show that, we start by manipulating the representations of previous tokens; e.g. by replacing the hidden states at some layer k with random vectors. Our experimenting with four LLMs and four tasks show that this operation often leads to small to negligible drop in performance. Importantly, this happens if the manipulation occurs in the top part of the model-k is in the final 30-50% of the layers. In contrast, doing the same manipulation in earlier layers might lead to chance level performance. We continue by switching the hidden state of certain tokens with hidden states of other tokens from another prompt; e.g., replacing the word "Italy" with "France" in "What is the capital of Italy?". We find that when applying this switch in the top 1/3 of the model, the model ignores it (answering "Rome"). However if we apply it before, the model conforms to the switch ("Paris"). Our results hint at a two stage process in transformer-based LLMs: the first part gathers input from previous tokens, while the second mainly processes that information internally.

For agents

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

get_harvested_code_for_paper("2409.03621")
get_code_for_paper("2409.03621")
have("2409.03621")

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

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

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

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

Connect an agent — have() is free.