SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.00917 · 2020

Controllable Orthogonalization in Training DNNs

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 0 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2004.00917.json · badge: /api/ran/2004.00917.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
huangleiBuaa/ONI canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran on a synthesized input
huangleiBuaa/ONI/ONI_PyTorch/ImageNet/imagenet.py
code served (permissive licence) · get_code("a8ef2238d374d6cd")
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 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 torch

torch.manual_seed(0)

# Create small tensors for testing accuracy function
batch_size = 2
num_classes = 4

# output: logits tensor of shape (batch_size, num_classes)
output = torch.randn(batch_size, num_classes)

# target: class indices of shape (batch_size,)
target = torch.tensor([0, 2])

# topk: tuple of k values to compute accuracy for
topk = (1,)

ARGS = {
    "output": output,
    "target": target,
    "topk": topk,
}
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 list, ndim 2, 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
find_classes Ran
ran; our contract draft was wrong, not the code
huangleiBuaa/ONI/ONI_PyTorch/GAN/datasets.py
code served (permissive licence) · get_code("52d10a10fb72fb9f")
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 os
import tempfile
import shutil

# Create a temporary directory with some subdirectories to simulate a class directory structure
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, "class_a"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "class_b"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "class_c"), exist_ok=True)

ARGS = {
    "dir": temp_dir
}
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 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
is_image_file Ran
ran, violated the contract we drafted
huangleiBuaa/ONI/ONI_PyTorch/GAN/datasets.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from ermongroup/fairgen, is pointer only (licence: NONE) · get_code("4e6a8faaf8e44abe")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from ermongroup/fairgen, 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.

l2normalize Ran
ran; our contract draft was wrong, not the code
huangleiBuaa/ONI/ONI_PyTorch/GAN/spectral_normalization.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from xxxliu95/RA_FA_Cardiac, is pointer only (licence: NONE) · get_code("bedff51745d2cf84")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from xxxliu95/RA_FA_Cardiac, 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.

make_dataset Ran
ran; our contract draft was wrong, not the code
huangleiBuaa/ONI/ONI_PyTorch/GAN/datasets.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from ermongroup/fairgen, is pointer only (licence: NONE) · get_code("79e61b6269a450e8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from ermongroup/fairgen, 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.

numpy_calculate_frechet_distance Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
huangleiBuaa/ONI/ONI_PyTorch/GAN/inception_utils.py
code served (permissive licence) · get_code("54af0200eab3163f")
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 float64, ndim 0, 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 for Frechet Distance calculation
# mu1 and mu2 are mean vectors (1D arrays)
mu1 = np.array([0.1, 0.2, 0.3, 0.4])
mu2 = np.array([0.15, 0.25, 0.35, 0.45])

# sigma1 and sigma2 are covariance matrices (2D square arrays)
# Create positive semi-definite covariance matrices
dim = 4
A1 = np.random.randn(dim, dim)
sigma1 = A1 @ A1.T  # Ensure positive semi-definite
A2 = np.random.randn(dim, dim)
sigma2 = A2 @ A2.T  # Ensure positive semi-definite

# eps is a small regularization constant
eps = 1e-06

ARGS = {
    "mu1": mu1,
    "sigma1": sigma1,
    "mu2": mu2,
    "sigma2": sigma2,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
sqrt_newton_schulz Ran
ran; our contract draft was wrong, not the code
huangleiBuaa/ONI/ONI_PyTorch/GAN/inception_utils.py
code served (permissive licence) · get_code("c39eebccbb5e86a6")
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 3, dtype family float, shape (2, 4, 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 torch

torch.manual_seed(0)

# Create a small batch of square matrices (batch_size=2, dim=4)
# The function expects A to be shape (batchSize, dim, dim)
batch_size = 2
dim = 4

# Create random positive semi-definite matrices by A = M @ M.T
M = torch.randn(batch_size, dim, dim, dtype=torch.float32)
A = torch.bmm(M, M.transpose(1, 2))

# numIters is the number of Newton-Schulz iterations
numIters = 3

# dtype is optional, can be None or a torch dtype string
dtype = None

ARGS = {
    "A": A,
    "numIters": numIters,
    "dtype": dtype,
}
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 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 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
torch_cov Ran
ran; our contract draft was wrong, not the code
huangleiBuaa/ONI/ONI_PyTorch/GAN/inception_utils.py
code served (permissive licence) · get_code("4a2b2f288be2a186")
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 2, dtype family float, shape (5, 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 torch

torch.manual_seed(0)

# Create a 2-D tensor with shape (3, 5)
# 3 variables, 5 observations
m = torch.randn(3, 5)

ARGS = {
    "m": m,
    "rowvar": False,
}
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 2, dtype family float, shape (5, 5) — shape (5, 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

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, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 8 later) and 0 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
find_classes 30 other papers
9 dated earlier, 21 later
1406.2661 (2014-06)
Generative Adversarial Networks
1612.06321 (2016-12)
Large-Scale Image Retrieval with Attentive Deep Local Features
1809.04729 (2018-09)
A Less Biased Evaluation of Out-of-distribution Sample Detectors
and 27 more not named here
l2normalize 27 other papers
9 dated earlier, 18 later · 2 only as an assembly brick
1703.09452 (2017-03)
SEGAN: Speech Enhancement Generative Adversarial Network
1802.05957 (2018-02)
Spectral Normalization for Generative Adversarial Networks
1806.03589 (2018-06)
Free-Form Image Inpainting with Gated Convolution
and 24 more not named here
is_image_file 22 other papers
8 dated earlier, 14 later
1406.2661 (2014-06)
Generative Adversarial Networks
1603.08511 (2016-03)
Colorful Image Colorization
1805.08318 (2018-05)
Self-Attention Generative Adversarial Networks
and 19 more not named here
torch_cov 12 other papers
3 dated earlier, 9 later
1406.2661 (2014-06)
Generative Adversarial Networks
1811.10597 (2018-11)
GAN Dissection: Visualizing and Understanding Generative Adversarial Networks
1912.05270 (2019-12)
MineGAN: effective knowledge transfer from GANs to target domains with few images
and 9 more not named here
make_dataset 10 other papers
3 dated earlier, 7 later
1406.2661 (2014-06)
Generative Adversarial Networks
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
1912.05270 (2019-12)
MineGAN: effective knowledge transfer from GANs to target domains with few images
and 7 more not named here
sqrt_newton_schulz 6 other papers
3 dated earlier, 3 later
1406.2661 (2014-06)
Generative Adversarial Networks
1811.10597 (2018-11)
GAN Dissection: Visualizing and Understanding Generative Adversarial Networks
1912.05270 (2019-12)
MineGAN: effective knowledge transfer from GANs to target domains with few images
and 3 more not named here
numpy_calculate_frechet_distance 5 other papers
2 dated earlier, 3 later
1406.2661 (2014-06)
Generative Adversarial Networks
1912.05270 (2019-12)
MineGAN: effective knowledge transfer from GANs to target domains with few images
aaai_20247 (2022 (year only))
An Adversarial Framework for Generating Unseen Images by Activation Maximization
and 2 more not named here
accuracy 3 other papers
2 dated earlier, 1 later
1904.03441 (2019-04)
Iterative Normalization: Beyond Standardization towards Efficient Whitening
2003.12327 (2020-03)
An Investigation into the Stochasticity of Batch Whitening
2009.13333 (2020-09)
Group Whitening: Balancing Learning Efficiency and Representational Capacity

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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Orthogonality is widely used for training deep neural networks (DNNs) due to its ability to maintain all singular values of the Jacobian close to 1 and reduce redundancy in representation. This paper proposes a computationally efficient and numerically stable orthogonalization method using Newton's iteration (ONI), to learn a layer-wise orthogonal weight matrix in DNNs. ONI works by iteratively stretching the singular values of a weight matrix towards 1. This property enables it to control the orthogonality of a weight matrix by its number of iterations. We show that our method improves the performance of image classification networks by effectively controlling the orthogonality to provide an optimal tradeoff between optimization benefits and representational capacity reduction. We also show that ONI stabilizes the training of generative adversarial networks (GANs) by maintaining the Lipschitz continuity of a network, similar to spectral normalization (SN), and further outperforms SN by providing controllable orthogonality.

For agents

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

get_harvested_code_for_paper("2004.00917")
get_code_for_paper("2004.00917")
have("2004.00917")

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

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

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

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

Connect an agent — have() is free.