SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.23032 · ICML · 2025

Bayesian Neural Scaling Law Extrapolation with Prior-Data Fitted Networks

Frank Hutter, Sung Hwang, Juho Lee, Hae Lee, Steven Adriaensen, Dongwoo Lee, Seon Kim

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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; 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.23032.json · badge: /api/ran/2505.23032.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
dongwoolee-eli/nslpfn canonical (classifier label)
classifier basis: classifier_2025
9 ran · 1 no recorded run
FunctionStatusWhere it lives
M3 Ran
ran; our contract draft was wrong, not the code
dongwoolee-eli/nslpfn/pfn/prior.py
code served (permissive licence) · get_code("f51f9e496a4d97ba")
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 ndarray, ndim 1, dtype family float, shape (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 numpy as np

class SimpleRNG:
    def __init__(self, seed=0):
        self.rng = np.random.RandomState(seed)
    
    def lognormal(self, mean, sigma):
        return self.rng.lognormal(mean, sigma)
    
    def uniform(self, low, high):
        return self.rng.uniform(low, high)

rng = SimpleRNG(seed=42)
x = np.array([0.1, 0.5, 1.0, 2.0, 5.0])

ARGS = {
    'rng': rng,
    'x': x,
    'minmax_samp': True,
    'up': False
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (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
M4 Ran
ran; our contract draft was wrong, not the code
dongwoolee-eli/nslpfn/pfn/prior.py
code served (permissive licence) · get_code("1b8f346791bd9aca")
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 ndarray, ndim 1, dtype family float, shape (10,) 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 numpy as np

# Create a random number generator
rng = np.random.RandomState(42)

# Create a small numpy array for x parameter
# The function uses x in operations like x**c and reshapes it to (-1, 1)
# so it needs to be 1D
x = np.linspace(0.1, 2.0, 10)

# Define ARGS dictionary with all parameters
ARGS = {
    'rng': rng,
    'x': x,
    'proc': 1000,
    'minmax_samp': True,
    'up': False
}
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 ndarray, ndim 1, dtype family float, shape (10,) — shape (10,) 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
bardist_calibration Ran
ran; our contract draft was wrong, not the code
dongwoolee-eli/nslpfn/inference.py
code served (permissive licence) · get_code("77d5a3111aa83e0f")
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 dict. 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 numpy as np

torch.manual_seed(0)

class BarDistribution:
    """Minimal BarDistribution class with icdf method"""
    def icdf(self, logits, quantile):
        """
        Inverse CDF (quantile function) for bar distribution.
        Takes logits of shape (N, num_bars) and returns quantiles of shape (N,)
        """
        # Simple implementation: use logits to generate quantile values
        # Map logits through a sigmoid-like transformation
        if isinstance(logits, torch.Tensor):
            # Use mean of logits as base, scale by quantile
            result = torch.mean(logits, dim=1) * quantile
            return result
        return logits

# Create minimal test data
batch_size = 2
num_bars = 4

# Logits: shape (N, num_bars) = (2, 4)
logits = torch.randn(batch_size, num_bars)

# Ground truth values: shape (N,) = (2,)
y_true = torch.randn(batch_size)

# Confidence levels (optional, will use default if None)
confidence_levels = [0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99]

# Create BarDistribution instance
bar_dist = BarDistribution()

ARGS = {
    'bar_dist': bar_dist,
    'logits': logits,
    'y_true': y_true,
    'confidence_levels': confidence_levels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_metric Ran
ran; our contract draft was wrong, not the code
dongwoolee-eli/nslpfn/inference.py
code served (permissive licence) · get_code("98177f96938533ef")
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 tuple, ndim 1, 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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Define a minimal BarDistribution stand-in class
class BarDistribution:
    """Minimal BarDistribution that supports icdf and median operations"""
    def icdf(self, logits, quantile):
        # Return quantile-based bounds from logits
        # logits shape: (N, num_bars)
        # Return shape: (N,)
        return logits[:, 0] * quantile + logits[:, 1] * (1 - quantile)
    
    def median(self, logits):
        # Return median prediction from logits
        # logits shape: (N, num_bars)
        # Return shape: (N,)
        return logits[:, 0]
    
    def __call__(self, yt_pred, yt):
        # Negative log probability loss
        # yt_pred shape: (1, N, num_bars)
        # yt shape: (1, N)
        # Return shape: (1, N)
        batch_size = yt_pred.shape[0]
        seq_len = yt_pred.shape[1]
        # Simple mock loss: return small values
        return torch.ones(batch_size, seq_len) * 0.1

# Define a minimal model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)  # 4 input features -> 3 output bars
    
    def forward(self, xc, yc, xt):
        # xc: (1, N_c)
        # yc: (1, N_c)
        # xt: (1, N_t)
        # Return: (1, N_t, num_bars)
        batch_size = xt.shape[0]
        seq_len = xt.shape[1]
        num_bars = 3
        # Stack inputs and pass through linear layer
        x_combined = torch.cat([xc, yc, xt], dim=1)  # (1, 3*N)
        # Simple mock output
        output = torch.randn(batch_size, seq_len, num_bars)
        return output

# Create instances
device = torch.device('cpu')
model = SimpleModel().to(device)
criterion = BarDistribution()

# Create small tensors
xc = torch.randn(2, dtype=torch.float32)  # 2 calibration points
yc = torch.randn(2, dtype=torch.float32)  # 2 calibration targets
xt = torch.randn(3, dtype=torch.float32)  # 3 test points
yt = torch.randn(3, dtype=torch.float32)  # 3 test targets

ARGS = {
    'device': device,
    'model': model,
    'criterion': criterion,
    'xc': xc,
    'yc': yc,
    'xt': xt,
    'yt': yt,
    'y_normalize': True,
    'epsilon': 0.01
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
predict_quantiles Ran
ran; our contract draft was wrong, not the code
dongwoolee-eli/nslpfn/inference.py
code served (permissive licence) · get_code("d870d57e4afb41cd")
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 2, dtype family float, shape (2, 3) 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 as nn
from scipy import stats

torch.manual_seed(0)

# Create a stand-in criterion class that has an icdf method
class QuantileCriterion:
    def __init__(self):
        # Use a normal distribution as the underlying distribution
        self.dist = stats.norm(loc=0, scale=1)
    
    def icdf(self, logits, q):
        # Inverse CDF (quantile function) applied to logits
        # Convert logits to probabilities and apply icdf
        batch_size = logits.shape[0]
        result = torch.tensor(
            [self.dist.ppf(q) for _ in range(batch_size)],
            dtype=torch.float32
        )
        return result

# Create small logits tensor (batch_size=2, features=4)
logits = torch.randn(2, 4)

# Create quantile values
qs = [0.25, 0.5, 0.75]

# Create criterion instance
criterion = QuantileCriterion()

ARGS = {
    "logits": logits,
    "qs": qs,
    "criterion": criterion
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
sample_downward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dongwoolee-eli/nslpfn/pfn/prior.py
code served (permissive licence) · get_code("59c2df8514e432be")
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 ndarray, ndim 1, dtype family float, shape (50,) 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 numpy as np

# Create a random number generator
rng = np.random.RandomState(42)

# Create X array - needs to be sorted and have context_size + 1 element
# X should represent some normalized values between 0 and 1
seq_len = 50
X = np.linspace(0, 1, seq_len)

# context_size should be less than seq_len
context_size = 10

# Variance parameters for lognormal distribution
var_lnloc = 0.0
var_lnscale = 0.5

# Sequence length
seq_len = 50

ARGS = {
    'rng': rng,
    'X': X,
    'context_size': context_size,
    'var_lnloc': var_lnloc,
    'var_lnscale': var_lnscale,
    'seq_len': seq_len
}
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 ndarray, ndim 1, dtype family float, shape (50,) — shape (50,) 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
sample_nobreak Ran
ran; our contract draft was wrong, not the code
dongwoolee-eli/nslpfn/pfn/prior.py
code served (permissive licence) · get_code("dfa2b4cbfed39b51")
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 ndarray, ndim 1, dtype family float, shape (50,) 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 numpy as np

# Create a random number generator
rng = np.random.RandomState(42)

# Create X array - input array for M3/M4 functions
# The functions use x in operations like 1/x and x**c, so we need positive values
X = np.linspace(0.1, 10, 50)

# context_size parameter
context_size = 10

# var_lnloc parameter - location for normal distribution of log variance
var_lnloc = 0.0

# var_lnscale parameter - scale for normal distribution of log variance
var_lnscale = 0.5

# seq_len parameter
seq_len = 50

ARGS = {
    "rng": rng,
    "X": X,
    "context_size": context_size,
    "var_lnloc": var_lnloc,
    "var_lnscale": var_lnscale,
    "seq_len": seq_len,
}
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 ndarray, ndim 1, dtype family float, shape (50,) — shape (50,) 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
sample_upward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dongwoolee-eli/nslpfn/pfn/prior.py
code served (permissive licence) · get_code("6cce303ee50fc71a")
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 ndarray, ndim 1, dtype family float, shape (50,) 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 numpy as np
import math
from scipy import stats

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

# Create a random number generator
rng = np.random.RandomState(42)

# Create X array - needs to be sorted and have context_size and seq_len indices
# seq_len will be 50, context_size will be 10
seq_len = 50
context_size = 10
X = np.linspace(0.1, 10.0, seq_len)

# Variance parameters for normal distribution
var_lnloc = 0.0
var_lnscale = 0.5

ARGS = {
    'rng': rng,
    'X': X,
    'context_size': context_size,
    'var_lnloc': var_lnloc,
    'var_lnscale': var_lnscale,
    'seq_len': seq_len,
}
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 ndarray, ndim 1, dtype family float, shape (50,) — shape (50,) 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
upward Ran
ran; our contract draft was wrong, not the code
dongwoolee-eli/nslpfn/pfn/prior.py
code served (permissive licence) · get_code("c7350bc2c2fac75d")
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 ndarray, ndim 1, dtype family float, shape (3,) 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 math
from scipy import stats
import numpy as np

class SimpleRNG:
    """Stand-in RNG with uniform and lognormal methods."""
    def __init__(self, seed=42):
        self.rng = np.random.RandomState(seed)
    
    def uniform(self, low, high):
        return self.rng.uniform(low, high)
    
    def lognormal(self, mean, sigma):
        return self.rng.lognormal(mean, sigma)

rng = SimpleRNG(seed=42)
x = np.array([0.2, 0.5, 0.8])

ARGS = {
    "rng": rng,
    "x": x
}
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 ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) 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
sample_from_prior Not yet run
unverified (harvested, no recorded run)
dongwoolee-eli/nslpfn/pfn/prior.py
code served (permissive licence) · get_code("78b98eda34d7f3c0")
How it ran

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, 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 10 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

Scaling has been a major driver of recent advancements in deep learning. Numerous empirical studies have found that scaling laws often follow the power-law and proposed several variants of power-law functions to predict the scaling behavior at larger scales. However, existing methods mostly rely on point estimation and do not quantify uncertainty, which is crucial for real-world applications involving decision-making problems such as determining the expected performance improvements achievable by investing additional computational resources. In this work, we explore a Bayesian framework based on Prior-data Fitted Networks (PFNs) for neural scaling law extrapolation. Specifically, we design a prior distribution that enables the sampling of infinitely many synthetic functions resembling real-world neural scaling laws, allowing our PFN to metalearn the extrapolation. We validate the effectiveness of our approach on real-world neural scaling laws, comparing it against both the existing point estimation methods and Bayesian approaches. Our method demonstrates superior performance, particularly in data-limited scenarios such as Bayesian active learning, underscoring its potential for reliable, uncertainty-aware extrapolation in practical applications. The code and models are available at https://github. com/DongWooLee-Eli/nslpfn.

For agents

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

get_harvested_code_for_paper("2505.23032")
get_code_for_paper("2505.23032")
have("2505.23032")

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

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

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

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

Connect an agent — have() is free.