SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.17947 · 2026

Understanding the Generalization of Bilevel Programming in Hyperparameter Optimization: A Tale of Bias-Variance Decomposition

Deyu Meng, Jun Shu, Yubo Zhou, Junmin Liu

arXiv · PDF

Code that ran

5 of 6 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; 5 failures of our instrument; 1 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/2602.17947.json · badge: /api/ran/2602.17947.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
kjunelee/MetaOptNet canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
R2D2_conv_block Ran
ran; our contract draft was wrong, not the code
kjunelee/MetaOptNet/models/R2D2_embedding.py
code served (permissive licence) · get_code("cc80669c5bb2379d")
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 Sequential. 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_channels': 3,
    'out_channels': 16,
    'retain_activation': True,
    'keep_prob': 0.8
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
computeGramMatrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kjunelee/MetaOptNet/models/classification_heads.py
code served (permissive licence) · get_code("6134727f9d286287")
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 3, dtype family float, shape (2, 3, 5) 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

torch.manual_seed(0)

# Create small tensors with distinct dimensions
# A: (n_batch=2, n=3, d=4)
# B: (n_batch=2, m=5, d=4)
A = torch.randn(2, 3, 4)
B = torch.randn(2, 5, 4)

ARGS = {
    "A": A,
    "B": B,
}
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 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) 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
kjunelee/MetaOptNet/models/ResNet12_embedding.py
pointer only (licence: Apache-2.0); 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: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, 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.

count_accuracy Ran
ran; our contract draft was wrong, not the code
kjunelee/MetaOptNet/utils.py
code served (permissive licence) · get_code("fb61241b42c06d73")
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

torch.manual_seed(0)

# Create small tensors for testing count_accuracy
# logits: shape (batch_size, num_classes) - the function does argmax on dim=1
# label: shape (batch_size,) - the function views it as -1

batch_size = 2
num_classes = 4

# Create logits tensor with shape (2, 4)
logits = torch.randn(batch_size, num_classes)

# Create label tensor with shape (2,) containing class indices
label = torch.tensor([0, 1])

ARGS = {
    "logits": logits,
    "label": label,
}
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
one_hot Ran
ran; our contract draft was wrong, not the code
kjunelee/MetaOptNet/models/classification_heads.py
code served (permissive licence) · get_code("7c64c35be7f02395")
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 Tensor, ndim 3, dtype family float; no output shape is stated. 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 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 a small indices tensor with shape (2, 3)
# Values should be in range [0, depth)
indices = torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long)

# Depth parameter - number of one-hot classes
depth = 4

ARGS = {
    "indices": indices,
    "depth": depth,
}
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 Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:AssertionError)
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
binv Not yet run
unverified (harvested, no recorded run)
kjunelee/MetaOptNet/models/classification_heads.py
code served (permissive licence) · get_code("69c14f660e42b400")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 1 the same month, 1 later) and 0 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
674 dated earlier, 2 the same month, 10 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
one_hot 11 other papers
11 dated earlier · 4 only as an assembly brick
1703.05175 (2017-03)
Prototypical Networks for Few-shot Learning
ijcai2020_0377 (2020 (year only))
Consistent MetaReg: Alleviating Intra-task Discrepancy for Better Meta-knowledge
2009.04960 (2020-09)
Prototype Completion with Primitive Knowledge for Few-Shot Learning
and 8 more not named here
computeGramMatrix 8 other papers
8 dated earlier · 1 only as an assembly brick
1703.05175 (2017-03)
Prototypical Networks for Few-shot Learning
ijcai2020_0377 (2020 (year only))
Consistent MetaReg: Alleviating Intra-task Discrepancy for Better Meta-knowledge
2010.00763 (2020-10)
BONGARD-LOGO: A New Benchmark for Human-Level Concept Learning and Reasoning
and 5 more not named here
count_accuracy 4 other papers
4 dated earlier
2009.04960 (2020-09)
Prototype Completion with Primitive Knowledge for Few-Shot Learning
2010.07092 (2020-10)
Data Augmentation for Meta-Learning
2111.04316 (2021-11)
SEGA: Semantic Guided Attention on Visual Prototype for Few-Shot Learning
and 1 more not named here
R2D2_conv_block 2 other papers
2 dated earlier
2010.07092 (2020-10)
Data Augmentation for Meta-Learning
2211.14666 (2022-11)
Synergies between Disentanglement and Sparsity: Generalization and Identifiability in Multi-Task Learning
binv 2 other papers
2 dated earlier
ijcai2020_0377 (2020 (year only))
Consistent MetaReg: Alleviating Intra-task Discrepancy for Better Meta-knowledge
2211.14666 (2022-11)
Synergies between Disentanglement and Sparsity: Generalization and Identifiability in Multi-Task Learning

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

Gradient-based hyperparameter optimization (HPO) have emerged recently, leveraging bilevel programming techniques to optimize hyperparameter by estimating hypergradient w.r.t. validation loss. Nevertheless, previous theoretical works mainly focus on reducing the gap between the estimation and groundtruth (i.e., the bias), while ignoring the error due to data distribution (i.e., the variance), which degrades performance. To address this issue, we conduct a bias-variance decomposition for hypergradient estimation error and provide a supplemental detailed analysis of the variance term ignored by previous works. We also present a comprehensive analysis of the error bounds for hypergradient estimation. This facilitates an easy explanation of some phenomena commonly observed in practice, like overfitting to the validation set. Inspired by the derived theories, we propose an ensemble hypergradient strategy to reduce the variance in HPO algorithms effectively. Experimental results on tasks including regularization hyperparameter learning, data hyper-cleaning, and few-shot learning demonstrate that our variance reduction strategy improves hypergradient estimation. To explain the improved performance, we establish a connection between excess error and hypergradient estimation, offering some understanding of empirical observations.

For agents

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

get_harvested_code_for_paper("2602.17947")
get_code_for_paper("2602.17947")
have("2602.17947")

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

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

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

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

Connect an agent — have() is free.