SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.13456 · NeurIPS · 2024

Deep linear networks for regression are implicitly regularized towards flat minima

Lénaïc Chizat, Pierre Marion

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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, 3 violated it and 0 have no contract verdict; 5 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/2405.13456.json · badge: /api/ran/2405.13456.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
PierreMarion23/implicit-reg-sharpness canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
generate_data Ran
ran; our contract draft was wrong, not the code
PierreMarion23/implicit-reg-sharpness/utils.py
code served (permissive licence) · get_code("5870180258b6c8a6")
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 jax
import jax.numpy as jnp
from jax import random

# Set seed for reproducibility
key = random.PRNGKey(0)

# Define arguments for generate_data function
n = 2          # number of samples
d = 4          # number of dimensions
noise_variance = 0.1  # noise variance level
key = random.PRNGKey(42)  # JAX random key

ARGS = {
    "n": n,
    "d": d,
    "noise_variance": noise_variance,
    "key": key
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
init_mlp Ran
ran; our contract draft was wrong, not the code
PierreMarion23/implicit-reg-sharpness/mlp.py
code served (permissive licence) · get_code("de709e50e91704f3")
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. 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.

from jax import random
import jax.numpy as jnp

# Set a seed for reproducibility
key = random.PRNGKey(0)

# Define parameters for init_mlp
d = 4        # dimension
L = 3        # number of layers
scale = 0.1  # scaling factor for initialization
key = random.PRNGKey(42)  # JAX random key

ARGS = {
    "d": d,
    "L": L,
    "scale": scale,
    "key": key,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
init_resnet Ran
ran; our contract draft was wrong, not the code
PierreMarion23/implicit-reg-sharpness/resnet.py
code served (permissive licence) · get_code("a1f262ba71bc7b8f")
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 3, 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 jax
import jax.numpy as jnp
from jax import random

# Set seed for reproducibility
key = random.PRNGKey(0)

# Define parameters
d = 4  # dimension of matrices
L = 3  # number of layers
scale = 2.0  # scaling factor

ARGS = {
    "d": d,
    "L": L,
    "scale": scale,
    "key": key
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, dtype family float — 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
linear_network Ran
ran, violated the contract we drafted
PierreMarion23/implicit-reg-sharpness/mlp.py
code served (permissive licence) · get_code("19ebd4e6ae48ea0d")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np

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

# Create small parameter matrices for the deep linear network
# Each weight matrix W will be applied as h = W @ h
# We need to ensure dimensions are compatible for chaining

# Start with input dimension 4, intermediate dimensions 3, 2, output dimension 2
params = [
    jnp.array(np.random.randn(3, 4), dtype=jnp.float32),  # 3x4 matrix
    jnp.array(np.random.randn(2, 3), dtype=jnp.float32),  # 2x3 matrix
    jnp.array(np.random.randn(2, 2), dtype=jnp.float32),  # 2x2 matrix
]

# Create input with batch size 2, feature dimension 4
inputs = jnp.array(np.random.randn(4, 2), dtype=jnp.float32)

ARGS = {
    "params": params,
    "inputs": inputs,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
linear_network_proj Ran
ran, violated the contract we drafted
PierreMarion23/implicit-reg-sharpness/resnet.py
code served (permissive licence) · get_code("09c329e7eeefd796")
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 ArrayImpl, ndim 1, dtype family float, shape (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 jax.numpy as jnp
import numpy as np

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

# Create small parameter matrices for the deep linear network
# params is a list of weight matrices that will be applied sequentially
params = [
    jnp.array(np.random.randn(5, 4), dtype=jnp.float32),  # First layer: 5x4
    jnp.array(np.random.randn(4, 5), dtype=jnp.float32),  # Second layer: 4x5
    jnp.array(np.random.randn(3, 4), dtype=jnp.float32),  # Third layer: 3x4
]

# Input to the network: batch of 2 samples, dimension 4
inputs = jnp.array(np.random.randn(4, 2), dtype=jnp.float32)

# Final projection weight vector: projects from dimension 3 to scalar
w = jnp.array(np.random.randn(3), dtype=jnp.float32)

ARGS = {
    "params": params,
    "inputs": inputs,
    "w": w,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (2,) — shape (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
loss_fn_resnet Ran
ran; our contract draft was wrong, not the code
PierreMarion23/implicit-reg-sharpness/resnet.py
code served (permissive licence) · get_code("1225e1d2cfd73d73")
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 jax.numpy as jnp
import jax.random as jr

# Set random seed for reproducibility
key = jr.PRNGKey(0)

# Define small tensor dimensions
batch_size = 2
input_dim = 4
hidden_dim = 3
output_dim = 2

# Create params: list of weight matrices for the deep linear network
# Each weight matrix transforms from one dimension to the next
params = [
    jnp.ones((hidden_dim, input_dim)),  # First layer: input_dim -> hidden_dim
    jnp.ones((output_dim, hidden_dim)),  # Second layer: hidden_dim -> output_dim
]

# Create input data X with shape (batch_size, input_dim)
X = jnp.ones((batch_size, input_dim))

# Create target data y with shape (batch_size,)
y = jnp.ones(batch_size)

# Create projection vector w with shape (output_dim,)
w = jnp.ones(output_dim)

# Package args as a tuple (X, y, w)
args = (X, y, w)

# Define ARGS dictionary
ARGS = {
    "params": params,
    "args": args,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
non_linear_network Ran
ran, violated the contract we drafted
PierreMarion23/implicit-reg-sharpness/mlp.py
code served (permissive licence) · get_code("a794995cb4ed8549")
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 ArrayImpl, ndim 1, dtype family float, shape (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 jax
import jax.numpy as jnp
import numpy as np

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

# Create small parameters for the network
# Each element in params list is a weight matrix W
# The function does: h = jnp.dot(W, h)
# So if h has shape (d_in,), then W should have shape (d_out, d_in)

# Build a simple 3-layer network with distinct dimensions
# Layer 1: input_dim=4 -> hidden_dim=5
# Layer 2: hidden_dim=5 -> hidden_dim=3
# Layer 3: hidden_dim=3 -> output_dim=2

W1 = jnp.array(np.random.randn(5, 4), dtype=jnp.float32)
W2 = jnp.array(np.random.randn(3, 5), dtype=jnp.float32)
W3 = jnp.array(np.random.randn(2, 3), dtype=jnp.float32)

params = [W1, W2, W3]

# Create input with batch dimension implicit in the vector form
# For a single forward pass, inputs should be 1D (d_in,)
inputs = jnp.array(np.random.randn(4), dtype=jnp.float32)

ARGS = {
    "params": params,
    "inputs": inputs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (2,) — shape (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
param_hessian_vector_product Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
PierreMarion23/implicit-reg-sharpness/utils.py
code served (permissive licence) · get_code("f19688ad8dd1a7e2")
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 ArrayImpl, ndim 1, dtype family float, shape (5,) 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 jax
import jax.numpy as jnp
import jax.flatten_util

# Define a simple loss function that takes params and args
def loss_fn(params, args):
    # params is expected to be a pytree (dict or nested structure)
    # args contains auxiliary data
    x, y = args
    # Simple quadratic loss: sum((params @ x - y)^2)
    pred = jnp.dot(params['w'], x) + params['b']
    loss = jnp.sum((pred - y) ** 2)
    return loss, None

# Create small test data
x = jnp.array([1.0, 2.0, 3.0, 4.0])
y = jnp.array([2.0, 4.0, 6.0, 8.0])
args = (x, y)

# Create initial parameters as a pytree
params = {
    'w': jnp.array([0.1, 0.2, 0.3, 0.4]),
    'b': jnp.array(0.5)
}

# Flatten params to get a vector representation
flat_params, unravel_fn = jax.flatten_util.ravel_pytree(params)

# Create a vector (tangent) with same shape as flattened params
vec = jnp.ones_like(flat_params) * 0.01

ARGS = {
    'vec': vec,
    'args': args,
    'params': params,
    'unravel_fn': unravel_fn,
    'loss_fn': loss_fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (5,) — shape (5,) 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
hessian_vector_product Not yet run
unverified (harvested, no recorded run)
PierreMarion23/implicit-reg-sharpness/utils.py
code served (permissive licence) · get_code("f3f3e20037b2576c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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

The largest eigenvalue of the Hessian, or sharpness, of neural networks is a key quantity to understand their optimization dynamics. In this paper, we study the sharpness of deep linear networks for univariate regression. Minimizers can have arbitrarily large sharpness, but not an arbitrarily small one. Indeed, we show a lower bound on the sharpness of minimizers, which grows linearly with depth. We then study the properties of the minimizer found by gradient flow, which is the limit of gradient descent with vanishing learning rate. We show an implicit regularization towards flat minima: the sharpness of the minimizer is no more than a constant times the lower bound. The constant depends on the condition number of the data covariance matrix, but not on width or depth. This result is proven both for a small-scale initialization and a residual initialization. Results of independent interest are shown in both cases. For small-scale initialization, we show that the learned weight matrices are approximately rank-one and that their singular vectors align. For residual initialization, convergence of the gradient flow for a Gaussian initialization of the residual network is proven. Numerical experiments illustrate our results and connect them to gradient descent with non-vanishing learning rate.

For agents

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

get_harvested_code_for_paper("2405.13456")
get_code_for_paper("2405.13456")
have("2405.13456")

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

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

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

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

Connect an agent — have() is free.