SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.27683 · 2026

CBD: API-Only LLM Black-Box Unlearning through Controlled Behavioral Divergence

Kim, Gao, Zhiqiang Xie, Dong Kim, Zhipeng Gao, Zhipeng Lin, Yijing Lin, Yijing Xie, Telecommunications Lin, In Dong

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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, 1 violated it and 0 have no contract verdict; 8 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2606.27683.json · badge: /api/ran/2606.27683.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
DGL-codes/CBD canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
NextTokenPredictionLoss Ran
ran; our contract draft was wrong, not the code
DGL-codes/CBD/uld/model/forget_losses.py
code served (permissive licence) · get_code("5540d0278fb0fa50")
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 0, dtype family float, shape () as a later run recorded it. 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, 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
from transformers import AutoModelForCausalLM

torch.manual_seed(0)

# Create a minimal mock model that satisfies the function's needs
class MockCausalLMModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embed = nn.Embedding(10, 4)
        self.lm_head = nn.Linear(4, 10)
    
    def forward(self, input_ids, attention_mask=None, labels=None, position_ids=None):
        # Minimal forward pass that returns outputs with a loss attribute
        embeddings = self.embed(input_ids)
        logits = self.lm_head(embeddings)
        
        # Create a mock output object
        class Output:
            def __init__(self, loss_val):
                self.loss = loss_val
        
        # Compute a simple loss if labels are provided
        if labels is not None:
            loss = nn.functional.cross_entropy(
                logits.view(-1, 10),
                labels.view(-1),
                ignore_index=-100
            )
        else:
            loss = None
        
        return Output(loss)

# Build the model
model = MockCausalLMModel()

# Create small tensors (batch_size=2)
batch_size = 2
seq_length = 3
vocab_size = 10

input_ids = torch.randint(0, vocab_size, (batch_size, seq_length))
attention_mask = torch.ones((batch_size, seq_length), dtype=torch.long)
labels = torch.randint(0, vocab_size, (batch_size, seq_length))
position_ids = torch.arange(seq_length).unsqueeze(0).expand(batch_size, -1)

ARGS = {
    'model': model,
    'input_ids': input_ids,
    'attention_mask': attention_mask,
    'labels': labels,
    'position_ids': position_ids
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, 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
TokenNextTokenPredictionLoss Ran
ran; our contract draft was wrong, not the code
DGL-codes/CBD/uld/model/forget_losses.py
code served (permissive licence) · get_code("d6b3161f4ab3c45c")
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 (2,) 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)

# Analyze the function to understand what shapes are needed:
# - output: used as output[..., :-1, :].contiguous() then transposed to (batch, seq_len-1, vocab)
#           so shape should be (batch, seq_len, vocab_size)
# - labels: used as labels[..., 1:].contiguous() then passed to CrossEntropyLoss
#           so shape should be (batch, seq_len)

batch_size = 2
seq_len = 5
vocab_size = 4

# Create output tensor: (batch_size, seq_len, vocab_size)
# This represents logits from a language model
output = torch.randn(batch_size, seq_len, vocab_size)

# Create labels tensor: (batch_size, seq_len)
# Values should be in range [0, vocab_size) or -100 for ignore_index
labels = torch.randint(0, vocab_size, (batch_size, seq_len))
# Add some -100 values to test ignore_index functionality
labels[0, 2] = -100
labels[1, 1] = -100

ARGS = {
    "output": output,
    "labels": labels,
}
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 float, shape (2,) — shape (2,) 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
collate_fn Ran
ran, honoured the contract we drafted
DGL-codes/CBD/uld/tofuutil/data_module.py
code served (permissive licence) · get_code("cdd171f20cd6f53d")
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 3, dtype family int; 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
from torch.nn.utils.rnn import pad_sequence

torch.manual_seed(0)

# Create sample batch data
# Each item in batch is a tuple of (input_ids, attention_mask)
# input_ids and attention_masks should be 1D tensors of different lengths

batch = [
    (torch.tensor([1, 2, 3], dtype=torch.long), torch.tensor([1, 1, 1], dtype=torch.long)),
    (torch.tensor([4, 5], dtype=torch.long), torch.tensor([1, 1], dtype=torch.long)),
]

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 tuple, ndim 3, dtype family int — 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
copy_weights Ran
ran; our contract draft was wrong, not the code
DGL-codes/CBD/uld/model/utils.py
code served (permissive licence) · get_code("a79e6d8f123f14b9")
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 MinimalModel. 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 config class
class Config:
    def __init__(self, name, num_hidden_layers=2):
        self._name_or_path = name
        self.num_hidden_layers = num_hidden_layers

# Create minimal layer and norm modules
class MinimalNorm(nn.Module):
    def __init__(self, dim=4):
        super().__init__()
        self.weight = nn.Parameter(torch.ones(dim))
    
    def state_dict(self):
        return {'weight': self.weight}
    
    def load_state_dict(self, state_dict):
        self.weight.data = state_dict['weight']

class MinimalEmbedTokens(nn.Module):
    def __init__(self, vocab_size=100, embed_dim=4):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, embed_dim)
    
    def state_dict(self):
        return self.embedding.state_dict()
    
    def load_state_dict(self, state_dict):
        self.embedding.load_state_dict(state_dict)

class MinimalLayer(nn.Module):
    def __init__(self, hidden_dim=4):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, hidden_dim)
    
    def state_dict(self):
        return self.linear.state_dict()
    
    def load_state_dict(self, state_dict):
        self.linear.load_state_dict(state_dict)

class MinimalLMHead(nn.Module):
    def __init__(self, hidden_dim=4, vocab_size=100):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, vocab_size)
    
    def state_dict(self):
        return self.linear.state_dict()
    
    def load_state_dict(self, state_dict):
        self.linear.load_state_dict(state_dict)

class MinimalBackbone(nn.Module):
    def __init__(self, num_hidden_layers=2, hidden_dim=4):
        super().__init__()
        self.embed_tokens = MinimalEmbedTokens(embed_dim=hidden_dim)
        self.layers = nn.ModuleList([MinimalLayer(hidden_dim) for _ in range(num_hidden_layers)])
        self.norm = MinimalNorm(hidden_dim)
    
    def state_dict(self):
        state = {}
        state.update({'embed_tokens.' + k: v for k, v in self.embed_tokens.state_dict().items()})
        state.update({'norm.' + k: v for k, v in self.norm.state_dict().items()})
        for i, layer in enumerate(self.layers):
            state.update({f'layers.{i}.' + k: v for k, v in layer.state_dict().items()})
        return state
    
    def load_state_dict(self, state_dict):
        self.embed_tokens.load_state_dict({k.replace('embed_tokens.', ''): v for k, v in state_dict.items() if k.startswith('embed_tokens.')})
        self.norm.load_state_dict({k.replace('norm.', ''): v for k, v in state_dict.items() if k.startswith('norm.')})
        for i, layer in enumerate(self.layers):
            layer_state = {k.replace(f'layers.{i}.', ''): v for k, v in state_dict.items() if k.startswith(f'layers.{i}.')}
            if layer_state:
                layer.load_state_dict(layer_state)

class MinimalModel(nn.Module):
    def __init__(self, name='llama', num_hidden_layers=2):
        super().__init__()
        self.model = MinimalBackbone(num_hidden_layers=num_hidden_layers)
        self.lm_head = MinimalLMHead()
        self.config = Config(name, num_hidden_layers=num_hidden_layers)
    
    def state_dict(self):
        state = {}
        state.update({'model.' + k: v for k, v in self.model.state_dict().items()})
        state.update({'lm_head.' + k: v for k, v in self.lm_head.state_dict().items()})
        return state
    
    def load_state_dict(self, state_dict):
        model_state = {k.replace('model.', ''): v for k, v in state_dict.items() if k.startswith('model.')}
        lm_head_state = {k.replace('lm_head.', ''): v for k, v in state_dict.items() if k.startswith('lm_head.')}
        if model_state:
            self.model.load_state_dict(model_state)
        if lm_head_state:
            self.lm_head.load_state_dict(lm_head_state)

# Create base LLM and target model
base_llm = MinimalModel(name='llama-7b', num_hidden_layers=2)
model = MinimalModel(name='llama-7b-custom', num_hidden_layers=2)

ARGS = {
    'base_llm': base_llm,
    'model': 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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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_data_collator Ran
ran; our contract draft was wrong, not the code
DGL-codes/CBD/uld/tofuutil/data_module.py
code served (permissive licence) · get_code("5985b70afc6ef2b0")
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 torch

torch.manual_seed(0)

# The function expects samples, where each sample is a tuple of:
# (input_ids, labels, attention_mask)
# Each of these should be a tensor that can be stacked.

# Create sample data: 2 samples, each with tensors of different shapes
# to make them distinctly identifiable

sample_1 = (
    torch.randn(4),      # input_ids: shape (4,)
    torch.randn(3),      # labels: shape (3,)
    torch.randn(5)       # attention_mask: shape (5,)
)

sample_2 = (
    torch.randn(4),      # input_ids: shape (4,)
    torch.randn(3),      # labels: shape (3,)
    torch.randn(5)       # attention_mask: shape (5,)
)

samples = [sample_1, sample_2]

ARGS = {
    "samples": samples
}
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
find_all_linear_names Ran
ran; our contract draft was wrong, not the code
DGL-codes/CBD/uld/model/peft_util.py
code served (permissive licence) · get_code("ebb85bc96e7f493f")
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 minimal model with Linear layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Linear(4, 8)
        self.hidden = nn.Linear(8, 16)
        self.output = nn.Linear(16, 4)
        self.lm_head = nn.Linear(4, 4)
    
    def forward(self, x):
        x = self.embedding(x)
        x = self.hidden(x)
        x = self.output(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model,
    'layer_max': -1
}
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
find_unfilled_paths Ran
ran; our contract draft was wrong, not the code
DGL-codes/CBD/uld/utils.py
code served (permissive licence) · get_code("dcd205afff8c60a9")
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.

from omegaconf import OmegaConf, DictConfig, ListConfig

# Create a DictConfig with some filled and unfilled values
conf_dict = OmegaConf.create({
    "model": {
        "name": "my_model",
        "layers": "???",
        "config": {
            "hidden_dim": 128,
            "activation": "???"
        }
    },
    "training": {
        "epochs": 10,
        "params": ["???", "filled_value"]
    },
    "unfilled_top": "???"
})

ARGS = {
    "conf": conf_dict,
    "path": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — 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
get_batch_loss Ran
ran, violated the contract we drafted
DGL-codes/CBD/uld/tofuutil/data_module.py
code served (permissive licence) · get_code("44dd25d964127b38")
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) and returned Tensor, ndim 1, dtype family float, shape (2,) 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
from torch import nn

torch.manual_seed(0)

# The function expects:
# - output: a tensor that will be sliced [..., :-1, :] and transposed to have shape (..., vocab_size, seq_len)
# - labels: a tensor that will be sliced [..., 1:] and used with CrossEntropyLoss
# 
# CrossEntropyLoss expects input of shape (N, C, d1, d2, ...) and target of shape (N, d1, d2, ...)
# where C is the number of classes (vocab_size)
#
# After output[..., :-1, :] we get shape (batch, seq_len-1, vocab_size)
# After transpose(-1, -2) we get shape (batch, vocab_size, seq_len-1)
# After labels[..., 1:] we get shape (batch, seq_len-1)
# This matches CrossEntropyLoss expectations

batch_size = 2
seq_len = 5
vocab_size = 4

# output shape: (batch_size, seq_len, vocab_size)
# After slicing [..., :-1, :]: (batch_size, seq_len-1, vocab_size)
# After transpose: (batch_size, vocab_size, seq_len-1)
output = torch.randn(batch_size, seq_len, vocab_size)

# labels shape: (batch_size, seq_len)
# After slicing [..., 1:]: (batch_size, seq_len-1)
# Values should be in range [0, vocab_size) or -100 for ignore_index
labels = torch.randint(0, vocab_size, (batch_size, seq_len))

ARGS = {
    "output": output,
    "labels": labels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 float, shape (2,) — shape (2,) 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_dtype Ran
ran; our contract draft was wrong, not the code
DGL-codes/CBD/uld/model/utils.py
code served (permissive licence) · get_code("c2cfa4061fa42997")
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 dtype. 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)

ARGS = {
    'data_type': 'bfloat16'
}
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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype 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
split_forget_retain Ran
ran; our contract draft was wrong, not the code
DGL-codes/CBD/uld/model/forget_losses.py
code served (permissive licence) · get_code("e14060d857db75be")
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 4, dtype family int; 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 numpy as np

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
seq_length = 4
vocab_size = 100

input_ids = torch.randint(0, vocab_size, (batch_size, seq_length))
attention_mask = torch.ones((batch_size, seq_length), dtype=torch.long)
labels = torch.randint(0, vocab_size, (batch_size, seq_length))
retainlabels = torch.tensor([0, 1], dtype=torch.long)

ARGS = {
    "input_ids": input_ids,
    "attention_mask": attention_mask,
    "labels": labels,
    "retainlabels": retainlabels,
}
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 4, dtype family int — 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
init_small_llm Not yet run
unverified (harvested, no recorded run)
DGL-codes/CBD/uld/model/utils.py
code served (permissive licence) · get_code("0d15ec94f3135db3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 8 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
collate_fn 9 other papers
9 dated earlier
2401.06121 (2024-01)
TOFU: A Task of Fictitious Unlearning for LLMs
2406.11614 (2024-06)
Intrinsic Test of Unlearning Using Parametric Knowledge Traces
2406.13356 (2024-06)
UNLEARNING OR OBFUSCATING? JOGGING THE MEM-ORY OF UNLEARNED LLMS VIA BENIGN RELEARNING CONTENT WARNING: THIS MANUSCRIPT CONTAINS EXAMPLES OF HARMFUL/HAZARDOUS TEXT
and 6 more not named here
custom_data_collator 5 other papers
5 dated earlier
2401.06121 (2024-01)
TOFU: A Task of Fictitious Unlearning for LLMs
2407.16997 (2024-07)
Revisiting Who's Harry Potter: Towards Targeted Unlearning from a Causal Intervention Perspective
2409.11844 (2024-09)
MEOW: MEMOry Supervised LLM Unlearning Via Inverted Facts
and 2 more not named here
get_batch_loss 4 other papers
4 dated earlier
2307.13702 (2023-07)
Measuring Faithfulness in Chain-of-Thought Reasoning
2409.11844 (2024-09)
MEOW: MEMOry Supervised LLM Unlearning Via Inverted Facts
2502.14829 (2025-02)
Measuring Chain of Thought Faithfulness by Unlearning Reasoning Steps
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-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

Edge devices increasingly invoke large language models (LLMs) through API services for context-aware edge intelligence, while edge-generated data may be collected to improve foundation LLMs and may introduce sensitive, copyrighted, harmful, or outdated information into model behavior. Machine unlearning has therefore become a practical way to remove the influence of undesired data without retraining LLMs from scratch. However, existing LLM unlearning methods still face two key gaps in practical deployment. The first is how to achieve unlearning under API-only black-box access, where target-model parameters and internal logits are unavailable. The second is how to preserve retained utility when unlearning target data and retained data share highly similar prompt structures or semantic patterns. To address these challenges, we propose Controlled Behavioral Divergence (CBD), an APIonly black-box unlearning framework. Specifically, CBD uses two auxiliary models to create controlled behavioral divergence between retained inputs and unlearning target inputs, converts this divergence into an unlearning-relevance score, and routes unlearning-related prompts away from the target LLM. Furthermore, to improve discrimination accuracy under high similarity between unlearning target data and retained data, CBD constructs a gradient-statistics-based discriminative basis by estimating empirical Fisher matrices and solving a regularized generalized eigenvalue problem, guiding the unlearning signal toward target-specific information rather than shared prompt structures. Compared with eleven representative white-box and gray-box unlearning baselines across multiple benchmark settings, CBD achieves a better unlearning-utility trade-off and its performance varies little across hyperparameter settings. On ToFU forget10, CBD approaches the retrained reference on the forget set while raising model utility to 74.90, about 15% above the second-best baseline. On WMDP, it lowers hazardousknowledge accuracy to 25.68, near the random-guess level, while preserving an MMLU accuracy of 52.67. Our code is available at https://github.com/DGL-codes/CBD.

For agents

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

get_harvested_code_for_paper("2606.27683")
get_code_for_paper("2606.27683")
have("2606.27683")

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

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

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

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

Connect an agent — have() is free.