SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.07145 · 2019

PyHessian: Neural Networks Through the Lens of the Hessian

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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 3 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1912.07145.json · badge: /api/ran/1912.07145.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
amirgholami/pyhessian canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
conv3x3 Ran
ran; our contract draft was wrong, not the code
amirgholami/pyhessian/models/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
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 lixiaotong97/DSU, 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.

density_generate Ran
ran on a synthesized input
amirgholami/pyhessian/density_plot.py
code served (permissive licence) · get_code("1425daa95c5d199f")
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 2, 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

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

# Create small test data
# eigenvalues: shape (num_runs, num_eigenvalues)
# weights: shape (num_runs, num_eigenvalues)

num_runs = 2
num_eigenvalues = 4

eigenvalues = np.random.randn(num_runs, num_eigenvalues) * 0.5 + 1.0
weights = np.abs(np.random.randn(num_runs, num_eigenvalues))
weights = weights / weights.sum(axis=1, keepdims=True)  # normalize weights

ARGS = {
    "eigenvalues": eigenvalues,
    "weights": weights,
    "num_bins": 100,
    "sigma_squared": 1e-05,
    "overhead": 0.01
}
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 tuple, ndim 2, dtype family float — 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
gaussian Ran
ran on a synthesized input
amirgholami/pyhessian/density_plot.py
code served (permissive licence) · get_code("fed978b343667599")
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 ndarray, ndim 1, dtype family float, shape (4,) 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 numpy as np

# The function gaussian takes three parameters:
# - x: a value or array (used in computation -(x0 - x) ** 2)
# - x0: a value or array (used in computation -(x0 - x) ** 2)
# - sigma_squared: a scalar or array (used in division and sqrt)

# All parameters are used in arithmetic operations with numpy
# Let's create distinct but compatible values

x = np.array([1.0, 2.0, 3.0, 4.0])
x0 = np.array([1.5, 2.5, 3.5, 4.5])
sigma_squared = np.array([0.5, 0.5, 0.5, 0.5])

ARGS = {
    "x": x,
    "x0": x0,
    "sigma_squared": sigma_squared
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (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
group_add Ran
ran; our contract draft was wrong, not the code
amirgholami/pyhessian/pyhessian/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from trustaiot/cr-sam, is pointer only (licence: NONE) · get_code("2530e16bed546c6a")
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 trustaiot/cr-sam, 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.

group_product Ran
ran, honoured the contract we drafted
amirgholami/pyhessian/pyhessian/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from trustaiot/cr-sam, is pointer only (licence: NONE) · get_code("c35e05b48a3f5b73")
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 trustaiot/cr-sam, 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.

normalization Ran
ran; our contract draft was wrong, not the code
amirgholami/pyhessian/pyhessian/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from trustaiot/cr-sam, is pointer only (licence: NONE) · get_code("0e4f4ed57a87f93d")
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 trustaiot/cr-sam, 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.

test Ran
ran on a synthesized input
amirgholami/pyhessian/utils.py
code served (permissive licence) · get_code("efb74181eced6df4")
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. 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

torch.manual_seed(0)

# Define a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)  # Input dim 4, output dim 3 (num classes)
    
    def forward(self, x):
        return self.linear(x)

# Create model instance
model = MinimalModel()

# Create test loader as list of (data, target) tuples
# Batch size 2, input dimension 4, 3 classes
test_loader = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([2, 0])),
]

# Define ARGS dict with all parameters
ARGS = {
    'model': model,
    'test_loader': test_loader,
    'cuda': False,  # Set to False since we're CPU-only
}
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
getData Not yet run
unverified (harvested, no recorded run)
amirgholami/pyhessian/utils.py
code served (permissive licence) · get_code("1f5d5616297ed7a9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 4 later) and 4 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
conv3x3 686 other papers
178 dated earlier, 3 the same month, 505 later · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
group_add 2 other papers
2 later
2307.11833 (2023-07)
PINNsFormer: A Transformer-Based Framework For Physics-Informed Neural Networks
2312.13555 (2023-12)
CR-SAM: Curvature Regularized Sharpness-Aware Minimization
group_product 2 other papers
2 later
2307.11833 (2023-07)
PINNsFormer: A Transformer-Based Framework For Physics-Informed Neural Networks
2312.13555 (2023-12)
CR-SAM: Curvature Regularized Sharpness-Aware Minimization
normalization 2 other papers
2 later
2307.11833 (2023-07)
PINNsFormer: A Transformer-Based Framework For Physics-Informed Neural Networks
2312.13555 (2023-12)
CR-SAM: Curvature Regularized Sharpness-Aware Minimization

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 present PYHESSIAN, a new scalable framework that enables fast computation of Hessian (i.e., second-order derivative) information for deep neural networks. PYHESSIAN enables fast computations of the top Hessian eigenvalues, the Hessian trace, and the full Hessian eigenvalue/spectral density, and it supports distributed-memory execution on cloud/supercomputer systems and is available as open source. This general framework can be used to analyze neural network models, including the topology of the loss landscape (i.e., curvature information) to gain insight into the behavior of different models/optimizers. To illustrate this, we analyze the effect of residual connections and Batch Normalization layers on the trainability of neural networks. One recent claim, based on simpler first-order analysis, is that residual connections and Batch Normalization make the loss landscape smoother, thus making it easier for Stochastic Gradient Descent to converge to a good solution. Our extensive analysis shows new finer-scale insights, demonstrating that, while conventional wisdom is sometimes validated, in other cases it is simply incorrect. In particular, we find that Batch Normalization does not necessarily make the loss landscape smoother, especially for shallower networks.

For agents

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

get_harvested_code_for_paper("1912.07145")
get_code_for_paper("1912.07145")
have("1912.07145")

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

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

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

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

Connect an agent — have() is free.