SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.08112 · 2023

Eliciting Latent Predictions from Transformers with the Tuned Lens

arXiv · PDF · Open in the Atlas

Code that ran

12 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 10 have no contract verdict; 2 failures of our instrument; 3 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/2303.08112.json · badge: /api/ran/2303.08112.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
alignmentresearch/tuned-lens canonical (classifier label)
classifier basis not recorded on the link
12 ran · 3 no recorded run
FunctionStatusWhere it lives
ablate_layer Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/causal/ablation.py
code served (permissive licence) · get_code("05340b7010647c2e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned _GeneratorContextManager. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Helper functions that the function calls
def get_transformer_layers(model):
    """Return tuple of (model, layers_list) where layers_list is the actual layer modules."""
    # The function expects get_transformer_layers to return (something, layers)
    # where layers is indexable
    return model, model.layers

def derange(residuals):
    """Randomly permute residuals along batch dimension."""
    batch_size = residuals.shape[0]
    perm = torch.randperm(batch_size)
    # Shift by 1 to ensure at least one element is different (derangement-like)
    perm = (perm + 1) % batch_size
    return residuals[perm]

# Build a minimal transformer-like model
class SimpleTransformerLayer(nn.Module):
    def __init__(self, hidden_dim):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, hidden_dim)
    
    def forward(self, x):
        # Return (output, *extras) where output includes residual
        # y should be such that y - x gives the residual
        residual_output = self.linear(x)
        y = x + residual_output
        return (y,)

class SimpleTransformer(nn.Module):
    def __init__(self, hidden_dim, num_layers):
        super().__init__()
        self.layers = nn.ModuleList([
            SimpleTransformerLayer(hidden_dim) for _ in range(num_layers)
        ])
    
    def forward(self, x):
        for layer in self.layers:
            x = layer(x)[0]
        return x

# Create model with 3 layers
hidden_dim = 4
num_layers = 3
model = SimpleTransformer(hidden_dim, num_layers)

# Create input: (batch_size=2, seq_len=3, hidden_dim=4)
# Using batch_size >= 2 because mean ablation requires it
x = torch.randn(2, 3, 4)

# Define ARGS for ablate_layer
ARGS = {
    'model': model,
    'layer_index': 1,
    'method': 'mean',
    'mode': 'batch'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _GeneratorContextManager — a _GeneratorContextManager output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _GeneratorContextManager output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ablate_subspace Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/causal/subspaces.py
code served (permissive licence) · get_code("5873fbd5d509497a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned _GeneratorContextManager. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal transformer-like model
class SimpleTransformer(nn.Module):
    def __init__(self, hidden_dim=4, num_layers=2):
        super().__init__()
        self.layers = nn.ModuleList([
            nn.Linear(hidden_dim, hidden_dim) for _ in range(num_layers)
        ])
    
    def forward(self, x):
        for layer in self.layers:
            x = layer(x)
        return x

def get_transformer_layers(model):
    """Stand-in function that returns model and its layers"""
    return model, model.layers

# Create model with hidden dimension 4
model = SimpleTransformer(hidden_dim=4, num_layers=2)

# Create A: a 2D matrix whose column space will be removed
# Shape: (4, 3) - 4 is the dimension, 3 is the number of basis vectors
A = torch.randn(4, 3)

# Layer index to ablate
layer_index = 0

# Mode for ablation
mode = 'zero'

# Orthonormal flag
orthonormal = False

ARGS = {
    'model': model,
    'A': A,
    'layer_index': layer_index,
    'mode': mode,
    'orthonormal': orthonormal
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _GeneratorContextManager — a _GeneratorContextManager output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _GeneratorContextManager output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
assert_type Ran
ran; our contract draft was wrong, not the code
alignmentresearch/tuned-lens/tuned_lens/utils.py
code served (permissive licence) · get_code("03a35f0556b1fb36")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from typing import Type, TypeVar, Any, cast

torch.manual_seed(0)

T = TypeVar('T')

def assert_type(typ: Type[T], obj: Any) -> T:
    """Assert that an object is of a given type at runtime and return it."""
    if not isinstance(obj, typ):
        raise TypeError(f'Expected {typ.__name__}, got {type(obj).__name__}')
    return cast(typ, obj)


# Build test arguments
test_obj = "hello"
test_type = str

ARGS = {
    'typ': test_type,
    'obj': test_obj,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
derange Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/causal/utils.py
code served (permissive licence) · get_code("148a538543a231c3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch as th

th.manual_seed(0)

# Create a small batch tensor with shape (2, 4)
# batch.shape[0] is used to determine the number of derangements needed
batch = th.randn(2, 4)

# generator is optional, can be None or a torch.Generator
generator = None

ARGS = {
    'batch': batch,
    'generator': generator,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_columns_all_equal Ran
ran; our contract draft was wrong, not the code
alignmentresearch/tuned-lens/tuned_lens/data.py
pointer only (licence: MIT); the stored copy get_code serves, from Teddy-XiongGZ/RAGLens, is pointer only (licence: NONE) · get_code("b44a86959a6f33aa")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Teddy-XiongGZ/RAGLens, and GitHub detected no licence in that repository 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.

get_key_path Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/model_surgery.py
code served (permissive licence) · get_code("e3a98b026c8ac489")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Parameter, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch as th
import torch.nn as nn

# Build a small model with nested structure matching the key path
class SimpleAttention(nn.Module):
    def __init__(self):
        super().__init__()
        self.query = nn.Linear(4, 3)

class SimpleLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.attention = SimpleAttention()

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layers = nn.ModuleList([SimpleLayer(), SimpleLayer()])

th.manual_seed(0)
model = SimpleModel()

# The key_path "layers.0.attention.query.weight" should:
# 1. Access model['layers'] or model.layers -> ModuleList
# 2. Access layers[0] -> SimpleLayer
# 3. Access layer.attention -> SimpleAttention
# 4. Access attention.query -> Linear module
# 5. Access query.weight -> tensor

ARGS = {
    "model": model,
    "key_path": "layers.0.attention.query.weight"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Parameter, ndim 2, dtype family float — no output shape is stated: observe_signature.py recorded Tensor ndim 2, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_value_for_key Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/model_surgery.py
code served (permissive licence) · get_code("553b8a92b63240ca")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Test case 1: Object with __getitem__ (list-like) and numeric key
test_list = [10, 20, 30, 40]

# Test case 2: Object with __getattr__ (attribute access) and string key
class TestObject:
    def __init__(self):
        self.name = "test_value"
        self.count = 42
        self.data = torch.randn(2, 4)

test_obj = TestObject()

# We'll test the numeric key case
ARGS = {
    "obj": test_list,
    "key": "0"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_lens_artifacts Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/load_artifacts.py
code served (permissive licence) · get_code("001dd74061137709")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
from pathlib import Path

# Create temporary directory structure to simulate local lens artifacts
temp_dir = tempfile.mkdtemp()
resource_id = "test_lens"
resource_path = Path(temp_dir) / resource_id
resource_path.mkdir(parents=True, exist_ok=True)

# Create dummy config.json and params.pt files
config_file_path = resource_path / "config.json"
ckpt_file_path = resource_path / "params.pt"

config_file_path.write_text('{"model": "test"}')
ckpt_file_path.write_bytes(b"dummy checkpoint data")

ARGS = {
    "resource_id": str(resource_path),
    "repo_id": "AlignmentResearch/tuned-lens",
    "repo_type": "space",
    "revision": "main",
    "config_file": "config.json",
    "ckpt_file": "params.pt",
    "subfolder": "lens",
    "cache_dir": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
huggingface_hub — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
maybe_all_cat Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/utils.py
code served (permissive licence) · get_code("649fe343c07b8712")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch as th
import torch.distributed as dist

th.manual_seed(0)

# Create a simple tensor for the function to process
# The function checks if distributed training is initialized,
# and if not, returns the tensor as-is.
# If it were initialized, it would use all_gather_into_tensor.
# We'll pass a CPU tensor with shape (2, 4) - batch size 2, feature dim 4
x = th.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
maybe_all_gather_lists Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/utils.py
code served (permissive licence) · get_code("b060d589bc7c497e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.distributed as dist
from unittest.mock import MagicMock, patch

torch.manual_seed(0)

# Since dist.is_initialized() will return False in a non-distributed environment,
# we need to create a simple list argument that the function can return as-is.
# The function takes a list of objects and either returns it unchanged (if not initialized)
# or gathers lists from all processes (if initialized).

# Create a simple list with various objects
test_list = [
    {"key": "value1", "num": 42},
    [1, 2, 3, 4],
    "string_object",
    torch.tensor([1.0, 2.0, 3.0, 4.0]),
    {"nested": {"data": [5, 6, 7]}},
]

ARGS = {
    "lst": test_list,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
remove_subspace Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/causal/subspaces.py
code served (permissive licence) · get_code("8142229159bd502a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch as th
import torch.nn as nn

th.manual_seed(0)

def derange(samples):
    """Helper function to derange samples (shuffle along batch dimension)."""
    # Simple derangement: roll by 1 along batch dimension
    return th.roll(samples, shifts=1, dims=0)

# Construct test tensors
# u: shape (batch=2, dim=4) - vectors to be projected
u = th.randn(2, 4)

# A: shape (dim=4, rank=2) - matrix whose column space is to be removed
A = th.randn(4, 2)

ARGS = {
    'u': u,
    'A': A,
    'mode': 'zero',
    'orthonormal': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_derangement Ran
ran on a synthesized input
alignmentresearch/tuned-lens/tuned_lens/causal/utils.py
code served (permissive licence) · get_code("313c6e8555ede0bd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family int, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch as th

# Set seed for reproducibility
th.manual_seed(0)

# Construct arguments for sample_derangement
n = 5  # Size of derangement (must be >= 2)
device = th.device('cpu')  # CPU device
generator = th.Generator(device=device)
generator.manual_seed(42)  # Optional generator with seed

ARGS = {
    'n': n,
    'device': device,
    'generator': generator
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family int, shape (5,) — shape (5,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
available_lens_artifacts Not yet run
unverified (harvested, no recorded run)
alignmentresearch/tuned-lens/tuned_lens/load_artifacts.py
code served (permissive licence) · get_code("53ed6e74b623ee2b")
How it ran

no invocation recorded.

chunk_and_tokenize Not yet run
unverified (harvested, no recorded run)
alignmentresearch/tuned-lens/tuned_lens/data.py
code served (permissive licence) · get_code("a7da4d3f0adefb46")
How it ran

no invocation recorded.

get_unembedding_matrix Not yet run
unverified (harvested, no recorded run)
alignmentresearch/tuned-lens/tuned_lens/model_surgery.py
code served (permissive licence) · get_code("545cc2aefbd57975")
How it ran

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, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 13 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
assert_type 5 other papers
5 later
2312.01037 (2023-12)
Eliciting Latent Knowledge from Quirky Language Models
2406.04093 (2024-06)
Scaling and evaluating sparse autoencoders
2410.16090 (2024-10)
Analysing the Residual Stream of Language Models Under Knowledge Conflicts
and 2 more not named here
get_columns_all_equal 4 other papers
4 later
2406.04093 (2024-06)
Scaling and evaluating sparse autoencoders
2410.16090 (2024-10)
Analysing the Residual Stream of Language Models Under Knowledge Conflicts
2501.18823 (2025-01)
Transcoders Beat Sparse Autoencoders for Interpretability
and 1 more not named here

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 analyze transformers from the perspective of iterative inference, seeking to understand how model predictions are refined layer by layer. To do so, we train an affine probe for each block in a frozen pretrained model, making it possible to decode every hidden state into a distribution over the vocabulary. Our method, the tuned lens, is a refinement of the earlier "logit lens" technique, which yielded useful insights but is often brittle. We test our method on various autoregressive language models with up to 20B parameters, showing it to be more predictive, reliable and unbiased than the logit lens. With causal experiments, we show the tuned lens uses similar features to the model itself. We also find the trajectory of latent predictions can be used to detect malicious inputs with high accuracy. All code needed to reproduce our results can be found at https://github.com/AlignmentResearch/tuned-lens.

For agents

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

get_harvested_code_for_paper("2303.08112")
get_code_for_paper("2303.08112")
have("2303.08112")

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

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

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

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

Connect an agent — have() is free.