SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.12329 · 2024

Opt-Out: Investigating Entity-Level Unlearning for Large Language Models via Optimal Transport

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 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 0 have no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2406.12329.json · badge: /api/ran/2406.12329.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
brightjade/Opt-Out canonical (classifier label)
classifier basis: census
3 ran · 4 no recorded run
FunctionStatusWhere it lives
create_reference_model Ran
ran; our contract draft was wrong, not the code
brightjade/Opt-Out/model.py
code served (permissive licence) · get_code("8f34ac05d4406cde")
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 SimpleModel. 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 copy import deepcopy

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

main_model = SimpleModel()

ARGS = {
    "main_model": main_model
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
custom_eval_collate_fn Ran
ran; our contract draft was wrong, not the code
brightjade/Opt-Out/dataset.py
code served (permissive licence) · get_code("04d68ff7fd17a649")
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

torch.manual_seed(0)

# The function expects a batch parameter which is a list of dicts
# Each dict should have 'input_ids', 'attention_mask', and 'labels' keys
# Each value should be a tensor that can be stacked

batch = [
    {
        'input_ids': torch.tensor([1, 2, 3, 4]),
        'attention_mask': torch.tensor([1, 1, 1, 0]),
        'labels': torch.tensor([0, 1, 0, 1])
    },
    {
        'input_ids': torch.tensor([5, 6, 7, 8]),
        'attention_mask': torch.tensor([1, 1, 1, 1]),
        'labels': torch.tensor([1, 0, 1, 0])
    }
]

ARGS = {
    'batch': 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 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
custom_train_collate_fn Ran
ran; our contract draft was wrong, not the code
brightjade/Opt-Out/dataset.py
code served (permissive licence) · get_code("3cbc61d43fe1b010")
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

torch.manual_seed(0)

# The function expects a batch where each element is a sequence of dicts
# Each dict in the sequence has 'input_ids', 'attention_mask', 'labels' keys
# that contain stackable tensors

# Create sample data: a batch of 2 items, each containing 3 sub-samples
batch = [
    [
        {'input_ids': torch.tensor([1, 2, 3, 4]), 'attention_mask': torch.tensor([1, 1, 1, 0]), 'labels': torch.tensor([0, 1, 0, 1])},
        {'input_ids': torch.tensor([5, 6, 7, 8]), 'attention_mask': torch.tensor([1, 1, 0, 0]), 'labels': torch.tensor([1, 0, 1, 0])},
        {'input_ids': torch.tensor([9, 10, 11, 12]), 'attention_mask': torch.tensor([1, 0, 0, 0]), 'labels': torch.tensor([0, 0, 1, 1])},
    ],
    [
        {'input_ids': torch.tensor([13, 14, 15, 16]), 'attention_mask': torch.tensor([1, 1, 1, 1]), 'labels': torch.tensor([1, 1, 0, 0])},
        {'input_ids': torch.tensor([17, 18, 19, 20]), 'attention_mask': torch.tensor([1, 1, 1, 0]), 'labels': torch.tensor([0, 1, 1, 0])},
        {'input_ids': torch.tensor([21, 22, 23, 24]), 'attention_mask': torch.tensor([1, 1, 0, 0]), 'labels': torch.tensor([1, 0, 0, 1])},
    ]
]

ARGS = {
    'batch': 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 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
evaluate Not yet run
unverified (harvested, no recorded run)
brightjade/Opt-Out/evaluator.py
code served (permissive licence) · get_code("7602201e656afaf5")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
brightjade/Opt-Out/dataset.py
code served (permissive licence) · get_code("a0f7e584947785ef")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
brightjade/Opt-Out/model.py
code served (permissive licence) · get_code("1e894760d60a6582")
How it ran

no invocation recorded.

load_tokenizer Not yet run
unverified (harvested, no recorded run)
brightjade/Opt-Out/model.py
code served (permissive licence) · get_code("3e34efa256660441")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Instruction-following large language models (LLMs), such as ChatGPT, have become widely popular among everyday users. However, these models inadvertently disclose private, sensitive information to their users, underscoring the need for machine unlearning techniques to remove selective information from the models. While prior work has focused on forgetting small, random subsets of training data at the instance-level, we argue that real-world scenarios often require the removal of an entire user data, which may require a more careful maneuver. In this study, we explore entity-level unlearning, which aims to erase all knowledge related to a target entity while preserving the remaining model capabilities. To address this, we introduce Opt-Out, an optimal transport-based unlearning method that utilizes the Wasserstein distance from the model's initial parameters to achieve more effective and fine-grained unlearning. We also present the first Entity-Level Unlearning Dataset (ELUDe) designed to evaluate entity-level unlearning. Our empirical results demonstrate that Opt-Out surpasses existing methods, establishing a new standard for secure and adaptable LLMs that can accommodate user data removal requests without the need for full retraining.

For agents

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

get_harvested_code_for_paper("2406.12329")
get_code_for_paper("2406.12329")
have("2406.12329")

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

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

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

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

Connect an agent — have() is free.