SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.03793 · ICML · 2025

LENSLLM: Unveiling Fine-Tuning Dynamics for LLM Selection

Haohui Wang, Tyler Cody, Dawei Zhou, Jun Wu, Junhong Lin, Xinyue Zeng

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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, 2 violated it and 0 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-24; 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/2505.03793.json · badge: /api/ran/2505.03793.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
susan571/lensllm marked official in Papers with Code
Papers with Code archive
3 ran · 1 no recorded run
FunctionStatusWhere it lives
fit_lens_llm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
susan571/lensllm/Code/model_select.py
code served (permissive licence) · get_code("52b713ea05460138")
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 tuple. 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 numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create small dummy data for the function parameters
log_x = np.array([1.0, 2.0, 3.0, 4.0])  # log dataset sizes
log_y = np.array([2.5, 2.0, 1.5, 1.2])  # log losses

# Initial function output at dataset size (shape: 4)
f0_X = np.array([1.0, 0.8, 0.6, 0.4])

# Target labels (shape: 4)
y = np.array([0.9, 0.7, 0.5, 0.3])

# NTK matrix (4x4) - symmetric positive definite
ntk_matrix = np.array([
    [2.0, 0.5, 0.2, 0.1],
    [0.5, 1.8, 0.4, 0.2],
    [0.2, 0.4, 1.6, 0.3],
    [0.1, 0.2, 0.3, 1.5]
])

# Fixed t parameter for phase_fitting case
t_fixed = 100.0

ARGS = {
    'log_x': log_x,
    'log_y': log_y,
    'f0_X': f0_X,
    'y': y,
    'ntk_matrix': ntk_matrix,
    'case': 'phase_fitting',
    't_fixed': t_fixed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
lens_llm_transform Ran
ran, violated the contract we drafted
susan571/lensllm/Code/model_select.py
code served (permissive licence) · get_code("0c460d6b23a7ff94")
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 float64, ndim 0, 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 numpy as np

np.random.seed(0)

# Create small example data
num_samples = 2
output_dim = 4

# f0_X: initial predictions, shape (num_samples, output_dim) or (num_samples,)
f0_X = np.random.randn(num_samples, output_dim)

# y: target values, same shape as f0_X
y = np.random.randn(num_samples, output_dim)

# ntk_matrix: NTK matrix, shape (num_samples, num_samples)
ntk_matrix = np.random.randn(num_samples, num_samples)

# t: time parameter, scalar
t = 1.5

# eta: learning rate parameter, scalar
eta = 0.01

# B: scaling constant for LensLLM transform
B = 100.0

# beta: power law exponent
beta = 0.5

# E: offset constant
E = 0.1

# log_x: log of dataset size D
log_x = 3.0

ARGS = {
    "log_x": log_x,
    "B": B,
    "beta": beta,
    "E": E,
    "f0_X": f0_X,
    "y": y,
    "ntk_matrix": ntk_matrix,
    "t": t,
    "eta": eta,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
ntk_loss Ran
ran, violated the contract we drafted
susan571/lensllm/Code/model_select.py
code served (permissive licence) · get_code("94e0a587c843d7ae")
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 float64, ndim 0, 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# f0_X: initial function values at input points
# Shape: (batch_size,) or (n_samples,)
f0_X = np.array([1.5, 2.3])

# y: target values
# Shape: (batch_size,) or (n_samples,) - must match f0_X
y = np.array([1.2, 2.1])

# ntk_matrix: Neural Tangent Kernel matrix
# Shape: (n_samples, n_samples) - square matrix for the kernel
ntk_matrix = np.array([
    [0.8, 0.2],
    [0.1, 0.9]
])

# t: time parameter (scalar)
t = 1.0

# eta: learning rate or step size (scalar)
eta = 0.1

ARGS = {
    "f0_X": f0_X,
    "y": y,
    "ntk_matrix": ntk_matrix,
    "t": t,
    "eta": eta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
our_fit_select Not yet run
unverified (harvested, no recorded run)
susan571/lensllm/Code/model_select.py
code served (permissive licence) · get_code("d77ff6d03faaa3f5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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.

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

The proliferation of open-sourced Large Language Models (LLMs) and diverse downstream tasks necessitates efficient model selection, given the impracticality of fine-tuning all candidates due to computational constraints. Despite the recent advances in LLM selection, a fundamental research question largely remains nascent: how can we model the dynamic behaviors of LLMs during fine-tuning, thereby enhancing our understanding of their generalization performance across diverse downstream tasks? In this work, we propose a novel theoretical framework that provides a proper lens to assess the generalization capabilities of LLMs, thereby enabling accurate and efficient LLM selection for downstream applications. In particular, we first derive a PAC-Bayesian Generalization Bound that unveils fine-tuning dynamics of LLMs and then introduce LENSLLM, a Neural Tangent Kernel (NTK)-based Rectified Scaling Model that enables accurate performance predictions across diverse tasks while maintaining computational efficiency. Extensive empirical results on 3 large-scale benchmarks demonstrate that our model achieves up to 91.1% accuracy and reduces up to 88.5% computational cost in LLM selection, outperforming 5 state-of-the-art methods. We open-source our proposed LENSLLM model and corresponding results at LensLLM.io.

For agents

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

get_harvested_code_for_paper("2505.03793")
get_code_for_paper("2505.03793")
have("2505.03793")

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

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

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

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

Connect an agent — have() is free.