SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.03819 · 2023

LEACE: Perfect linear concept erasure in closed form

arXiv · PDF · Open in the Atlas

Code that ran

12 of 14 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; 1 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 2 failures of our instrument; 2 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/2306.03819.json · badge: /api/ran/2306.03819.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
eleutherai/concept-erasure canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FairUnlearn/detoxai community (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_mass_mean_probe Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/cavs/mass_mean_probe.py
code served (permissive licence) · get_code("39a9a55630bed817")
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 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 numpy as np
import torch

torch.manual_seed(0)

# Create sample data
# vecs: shape (samples, features) - let's use (6, 4) for 6 samples and 4 features
vecs = np.random.randn(6, 4).astype(np.float32)

# targets: shape (samples,) - binary labels (0 or 1)
# Let's have 3 samples with label 0 (non-artifact) and 3 with label 1 (artifact)
targets = np.array([0, 0, 0, 1, 1, 1], dtype=np.int64)

ARGS = {
    "vecs": vecs,
    "targets": targets,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
construct_metrics_config Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/core/interface_helpers.py
code served (permissive licence) · get_code("b32c03649dd0c3ec")
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 torch
import numpy as np

torch.manual_seed(0)

# The function construct_metrics_config takes two parameters:
# 1. metrics: list[str] | str - can be 'all' or a list of strings
# 2. types: str - can be 'GAP' or 'RATIO'

# Looking at the function body:
# - metrics is compared to 'all' (string comparison)
# - If metrics == 'all', it uses predefined fair_metrics and perf_metrics lists
# - If metrics is not 'all', it raises NotImplementedError
# - types is compared to 'GAP' and 'RATIO' (string comparisons)
# - No actual usage of the values beyond these comparisons

ARGS = {
    'metrics': 'all',
    'types': 'GAP'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
evaluate_model Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/core/evaluation.py
code served (permissive licence) · get_code("375ff94b7f4a2397")
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. 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
from torch.utils.data import DataLoader

torch.manual_seed(0)

# Mock comprehensive_metrics_torch function since it's called but not defined
def comprehensive_metrics_torch(targets, preds, protected_attributes):
    """Mock implementation that returns a dict of metrics as tensors"""
    return {
        'accuracy': torch.tensor(0.85),
        'fairness': torch.tensor(0.92),
        'precision': torch.tensor(0.88),
    }

# Inject mock into the module namespace
import sys
current_module = sys.modules[__name__]
current_module.comprehensive_metrics_torch = comprehensive_metrics_torch

# Build a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)  # 4 input features, 3 output classes
    
    def forward(self, x):
        return self.linear(x)

model = MinimalModel()

# Build a minimal DataLoader
# Each batch is a tuple of (x, y, prot_attr)
# x: batch of 2 samples, 4 features each
# y: batch of 2 labels (class indices 0-2)
# prot_attr: batch of 2 protected attributes
batch1 = (
    torch.randn(2, 4),
    torch.tensor([0, 1]),
    torch.tensor([0, 1])
)
batch2 = (
    torch.randn(2, 4),
    torch.tensor([2, 0]),
    torch.tensor([1, 0])
)

dataloader = [batch1, batch2]

# Define arguments
ARGS = {
    'model': model,
    'dataloader': dataloader,
    'pareto_metrics': ['accuracy', 'fairness'],
    'device': 'cpu',
}
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 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
g Ran
ran; our contract draft was wrong, not the code
eleutherai/concept-erasure/experiments/fleace.py
code served (permissive licence) · get_code("203f94a4b5a85512")
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, 3) 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.functional as F

torch.manual_seed(0)

# Create a small tensor with distinct dimensions: batch=2, features=4
x = torch.randn(2, 4)

# Set k to be less than the last dimension
k = 3

# Set device to CPU
device = 'cpu'

# Construct the ARGS dictionary
ARGS = {
    'x': x,
    'k': k,
    'device': device
}
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, 3) — shape (2, 3) 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_all_layers Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/cavs/extract_activations.py
code served (permissive licence) · get_code("cca0703f7f2a9c0e")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a small nested model with multiple layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
        self.nested = nn.Sequential(
            nn.Linear(2, 5),
            nn.ReLU(),
            nn.Linear(5, 1)
        )
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        x = self.nested(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model,
    'prefix': ''
}
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 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_layer_by_name Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/cavs/extract_activations.py
code served (permissive licence) · get_code("d33f71007b5dc457")
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 Sequential. 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)

# Build a model with nested layers that can be accessed by dot-separated names
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Sequential(
            nn.Linear(4, 3),
            nn.ReLU()
        )
        self.decoder = nn.Linear(3, 2)
        self.nested = nn.ModuleDict({
            'layer1': nn.Linear(2, 4)
        })

model = SimpleModel()

# Test case 1: Access a top-level attribute
layer_name = "encoder"

ARGS = {
    "model": model,
    "layer_name": layer_name
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
infer_layers Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/core/interface_helpers.py
code served (permissive licence) · get_code("abe7aa13cf16aede")
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)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
        self.layer3 = nn.Linear(2, 1)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        x = self.layer3(x)
        return x

def get_layer_by_name(model, layer_name):
    """Helper function to get a layer by name from a model"""
    if layer_name == "":
        return model
    for name, module in model.named_modules():
        if name == layer_name:
            return module
    return model

class CorrectorStandIn:
    """Stand-in corrector object with a model attribute"""
    def __init__(self, model):
        self.model = model

model = SimpleModel()
corrector = CorrectorStandIn(model)

ARGS = {
    "corrector": corrector,
    "layers": "last"
}
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
is_pareto_efficient Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/core/mcda_helpers.py
code served (permissive licence) · get_code("72eb626f8906d540")
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 ndarray, ndim 1, dtype family float, 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 numpy as np

# Create sample costs array with multiple objectives
# Shape: (n_points, n_costs)
# Let's create 5 points with 3 cost objectives
costs = np.array([
    [1.0, 2.0, 3.0],
    [2.0, 1.0, 4.0],
    [3.0, 3.0, 2.0],
    [0.5, 5.0, 5.0],
    [2.5, 2.5, 2.5]
], dtype=np.float32)

ARGS = {
    "costs": costs,
    "return_mask": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, 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
load_activations Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/cavs/extract_activations.py
code served (permissive licence) · get_code("7c2b37a6331c6391")
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 tempfile
import numpy as np
import os

# Create a temporary npz file with sample activations
temp_dir = tempfile.mkdtemp()
save_path = os.path.join(temp_dir, "activations.npz")

# Create sample activation data
activations_data = {
    "layer_1": np.random.randn(2, 4),
    "layer_2": np.random.randn(3, 5),
    "layer_3": np.random.randn(2, 3, 4)
}

# Save to npz file
np.savez(save_path, **activations_data)

ARGS = {
    "save_path": save_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
parse_methods_config Ran
ran on a synthesized input
FairUnlearn/detoxai/src/detoxai/core/interface.py
code served (permissive licence) · get_code("b73ffc8f530e3ef6")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Construct a minimal methods_config dict that will be passed to parse_methods_config
# This should be a partial config that will be merged with DEFAULT_METHODS_CONFIG

methods_config = {
    'global': {
        'last_layer_name': 'custom_last',
        'experiment_name': 'test_exp',
    },
    'PCLARC': {
        'cav_type': 'custom_signal',
    },
    'LEACE': {
        'use_cache': False,
    },
    'FINETUNE': {
        'fine_tune_epochs': 5,
    }
}

ARGS = {
    'methods_config': methods_config,
}
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 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
relu_eraser Ran
ran; our contract draft was wrong, not the code
eleutherai/concept-erasure/experiments/fleace.py
code served (permissive licence) · get_code("531027e767080721")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for the function
# relu_eraser(x: torch.Tensor, n: int, k: int)
# x should be a 2D tensor with shape (batch, n) where batch=2, n=4
x = torch.randn(2, 4)

# n is the dimension parameter, should match x.shape[1]
n = 4

# k is the number of ReLU output features to use, should be <= n
k = 3

ARGS = {
    "x": x,
    "n": n,
    "k": k,
}
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
v_transform Ran
ran, honoured the contract we drafted
eleutherai/concept-erasure/experiments/fleace.py
code served (permissive licence) · get_code("615d0b76d8de9c0d")
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 (4, 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

torch.manual_seed(0)

# K is a symmetric positive semi-definite kernel matrix
# The function expects a 2D tensor
# Create a small symmetric kernel matrix (4x4)
K = torch.tensor([
    [1.0, 0.8, 0.6, 0.4],
    [0.8, 1.0, 0.7, 0.5],
    [0.6, 0.7, 1.0, 0.6],
    [0.4, 0.5, 0.6, 1.0]
], dtype=torch.float32)

ARGS = {
    "K": K
}
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 (4, 4) — shape (4, 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
compute_cav Not yet run
unverified (harvested, no recorded run)
FairUnlearn/detoxai/src/detoxai/cavs/cav.py
code served (permissive licence) · get_code("2169d858bb0d8420")
How it ran

no invocation recorded.

resolve_layer Not yet run
unverified (harvested, no recorded run)
FairUnlearn/detoxai/src/detoxai/core/interface_helpers.py
code served (permissive licence) · get_code("24a3cfc38554b47a")
How it ran

no invocation recorded.

Also present in other papers' code

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

Concept erasure aims to remove specified features from an embedding. It can improve fairness (e.g. preventing a classifier from using gender or race) and interpretability (e.g. removing a concept to observe changes in model behavior). We introduce LEAst-squares Concept Erasure (LEACE), a closed-form method which provably prevents all linear classifiers from detecting a concept while changing the embedding as little as possible, as measured by a broad class of norms. We apply LEACE to large language models with a novel procedure called "concept scrubbing," which erases target concept information from every layer in the network. We demonstrate our method on two tasks: measuring the reliance of language models on part-of-speech information, and reducing gender bias in BERT embeddings. Code is available at https://github.com/EleutherAI/concept-erasure.

For agents

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

get_harvested_code_for_paper("2306.03819")
get_code_for_paper("2306.03819")
have("2306.03819")

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

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

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

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

Connect an agent — have() is free.