SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.09717 · NeurIPS · 2020

Neural Anisotropy Directions

Guillermo Ortiz-Jiménez, Apostolos Modas, Seyed-Mohsen Moosavi-Dezfooli, Pascal Frossard

arXiv · PDF · Open in the Atlas

Code that ran

4 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 2 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/2006.09717.json · badge: /api/ran/2006.09717.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
VahidZee/nads community
Papers with Code archive
2 ran · 5 no recorded run
LTS4/neural-anisotropy-directions marked official in Papers with Code
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
GradientCovarianceAnisotropyFinder Ran
ran on a synthesized input · constructed an object; no result was computed
LTS4/neural-anisotropy-directions/nad_computation.py
code served (permissive licence) · get_code("39c01bcce404741c")
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 an instance of its own class, GradientCovarianceAnisotropyFinder: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)

# Define a simple model that takes input and produces output
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=1):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        # x shape: (batch, input_dim)
        return self.linear(x)

# Create a model generator function
def model_gen_fun():
    return SimpleModel(input_dim=4, output_dim=1)

# Create evaluation point - small tensor of shape (4,)
eval_point = torch.randn(4)

# Set up arguments
ARGS = {
    'model_gen_fun': model_gen_fun,
    'num_networks': 2,
    'eval_point': eval_point,
    'k': 2,
    'scale': 0.01,
    'device': 'cpu',
    'batch_size': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GradientCovarianceAnisotropyFinder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradientCovarianceAnisotropyFinder 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
NADs Ran
ran on a synthesized input · constructed an object; no result was computed
VahidZee/nads/nads/compute/gradient_covariance.py
code served (permissive licence) · get_code("0f838c9168e36b16")
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 an instance of its own class, NADs: the run constructed the object and did not call it, so no result was computed. 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)

# Create tiny tensors for NADs
# nads: shape (num_nads, flattened_32x32) = (2, 1024) for 2 NADs of 32x32 each
nads_tensor = torch.randn(2, 1024)

# eigen_values: shape (num_nads,) representing eigenvalues
eigen_values_tensor = torch.randn(2)

# model_params: optional dict with model configuration
model_params_dict = {
    'architecture': 'resnet',
    'depth': 18,
    'width': 64
}

# name: optional string identifier
name_str = "test_nads_model"

ARGS = {
    'nads': nads_tensor,
    'eigen_values': eigen_values_tensor,
    'name': name_str,
    'model_params': model_params_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NADs — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a NADs 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
input_numerical_jacobian Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LTS4/neural-anisotropy-directions/nad_computation.py
code served (permissive licence) · get_code("1a7c50021e79245d")
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 (3, 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
import numpy as np

torch.manual_seed(0)

# Define a simple function that takes a batch of inputs and returns a scalar per input
def fn(batch):
    """
    Takes a batch of shape [batch_size, *input_shape] and returns a tensor of shape [batch_size, 1]
    """
    # Sum over all dimensions except batch, then reshape to [batch_size, 1]
    return batch.view(batch.shape[0], -1).sum(dim=1, keepdim=True)

# Define input tensor x with shape [3, 4]
x = torch.randn(3, 4)

# Define scale parameter for numerical differentiation
scale = 1e-4

# Define device as CPU
device = 'cpu'

# Optional batch_size parameter (can be None, which uses default)
batch_size = 6

ARGS = {
    'fn': fn,
    'x': x,
    'scale': scale,
    'device': device,
    '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, 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 (3, 4) — shape (3, 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
numerical_jacobian Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
VahidZee/nads/nads/compute/gradient_covariance.py
code served (permissive licence) · get_code("dc61272119b0560e")
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 (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
import torch.nn as nn
import typing as th

torch.manual_seed(0)

# Define a simple nn.Module that takes a batch of tensors and outputs a scalar per sample
class SimpleModel(nn.Module):
    def __init__(self, input_size: int):
        super().__init__()
        self.linear = nn.Linear(input_size, 1)
    
    def forward(self, x: torch.Tensor) -> torch.Tensor:
        # x shape: (batch_size, input_size)
        # output shape: (batch_size, 1)
        return self.linear(x)

# Create a simple model
input_dim = 4
model = SimpleModel(input_dim)

# Create input tensor with shape (4,)
x = torch.randn(input_dim, dtype=torch.float32)

# Set scale parameter
scale = 100.0

# Set batch_size (optional, can be None or an integer)
batch_size = 2

ARGS = {
    "fn": model,
    "x": x,
    "scale": scale,
    "batch_size": batch_size
}
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 (4,) — shape (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
GradientCovariance Not yet run
unverified (harvested, no recorded run)
VahidZee/nads/nads/compute/gradient_covariance.py
code served (permissive licence) · get_code("ede6d5b4a5394294")
How it ran

no invocation recorded.

make_subdirectories Not yet run
unverified (harvested, no recorded run)
VahidZee/nads/nads/compute/gradient_covariance.py
code served (permissive licence) · get_code("f36de828f2999ceb")
How it ran

no invocation recorded.

visualize_image Not yet run
unverified (harvested, no recorded run)
VahidZee/nads/nads/compute/gradient_covariance.py
code served (permissive licence) · get_code("9118a1c9f6fc8c15")
How it ran

no invocation recorded.

visualize_nads Not yet run
unverified (harvested, no recorded run)
VahidZee/nads/nads/compute/gradient_covariance.py
code served (permissive licence) · get_code("9ca12e126bfb8d93")
How it ran

no invocation recorded.

visualize_spectrum Not yet run
unverified (harvested, no recorded run)
VahidZee/nads/nads/compute/gradient_covariance.py
code served (permissive licence) · get_code("a840a0cfb6a71e5e")
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-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

In this work, we analyze the role of the network architecture in shaping the inductive bias of deep classifiers. To that end, we start by focusing on a very simple problem, i.e., classifying a class of linearly separable distributions, and show that, depending on the direction of the discriminative feature of the distribution, many state-ofthe-art deep convolutional neural networks (CNNs) have a surprisingly hard time solving this simple task. We then define as neural anisotropy directions (NADs) the vectors that encapsulate the directional inductive bias of an architecture. These vectors, which are specific for each architecture and hence act as a signature, encode the preference of a network to separate the input data based on some particular features. We provide an efficient method to identify NADs for several CNN architectures and thus reveal their directional inductive biases. Furthermore, we show that, for the CIFAR-10 dataset, NADs characterize the features used by CNNs to discriminate between different classes. * Equal contribution. Correspondence to {guillermo.ortizjimenez, apostolos.modas}@epfl.ch. The code to reproduce our experiments can be found at https://github.com/LTS4/neural-anisotropy-directions. 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.09717")
get_code_for_paper("2006.09717")
have("2006.09717")

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

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

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

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

Connect an agent — have() is free.