SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.00879 · NeurIPS · 2020

Understanding Approximate Fisher Information for Fast Convergence of Natural Gradient Descent in Wide Neural Networks

Ryo Karakida, Kazuki Osawa

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 0 honoured the contract we drafted, 0 violated it and 8 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/2010.00879.json · badge: /api/ran/2010.00879.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
kazukiosawa/ngd_in_wide_nn canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
activation Ran
ran on a synthesized input
kazukiosawa/ngd_in_wide_nn/numpy-based/empirical.py
code served (permissive licence) · get_code("91f17369226529c0")
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 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small tensor input for the activation function
# The function uses: inputs > 0 (comparison), inputs * derivatives (multiplication)
# Shape: (2, 4) for batch_size=2, features=4
inputs = torch.randn(2, 4)

ARGS = {
    'inputs': inputs,
    'name': 'relu'
}
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 3, 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
analytic_kernel Ran
ran on a synthesized input
kazukiosawa/ngd_in_wide_nn/numpy-based/analytical.py
code served (permissive licence) · get_code("06a25a41e742052f")
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 numpy as np

# Create small input arrays
x1 = np.random.randn(2, 4)  # N1=2, M0=4
x2 = np.random.randn(3, 4)  # N2=3, M0=4

# Create weight variance parameter
w_var = 1.5

# Create ng_type parameter - test with block_diagonal
ng_type = 'block_diagonal'

ARGS = {
    'x1': x1,
    'x2': x2,
    'w_var': w_var,
    'ng_type': ng_type
}
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 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
batch_analytic_kernel Ran
ran on a synthesized input
kazukiosawa/ngd_in_wide_nn/numpy-based/analytical.py
code served (permissive licence) · get_code("f43af3f41a794003")
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 numpy as np

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

# Create small input arrays
# x1: (batch_size * n_batch1, input_dim) = (4, 8)
# x2: (batch_size * n_batch2, input_dim) = (4, 8)
x1 = np.random.randn(4, 8).astype(np.float32)
x2 = np.random.randn(4, 8).astype(np.float32)

# Weight variance parameter
w_var = 1.0

# Neural Gaussian type - use 'block_diagonal' as valid option
ng_type = 'block_diagonal'

# Batch size that divides both x1.shape[0] and x2.shape[0]
batch_size = 2

ARGS = {
    'x1': x1,
    'x2': x2,
    'w_var': w_var,
    'ng_type': ng_type,
    'batch_size': batch_size
}
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 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
forster_transform Ran
ran on a synthesized input
kazukiosawa/ngd_in_wide_nn/numpy-based/utils.py
code served (permissive licence) · get_code("2b21995a01e13c49")
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 (5, 3) 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

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

# Create a small test matrix X with shape (N, M0)
# N = 5 samples, M0 = 3 features
N = 5
M0 = 3
X = np.random.randn(N, M0).astype(np.float64)

# Define all arguments for forster_transform
ARGS = {
    'X': X,
    'n_iters': 100,
    'tol': 0.001,
    'eps': 1e-07
}
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 (5, 3) — shape (5, 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
forward_and_backward Ran
ran on a synthesized input
kazukiosawa/ngd_in_wide_nn/numpy-based/empirical.py
code served (permissive licence) · get_code("c07dde587e3e19a7")
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
from functools import partial

np.random.seed(0)

# Small batch size and dimensions for testing
batch_size = 2
input_dim = 4
hidden_dim_1 = 5
hidden_dim_2 = 3
output_dim = 2

# Create small weight matrices
W1 = np.random.randn(hidden_dim_1, input_dim).astype(np.float32)
W2 = np.random.randn(hidden_dim_2, hidden_dim_1).astype(np.float32)
W3 = np.random.randn(output_dim, hidden_dim_2).astype(np.float32)

# Create small input batch
x = np.random.randn(batch_size, input_dim).astype(np.float32)

ARGS = {
    'x': x,
    'W1': W1,
    'W2': W2,
    'W3': W3,
    'backward': True,
    'kfac': False
}
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
gradient_descent_mse Ran
ran on a synthesized input
kazukiosawa/ngd_in_wide_nn/numpy-based/predict.py
code served (permissive licence) · get_code("12b893d866119885")
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 numpy as np

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

# Create small synthetic data
batch_size = 2
feature_dim = 4
test_batch_size = 3

# fx_train: predictions on training set (batch_size,)
fx_train = np.random.randn(batch_size)

# y_train: ground truth labels on training set (batch_size,)
y_train = np.random.randn(batch_size)

# g_dd: Gram matrix of data descriptors (batch_size, batch_size)
# Must be symmetric positive semi-definite for eigh to work properly
A = np.random.randn(batch_size, batch_size)
g_dd = A @ A.T + np.eye(batch_size) * 0.1  # Ensure it's SPD

# g_td: cross-Gram matrix between test and data descriptors (test_batch_size, batch_size)
g_td = np.random.randn(test_batch_size, batch_size)

ARGS = {
    'fx_train': fx_train,
    'y_train': y_train,
    'g_dd': g_dd,
    'g_td': g_td,
}
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 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
init_ntk_mlp Ran
ran on a synthesized input
kazukiosawa/ngd_in_wide_nn/numpy-based/empirical.py
code served (permissive licence) · get_code("efc518313b8e690c")
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

# Define ARGS dict with all parameters for init_ntk_mlp
ARGS = {
    "M3": 8,      # Output dimension
    "M2": 6,      # Hidden layer 2 dimension
    "M1": 4,      # Hidden layer 1 dimension
    "M0": 3,      # Input dimension
    "W_std": 1.0,
    "b_std": 0.0,
    "random_seed": 0
}
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
load_dataset Ran
ran on a synthesized input
kazukiosawa/ngd_in_wide_nn/jax-based/utils.py
code served (permissive licence) · get_code("272b1343d9ce6f9b")
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
import tempfile
import os

# Create a temporary npz file with the required arrays
temp_dir = tempfile.mkdtemp()
dataset_path = os.path.join(temp_dir, "test_dataset.npz")

# Define dimensions
n_train = 2
n_test = 3
n_classes = 2
feature_dim = 4

# Create sample data
x_train = np.random.randn(n_train, feature_dim).astype(np.float32)
y_train = np.random.randint(0, 2, (n_train, 1)).astype(np.int64)
x_test = np.random.randn(n_test, feature_dim).astype(np.float32)
y_test = np.random.randint(0, 2, (n_test, 1)).astype(np.int64)
target_classes = np.array([0, 1], dtype=np.int64)

# Save to npz file
np.savez(dataset_path, x_train, y_train, x_test, y_test, target_classes)

ARGS = {
    "dataset_path": dataset_path,
    "n_train": n_train,
    "n_test": n_test,
    "n_classes": n_classes,
}
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
exact_natural_gradient_descent_mse Not yet run
unverified (harvested, no recorded run)
kazukiosawa/ngd_in_wide_nn/numpy-based/predict.py
code served (permissive licence) · get_code("df49c5fd9bfb5a9c")
How it ran

no invocation recorded.

flatten_features Not yet run
unverified (harvested, no recorded run)
kazukiosawa/ngd_in_wide_nn/jax-based/empirical.py
code served (permissive licence) · get_code("0e413bb1862ac2de")
How it ran

no invocation recorded.

natural_gradient_descent_mse Not yet run
unverified (harvested, no recorded run)
kazukiosawa/ngd_in_wide_nn/numpy-based/predict.py
code served (permissive licence) · get_code("d11096b872285991")
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, 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 11 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-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

Natural Gradient Descent (NGD) helps to accelerate the convergence of gradient descent dynamics, but it requires approximations in large-scale deep neural networks because of its high computational cost. Empirical studies have confirmed that some NGD methods with approximate Fisher information converge sufficiently fast in practice. Nevertheless, it remains unclear from the theoretical perspective why and under what conditions such heuristic approximations work well. In this work, we reveal that, under specific conditions, NGD with approximate Fisher information achieves the same fast convergence to global minima as exact NGD. We consider deep neural networks in the infinite-width limit, and analyze the asymptotic training dynamics of NGD in function space via the neural tangent kernel. In the function space, the training dynamics with the approximate Fisher information are identical to those with the exact Fisher information, and they converge quickly. The fast convergence holds in layer-wise approximations; for instance, in block diagonal approximation where each block corresponds to a layer as well as in block tridiagonal and K-FAC approximations. We also find that a unit-wise approximation achieves the same fast convergence under some assumptions. All of these different approximations have an isotropic gradient in the function space, and this plays a fundamental role in achieving the same convergence properties in training. Thus, the current study gives a novel and unified theoretical foundation with which to understand NGD methods in deep learning.

For agents

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

get_harvested_code_for_paper("2010.00879")
get_code_for_paper("2010.00879")
have("2010.00879")

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

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

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

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

Connect an agent — have() is free.