SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.17622 · NeurIPS · 2023

Combating Representation Learning Disparity with Geometric Harmonization

Bo Han, Hong, Ya Zhang, Zhihan Zhou, Jiangchao Yao, Yanfeng Wang

arXiv · PDF · Open in the Atlas

Code that ran

12 of 15 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 0 have no contract verdict; 11 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2310.17622.json · badge: /api/ran/2310.17622.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
MediaBrain-SJTU/Geometric-Harmonization canonical (classifier label)
classifier basis: census
12 ran · 3 no recorded run
FunctionStatusWhere it lives
ResNet18 Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/resnet.py
code served (permissive licence) · get_code("43a1d3b25104ae7a")
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 ResNet. 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

torch.manual_seed(0)

ARGS = {
    "low_dim": 128,
    "use_norm": 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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
ResNet34 Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/resnet.py
code served (permissive licence) · get_code("c2b0a60d47724297")
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 ResNet. 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

torch.manual_seed(0)

ARGS = {
    "low_dim": 128,
    "use_norm": 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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
ShearX Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/BCL/randaug.py
pointer only (licence: MIT); the stored copy get_code serves, from sumyeongahn/cuda_ltr, is pointer only (licence: NONE) · get_code("9846307204b08173")
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 sumyeongahn/cuda_ltr, 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.

ShearY Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/BCL/randaug.py
pointer only (licence: MIT); the stored copy get_code serves, from sumyeongahn/cuda_ltr, is pointer only (licence: NONE) · get_code("109155544d6d2c48")
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 sumyeongahn/cuda_ltr, 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.

TranslateX Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/BCL/randaug.py
code served (permissive licence) · get_code("f03d112eee854337")
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) and returned Image. 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 random
import PIL
import PIL.Image
import PIL.ImageOps
import PIL.ImageEnhance
import PIL.ImageDraw

# Create a small PIL Image for testing
# The function uses img.size[0] to get width, and calls img.transform()
img = PIL.Image.new('RGB', (100, 80), color='red')

# v is a float/int that gets multiplied by img.size[0]
v = 0.1

ARGS = {
    'img': img,
    'v': v
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/resnet_imagenet.py
code served (permissive licence) · get_code("d9def42110729a85")
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) and returned Conv2d. 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

torch.manual_seed(0)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/SDCLR/resnet_prune.py
code served (permissive licence) · get_code("1cd86864f32ad467")
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 prune_conv2d. 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

torch.manual_seed(0)

ARGS = {
    'in_planes': 3,
    'out_planes': 16,
    'stride': 1,
}
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 prune_conv2d — a prune_conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a prune_conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/resnet_imagenet.py
code served (permissive licence) · get_code("160bb14bd76201b4")
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) and returned Conv2d. 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

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/SDCLR/resnet_prune.py
code served (permissive licence) · get_code("ae216d6807b93383")
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 prune_conv2d. 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

torch.manual_seed(0)

ARGS = {
    'in_planes': 3,
    'out_planes': 16,
    'stride': 1,
    'groups': 1,
    'dilation': 1,
}
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 prune_conv2d — a prune_conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a prune_conv2d 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
get_negative_mask Ran
ran, violated the contract we drafted
MediaBrain-SJTU/Geometric-Harmonization/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from kaotty/Understanding-ESSL, is pointer only (licence: NONE) · get_code("b09a2cc2e21f2012")
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 kaotty/Understanding-ESSL, 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.

normalize_fn Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from spin-umass/meansparse, is pointer only (licence: NONE) · get_code("0e0f66ffb7a61530")
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 spin-umass/meansparse, 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.

sinkhorn Ran
ran; our contract draft was wrong, not the code
MediaBrain-SJTU/Geometric-Harmonization/utils.py
code served (permissive licence) · get_code("38b1cfaaa3fc1906")
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. 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, 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)

# out: logits tensor, shape (N, K) where N is batch size and K is number of classes
# The function will transpose it, so Q will be (K, N)
out = torch.randn(2, 4)

# l: temperature parameter (scalar or small float)
l = 0.1

# sinkhorn_iterations: number of iterations for the algorithm
sinkhorn_iterations = 5

# stat: optional tensor for weighting, shape should be (K,) to reshape to (K, 1)
stat = torch.ones(4)

ARGS = {
    "out": out,
    "l": l,
    "sinkhorn_iterations": sinkhorn_iterations,
    "stat": stat
}
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
calculate_momentum_weight Not yet run
unverified (harvested, no recorded run)
MediaBrain-SJTU/Geometric-Harmonization/BCL/memoboosted_LT_Dataset.py
code served (permissive licence) · get_code("21004f703e266a6c")
How it ran

no invocation recorded.

calculate_momentum_weight Not yet run
unverified (harvested, no recorded run)
MediaBrain-SJTU/Geometric-Harmonization/BCL/memoboosted_cifar100.py
code served (permissive licence) · get_code("01e541288a411510")
How it ran

no invocation recorded.

nt_xent Not yet run
unverified (harvested, no recorded run)
MediaBrain-SJTU/Geometric-Harmonization/utils.py
code served (permissive licence) · get_code("1223e88b708e9e08")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 3 the same month, 4 later) and 8 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
conv1x1 431 other papers
288 dated earlier, 5 the same month, 129 later, 8 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
190 dated earlier, 5 the same month, 109 later, 7 same year, order not determinable, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
normalize_fn 7 other papers
5 dated earlier, 2 later
1910.00033 (2019-10)
Hidden Trigger Backdoor Attacks
2007.09271 (2020-07)
OnlineAugment: Online Data Augmentation with Less Domain Knowledge
2010.09080 (2020-10)
Poisoned classifiers are not only backdoored, they are fundamentally broken
and 4 more not named here
get_negative_mask 3 other papers
1 dated earlier, 1 the same month, 1 later
2306.13924 (2023-06)
Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning
2310.15664 (2023-10)
Expression Syntax Information Bottleneck for Math Word Problems
2411.06508 (2024-11)
Understanding the Role of Equivariance in Self-supervised Learning
ShearX 2 other papers
2 dated earlier · 1 only as an assembly brick
1909.13719 (2019-09)
RandAugment: Practical automated data augmentation with a reduced search space
2302.05499 (2023-02)
CUDA: Curriculum of Data Augmentation for Long-Tailed Recognition
ShearY 2 other papers
2 dated earlier · 1 only as an assembly brick
1909.13719 (2019-09)
RandAugment: Practical automated data augmentation with a reduced search space
2302.05499 (2023-02)
CUDA: Curriculum of Data Augmentation for Long-Tailed Recognition
TranslateX 1 other paper
1 dated earlier
1909.13719 (2019-09)
RandAugment: Practical automated data augmentation with a reduced search space

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

Self-supervised learning (SSL) as an effective paradigm of representation learning has achieved tremendous success on various curated datasets in diverse scenarios. Nevertheless, when facing the long-tailed distribution in real-world applications, it is still hard for existing methods to capture transferable and robust representation. Conventional SSL methods, pursuing sample-level uniformity, easily leads to representation learning disparity where head classes dominate the feature regime but tail classes passively collapse. To address this problem, we propose a novel Geometric Harmonization (GH) method to encourage category-level uniformity in representation learning, which is more benign to the minority and almost does not hurt the majority under long-tailed distribution. Specially, GH measures the population statistics of the embedding space on top of self-supervised learning, and then infer an fine-grained instance-wise calibration to constrain the space expansion of head classes and avoid the passive collapse of tail classes. Our proposal does not alter the setting of SSL and can be easily integrated into existing methods in a low-cost manner. Extensive results on a range of benchmark datasets show the effectiveness of GH with high tolerance to the distribution skewness. Our code is available at https://github.com/MediaBrain-SJTU/Geometric-Harmonization.

For agents

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

get_harvested_code_for_paper("2310.17622")
get_code_for_paper("2310.17622")
have("2310.17622")

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

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

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

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

Connect an agent — have() is free.