SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.17623 · 2026

ARES: Scalable and Practical Gradient Inversion Attack in Federated Learning through Activation Recovery

Shirui Pan, Cong Wang, Viet Vo, Leo Zhang, Yanjun Zhang, Tianqing Zhu, Zirui Gong

arXiv · PDF · Open in the Atlas

Code that ran

11 of 17 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; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 8 failures of our instrument; 6 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/2603.17623.json · badge: /api/ran/2603.17623.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
gaow0007/ATSPrivacy canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
gongzir1/ARES community
Papers with Code archive
2 ran · 3 no recorded run
unknown123489/Scale-MIA community
Papers with Code archive
1 ran · 2 no recorded run
FunctionStatusWhere it lives
GradualWarmupScheduler Ran
ran on a synthesized input
gongzir1/ARES/attacks/analytic_attack.py
pointer only (licence: NONE) · get_code("25c34c54d9ce5f56")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gongzir1/ARES when it was checked. 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.

PSNR_cal Ran
ran; our contract draft was wrong, not the code
unknown123489/Scale-MIA/fedavg-cifar/multimodel-recover-attack.py
pointer only (licence: NOASSERTION) · get_code("d5378222c82c7a79")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, unknown123489/Scale-MIA (NOASSERTION). 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.

activation_errors Ran
ran; our contract draft was wrong, not the code
gaow0007/ATSPrivacy/inversefed/metrics.py
code served (permissive licence) · get_code("e551d62ffffcfda9")
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 defaultdict. 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 collections import defaultdict

torch.manual_seed(0)

# Build a small model with named modules
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.relu = nn.ReLU()
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.relu(x)
        x = self.linear2(x)
        return x

model = SimpleModel()
model.eval()

# Create two small input tensors with batch size 2 and feature dimension 4
x1 = torch.randn(2, 4)
x2 = torch.randn(2, 4)

ARGS = {
    "model": model,
    "x1": x1,
    "x2": x2,
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
collate_fn Ran
ran; our contract draft was wrong, not the code
gaow0007/ATSPrivacy/benchmark/cifar100_attack.py
code served (permissive licence) · get_code("50b843f4577cb9e7")
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)

# Create example dictionaries with pixel_values and fine_label
examples = [
    {
        'pixel_values': torch.randn(3, 4),
        'fine_label': 0
    },
    {
        'pixel_values': torch.randn(3, 4),
        'fine_label': 1
    }
]

ARGS = {
    'examples': examples,
    'label_key': 'fine_label'
}
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
eval_score Ran
ran, honoured the contract we drafted
gaow0007/ATSPrivacy/benchmark/search_transform_attack.py
code served (permissive licence) · get_code("d990a0f24d4e3d84")
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 float64, ndim 0, 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

# The function eval_score takes:
# 1. jacob: used with np.corrcoef() - needs to be a 2D array-like
# 2. labels: optional, not used in the function body - can be None or any value

# Create a small jacobian matrix (2D array)
# Using shape (4, 3) to have distinct dimensions
jacob = np.random.randn(4, 3)

# labels is not used in the function body, so None is appropriate
labels = None

ARGS = {
    "jacob": jacob,
    "labels": labels,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded complex128 ndim 0, which disagrees with the fixture run
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
img_warp Ran
ran; our contract draft was wrong, not the code
gaow0007/ATSPrivacy/autoaugment.py
code served (permissive licence) · get_code("a111b516b74dd7b0")
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 Image. 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 torchvision.transforms as transforms
from PIL import Image

torch.manual_seed(0)

# Create a small PIL Image to pass to img_warp
# RandomPerspective expects a PIL Image or a tensor
# We'll create a small PIL Image (4x3 pixels, RGB)
img_array = torch.randint(0, 256, (3, 4, 3), dtype=torch.uint8).numpy()
img = Image.fromarray(img_array.transpose(1, 2, 0), mode='RGB')

ARGS = {
    'img': img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
img_zoom Ran
ran; our contract draft was wrong, not the code
gaow0007/ATSPrivacy/autoaugment.py
code served (permissive licence) · get_code("f52f54936f6ed88e")
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 Image. 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
from PIL import Image
import torchvision.transforms as transforms
import random

# Set seed for reproducibility
torch.manual_seed(0)
random.seed(0)
np.random.seed(0)

# Create a small test image (32x32 RGB)
img_array = np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8)
img = Image.fromarray(img_array).convert('RGB')

ARGS = {
    'img': img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
optimizer_lookup Ran
ran; our contract draft was wrong, not the code
gongzir1/ARES/attacks/analytic_attack.py
pointer only (licence: NONE) · get_code("8c70be05071f1bc6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gongzir1/ARES when it was checked. 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.

psnr Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaow0007/ATSPrivacy/inversefed/metrics.py
code served (permissive licence) · get_code("5ef2f520281c0bdf")
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 float, 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

torch.manual_seed(0)

# Create small test tensors with distinct dimensions
# Shape: [B=2, C=3, m=4, n=5]
img_batch = torch.randn(2, 3, 4, 5)
ref_batch = torch.randn(2, 3, 4, 5)

ARGS = {
    "img_batch": img_batch,
    "ref_batch": ref_batch,
    "batched": False,
    "factor": 1.0,
}
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 float, 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
reconstruction_costs Ran
ran, honoured the contract we drafted
gaow0007/ATSPrivacy/inversefed/reconstruction_algorithms.py
code served (permissive licence) · get_code("b0291b9e998a5906")
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

torch.manual_seed(0)

# Create input_gradient: list of tensors representing gradients
# Each element should be a tensor with different shapes to test indexing
input_gradient = [
    torch.randn(4, 3),  # gradient for layer 1
    torch.randn(5),     # gradient for layer 2
    torch.randn(2, 6),  # gradient for layer 3
    torch.randn(3),     # gradient for layer 4
    torch.randn(4, 2),  # gradient for layer 5
    torch.randn(7),     # gradient for layer 6
    torch.randn(3, 3),  # gradient for layer 7
    torch.randn(8),     # gradient for layer 8
    torch.randn(2, 5),  # gradient for layer 9
    torch.randn(6),     # gradient for layer 10
]

# Create gradients: list of lists of tensors (each representing a trial)
# Each trial_gradient should have same structure as input_gradient
gradients = [
    [t + torch.randn_like(t) * 0.1 for t in input_gradient],
    [t + torch.randn_like(t) * 0.1 for t in input_gradient],
    [t + torch.randn_like(t) * 0.1 for t in input_gradient],
]

ARGS = {
    'gradients': gradients,
    'input_gradient': input_gradient,
    'cost_fn': 'l2',
    'indices': 'def',
    'weights': 'equal',
}
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
total_variation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaow0007/ATSPrivacy/inversefed/metrics.py
code served (permissive licence) · get_code("3d23162c75564e01")
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

torch.manual_seed(0)

# The function takes a 4D tensor x and computes anisotropic total variation
# It accesses x[:, :, :, :-1], x[:, :, :, 1:], x[:, :, :-1, :], x[:, :, 1:, :]
# So we need a 4D tensor with shape (batch, channels, height, width)
# Using distinct sizes: batch=2, channels=4, height=3, width=5

x = torch.randn(2, 4, 3, 5)

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 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
AnalyticAttacker Not yet run
unverified (harvested, no recorded run)
gongzir1/ARES/attacks/analytic_attack.py
pointer only (licence: NONE) · get_code("049502ce90fbd732")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gongzir1/ARES when it was checked. 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. No invocation recorded.

ImprintAttacker Not yet run
unverified (harvested, no recorded run)
gongzir1/ARES/attacks/analytic_attack.py
pointer only (licence: NONE) · get_code("e1517f98c825492d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gongzir1/ARES when it was checked. 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. No invocation recorded.

_BaseAttacker Not yet run
unverified (harvested, no recorded run)
gongzir1/ARES/attacks/analytic_attack.py
pointer only (licence: NONE) · get_code("21ec4dad73960b79")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gongzir1/ARES when it was checked. 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. No invocation recorded.

attack Not yet run
unverified (harvested, no recorded run)
unknown123489/Scale-MIA/fedavg-cifar/multimodel-recover-attack.py
pointer only (licence: NOASSERTION) · get_code("f5c2f5be766751a1")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, unknown123489/Scale-MIA (NOASSERTION). 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. No invocation recorded.

input_retrival Not yet run
unverified (harvested, no recorded run)
unknown123489/Scale-MIA/fedavg-cifar/multimodel-recover-attack.py
pointer only (licence: NOASSERTION) · get_code("e42861ff4d8806ea")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, unknown123489/Scale-MIA (NOASSERTION). 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. No invocation recorded.

similarity_measures Not yet run
unverified (harvested, no recorded run)
gaow0007/ATSPrivacy/benchmark/search_transform_attack.py
code served (permissive licence) · get_code("cd8cc2a4392baf95")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 13 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
activation_errors 5 other papers
5 dated earlier
Sun_Soteria_Provable_Defense_Against_Privacy_Leakage_in_Federated_Learning_From_CVPR_2021_paper (2021 (year only))
Soteria: Provable Defense against Privacy Leakage in Federated Learning from Representation Perspective
2107.01154 (2021-07)
Gradient-Leakage Resilient Federated Learning
2308.04699 (2023-08)
GIFD: A Generative Gradient Inversion Method with Feature Domain Optimization
and 2 more not named here
psnr 5 other papers
5 dated earlier
Sun_Soteria_Provable_Defense_Against_Privacy_Leakage_in_Federated_Learning_From_CVPR_2021_paper (2021 (year only))
Soteria: Provable Defense against Privacy Leakage in Federated Learning from Representation Perspective
2107.01154 (2021-07)
Gradient-Leakage Resilient Federated Learning
2308.04699 (2023-08)
GIFD: A Generative Gradient Inversion Method with Feature Domain Optimization
and 2 more not named here
total_variation 5 other papers
5 dated earlier
Sun_Soteria_Provable_Defense_Against_Privacy_Leakage_in_Federated_Learning_From_CVPR_2021_paper (2021 (year only))
Soteria: Provable Defense against Privacy Leakage in Federated Learning from Representation Perspective
2107.01154 (2021-07)
Gradient-Leakage Resilient Federated Learning
2308.04699 (2023-08)
GIFD: A Generative Gradient Inversion Method with Feature Domain Optimization
and 2 more not named here
PSNR_cal
brick of this paper's assembly: metric
1 other paper
1 dated earlier
2311.05808 (2023-11)
Scale-MIA: A Scalable Model Inversion Attack against Secure Federated Learning via Latent Space Reconstruction

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

Federated Learning (FL) enables collaborative model training by sharing model updates instead of raw data, aiming to protect user privacy. However, recent studies reveal that these shared updates can inadvertently leak sensitive training data through gradient inversion attacks (GIAs). Among them, active GIAs are particularly powerful, enabling highfidelity reconstruction of individual samples even under large batch sizes. Nevertheless, existing approaches often require architectural modifications, which limit their practical applicability. In this work, we bridge this gap by introducing the Activation REcovery via Sparse inversion (ARES) attack, an active GIA designed to reconstruct training samples from large training batches without requiring architectural modifications. Specifically, we formulate the recovery problem as a noisy sparse recovery task and solve it using the generalized Least Absolute Shrinkage and Selection Operator (Lasso). To extend the attack to multi-sample recovery, ARES incorporates the imprint method to disentangle activations, enabling scalable per-sample reconstruction. We further establish the expected recovery rate and derive an upper bound on the reconstruction error, providing theoretical guarantees for the ARES attack. Extensive experiments on CNNs and MLPs demonstrate that ARES achieves high-fidelity reconstruction across diverse datasets, significantly outperforming prior GIAs under large batch sizes and realistic FL settings. Our results highlight that intermediate activations pose a serious and underestimated privacy risk in FL, underscoring the urgent need for stronger defenses.

For agents

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

get_harvested_code_for_paper("2603.17623")
get_code_for_paper("2603.17623")
have("2603.17623")

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

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

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

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

Connect an agent — have() is free.