SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.15647 · ICML · 2025

Hard Labels In! Rethinking the Role of Hard Labels in Mitigating Local Semantic Drift

Zhiqiang Shen, Jiacheng Liu, Xiaohan Zhao, Bingkui Tong, Jiacheng Cui, Xinyue Bi

arXiv · PDF · Open in the Atlas

Code that ran

3 of 8 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, 1 violated it and 0 have no contract verdict; 1 failure of our instrument; 5 no recorded run), measured 2026-11-23; 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/2512.15647.json · badge: /api/ran/2512.15647.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
Jiacheng8/HALD community
Papers with Code archive
3 ran · 5 no recorded run
FunctionStatusWhere it lives
apply_fkd_transform_batch_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Jiacheng8/HALD/validate/train_fkd.py
code served (permissive licence) · get_code("f8bfba92d8328d35")
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 4, dtype family float, shape (2, 3, 32, 32) 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
from torchvision.transforms import InterpolationMode
import torchvision.transforms.functional as F_vision

torch.manual_seed(0)

# Create a small batch of images: 2 images, 3 channels (RGB), 64x64 spatial dims
images_tensor = torch.rand(2, 3, 64, 64, dtype=torch.float32)

# Create coordinates list: 2 images, each with (i_ratio, j_ratio, h_ratio, w_ratio)
# Values should be in [0, 1] range to represent ratios
coords_list = torch.tensor([
    [0.1, 0.2, 0.5, 0.6],
    [0.05, 0.15, 0.7, 0.75]
], dtype=torch.float32)

# Create flip list: boolean flags for horizontal flip for each image
flip_list = torch.tensor([True, False], dtype=torch.bool)

# Input size for the resized crop output
input_size = 32

# Standard ImageNet normalization mean and std
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]

ARGS = {
    "images_tensor": images_tensor,
    "coords_list": coords_list,
    "flip_list": flip_list,
    "input_size": input_size,
    "mean": mean,
    "std": std
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 32, 32) — shape (2, 3, 32, 32) 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
is_special_epoch Ran
ran, violated the contract we drafted
Jiacheng8/HALD/validate/train_fkd.py
code served (permissive licence) · get_code("cd4d8e43e2ff286b")
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 bool, 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 numpy as np

torch.manual_seed(0)

# The function is_special_epoch takes two integer parameters:
# - epoch: the current epoch number
# - total_epochs: the total number of epochs
# 
# It checks if:
# 1. epoch is in the last 80% of training (epoch >= 0.8 * total_epochs)
# 2. epoch ends with 9 or is the last epoch (epoch % 10 == 9 or epoch == total_epochs - 1)
#
# We need to construct valid integer arguments that will execute this function.

epoch = 89
total_epochs = 100

ARGS = {
    "epoch": epoch,
    "total_epochs": total_epochs
}
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 bool, 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
soft_cross_entropy Ran
ran, honoured the contract we drafted
Jiacheng8/HALD/validate/train_fkd.py
code served (permissive licence) · get_code("cef161c1e3365a6a")
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)

# logits: shape (batch_size, num_classes)
# soft_targets: shape (batch_size, num_classes)
logits = torch.randn(2, 4)
soft_targets = torch.softmax(torch.randn(2, 4), dim=1)

ARGS = {
    "logits": logits,
    "soft_targets": soft_targets,
}
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
hard_train Not yet run
unverified (harvested, no recorded run)
Jiacheng8/HALD/validate/train_fkd.py
code served (permissive licence) · get_code("fc95eb37eccb57be")
How it ran

no invocation recorded.

run_one_epoch Not yet run
unverified (harvested, no recorded run)
Jiacheng8/HALD/validate/train_fkd.py
code served (permissive licence) · get_code("0ba64fb9bbc21cb0")
How it ran

no invocation recorded.

save_checkpoint Not yet run
unverified (harvested, no recorded run)
Jiacheng8/HALD/validate/train_fkd.py
code served (permissive licence) · get_code("9a03064558c4c3e2")
How it ran

no invocation recorded.

soft_train Not yet run
unverified (harvested, no recorded run)
Jiacheng8/HALD/validate/train_fkd.py
code served (permissive licence) · get_code("4b437fdad717871d")
How it ran

no invocation recorded.

validate Not yet run
unverified (harvested, no recorded run)
Jiacheng8/HALD/validate/train_fkd.py
code served (permissive licence) · get_code("4d2b9fa1e962b322")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
is_special_epoch
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2506.24125 (2025-06)
FADRM: Fast and Accurate Data Residual Matching for Dataset Distillation
2606.18209 (2026-06)
Rethinking Dataset Distillation for Classification: Do Distilled Sets Outperform Coresets?

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

Soft labels from teacher models are a de facto practice for knowledge transfer and large-scale dataset distillation (e.g., SRe 2 L, LPLD). However, when we limit the number of crops per image to reduce the substantial cost of storing precomputed soft labels, these methods suffer severely from local semantic drift: visually ambiguous crops can cause soft supervision to deviate from the imagelevel ground-truth semantics, leading to persistent errors and a train-test distribution mismatch. We revisit the overlooked role of hard labels and show that, when properly integrated, they can act as a content-invariant semantic anchor that calibrates such drift. We theoretically analyze the emergence of drift under sparse soft-label supervision and demonstrate that hybridizing hard and soft labels restores alignment between visual content and semantic supervision. Building on this insight, we propose a new training paradigm, Hard Label for Alleviating Local Semantic Drift (HALD), which uses hard labels as intermediate corrective signals while preserving the fine-grained benefits of soft labels. Extensive experiments on dataset distillation and large-scale classification benchmarks show consistent generalization improvements. On ImageNet-1K, our method achieves 42.7% accuracy with only 285M soft-label storage (reduces by 100×), outperforming prior state-of-the-art LPLD by 9.0%. Code is available at https://github.com/Jiacheng8/HALD.

For agents

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

get_harvested_code_for_paper("2512.15647")
get_code_for_paper("2512.15647")
have("2512.15647")

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

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

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

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

Connect an agent — have() is free.