SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.02659 · ICML · 2022

Robust Fine-Tuning of Deep Neural Networks with Hessian-based Generalization Guarantees

Dongyue Li, Haotian Ju, ‡ Hongyang, R Zhang

arXiv · PDF · Open in the Atlas

Code that ran

9 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, 0 violated it and 2 have no contract verdict; 6 failures of our instrument; 2 no recorded run); 2 of them were also run on the host, not in the jail, by the peer-agreement lane that set their level, 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/2206.02659.json · badge: /api/ran/2206.02659.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
VirtuosoResearch/Robust-fine-tuning canonical (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
FunctionStatusWhere it lives
np2th Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/model/modeling_resnet.py
code served (permissive licence) · get_code("7d8eaf5537f699e4")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (5, 4, 2, 3) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T00:36:31Z). 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 numpy as np

torch.manual_seed(0)

# Create a small numpy array with shape HWIO (Height, Width, Input channels, Output channels)
# Using distinct dimensions: H=2, W=3, I=4, O=5
weights = np.random.randn(2, 3, 4, 5).astype(np.float32)

ARGS = {
    "weights": weights,
    "conv": True
}
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 Tensor, ndim 4, dtype family float, shape (5, 4, 2, 3) — shape (5, 4, 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
swish Ran
ran; our contract draft was wrong, not the code
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/model/modeling_vit.py
code served (permissive licence) · get_code("0f786c407fb1ee4c")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) 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. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:33:52Z). 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 swish takes a single parameter 'x' which is used with:
# - torch.sigmoid(x) - requires a tensor
# - x * ... - requires a tensor that supports multiplication
# So x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
accuracy Ran
ran; our contract draft was wrong, not the code
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/model/metric.py
pointer only (licence: MIT); the stored copy get_code serves, from lingbai-kong/causalformer, is pointer only (licence: GPL-3.0) · get_code("5dcb4148be3fcbaf")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lingbai-kong/causalformer, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

conv1x1 Ran
ran; our contract draft was wrong, not the code
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/model/modeling_resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from maloadba/mgenseg_2d, is pointer only (licence: NONE) · get_code("b0f916df39e78ae5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from maloadba/mgenseg_2d, and GitHub detected no licence in that repository 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/model/modeling_resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from maloadba/mgenseg_2d, is pointer only (licence: NONE) · get_code("4e5bf13dbdc4f008")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from maloadba/mgenseg_2d, and GitHub detected no licence in that repository 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.

custom_kl_div Ran
ran, honoured the contract we drafted
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/model/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from erikenglesson/gjs, is pointer only (licence: NONE) · get_code("f508a1f840aee873")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from erikenglesson/gjs, and GitHub detected no licence in that repository 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.

nll_loss Ran
ran on a synthesized input
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/model/loss.py
code served (permissive licence) · get_code("8c2db3d4435816c0")
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.functional as F

torch.manual_seed(0)

# NLL loss expects log probabilities as output and target class indices
# output should be of shape (batch_size, num_classes) with log probabilities
# target should be of shape (batch_size,) with class indices

batch_size = 2
num_classes = 4

output = F.log_softmax(torch.randn(batch_size, num_classes), dim=1)
target = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "output": output,
    "target": target,
}
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
perturbe_model_weights Ran
ran on a synthesized input
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/compute_noise_stability.py
code served (permissive licence) · get_code("aab5cc3f4ce427b5")
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)

# Create a mock state_dict with various weight tensors
# The function looks for keys containing 'conv' or 'pred_head' with 'weight' in the name
# and filters for multi-dimensional tensors (len(value.size()) != 1)

state_dict = {
    'conv1.weight': torch.randn(4, 3, 3, 3),  # conv weight: (out_channels, in_channels, height, width)
    'conv1.bias': torch.randn(4),  # bias (1D, should be skipped)
    'conv2.weight': torch.randn(8, 4, 3, 3),  # another conv weight
    'pred_head.weight': torch.randn(10, 8),  # pred_head weight: (out_features, in_features)
    'pred_head.bias': torch.randn(10),  # bias (1D, should be skipped)
    'linear.weight': torch.randn(5, 8),  # linear weight not matching pattern, but let's include it
    'linear.bias': torch.randn(5),  # bias (1D)
    'bn1.weight': torch.randn(4),  # batch norm weight (1D, should be skipped)
}

ARGS = {
    'state_dict': state_dict,
    'eps': 0.001
}
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
top_k_acc Ran
ran; our contract draft was wrong, not the code
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/model/metric.py
pointer only (licence: MIT); the stored copy get_code serves, from lingbai-kong/causalformer, is pointer only (licence: GPL-3.0) · get_code("61cc9667c37ecd27")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lingbai-kong/causalformer, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

get_classes Not yet run
unverified (harvested, no recorded run)
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/data_loader/mini_domain_net.py
code served (permissive licence) · get_code("0a6dcb72cc637951")
How it ran

no invocation recorded.

get_loaders Not yet run
unverified (harvested, no recorded run)
VirtuosoResearch/Robust-fine-tuning/exps_on_image_datasets/data_loader/mini_domain_net.py
code served (permissive licence) · get_code("fa25db77d8a7f54f")
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, 9 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 3 the same month, 8 later) and 2 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
swish 206 other papers
111 dated earlier, 1 the same month, 90 later, 4 same year, order not determinable · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
np2th 35 other papers
18 dated earlier, 17 later · 5 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2102.04306 (2021-02)
TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation
2103.07976 (2021-03)
TransFG: A Transformer Architecture for Fine-grained Recognition
and 32 more not named here
conv1x1 33 other papers
17 dated earlier, 1 the same month, 15 later · 3 only as an assembly brick
1912.11370 (2019-12)
Big Transfer (BiT): General Visual Representation Learning
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2102.04306 (2021-02)
TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation
and 30 more not named here
conv3x3 33 other papers
17 dated earlier, 1 the same month, 15 later · 3 only as an assembly brick
1912.11370 (2019-12)
Big Transfer (BiT): General Visual Representation Learning
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2102.04306 (2021-02)
TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation
and 30 more not named here
nll_loss 7 other papers
3 dated earlier, 2 later, 2 same year, order not determinable
2104.00650 (2021-04)
Frozen in Time: A Joint Video and Image Encoder for End-to-End Retrieval
2109.04912 (2021-09)
ReasonBERT: Pre-trained to Reason with Distant Supervision
2022.findings-acl.116 (2022 (year only))
Thai Nested Named Entity Recognition Corpus
and 4 more not named here
accuracy 5 other papers
3 dated earlier, 2 later
1609.09869 (2016-09)
Structured Inference Networks for Nonlinear State Space Models
1907.00865 (2019-07)
Radial Bayesian Neural Networks: Beyond Discrete Support In Large-Scale Bayesian Deep Learning
2111.04578 (2021-11)
Improved Regularization and Robustness for Fine-tuning in Neural Networks
and 2 more not named here
top_k_acc 4 other papers
2 dated earlier, 2 later
1609.09869 (2016-09)
Structured Inference Networks for Nonlinear State Space Models
2111.04578 (2021-11)
Improved Regularization and Robustness for Fine-tuning in Neural Networks
2312.10890 (2023-12)
Low-latency Space-time Supersampling for Real-time Rendering
and 1 more not named here
custom_kl_div 2 other papers
2 dated earlier
2105.04522 (2021-05)
Generalized Jensen-Shannon Divergence Loss for Learning with Noisy Labels
2112.14869 (2021-12)
Label Distributionally Robust Losses for Multi-class Classification: Consistency, Robustness and Adaptivity
perturbe_model_weights 1 other paper
1 later
2306.08553 (2023-06)
Noise Stability Optimization for Finding Flat Minima: A Hessian-based Regularization Approach

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

We consider fine-tuning a pretrained deep neural network on a target task. We study the generalization properties of fine-tuning to understand the problem of overfitting, which has often been observed (e.g., when the target dataset is small or when the training labels are noisy). Existing generalization measures for deep networks depend on notions such as distance from the initialization (i.e., the pretrained network) of the fine-tuned model and noise stability properties of deep networks. This paper identifies a Hessian-based distance measure through PAC-Bayesian analysis, which is shown to correlate well with observed generalization gaps of fine-tuned models. Theoretically, we prove Hessian distance-based generalization bounds for fine-tuned models. We also describe an extended study of fine-tuning against label noise, where overfitting remains a critical problem. We present an algorithm and a generalization error guarantee for this algorithm under a class conditional independent noise model. Empirically, we observe that the Hessianbased distance measure can match the scale of the observed generalization gap of fine-tuned models in practice. We also test our algorithm on several image classification tasks with noisy training labels, showing gains over prior methods and decreases in the Hessian distance measure of the fine-tuned model.

For agents

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

get_harvested_code_for_paper("2206.02659")
get_code_for_paper("2206.02659")
have("2206.02659")

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

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

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

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

Connect an agent — have() is free.