SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.17839 · 2026

Balancing Knowledge Distillation for Imbalance Learning with Bilevel Optimization

Viet Cuong, Anh Nguyen ⋆, Ba Tho, Ta ⋆⋆

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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 0 have no contract verdict; 9 failures of our instrument; 2 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/2605.17839.json · badge: /api/ran/2605.17839.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
phan-tho/Bilevel-balancing-kd canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
phan-tho/Bilevel-balancing-kd/train_student.py
pointer only (licence: NONE) · get_code("ddd2b1872e6d2464")
How it ran

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

conv3x3 Ran
ran; our contract draft was wrong, not the code
phan-tho/Bilevel-balancing-kd/model/resnet.py
pointer only (licence: NONE); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

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

gap_loss Ran
ran; our contract draft was wrong, not the code
phan-tho/Bilevel-balancing-kd/model/metaresnet.py
pointer only (licence: NONE) · get_code("3c15c7ba712bf845")
How it ran

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

kd_loss_fn Ran
ran; our contract draft was wrong, not the code
phan-tho/Bilevel-balancing-kd/bilevel_balancing_kd.py
pointer only (licence: NONE) · get_code("c01c3e64a40416d5")
How it ran

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

make_imbalanced_dataset Ran
ran; our contract draft was wrong, not the code
phan-tho/Bilevel-balancing-kd/cifar.py
pointer only (licence: NONE) · get_code("790bfc794a1acd12")
How it ran

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

meta_conv3x3 Ran
ran; our contract draft was wrong, not the code
phan-tho/Bilevel-balancing-kd/model/metaresnet.py
pointer only (licence: NONE) · get_code("e4aa1d0a6fa9e12e")
How it ran

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

to_var Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
phan-tho/Bilevel-balancing-kd/model/metaresnet.py
pointer only (licence: NONE) · get_code("abf8510196c87f79")
How it ran

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

train Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
phan-tho/Bilevel-balancing-kd/train_student.py
pointer only (licence: NONE) · get_code("065d2cb0ad758aed")
How it ran

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

validate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
phan-tho/Bilevel-balancing-kd/train_student.py
pointer only (licence: NONE) · get_code("3c632e1cb4648cc0")
How it ran

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

accuracy Not yet run
unverified (harvested, no recorded run)
phan-tho/Bilevel-balancing-kd/bilevel_balancing_kd.py
pointer only (licence: NONE); the stored copy get_code serves, from yuxwind/exactcompression, is pointer only (licence: NONE) · get_code("469bf48752905889")
How it ran

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

build_dataset Not yet run
unverified (harvested, no recorded run)
phan-tho/Bilevel-balancing-kd/cifar.py
pointer only (licence: NONE) · get_code("64027512b5c071fd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, phan-tho/Bilevel-balancing-kd 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 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 2 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
conv3x3 686 other papers
677 dated earlier, 1 the same month, 8 later · 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
accuracy 116 other papers
111 dated earlier, 2 the same month, 3 later · 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
accuracy 71 other papers
71 dated earlier · 2 only as an assembly brick
1505.05424 (2015-05)
Weight Uncertainty in Neural Networks
1705.07204 (2017-05)
Ensemble Adversarial Training: Attacks and Defenses
1802.10399 (2018-02)
Compressing Neural Networks using the Variational Information Bottleneck
and 68 more not named here
gap_loss 1 other paper
1 dated earlier
2211.16231 (2022-11)
Curriculum Temperature for Knowledge Distillation

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

Knowledge distillation transfers knowledge from a high capacity teacher to a compact student using a mixture of hard and soft losses. On imbalanced data, a fixed weighting between hard and soft losses becomes brittle the learning process. Recent studies try to reweight these components in long-tailed settings. However, most of these methods do not adapt weights at the sample-wise level and do not take into account the student's behavior during training. To address this, we propose BiKD -a bilevel framework that dynamically balances hard and soft losses for each sample. We employ a weight generation network that produces adaptive per-sample weights, guided by a small balanced validation set. The student is now trained with an unconstrained combination of weighted hard and soft losses, allowing the student to relax both terms. We further propose a multi-step SGD strategy to optimize the weight model more accurately and efficiently. Experiments on long-tailed CIFAR-10/100 show that our approach surpasses recent balanced distillation methods across imbalance factors. Our implementation is available at https://github.com/phan-tho/Bilevel-balancing-kd.

For agents

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

get_harvested_code_for_paper("2605.17839")
get_code_for_paper("2605.17839")
have("2605.17839")

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

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

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

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

Connect an agent — have() is free.