SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.09313 · NeurIPS · 2020

Hausdorff Dimension, Heavy Tails, and Generalization in Neural Networks

Umut Şimşekli, Ozan Sener, George Deligiannidis, Murat Erdogdu

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 0 failures of our instrument; 3 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/2006.09313.json · badge: /api/ran/2006.09313.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
umutsimsekli/Hausdorff-Dimension-and-Generalization canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_loss_accuracy Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/eval_lenet.py
code served (permissive licence) · get_code("8516b1e3797f3626")
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 torch.nn as nn

torch.manual_seed(0)

# Define a small neural network that takes inputs and produces class predictions
class SimpleNet(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super(SimpleNet, self).__init__()
        self.fc = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.fc(x)

# Create a simple data loader as a list of (inputs, labels) tuples
# Each input is a batch of 2 samples with 4 features
# Each label is a batch of 2 class indices (0, 1, or 2)
loader = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([2, 0])),
]

# Instantiate the network
net = SimpleNet(input_dim=4, num_classes=3)

# Device (CPU only)
device = 'cpu'

ARGS = {
    'net': net,
    'loader': loader,
    'device': device,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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_5_good_fiv Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/alpha_estimator_vgg.py
code served (permissive licence) · get_code("df1d0d9922d01dfd")
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. 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 numpy as np

def get_5_good_fiv(x):
    rs = int(np.floor(np.sqrt(x)))
    div = []
    for i in range(2, rs):
        if x % i == 0:
            div.append(i)
    if len(div) > 5:
        return (x, div[::int(np.ceil(len(div) / 4))] + [div[-1]])
    else:
        return get_5_good_fiv(x - 1)

# The function takes an integer x and finds divisors
# We need to pass a number large enough that it will eventually find
# a number with more than 5 divisors
# 360 has divisors: 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180
# which is way more than 5

ARGS = {
    "x": 360
}
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 — a tuple output has no array shape of its own; none is 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_grads Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/utils.py
code served (permissive licence) · get_code("81aabb5979983838")
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 1, dtype family float, shape (23,) 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)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create some dummy data and do a forward/backward pass to populate gradients
x = torch.randn(2, 4)
y = torch.randn(2, 2)
output = model(x)
loss = torch.nn.functional.mse_loss(output, y)
loss.backward()

ARGS = {
    'model': model
}
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 1, dtype family float, shape (23,) — shape (23,) 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_layerWise_norms Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/utils.py
code served (permissive licence) · get_code("0b07fe0f42cc6c92")
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. 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 SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

net = SimpleNet()

# Create some dummy input and output for a backward pass
x = torch.randn(2, 4)
y = torch.randn(2, 2)

# Forward pass
output = net(x)

# Compute loss and backward to populate gradients
loss = nn.MSELoss()(output, y)
loss.backward()

ARGS = {
    "net": net
}
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 — a tuple output has no array shape of its own; none is 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_ms Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/alpha.py
code served (permissive licence) · get_code("7715f76656a8f363")
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. 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

torch.manual_seed(0)

# Read the function body to understand what parameters are needed
# get_ms takes two parameters: iter_size and mod_size
# iter_size must be one of [1563, 196, 782, 391]
# mod_size must be one of the keys in net_sizes_div

# Valid iter_size values: 1563, 196, 782, 391
# Valid mod_size values: 368640, 10080, 386914, 450, 2400, 4000, 6882, 48000, 840, 52202, 97706, 7056, 1200, 369970, 415474, 69146

ARGS = {
    'iter_size': 1563,
    'mod_size': 450
}
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 — a tuple output has no array shape of its own; none is 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_ms Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/alpha_estimator_vgg.py
code served (permissive licence) · get_code("f9856a1f95a31bd1")
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. 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 numpy as np

def get_5_good_fiv(x):
    rs = int(np.floor(np.sqrt(x)))
    div = []
    for i in range(2, rs):
        if x % i == 0:
            div.append(i)
    if len(div) > 5:
        return (x, div[::int(np.ceil(len(div) / 4))] + [div[-1]])
    else:
        return get_5_good_fiv(x - 1)

def get_ms(iter_size, mod_size):
    if iter_size in resolutions:
        iter_set = resolutions[iter_size]
    else:
        raise ValueError('Not a valid iteration size')
    mod_set = get_5_good_fiv(mod_size)
    full_size = iter_set[0] * mod_set[0]
    all_ms = sorted([a * b for a in iter_set[1] for b in mod_set[1]])
    return (full_size, all_ms)

resolutions = {3136: [756, [2, 3, 6, 18, 36]], 1574: [756, [2, 3, 6, 18, 36]], 1563: [756, [2, 3, 6, 18, 36]], 793: [756, [2, 3, 6, 7, 9, 18, 36]], 782: [756, [2, 3, 6, 7, 9, 18, 36]], 402: [324, [2, 3, 6, 9, 18, 36]], 391: [324, [2, 3, 6, 9, 18, 36]], 207: [196, [2, 4, 7, 14, 28]], 196: [196, [2, 4, 7, 14, 28]]}

ARGS = {
    "iter_size": 3136,
    "mod_size": 402
}
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 — a tuple output has no array shape of its own; none is 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
linear_hinge_loss Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/utils.py
code served (permissive licence) · get_code("edb70818f0dae2b8")
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

torch.manual_seed(0)

# Analyze the function:
# - output: tensor that supports new_empty(), size(), indexing, arithmetic operations
# - target: sequence that supports len() and indexing with integers
# The function treats target as class indices and output as raw scores/logits

# Create small tensors:
# batch_size=2, num_classes=4
batch_size = 2
num_classes = 4

# output should be shape (batch_size, num_classes) - raw model outputs
output = torch.randn(batch_size, num_classes)

# target should be a tensor or list of class indices (one per sample)
# Each index should be in range [0, num_classes)
target = torch.tensor([1, 3])

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
peek_model_size Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/alpha.py
code served (permissive licence) · get_code("13d5dc2899f822db")
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 list, ndim 1, dtype family int; 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Create parameters with distinct shapes
        self.linear1 = nn.Linear(4, 3)  # weight: (3, 4), bias: (3,)
        self.linear2 = nn.Linear(3, 2)  # weight: (2, 3), bias: (2,)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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 list, ndim 1, dtype family int — 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
peek_model_size Ran
ran on a synthesized input
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/alpha_estimator_vgg.py
code served (permissive licence) · get_code("d62121af35bc57d8")
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 list, ndim 1, dtype family int; 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Create parameters with distinct sizes for probing
        self.linear1 = nn.Linear(4, 3)  # weight: 3x4, bias: 3
        self.linear2 = nn.Linear(3, 2)  # weight: 2x3, bias: 2
        # Add a 1D parameter to test the len(p.shape) < 2 case
        self.scale = nn.Parameter(torch.randn(5))
    
model = SimpleModel()

ARGS = {
    "model": model
}
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 list, ndim 1, dtype family int — 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
compute_loss_accuracy Not yet run
unverified (harvested, no recorded run)
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/eval_vgg.py
code served (permissive licence) · get_code("7fba23b864d78e0e")
How it ran

no invocation recorded.

test_on_cifar Not yet run
unverified (harvested, no recorded run)
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/eval_lenet.py
code served (permissive licence) · get_code("df5d0650abc8d23f")
How it ran

no invocation recorded.

test_on_cifar Not yet run
unverified (harvested, no recorded run)
umutsimsekli/Hausdorff-Dimension-and-Generalization/src/eval_vgg.py
code served (permissive licence) · get_code("8b6ff57568a221d1")
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 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 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
get_grads 1 other paper
1 later
2009.10588 (2020-09)
Anomalous diffusion dynamics of learning in deep neural networks

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

Despite its success in a wide range of applications, characterizing the generalization properties of stochastic gradient descent (SGD) in non-convex deep learning problems is still an important challenge. While modeling the trajectories of SGD via stochastic differential equations (SDE) under heavy-tailed gradient noise has recently shed light over several peculiar characteristics of SGD, a rigorous treatment of the generalization properties of such SDEs in a learning theoretical framework is still missing. Aiming to bridge this gap, in this paper, we prove generalization bounds for SGD under the assumption that its trajectories can be well-approximated by a Feller process, which defines a rich class of Markov processes that include several recent SDE representations (both Brownian or heavy-tailed) as its special case. We show that the generalization error can be controlled by the Hausdorff dimension of the trajectories, which is intimately linked to the tail behavior of the driving process. Our results imply that heavier-tailed processes should achieve better generalization; hence, the tail-index of the process can be used as a notion of "capacity metric". We support our theory with experiments on deep neural networks illustrating that the proposed capacity metric accurately estimates the generalization error, and it does not necessarily grow with the number of parameters unlike the existing capacity metrics in the literature. 34th Conference on Neural Information Processing Systems (NeurIPS 2020),

For agents

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

get_harvested_code_for_paper("2006.09313")
get_code_for_paper("2006.09313")
have("2006.09313")

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

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

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

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

Connect an agent — have() is free.