SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.01461 · 2020

Gradient Centralization: A New Optimization Technique for Deep Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

18 of 29 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; 1 honoured the contract we drafted, 0 violated it and 15 have no contract verdict; 2 failures of our instrument; 11 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.01461.json · badge: /api/ran/2004.01461.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
HamadYA/GhostFaceNets community (classifier label)
classifier basis not recorded on the link
16 ran · 6 no recorded run
mhassann22/GCSAM extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
lessw2020/Ranger-Deep-Learning-Optimizer community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
Rishit-dagli/Gradient-Centralization-TensorFlow community (classifier label)
classifier basis not recorded on the link
0 ran · 5 no recorded run
FunctionStatusWhere it lives
activation Ran
ran on a synthesized input
HamadYA/GhostFaceNets/backbones/ghost_model.py
code served (permissive licence) · get_code("619357c6cd6c6727")
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 KerasTensor. 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 tensorflow as tf
import numpy as np

# Create a small input tensor
# The function expects a tensor input and applies relu activation to it
input_tensor = tf.keras.Input(shape=(4, 3, 2))

# Define ARGS dict with the required parameter
ARGS = {
    'inputs': input_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KerasTensor — a KerasTensor 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
add_l2_regularizer_2_model Ran
ran on a synthesized input
HamadYA/GhostFaceNets/GhostFaceNets.py
code served (permissive licence) · get_code("719582a083732fb7")
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 Functional. 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 tensorflow as tf
from tensorflow import keras
import numpy as np

# Create a small model with Dense and Conv2D layers
def create_test_model():
    inputs = keras.Input(shape=(8,))
    x = keras.layers.Dense(4, use_bias=True)(inputs)
    x = keras.layers.Dense(3, use_bias=True)(x)
    model = keras.Model(inputs=inputs, outputs=x)
    return model

# Build a simple model
model = create_test_model()

# Define arguments
ARGS = {
    'model': model,
    'weight_decay': 0.01,
    'custom_objects': {},
    'apply_to_batch_normal': False,
    'apply_to_bias': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
buildin_models Ran
ran on a synthesized input
HamadYA/GhostFaceNets/GhostFaceNets.py
code served (permissive licence) · get_code("e8ddfad281bed049")
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 Functional. 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 tensorflow as tf
from tensorflow import keras
import numpy as np

# Create a minimal stem model that satisfies the function's expectations
class MinimalStemModel(keras.Model):
    def __init__(self, input_shape=(112, 112, 3)):
        super().__init__()
        self.name = 'minimal_stem'
        self._input_shape = input_shape
        
        # Create layers that will be used by buildin_models
        self.conv1 = keras.layers.Conv2D(16, 3, padding='same')
        self.bn1 = keras.layers.BatchNormalization()
        self.conv2 = keras.layers.Conv2D(32, 3, padding='same')
        
    def call(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        x = self.conv2(x)
        return x
    
    @property
    def inputs(self):
        # Return a list with a mock input tensor
        inp = keras.Input(shape=(112, 112, 3))
        return [inp]
    
    @property
    def outputs(self):
        # Return a list with output tensor of shape (112, 112, 32)
        inp = keras.Input(shape=(112, 112, 3))
        x = self.conv1(inp)
        x = self.bn1(x)
        x = self.conv2(x)
        return [x]
    
    @property
    def layers(self):
        return [self.conv1, self.bn1, self.conv2]

# Build a proper functional model for testing
input_layer = keras.Input(shape=(112, 112, 3))
x = keras.layers.Conv2D(16, 3, padding='same')(input_layer)
x = keras.layers.BatchNormalization()(x)
x = keras.layers.Conv2D(32, 3, padding='same')(x)
stem_model = keras.Model(inputs=input_layer, outputs=x, name='test_stem')

ARGS = {
    'stem_model': stem_model,
    'dropout': 0.5,
    'emb_shape': 512,
    'input_shape': (112, 112, 3),
    'output_layer': 'GDC',
    'bn_momentum': 0.99,
    'bn_epsilon': 0.001,
    'add_pointwise_conv': False,
    'pointwise_conv_act': 'relu',
    'use_bias': False,
    'scale': True,
    'weights': 'imagenet',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
backbones, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
buildin_models Ran
ran on a synthesized input
HamadYA/GhostFaceNets/GhostFaceNets_with_Bias.py
code served (permissive licence) · get_code("6dbeec44cfb81d9f")
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 Functional. 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 tensorflow as tf
from tensorflow import keras
import numpy as np

# Create a minimal stub model that mimics the structure expected
class StubStemModel(keras.Model):
    def __init__(self, input_shape=(112, 112, 3), **kwargs):
        super().__init__(**kwargs)
        self.input_layer = keras.layers.Input(shape=input_shape)
        # Output shape needs to be compatible with DepthwiseConv2D
        # DepthwiseConv2D expects spatial dimensions > 1
        self.conv1 = keras.layers.Conv2D(32, 3, padding='same', name='stub_conv1')
        self.bn1 = keras.layers.BatchNormalization(momentum=0.99, epsilon=0.001, name='stub_bn1')
        self.pool = keras.layers.AveragePooling2D(pool_size=(56, 56), name='stub_pool')
    
    def call(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        x = self.pool(x)
        return x

# Build the stub model
stub_input = keras.layers.Input(shape=(112, 112, 3))
stub_x = keras.layers.Conv2D(32, 3, padding='same', name='stub_conv1')(stub_input)
stub_x = keras.layers.BatchNormalization(momentum=0.99, epsilon=0.001, name='stub_bn1')(stub_x)
stub_x = keras.layers.AveragePooling2D(pool_size=(56, 56), name='stub_pool')(stub_x)
stem_model_instance = keras.models.Model(inputs=stub_input, outputs=stub_x, name='stub_stem')

ARGS = {
    'stem_model': stem_model_instance,
    'dropout': 0.5,
    'emb_shape': 512,
    'input_shape': (112, 112, 3),
    'output_layer': 'GDC',
    'bn_momentum': 0.99,
    'bn_epsilon': 0.001,
    'add_pointwise_conv': False,
    'pointwise_conv_act': 'relu',
    'use_bias': False,
    'scale': True,
    'weights': 'imagenet'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
backbones, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
calculate_roc Ran
ran on a synthesized input
HamadYA/GhostFaceNets/evals.py
code served (permissive licence) · get_code("c3af5327e1b4e163")
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

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

# Create small test data
nrof_samples = 10
embedding_dim = 4
nrof_thresholds = 5

# Create embeddings1 and embeddings2
embeddings1 = np.random.randn(nrof_samples, embedding_dim).astype(np.float32)
embeddings2 = np.random.randn(nrof_samples, embedding_dim).astype(np.float32)

# Create actual_issame boolean array
actual_issame = np.array([True, False, True, False, True, False, True, False, True, False], dtype=bool)

# Create thresholds
thresholds = np.linspace(0, 10, nrof_thresholds)

ARGS = {
    "thresholds": thresholds,
    "embeddings1": embeddings1,
    "embeddings2": embeddings2,
    "actual_issame": actual_issame,
    "nrof_folds": 2,
    "pca": 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
centralized_gradient Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mhassann22/GCSAM/cifar10_gcsam_resnet50.py
pointer only (licence: NONE) · get_code("27a3d56a09e0e7cf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mhassann22/GCSAM 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.

centralized_gradient Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lessw2020/Ranger-Deep-Learning-Optimizer/ranger/ranger2020.py
code served (permissive licence) · get_code("62a2acf5cdbc743f")
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 (2, 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 tensor for gradient centralization
# The function expects a tensor with .size() method and .add_() method
# Test with a 2D tensor (conv bias or linear layer gradient)
x = torch.randn(2, 4)

ARGS = {
    "x": x,
    "use_gc": True,
    "gc_conv_only": 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 (2, 4) — shape (2, 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
distiller_loss_cosine Ran
ran on a synthesized input
HamadYA/GhostFaceNets/losses.py
code served (permissive licence) · get_code("4799f292d886421d")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

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

# Create small test tensors
batch_size = 2
embedding_dim = 4

# Create true embeddings with valid finite values
true_emb = tf.constant(
    np.random.randn(batch_size, embedding_dim).astype(np.float32),
    dtype=tf.float32
)

# Create predicted embeddings with valid finite values
pred_emb = tf.constant(
    np.random.randn(batch_size, embedding_dim).astype(np.float32),
    dtype=tf.float32
)

ARGS = {
    "true_emb": true_emb,
    "pred_emb": pred_emb
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
distiller_loss_euclidean Ran
ran on a synthesized input
HamadYA/GhostFaceNets/losses.py
code served (permissive licence) · get_code("82eb5716083ae566")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

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

# Create small sample tensors
batch_size = 2
embedding_dim = 4

# true_emb: ground truth embeddings (batch_size, embedding_dim)
true_emb = tf.constant(np.random.randn(batch_size, embedding_dim), dtype=tf.float32)

# pred_emb: predicted embeddings (batch_size, embedding_dim)
pred_emb = tf.constant(np.random.randn(batch_size, embedding_dim), dtype=tf.float32)

ARGS = {
    'true_emb': true_emb,
    'pred_emb': pred_emb,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
face_align_landmark Ran
ran on a synthesized input
HamadYA/GhostFaceNets/IJB_evals.py
code served (permissive licence) · get_code("95b7e550f0df874b")
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 3, dtype family int, shape (112, 112, 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 cv2
import numpy as np
from skimage import transform

# Create a small test image (height=150, width=120, channels=3)
test_img = np.random.randint(0, 256, (150, 120, 3), dtype=np.uint8)

# Create landmark points (5 facial landmarks as expected by the function)
# These should be 5 points in 2D space
test_landmark = np.array([
    [38.2946, 51.6963],
    [73.5318, 51.5014],
    [56.0252, 71.7366],
    [41.5493, 92.3655],
    [70.729904, 92.2041]
], dtype=np.float32)

ARGS = {
    'img': test_img,
    'landmark': test_landmark,
    'image_size': (112, 112),
    'method': 'similar'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (112, 112, 3) — shape (112, 112, 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
ghost_module Ran
ran on a synthesized input
HamadYA/GhostFaceNets/backbones/ghost_model.py
code served (permissive licence) · get_code("2dcab8fa77a49fd8")
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 KerasTensor. 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 tensorflow as tf
from tensorflow import keras
from tensorflow.keras.layers import Input

# Create a small input tensor (batch_size=2, height=4, width=4, channels=3)
input_tensor = Input(shape=(4, 4, 3))

# Define ARGS dictionary with all parameters for ghost_module
ARGS = {
    'inputs': input_tensor,
    'out': 16,
    'convkernel': 1,
    'dwkernel': 3,
    'add_activation': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KerasTensor — a KerasTensor 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
half_split_weighted_cosine_similarity_11 Ran
ran on a synthesized input
HamadYA/GhostFaceNets/evals.py
code served (permissive licence) · get_code("75f14459448a4cef")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create small test tensors with distinct dimensions
# batch_size=2, feature_dim=4
aa = tf.constant([[1.0, 2.0, 3.0, 4.0],
                  [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

bb = tf.constant([[2.0, 3.0, 4.0, 5.0],
                  [6.0, 7.0, 8.0, 9.0]], dtype=tf.float32)

ARGS = {
    "aa": aa,
    "bb": bb
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
plot_tpr_far Ran
ran on a synthesized input
HamadYA/GhostFaceNets/eval_folder.py
code served (permissive licence) · get_code("aa04aa5fb992d2bc")
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 Figure. 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 pandas as pd

# Create synthetic score and label data for ROC curve plotting
np.random.seed(0)

# Generate scores (continuous predictions) - values between 0 and 1
score = np.random.rand(100)

# Generate binary labels - 0 or 1
label = np.random.randint(0, 2, 100)

ARGS = {
    'score': score,
    'label': label,
    'new_figure': True,
    'label_prefix': 'Test Model'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, pandas, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
read_IJB_meta_columns_to_int Ran
ran on a synthesized input
HamadYA/GhostFaceNets/IJB_evals.py
code served (permissive licence) · get_code("c5ac51f2fe4a6729")
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 generator. 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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_meta.csv")

# Write a simple CSV with numeric data
with open(temp_file, 'w') as f:
    f.write("10 20 30\n")
    f.write("40 50 60\n")
    f.write("70 80 90\n")

ARGS = {
    'file_path': temp_file,
    'columns': [0, 2],
    'sep': ' ',
    'skiprows': 0,
    'header': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
replace_ReLU_with_PReLU Ran
ran on a synthesized input
HamadYA/GhostFaceNets/GhostFaceNets.py
code served (permissive licence) · get_code("d1106a8957c8d037")
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 Functional. 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 tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers

# Build a small model with ReLU activations
def build_test_model():
    inputs = keras.Input(shape=(4, 3, 5))
    x = layers.Conv2D(8, (3, 3), padding='same', name='conv1')(inputs)
    x = layers.ReLU(name='conv1_relu')(x)
    x = layers.Conv2D(8, (3, 3), padding='same', name='conv2')(x)
    x = layers.Activation('relu', name='conv2_relu')(x)
    outputs = layers.GlobalAveragePooling2D()(x)
    model = keras.Model(inputs=inputs, outputs=outputs)
    return model

model = build_test_model()

ARGS = {
    'model': model,
    'target_activation': 'PReLU',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
se_module Ran
ran on a synthesized input
HamadYA/GhostFaceNets/backbones/ghost_model.py
code served (permissive licence) · get_code("ed575936f30efada")
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 KerasTensor. 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 tensorflow as tf
from tensorflow import keras
from tensorflow.keras import backend as K
from tensorflow.keras.layers import Input

# Set up a small input tensor to pass to se_module
# The function expects a tensor with shape (batch, height, width, channels)
# Using batch=2, height=4, width=3, channels=8
input_tensor = tf.keras.Input(shape=(4, 3, 8))

ARGS = {
    'inputs': input_tensor,
    'se_ratio': 0.25
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KerasTensor — a KerasTensor 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
teacher_model_interf_wrapper Ran
ran on a synthesized input
HamadYA/GhostFaceNets/data_distiller.py
code served (permissive licence) · get_code("36a0054d36a367be")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np
import tempfile
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal PyTorch model and save it
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(112 * 112 * 3, 128)
    
    def forward(self, x):
        batch_size = x.shape[0]
        x = x.reshape(batch_size, -1)
        return self.fc(x)

# Create a temporary .pth file with a traced model
model = SimpleModel()
model.eval()

# Create dummy input for tracing
dummy_input = torch.randn(1, 3, 112, 112)
traced_model = torch.jit.trace(model, dummy_input)

# Save to temporary file
temp_dir = tempfile.gettempdir()
model_path = os.path.join(temp_dir, "test_model.pth")
torch.jit.save(traced_model, model_path)

ARGS = {
    "model_file": model_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
mxnet, numpy, tensorflow, torch — 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
to_4d Ran
ran, honoured the contract we drafted
HamadYA/GhostFaceNets/augment.py
pointer only (licence: MIT); the stored copy get_code serves, from trungtrinh44/damp, is pointer only (licence: NONE) · get_code("bd1c72a9d8556505")
How it ran

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

adadelta Not yet run
unverified (harvested, no recorded run)
Rishit-dagli/Gradient-Centralization-TensorFlow/gctf/optimizers.py
code served (permissive licence) · get_code("8f86e7549e63b17d")
How it ran

no invocation recorded.

adagrad Not yet run
unverified (harvested, no recorded run)
Rishit-dagli/Gradient-Centralization-TensorFlow/gctf/optimizers.py
code served (permissive licence) · get_code("a02310673d3edff8")
How it ran

no invocation recorded.

centralized_gradients_for_optimizer Not yet run
unverified (harvested, no recorded run)
Rishit-dagli/Gradient-Centralization-TensorFlow/gctf/centralized_gradients.py
code served (permissive licence) · get_code("fd031cd7977c1eee")
How it ran

no invocation recorded.

from_4d Not yet run
unverified (harvested, no recorded run)
HamadYA/GhostFaceNets/augment.py
pointer only (licence: MIT); the stored copy get_code serves, from trungtrinh44/damp, is pointer only (licence: NONE) · get_code("b10fb8ac53c53a97")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from trungtrinh44/damp, 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. No invocation recorded.

get_centralized_gradients Not yet run
unverified (harvested, no recorded run)
Rishit-dagli/Gradient-Centralization-TensorFlow/gctf/centralized_gradients.py
code served (permissive licence) · get_code("52780979cc1c6e50")
How it ran

no invocation recorded.

half_split_weighted_cosine_similarity Not yet run
unverified (harvested, no recorded run)
HamadYA/GhostFaceNets/evals.py
code served (permissive licence) · get_code("b76d78b83d84097c")
How it ran

no invocation recorded.

keras_model_interf Not yet run
unverified (harvested, no recorded run)
HamadYA/GhostFaceNets/IJB_evals.py
code served (permissive licence) · get_code("0d40d2078622e4a1")
How it ran

no invocation recorded.

random_cutout_or_cutout_mask Not yet run
unverified (harvested, no recorded run)
HamadYA/GhostFaceNets/data.py
code served (permissive licence) · get_code("b0dc513e1e285780")
How it ran

no invocation recorded.

replace_add_with_stochastic_depth Not yet run
unverified (harvested, no recorded run)
HamadYA/GhostFaceNets/models.py
code served (permissive licence) · get_code("5de5a42ab87d80ec")
How it ran

no invocation recorded.

tf_imread Not yet run
unverified (harvested, no recorded run)
HamadYA/GhostFaceNets/data.py
code served (permissive licence) · get_code("95d626160eefd668")
How it ran

no invocation recorded.

update_optimizer Not yet run
unverified (harvested, no recorded run)
Rishit-dagli/Gradient-Centralization-TensorFlow/gctf/optimizers.py
code served (permissive licence) · get_code("df2465eb334d9036")
How it ran

no invocation recorded.

Also present in other papers' code

Of 29 samples lifted from this paper's linked repositories, 29 carry a function identity and 0 do not. Of the 28 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 4 later) and 24 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
centralized_gradient 2 other papers
2 later
2010.01412 (2020-10)
Sharpness-Aware Minimization for Efficiently Improving Generalization
2010.07468 (2020-10)
AdaBelief Optimizer: Adapting Stepsizes by the Belief in Observed Gradients
from_4d 2 other papers
1 dated earlier, 1 later
1911.04252 (2019-11)
Self-training with Noisy Student improves ImageNet classification
2406.16540 (2024-06)
Improving robustness to corruptions with multiplicative weight perturbations
to_4d 2 other papers
1 dated earlier, 1 later
1911.04252 (2019-11)
Self-training with Noisy Student improves ImageNet classification
2406.16540 (2024-06)
Improving robustness to corruptions with multiplicative weight perturbations
calculate_roc 1 other paper
1 later
aaai_26699 (2023 (year only))
MixFairFace: Towards Ultimate Fairness via MixFair Adapter in Face Recognition

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

Optimization techniques are of great importance to effectively and efficiently train a deep neural network (DNN). It has been shown that using the first and second order statistics (e.g., mean and variance) to perform Z-score standardization on network activations or weight vectors, such as batch normalization (BN) and weight standardization (WS), can improve the training performance. Different from these existing methods that mostly operate on activations or weights, we present a new optimization technique, namely gradient centralization (GC), which operates directly on gradients by centralizing the gradient vectors to have zero mean. GC can be viewed as a projected gradient descent method with a constrained loss function. We show that GC can regularize both the weight space and output feature space so that it can boost the generalization performance of DNNs. Moreover, GC improves the Lipschitzness of the loss function and its gradient so that the training process becomes more efficient and stable. GC is very simple to implement and can be easily embedded into existing gradient based DNN optimizers with only one line of code. It can also be directly used to fine-tune the pre-trained DNNs. Our experiments on various applications, including general image classification, fine-grained image classification, detection and segmentation, demonstrate that GC can consistently improve the performance of DNN learning. The code of GC can be found at https://github.com/Yonghongwei/Gradient-Centralization.

For agents

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

get_harvested_code_for_paper("2004.01461")
get_code_for_paper("2004.01461")
have("2004.01461")

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

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

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

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

Connect an agent — have() is free.