SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.11380 · 2022

Outliers Dimensions that Disrupt Transformers Are Driven by Frequency

arXiv · PDF · Open in the Atlas

Code that ran

8 of 16 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 8 have no contract verdict; 0 failures of our instrument; 8 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/2205.11380.json · badge: /api/ran/2205.11380.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
gpucce/outliersvsfreq canonical (classifier label)
classifier basis not recorded on the link
8 ran · 8 no recorded run
FunctionStatusWhere it lives
corr_freq Ran
ran on a synthesized input
gpucce/outliersvsfreq/outliersvsfreq/pyplot/plotting_correlation.py
code served (permissive licence) · get_code("1b51980570480603")
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 float, shape (12,) 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 numpy as np
from scipy.stats import pearsonr

torch.manual_seed(0)

# Analyze the function:
# - freqs: indexed with masks.bool(), so needs to be tensor-like with boolean indexing
# - hidden_states: indexed as hidden_states[idx] where idx goes 0-11, then boolean indexed
#   So it's a sequence of 12 items, each indexable with a mask
# - masks: needs .bool() method, and boolean indexing support

# Create freqs: 1D tensor of frequencies
freqs = torch.randn(10)

# Create hidden_states: list/tensor of 12 items, each a 1D tensor
hidden_states = torch.randn(12, 10)

# Create masks: boolean tensor of shape (10,)
masks = torch.tensor([True, False, True, True, False, True, False, True, True, False])

ARGS = {
    "freqs": freqs,
    "hidden_states": hidden_states,
    "masks": masks,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, 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 float, shape (12,) — shape (12,) 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
free_gather_scores Ran
ran on a synthesized input
gpucce/outliersvsfreq/outliersvsfreq/gather_scores.py
code served (permissive licence) · get_code("a33067a65c46cc19")
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 tempfile
import json
import os

# Create a temporary directory with test JSON files
temp_dir = tempfile.mkdtemp()

# Create test JSON files with the expected structure
test_files = [
    "task1_[id1].json",
    "task1_[id2].json",
    "task2_[id1].json",
    "task2_[id3].json",
]

for file_name in test_files:
    file_path = os.path.join(temp_dir, file_name)
    if "task1_[id1]" in file_name:
        data = {"eval_accuracy": 0.95}
    elif "task1_[id2]" in file_name:
        data = {"eval_matthews_correlation": 0.87}
    elif "task2_[id1]" in file_name:
        data = {"eval_spearmanr": 0.92}
    else:
        data = {"eval_accuracy": 0.88}
    
    with open(file_path, 'w') as f:
        json.dump(data, f)

ARGS = {
    'path': temp_dir,
    'exclude': [],
    'include': [],
    'include_or': [],
    'name': '',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — 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
free_gather_scores_with_layers Ran
ran on a synthesized input
gpucce/outliersvsfreq/outliersvsfreq/gather_scores.py
code served (permissive licence) · get_code("108985beabfedd43")
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 os.path as osp
import json
import tempfile
import shutil

# Create a temporary directory with test JSON files
temp_dir = tempfile.mkdtemp()

# Create sample JSON files that match the expected naming pattern
test_files = [
    "task1_layers_0_[0-5].json",
    "task1_layers_1_[6-10].json",
    "task2_layers_0_[0-5].json",
    "task2_layers_1_[6-10].json",
]

for file_name in test_files:
    file_path = osp.join(temp_dir, file_name)
    data = {
        "eval_accuracy": 0.85,
        "eval_loss": 0.15
    }
    with open(file_path, 'w') as f:
        json.dump(data, f)

# Alternative file with different metrics
alt_file = osp.join(temp_dir, "task3_layers_0_[0-5].json")
with open(alt_file, 'w') as f:
    json.dump({"eval_matthews_correlation": 0.75, "eval_loss": 0.25}, f)

alt_file2 = osp.join(temp_dir, "task3_layers_1_[6-10].json")
with open(alt_file2, 'w') as f:
    json.dump({"eval_spearmanr": 0.80}, f)

# File that should be excluded
excluded_file = osp.join(temp_dir, "skip_task_layers_0_[0-5].json")
with open(excluded_file, 'w') as f:
    json.dump({"eval_accuracy": 0.90}, f)

ARGS = {
    "path": temp_dir,
    "exclude": ["skip"],
    "include": [],
    "include_or": [],
    "name": "test"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — 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
gather_scores Ran
ran on a synthesized input
gpucce/outliersvsfreq/outliersvsfreq/gather_scores.py
code served (permissive licence) · get_code("c9b158755dc0f543")
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 dict. 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 os
import tempfile
import json
import pandas as pd

# Create a temporary directory with test JSON files
temp_dir = tempfile.mkdtemp()

# Create test JSON files with different task names and metrics
test_files = [
    ("task1_[id1].json", {"eval_accuracy": 0.95}),
    ("task1_[id2].json", {"eval_accuracy": 0.93}),
    ("task2_[id1].json", {"eval_matthews_correlation": 0.87}),
    ("task2_[id2].json", {"eval_matthews_correlation": 0.89}),
    ("task3_[id1].json", {"eval_spearmanr": 0.91}),
    ("task3_[id2].json", {"eval_spearmanr": 0.92}),
]

for filename, data in test_files:
    filepath = os.path.join(temp_dir, filename)
    with open(filepath, 'w') as f:
        json.dump(data, f)

ARGS = {
    'path': temp_dir,
    'exclude': [],
    'include': [],
    'include_or': [],
    'name': ''
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, regex — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_layers Ran
ran on a synthesized input
gpucce/outliersvsfreq/outliersvsfreq/parameter_access.py
code served (permissive licence) · get_code("2349f1f44cdb663a")
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, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a small model with named parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
        self.embedding = nn.Embedding(5, 4)
        self.attention_head = nn.Linear(2, 2)
    
    def forward(self, x):
        return x

model = SimpleModel()

# present: list of strings to filter for - parameters containing these strings will be included
present = ["layer", "attention"]

# absent: list of strings to filter against - parameters containing these strings will be excluded
absent = ["embedding"]

ARGS = {
    "model": model,
    "present": present,
    "absent": absent
}
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, ndim 1, dtype family float — a list 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
replace_weight_name Ran
ran on a synthesized input
gpucce/outliersvsfreq/outliersvsfreq/util.py
code served (permissive licence) · get_code("508d37d044d4a5d6")
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

torch.manual_seed(0)

ARGS = {
    'stringa': 'encoder.sentence_encoder.layers.0.self_attn.q_proj.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 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
self_generate_sents Ran
ran on a synthesized input
gpucce/outliersvsfreq/outliersvsfreq/util.py
code served (permissive licence) · get_code("0a19e5b39a0281f0")
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. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, input_ids, attention_mask, output_attentions=False):
        # Simulate model output with logits and attentions
        batch_size, seq_len = input_ids.shape
        logits = self.linear(torch.randn(batch_size, seq_len, 4))
        
        attentions = None
        if output_attentions:
            # Return a tuple of attention tensors (one per layer)
            attentions = (torch.randn(batch_size, 2, seq_len, seq_len),)
        
        # Create output object with logits and attentions attributes
        class ModelOutput:
            pass
        
        out = ModelOutput()
        out.logits = logits
        out.attentions = attentions
        return out

# Create a minimal tokenizer that satisfies the function's usage
class MinimalTokenizer:
    def __call__(self, text, return_tensors=None, padding=False):
        # Return dict with input_ids and attention_mask
        batch_size = 2
        seq_len = 3
        result = {
            'input_ids': torch.randint(0, 4, (batch_size, seq_len)),
            'attention_mask': torch.ones(batch_size, seq_len)
        }
        return result
    
    def decode(self, tokens):
        # Simple decode that returns a string representation
        return f"decoded_{tokens.tolist()}"

# Construct arguments
model = MinimalModel()
loc_tokenizer = MinimalTokenizer()
sents = ["hello world", "test sentence"]
start_idx = 0
end_idx = None

ARGS = {
    'model': model,
    'loc_tokenizer': loc_tokenizer,
    'sents': sents,
    'start_idx': start_idx,
    'end_idx': end_idx
}
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 tuple — a tuple 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
stack_plot_perf Ran
ran on a synthesized input
gpucce/outliersvsfreq/outliersvsfreq/pyplot/plotting_scores.py
code served (permissive licence) · get_code("c27f75a28dbe7d4a")
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. 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 pandas as pd
import numpy as np

# Create two sample DataFrames with numeric columns
# The function iterates over columns and accesses .values, and uses range(12)
# So we need DataFrames with 12 rows and multiple columns
np.random.seed(0)

df1 = pd.DataFrame({
    'metric_a': np.random.randn(12),
    'metric_b': np.random.randn(12),
    'metric_c': np.random.randn(12),
})

df2 = pd.DataFrame({
    'loss': np.random.randn(12),
    'accuracy': np.random.randn(12),
})

ARGS = {
    'df1': df1,
    'df2': df2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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
get_layernorm_layers Not yet run
unverified (harvested, no recorded run)
gpucce/outliersvsfreq/outliersvsfreq/parameter_access.py
code served (permissive licence) · get_code("f1f2a706bef961c1")
How it ran

no invocation recorded.

get_vit_layernorm_layers Not yet run
unverified (harvested, no recorded run)
gpucce/outliersvsfreq/outliersvsfreq/parameter_access.py
code served (permissive licence) · get_code("e11878a2b3bf9277")
How it ran

no invocation recorded.

scale_param_ Not yet run
unverified (harvested, no recorded run)
gpucce/outliersvsfreq/outliersvsfreq/parameter_hiding.py
code served (permissive licence) · get_code("01f7363ecd6f58ab")
How it ran

no invocation recorded.

smart_init_ Not yet run
unverified (harvested, no recorded run)
gpucce/outliersvsfreq/outliersvsfreq/util.py
code served (permissive licence) · get_code("1cc3a191a5fc8f71")
How it ran

no invocation recorded.

stack_plot_corr Not yet run
unverified (harvested, no recorded run)
gpucce/outliersvsfreq/outliersvsfreq/pyplot/plotting_correlation.py
code served (permissive licence) · get_code("d9d660f307837089")
How it ran

no invocation recorded.

stack_plot_freq Not yet run
unverified (harvested, no recorded run)
gpucce/outliersvsfreq/outliersvsfreq/pyplot/plotting_correlation.py
code served (permissive licence) · get_code("8ff4e48a0a36bb08")
How it ran

no invocation recorded.

zero_last_param_ Not yet run
unverified (harvested, no recorded run)
gpucce/outliersvsfreq/outliersvsfreq/parameter_hiding.py
code served (permissive licence) · get_code("4763445fb22e6e94")
How it ran

no invocation recorded.

zero_param_ Not yet run
unverified (harvested, no recorded run)
gpucce/outliersvsfreq/outliersvsfreq/parameter_hiding.py
code served (permissive licence) · get_code("72570b46c29b7444")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 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 16 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-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

While Transformer-based language models are generally very robust to pruning, there is the recently discovered outlier phenomenon: disabling only 48 out of 110M parameters in BERT-base drops its performance by nearly 30% on MNLI. We replicate the original evidence for the outlier phenomenon and we link it to the geometry of the embedding space. We find that in both BERT and RoBERTa the magnitude of hidden state coefficients corresponding to outlier dimensions correlates with the frequency of encoded tokens in pre-training data, and it also contributes to the "vertical" self-attention pattern enabling the model to focus on the special tokens. This explains the drop in performance from disabling the outliers, and it suggests that to decrease anisotropicity in future models we need pre-training schemas that would better take into account the skewed token distributions.

For agents

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

get_harvested_code_for_paper("2205.11380")
get_code_for_paper("2205.11380")
have("2205.11380")

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

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

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

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

Connect an agent — have() is free.