SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · ijcai2023_0434 · IJCAI · 2023

Stochastic Feature Averaging for Learning with Long-Tailed Noisy Labels

Hao Yang, Min-Ling Zhang, Tong Wei, Hao-Tian Li, Chong Peng, Kun Hu, Li-Bo Sun, Xun-Liang Cai

Open in the Atlas

Code that ran

7 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 4 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/ijcai2023_0434.json · badge: /api/ran/ijcai2023_0434.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
HotanLee/SFA canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
ResNet18 Ran
ran; our contract draft was wrong, not the code
HotanLee/SFA/PreResNet.py
code served (permissive licence) · get_code("b31b4718042821ed")
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 = {
    "num_classes": 10
}
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
HotanLee/SFA/PreResNet.py
code served (permissive licence) · get_code("da6a1c8dca7ef4c2")
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 = {
    "num_classes": 10,
}
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
balanced_softmax_loss Ran
ran on a synthesized input
HotanLee/SFA/Train_webvision.py
code served (permissive licence) · get_code("cab419e4f6f80c1f")
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 0, dtype family float, shape () 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.functional as F

torch.manual_seed(0)

# Parameters for balanced_softmax_loss
batch_size = 2
num_classes = 4

# labels: should be one-hot encoded or soft labels with shape (batch_size, num_classes)
labels = torch.zeros(batch_size, num_classes)
labels[0, 0] = 1.0
labels[1, 2] = 1.0

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

# sample_per_class: shape (num_classes,) - number of samples per class
sample_per_class = torch.tensor([10.0, 15.0, 20.0, 25.0])

# reduction: string parameter (though not actually used in the function body)
reduction = "mean"

ARGS = {
    "labels": labels,
    "logits": logits,
    "sample_per_class": sample_per_class,
    "reduction": reduction
}
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 0, dtype family float, shape () — shape () 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
HotanLee/SFA/PreResNet.py
pointer only (licence: MIT); the stored copy get_code serves, from amerch/CIFAR100-Training, is pointer only (licence: NONE) · get_code("583f9780bdd00a45")
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 amerch/CIFAR100-Training, 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.

create_model Ran
ran on a synthesized input
HotanLee/SFA/KNNClassifier.py
code served (permissive licence) · get_code("5ca32a0289195cef")
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 KNNClassifier. 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 torch
import numpy as np
import pickle
import tempfile
from os import path

torch.manual_seed(0)

# Create a temporary directory for log_dir
temp_dir = tempfile.mkdtemp()

# Create a pickle file with cfeats data
cfeats_data = {
    'mean': np.random.randn(4).astype(np.float32),
    'cl2ncs': np.random.randn(5, 4).astype(np.float32),
    'l2ncs': np.random.randn(5, 4).astype(np.float32),
    'uncs': np.random.randn(5, 4).astype(np.float32),
}

pickle_path = path.join(temp_dir, 'cfeats.pkl')
with open(pickle_path, 'wb') as f:
    pickle.dump(cfeats_data, f)

ARGS = {
    'feat_dim': 4,
    'num_classes': 5,
    'feat_type': 'cl2n',
    'dist_type': 'l2',
    'log_dir': temp_dir,
    'test': False,
}
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 KNNClassifier — a KNNClassifier output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a KNNClassifier 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_knncentroids Ran
ran on a synthesized input
HotanLee/SFA/Train_cifar.py
code served (permissive licence) · get_code("84bd62d917a99091")
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 dict. 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 small sample data
batch_size = 2
feat_dim = 4
num_classes = 3

# Features: shape (batch_size, feat_dim)
feats = torch.randn(batch_size, feat_dim)

# Labels: shape (batch_size,) with values in range [0, num_classes)
labels = torch.tensor([0, 1], dtype=torch.long)

# Mask: shape (batch_size,) as boolean tensor
mask = torch.tensor([True, True], dtype=torch.bool)

ARGS = {
    'feats': feats,
    'labels': labels,
    'mask': mask
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
unpickle Ran
ran; our contract draft was wrong, not the code
HotanLee/SFA/dataloader_cifar.py
code served (permissive licence) · get_code("ef49e82a7403eee1")
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 dict. 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 _pickle as cPickle
import tempfile
import os

# Create a temporary pickle file with sample data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.pkl")

# Create some sample data and pickle it
sample_data = {
    'key1': 'value1',
    'key2': [1, 2, 3],
    'key3': {'nested': 'dict'}
}

with open(temp_file, 'wb') as f:
    cPickle.dump(sample_data, f)

ARGS = {
    'file': temp_file
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_gmm_prob Not yet run
unverified (harvested, no recorded run)
HotanLee/SFA/Train_cifar.py
code served (permissive licence) · get_code("49d4ae079bdda5e5")
How it ran

no invocation recorded.

get_gmm_prob Not yet run
unverified (harvested, no recorded run)
HotanLee/SFA/Train_webvision.py
code served (permissive licence) · get_code("7a1638c30a827a6a")
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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 5 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
conv3x3 686 other papers
453 dated earlier, 139 later, 94 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
ResNet34 24 other papers
13 dated earlier, 8 later, 3 same year, order not determinable
1605.07146 (2016-05)
Wide Residual Networks
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2002.12047 (2020-02)
FMix: Enhancing Mixed Sample Data Augmentation
and 21 more not named here
ResNet18 7 other papers
5 dated earlier, 2 later
2105.14083 (2021-05)
Rethinking Noisy Label Models: Labeler-Dependent Noise with Adversarial Awareness
2112.00059 (2021-12)
Evaluating Gradient Inversion Attacks and Defenses in Federated Learning
2203.14542 (2022-03)
UNICON: Combating Label Noise Through Uniform Selection and Contrastive Learning
and 4 more not named here
unpickle 7 other papers
3 dated earlier, 3 later, 1 same year, order not determinable
2105.14083 (2021-05)
Rethinking Noisy Label Models: Labeler-Dependent Noise with Adversarial Awareness
2203.14542 (2022-03)
UNICON: Combating Label Noise Through Uniform Selection and Contrastive Learning
2207.14476 (2022-07)
Centrality and Consistency: Two-Stage Clean Samples Identification for Learning with Instance-Dependent Noisy Labels
and 4 more not named here

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

Repositories linked to this paper

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

Abstract

Deep neural networks have shown promising results on a wide variety of tasks using large-scale and well-annotated training datasets. However, data collected from real-world applications can suffer from two prevalent biases, i.e., long-tailed class distribution and label noise. Previous efforts on long-tailed learning and label-noise learning can only address a single type of data bias, leading to a severe deterioration of their performance. In this paper, we propose a distance-based sample selection algorithm called Stochastic Feature Averaging (SFA), which fits a Gaussian using the exponential running average of class centroids to capture uncertainty in representation space due to label noise and data scarcity. With SFA, we detect noisy samples based on their distances to class centroids sampled from this Gaussian distribution. Based on the identified clean samples, we then propose to train an auxiliary balanced classifier to improve the generalization for the minority class and facilitate the update of Gaussian parameters. Extensive experimental results show that SFA can enhance the performance of existing methods on both simulated and real-world datasets. Further, we propose to combine SFA with the sample-selection approach, distribution-robust, and noise-robust loss functions, resulting in significant improvement in performance over the baselines. Our code is available at https://github.com/HotanLee/SFA.

For agents

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

get_harvested_code_for_paper("ijcai2023_0434")
get_code_for_paper("ijcai2023_0434")
have("ijcai2023_0434")

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

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

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

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

Connect an agent — have() is free.