SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.08661 · CVPR · 2023

Global and Local Mixture Consistency Cumulative Learning for Long-tailed Visual Recognitions

Yun Yang, Qi Jia, Peng Yang, Fei Du, Fengtao Nan, Xiaoting Chen

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 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; 3 no recorded run), measured 2026-11-23; 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/2305.08661.json · badge: /api/ran/2305.08661.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
val-iisc/saddle-longtail community
Papers with Code archive
4 ran · 1 no recorded run
ynu-yangpeng/GLMC marked official in Papers with Code
Papers with Code archive
2 ran · 2 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AverageMeter Ran
ran on a synthesized input · constructed an object; no result was computed
val-iisc/saddle-longtail/GLMC-2023/Trainer.py
code served (permissive licence) · get_code("8c2fbaf0a3677a09")
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, AverageMeter: 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

torch.manual_seed(0)

ARGS = {
    'name': 'Loss',
    'fmt': ':f'
}
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 AverageMeter — 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 AverageMeter 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
GLMC_mixed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ynu-yangpeng/GLMC/GLMC-2023/Trainer.py
pointer only (licence: NONE) · get_code("103036c86a31c52b")
How it ran

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

SAM Ran
ran on a synthesized input · constructed an object; no result was computed
val-iisc/saddle-longtail/GLMC-2023/Trainer.py
code served (permissive licence) · get_code("5f0b6886fbdb403e")
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, SAM: 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

torch.manual_seed(0)

# Define a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Create model and parameters
model = SimpleModel()
params = list(model.parameters())

# Define base optimizer (SGD or Adam)
base_optimizer = torch.optim.SGD

# Create dummy data for closure
x_dummy = torch.randn(2, 4)
y_dummy = torch.randint(0, 2, (2,))

# Create a closure function that computes loss
def create_closure(model, x, y):
    def closure():
        model.zero_grad()
        output = model(x)
        loss = torch.nn.functional.cross_entropy(output, y)
        loss.backward()
        return loss
    return closure

closure_fn = create_closure(model, x_dummy, y_dummy)

ARGS = {
    'params': params,
    'base_optimizer': base_optimizer,
    'rho': 0.05,
    'adaptive': False,
    'lr': 0.01
}
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 SAM — 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 SAM 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
Trainer Ran
ran on a synthesized input · constructed an object; no result was computed
val-iisc/saddle-longtail/GLMC-2023/Trainer.py
code served (permissive licence) · get_code("55445e6fa2989a18")
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, Trainer: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import numpy as np
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self, num_classes=10):
        super(SimpleModel, self).__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(8, num_classes)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

class ArgsConfig:
    def __init__(self):
        self.gpu = 'cpu'
        self.print_freq = 10
        self.lr = 0.1
        self.label_weighting = False
        self.epochs = 5
        self.start_epoch = 0
        self.num_classes = 10
        self.contrast_weight = 0.0
        self.rho = 0.0
        self.momentum = 0.9
        self.weight_decay = 1e-4
        self.beta = 0.9999
        self.root_model = '/tmp'
        self.store_name = 'test_model'

model = SimpleModel(num_classes=10)

X_train = torch.randn(4, 4)
y_train = torch.randint(0, 10, (4,))
train_dataset = TensorDataset(X_train, y_train)
train_loader = DataLoader(train_dataset, batch_size=2, shuffle=True)

X_val = torch.randn(2, 4)
y_val = torch.randint(0, 10, (2,))
val_dataset = TensorDataset(X_val, y_val)
val_loader = DataLoader(val_dataset, batch_size=2, shuffle=False)

weighted_train_loader = DataLoader(train_dataset, batch_size=2, shuffle=True)

per_class_num = [4, 3, 5, 2, 4, 3, 5, 2, 4, 3]

class SimpleLog:
    def write(self, msg):
        pass

log = SimpleLog()

args = ArgsConfig()

ARGS = {
    'args': args,
    'model': model,
    'train_loader': train_loader,
    'val_loader': val_loader,
    'weighted_train_loader': weighted_train_loader,
    'per_class_num': per_class_num,
    'log': log
}
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 Trainer — 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 Trainer 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
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from fmy266/tpa
pointer only; the stored copy get_code serves, from fmy266/tpa, is pointer only (licence: NONE) · get_code("fd638ce21929b00d")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
val-iisc/saddle-longtail/GLMC-2023/Trainer.py
code served (permissive licence) · get_code("1e369e39c90cada6")
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 list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

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

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

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

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

ARGS = {
    "output": output,
    "target": target,
    "topk": topk,
}
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 list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rand_bbox Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ynu-yangpeng/GLMC/GLMC-2023/Trainer.py
pointer only (licence: NONE) · get_code("94a1b38875494387")
How it ran

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

Trainer Not yet run
unverified (harvested, no recorded run)
ynu-yangpeng/GLMC/GLMC-2023/Trainer.py
pointer only (licence: NONE) · get_code("8f5d8a765e776472")
How it ran

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

save_checkpoint Not yet run
unverified (harvested, no recorded run)
val-iisc/saddle-longtail/GLMC-2023/Trainer.py
code served (permissive licence) · get_code("909b8d6eeb4f3bb4")
How it ran

no invocation recorded.

save_checkpoint Not yet run
unverified (harvested, no recorded run)
ynu-yangpeng/GLMC/GLMC-2023/Trainer.py
pointer only (licence: NONE) · get_code("c5a1cf535d31085e")
How it ran

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

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 4 later) and 6 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
accuracy
brick of this paper's assembly: helper
116 other papers
72 dated earlier, 2 the same month, 40 later, 2 same year, order not determinable · 8 only as an assembly brick
1502.03044 (2015-02)
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
1610.05820 (2016-10)
Membership Inference Attacks Against Machine Learning Models
1905.03696 (2019-05)
HAWQ: Hessian AWare Quantization of Neural Networks with Mixed-Precision
and 113 more not named here
AverageMeter
brick of this paper's assembly: helper
9 other papers
7 dated earlier, 2 later · 8 only as an assembly brick
2009.14193 (2020-09)
Uncertainty Sets for Image Classifiers using Conformal Prediction
2106.10891 (2021-06)
Open-set Label Noise Can Improve Robustness Against Inherent Label Noise
2203.09343 (2022-03)
CYBORGS: Contrastively Bootstrapping Object Representations by Grounding in Segmentation
and 6 more not named here
accuracy
brick of this paper's assembly: metric
5 other papers
3 dated earlier, 2 later
1802.08831 (2018-02)
Convolutional Neural Networks combined with Runge-Kutta Methods
2012.10071 (2020-12)
TDN: Temporal Difference Networks for Efficient Action Recognition
2302.06359 (2023-02)
Fixing Overconfidence in Dynamic Neural Networks
and 2 more not named here
SAM
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 2 only as an assembly brick
2010.01412 (2020-10)
Sharpness-Aware Minimization for Efficiently Improving Generalization
2310.10074 (2023-10)
SoTTA: Robust Test-Time Adaptation on Noisy Data Streams
2601.11981 (2026-01)
Nip Rumors in the Bud: Retrieval-Guided Topic-Level Adaptation for Test-Time Fake News Video Detection

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

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 paper, our goal is to design a simple learning paradigm for long-tail visual recognition, which not only improves the robustness of the feature extractor but also alleviates the bias of the classifier towards head classes while reducing the training skills and overhead. We propose an efficient one-stage training strategy for long-tailed visual recognition called Global and Local Mixture Consistency cumulative learning (GLMC). Our core ideas are twofold: (1) a global and local mixture consistency loss improves the robustness of the feature extractor. Specifically, we generate two augmented batches by the global MixUp and local CutMix from the same batch data, respectively, and then use cosine similarity to minimize the difference. (2) A cumulative head-tail soft label reweighted loss mitigates the head class bias problem. We use empirical class frequencies to reweight the mixed label of the head-tail class for long-tailed data and then balance the conventional loss and the rebalanced loss with a coefficient accumulated by epochs. Our approach achieves state-of-the-art accuracy on CIFAR10-LT, CIFAR100-LT, and ImageNet-LT datasets. Additional experiments on balanced ImageNet and CIFAR demonstrate that GLMC can significantly improve the generalization of backbones. Code is made publicly available at https://github.com/ynu-yangpeng/GLMC.

For agents

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

get_harvested_code_for_paper("2305.08661")
get_code_for_paper("2305.08661")
have("2305.08661")

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

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

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

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

Connect an agent — have() is free.