SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.08196 · ICML · 2023

Deep Regression Unlearning

Mohan Kankanhalli, Ayush Tarun, Vikram Chundawat, Murari Mandal

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 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/2210.08196.json · badge: /api/ran/2210.08196.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
ayu987/deep-regression-unlearning marked official in Papers with Code
Papers with Code archive
7 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
attention Ran
ran, honoured the contract we drafted
ayu987/deep-regression-unlearning/unlearn.py
code served (permissive licence) · get_code("b817aa66879a905d")
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, 9) 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)

# The function expects x to be a tensor with shape (batch_size, channels, height, width)
# or similar multi-dimensional format where:
# - x.pow(2) squares the tensor
# - .mean(1) reduces along dimension 1 (channels)
# - .view(x.size(0), -1) reshapes to (batch_size, flattened_spatial)
# - F.normalize normalizes the result

# Create a small 4D tensor: (batch=2, channels=4, height=3, width=3)
x = torch.randn(2, 4, 3, 3)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 9) — shape (2, 9) 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
attention_diff Ran
ran, honoured the contract we drafted
ayu987/deep-regression-unlearning/unlearn.py
code served (permissive licence) · get_code("fa2c8ba3cdf9f1d6")
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. 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 torch.nn import functional as F

torch.manual_seed(0)

# Create two small activation tensors
# Shape: (batch_size=2, channels=4, height=3, width=3)
x = torch.randn(2, 4, 3, 3)
y = torch.randn(2, 4, 3, 3)

ARGS = {
    'x': x,
    'y': y
}
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 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
evaluate Ran
ran; our contract draft was wrong, not the code
ayu987/deep-regression-unlearning/unlearn.py
code served (permissive licence) · get_code("39ab71f99f903d6c")
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
from torch.nn import functional as F

torch.manual_seed(0)

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

# Create model instance
model = SimpleModel()

# Create a minimal data loader (list of batches)
# Each batch is (images, labels) tuple
val_loader = [
    (torch.randn(2, 4), torch.randn(2, 3)),
    (torch.randn(2, 4), torch.randn(2, 3)),
]

# Device parameter
device = 'cpu'

ARGS = {
    'model': model,
    'val_loader': val_loader,
    '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 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
fit_one_forget_cycle Ran
ran; our contract draft was wrong, not the code
ayu987/deep-regression-unlearning/unlearn.py
code served (permissive licence) · get_code("a6d53a1eee4c85ff")
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 list, ndim 1, dtype family float; no output shape is stated. 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 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
import torch.nn.functional as F
import numpy as np
import tempfile

torch.manual_seed(0)

# Define a minimal model that returns output and activations
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(8, 3)
    
    def forward(self, x):
        act1 = self.fc1(x)
        act2 = F.relu(act1)
        out = self.fc2(act2)
        return out, act1, act2

# Create model and proxy model
model = SimpleModel()
proxy_model = SimpleModel()

# Create tiny data loaders
# Training loader: (images, labels, ulabels) where ulabels indicates forget samples
train_loader = [
    (torch.randn(2, 4), torch.randn(2, 3), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.randn(2, 3), torch.tensor([1, 0])),
]

# Validation loader: (images, labels)
val_loader = [
    (torch.randn(2, 4), torch.randn(2, 3)),
    (torch.randn(2, 4), torch.randn(2, 3)),
]

# Create temporary file for save_path
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix='.pt')
save_path = temp_file.name
temp_file.close()

ARGS = {
    'epochs': 1,
    'model': model,
    'proxy_model': proxy_model,
    'train_loader': train_loader,
    'val_loader': val_loader,
    'lr': 0.001,
    'device': torch.device('cpu'),
    'save_path': save_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
forget_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ayu987/deep-regression-unlearning/unlearn.py
code served (permissive licence) · get_code("4cdb9072c8114759")
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. 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 F

torch.manual_seed(0)

# Create small tensors for model and proxy outputs
batch_size = 2
output_dim = 4

model_output = torch.randn(batch_size, output_dim)
proxy_output = torch.randn(batch_size, output_dim)

# Create a mask that selects some samples
mask = torch.tensor([True, False])

# Create activations - list of tensors with different spatial dimensions
# Each activation tensor should have shape (batch_size, channels, height, width) or similar
# to work with the attention function which does .mean(1)
model_activations = [
    torch.randn(batch_size, 3, 4, 4),  # (batch, channels, height, width)
    torch.randn(batch_size, 5, 2, 2),  # different channel/spatial dims
]

proxy_activations = [
    torch.randn(batch_size, 3, 4, 4),
    torch.randn(batch_size, 5, 2, 2),
]

# Set AT_beta
AT_beta = 50

ARGS = {
    "model_output": model_output,
    "model_activations": model_activations,
    "proxy_output": proxy_output,
    "proxy_activations": proxy_activations,
    "mask": mask,
    "AT_beta": AT_beta,
}
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 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
get_lr Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from yjzhang96/UTI-VFI
pointer only; the stored copy get_code serves, from yjzhang96/UTI-VFI, is pointer only (licence: NONE) · get_code("7337f1f5ff01dcd0")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

validation_epoch_end Ran
ran; our contract draft was wrong, not the code
ayu987/deep-regression-unlearning/unlearn.py
code served (permissive licence) · get_code("ec763a44f4003fcf")
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 minimal model (not actually used by the function, but required)
class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

model = DummyModel()

# Build outputs: list of dicts, each containing 'Loss' key with a tensor
outputs = [
    {'Loss': torch.tensor(0.5)},
    {'Loss': torch.tensor(0.3)},
]

ARGS = {
    'model': model,
    'outputs': outputs,
}
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
validation_step Ran
ran; our contract draft was wrong, not the code
ayu987/deep-regression-unlearning/unlearn.py
code served (permissive licence) · get_code("9e5fea09993a1fb7")
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
from torch.nn import functional as F

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        out = self.linear(x)
        return out, None

model = SimpleModel()

images = torch.randn(2, 4)
labels = torch.randn(2, 3)
batch = (images, labels)

device = 'cpu'

ARGS = {
    'model': model,
    'batch': batch,
    '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 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
epoch_end Not yet run
unverified (harvested, no recorded run)
ayu987/deep-regression-unlearning/unlearn.py
code served (permissive licence) · get_code("95db9e228c665421")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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, 3 later) and 6 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
get_lr
brick of this paper's assembly: helper
25 other papers
17 dated earlier, 8 later · 2 only as an assembly brick
1605.07148 (2016-05)
Backprop KF: Learning Discriminative Deterministic State Estimators
1606.00915 (2016-06)
DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs
1904.01355 (2019-04)
FCOS: Fully Convolutional One-Stage Object Detection
and 22 more not named here
attention
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later
1905.09768 (2019-05)
Zero-shot Knowledge Transfer via Adversarial Belief Matching
2201.05629 (2022-01)
Zero-Shot Machine Unlearning
2402.01401 (2024-02)
An Information Theoretic Approach to Machine Unlearning
attention_diff
brick of this paper's assembly: loss
3 other papers
2 dated earlier, 1 later
1905.09768 (2019-05)
Zero-shot Knowledge Transfer via Adversarial Belief Matching
2201.05629 (2022-01)
Zero-Shot Machine Unlearning
2402.01401 (2024-02)
An Information Theoretic Approach to Machine Unlearning

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

With the introduction of data protection and privacy regulations, it has become crucial to remove the lineage of data on demand from a machine learning (ML) model. In the last few years, there have been notable developments in machine unlearning to remove the information of certain training data efficiently and effectively from ML models. In this work, we explore unlearning for the regression problem, particularly in deep learning models. Unlearning in classification and simple linear regression has been considerably investigated. However, unlearning in deep regression models largely remains an untouched problem till now. In this work, we introduce deep regression unlearning methods that generalize well and are robust to privacy attacks. We propose the Blindspot unlearning method which uses a novel weight optimization process. A randomly initialized model, partially exposed to the retain samples and a copy of the original model are used together to selectively imprint knowledge about the data that we wish to keep and scrub off the information of the data we wish to forget. We also propose a Gaussian fine tuning method for regression unlearning. The existing unlearning metrics for classification are not directly applicable to regression unlearning. Therefore, we adapt these metrics for the regression setting. We conduct regression unlearning experiments for computer vision, natural language processing and forecasting applications. Our methods show excellent performance for all these datasets across all the metrics. Source code: https://github.com/ayu987/ deep-regression-unlearning

For agents

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

get_harvested_code_for_paper("2210.08196")
get_code_for_paper("2210.08196")
have("2210.08196")

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

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

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

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

Connect an agent — have() is free.