SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.11228 · 2021

Taxonomizing local versus global structure in neural network loss landscapes

arXiv · PDF · Open in the Atlas

Code that ran

7 of 12 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 6 have no contract verdict; 0 failures of our instrument; 5 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/2107.11228.json · badge: /api/ran/2107.11228.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
nsfzyzz/loss_landscape_taxonomy canonical (classifier label)
classifier basis: census
7 ran · 5 no recorded run
FunctionStatusWhere it lives
clean_state_dict Ran
ran on a synthesized input
nsfzyzz/loss_landscape_taxonomy/workspace/src/code/Mode_connectivity.py
code served (permissive licence) · get_code("1fc072078f313a48")
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 OrderedDict. 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
from collections import OrderedDict

torch.manual_seed(0)

# Create a sample state_dict with various tensor parameters
# This simulates a typical PyTorch model state dictionary
state_dict = OrderedDict([
    ("layer1.weight", torch.randn(4, 3)),
    ("layer1.bias", torch.randn(4)),
    ("layer2.weight", torch.randn(5, 4)),
    ("layer2.bias", torch.randn(5)),
])

ARGS = {
    "state_dict": state_dict
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
compare_classification Ran
ran on a synthesized input
nsfzyzz/loss_landscape_taxonomy/workspace/src/code/CKA_utils.py
code served (permissive licence) · get_code("701e76e754c29f3a")
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 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

torch.manual_seed(0)

# Simple classification model
class SimpleClassifier(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.fc = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.fc(x)

# Create two small models
model1 = SimpleClassifier(input_dim=4, num_classes=3)
model2 = SimpleClassifier(input_dim=4, num_classes=3)

# Create a small eval_loader with 2 batches of size 2
eval_loader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,)))
]

# Create args with mixup_CKA attribute
class Args:
    def __init__(self):
        self.mixup_CKA = False
        self.mixup_alpha = 0.2

args = Args()

# Create a cosine similarity function (cos parameter)
def cos_similarity(x, y):
    return F.cosine_similarity(x.unsqueeze(0), y.unsqueeze(0))

cos = cos_similarity

ARGS = {
    "model1": model1,
    "model2": model2,
    "eval_loader": eval_loader,
    "args": args,
    "cos": cos
}
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 1, 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
get_ckpt_folder Ran
ran on a synthesized input
nsfzyzz/loss_landscape_taxonomy/workspace/src/write_script.py
code served (permissive licence) · get_code("f3ecf7efd2df0664")
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 str. 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 os

class Args:
    def __init__(self):
        self.temperature_type = "linear"
        self.training_type = "supervised"
        self.arch = "resnet50"
        self.folder_suffix = "v1"

args = Args()
home_dir = "/tmp/experiment"
val = "0.95"
load_suffix = "best"

ARGS = {
    "args": args,
    "home_dir": home_dir,
    "val": val,
    "load_suffix": load_suffix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_parser Ran
ran on a synthesized input
nsfzyzz/loss_landscape_taxonomy/workspace/src/code/arguments.py
code served (permissive licence) · get_code("52c0162b00112afd")
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 ArgumentParser. 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 argparse
import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'code_type': 'training'
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
get_training_params Ran
ran on a synthesized input
nsfzyzz/loss_landscape_taxonomy/workspace/src/write_script.py
code served (permissive licence) · get_code("f10539642e6e60fc")
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 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 numpy as np

class Args:
    def __init__(self):
        self.lr_standard = 0.001
        self.bs_standard = 32
        self.wd_standard = 0.0001
        self.temperature_type = 'lr'
        self.training_type = 'standard'

args = Args()
val = 0.01

ARGS = {
    'args': args,
    'val': val
}
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 1, 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
gram_linear Ran
ran, honoured the contract we drafted
nsfzyzz/loss_landscape_taxonomy/workspace/src/code/CKA_utils.py
code served (permissive licence) · get_code("3244098809cadb0a")
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 2, dtype family float, shape (2, 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 numpy as np

# Create a small feature matrix: num_examples x num_features
# Using distinct dimensions: 2 examples, 4 features
x = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float32)

ARGS = {
    "x": x
}
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 2, dtype family float, shape (2, 2) — shape (2, 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
l2_regularizer Ran
ran on a synthesized input
nsfzyzz/loss_landscape_taxonomy/workspace/src/code/curves.py
code served (permissive licence) · get_code("cb72b7e1024c31b0")
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 function. 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)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    @property
    def l2(self):
        # Compute L2 norm of all parameters
        l2_norm = 0.0
        for param in self.parameters():
            l2_norm += torch.sum(param ** 2)
        return l2_norm

model = SimpleModel()
weight_decay = 0.01

ARGS = {
    "weight_decay": weight_decay,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
all_latent Not yet run
unverified (harvested, no recorded run)
nsfzyzz/loss_landscape_taxonomy/workspace/src/code/CKA_utils.py
code served (permissive licence) · get_code("eabce69961b8a5da")
How it ran

no invocation recorded.

customize_range Not yet run
unverified (harvested, no recorded run)
nsfzyzz/loss_landscape_taxonomy/workspace/src/example_experiment.py
code served (permissive licence) · get_code("e981f899ad0d5072")
How it ran

no invocation recorded.

get_load_temperature Not yet run
unverified (harvested, no recorded run)
nsfzyzz/loss_landscape_taxonomy/workspace/src/write_script.py
code served (permissive licence) · get_code("3ff8b5611addf14a")
How it ran

no invocation recorded.

get_slurm_script Not yet run
unverified (harvested, no recorded run)
nsfzyzz/loss_landscape_taxonomy/workspace/src/example_experiment.py
code served (permissive licence) · get_code("e016667f5ec72494")
How it ran

no invocation recorded.

learning_rate_schedule Not yet run
unverified (harvested, no recorded run)
nsfzyzz/loss_landscape_taxonomy/workspace/src/code/Mode_connectivity.py
code served (permissive licence) · get_code("b72258e10ce08c1e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 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, 2 later) and 9 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
gram_linear 4 other papers
1 dated earlier, 3 later
2007.01195 (2020-07)
Hierarchically Organized Latent Modules for Exploratory Search in Morphogenetic Systems
2309.01265 (2023-09)
SOAR: Scene-debiasing Open-set Action Recognition
2024.findings-acl.608 (2024 (year only))
LLM Factoscope: Uncovering LLMs' Factual Discernment through Measuring Inner States
and 1 more not named here
l2_regularizer 2 other papers
1 dated earlier, 1 later
2005.00060 (2020-05)
Bridging Mode Connectivity in Loss Landscapes and Adversarial Robustness
2302.12758 (2023-02)
Defending Against Backdoor Attacks by Layer-wise Feature Analysis
learning_rate_schedule 1 other paper
1 dated earlier
1802.10026 (2018-02)
Loss Surfaces, Mode Connectivity, and Fast Ensembling of DNNs

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

Viewing neural network models in terms of their loss landscapes has a long history in the statistical mechanics approach to learning, and in recent years it has received attention within machine learning proper. Among other things, local metrics (such as the smoothness of the loss landscape) have been shown to correlate with global properties of the model (such as good generalization performance). Here, we perform a detailed empirical analysis of the loss landscape structure of thousands of neural network models, systematically varying learning tasks, model architectures, and/or quantity/quality of data. By considering a range of metrics that attempt to capture different aspects of the loss landscape, we demonstrate that the best test accuracy is obtained when: the loss landscape is globally well-connected; ensembles of trained models are more similar to each other; and models converge to locally smooth regions. We also show that globally poorly-connected landscapes can arise when models are small or when they are trained to lower quality data; and that, if the loss landscape is globally poorly-connected, then training to zero loss can actually lead to worse test accuracy. Our detailed empirical results shed light on phases of learning (and consequent double descent behavior), fundamental versus incidental determinants of good generalization, the role of load-like and temperature-like parameters in the learning process, different influences on the loss landscape from model and data, and the relationships between local and global metrics, all topics of recent interest.

For agents

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

get_harvested_code_for_paper("2107.11228")
get_code_for_paper("2107.11228")
have("2107.11228")

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

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

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

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

Connect an agent — have() is free.