SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.18846 · 2024

Multi-Fidelity Residual Neural Processes for Scalable Surrogate Modeling

arXiv · PDF · Open in the Atlas

Code that ran

6 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, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2402.18846.json · badge: /api/ran/2402.18846.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
rose-stl-lab/mfrnp canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
get_dataset Ran
ran; our contract draft was wrong, not the code
rose-stl-lab/mfrnp/lib/utils.py
code served (permissive licence) · get_code("fac4b8f5a66f6148")
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
import os
import tempfile

# Create a temporary directory for test data
temp_dir = tempfile.mkdtemp()

# Create synthetic data files matching the expected format
levels = 2
for level in range(levels):
    # Training data
    train_x = np.random.randn(10, 4).astype(np.float32)  # 10 samples, 4 features
    train_y = np.random.randn(10, 3).astype(np.float32)  # 10 samples, 3 outputs
    train_path = os.path.join(temp_dir, f'train_l{level + 1}.npz')
    np.savez(train_path, x=train_x, y=train_y)
    
    # Test data
    test_x = np.random.randn(5, 4).astype(np.float32)  # 5 samples, 4 features
    test_y = np.random.randn(5, 3).astype(np.float32)  # 5 samples, 3 outputs
    test_path = os.path.join(temp_dir, f'test_l{level + 1}.npz')
    np.savez(test_path, x=test_x, y=test_y)

ARGS = {
    'data_path': temp_dir,
    'levels': 2,
    'transform': True
}
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 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
kld_gaussian_loss Ran
ran; our contract draft was wrong, not the code
rose-stl-lab/mfrnp/model/loss.py
code served (permissive licence) · get_code("ceea3ddbe3c45948")
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)

# The function expects 4 tensors representing:
# - z_mean_all: mean of the "all" distribution
# - z_var_all: variance of the "all" distribution
# - z_mean_context: mean of the "context" distribution
# - z_var_context: variance of the "context" distribution
# All tensors should have compatible shapes for broadcasting in KL divergence

batch_size = 2
latent_dim = 4

z_mean_all = torch.randn(batch_size, latent_dim)
z_var_all = torch.exp(torch.randn(batch_size, latent_dim))  # ensure positive variances
z_mean_context = torch.randn(batch_size, latent_dim)
z_var_context = torch.exp(torch.randn(batch_size, latent_dim))  # ensure positive variances

ARGS = {
    "z_mean_all": z_mean_all,
    "z_var_all": z_var_all,
    "z_mean_context": z_mean_context,
    "z_var_context": z_var_context,
}
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
load_data_from_files Ran
ran; our contract draft was wrong, not the code
rose-stl-lab/mfrnp/lib/utils.py
code served (permissive licence) · get_code("20a8bff1ec7334ef")
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, ndim 2, 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 os
import tempfile

# Create a temporary directory to serve as data_path
temp_dir = tempfile.mkdtemp()

# Define arguments for the function
ARGS = {
    "data_path": temp_dir,
    "levels": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
nll_loss Ran
ran; our contract draft was wrong, not the code
rose-stl-lab/mfrnp/model/loss.py
code served (permissive licence) · get_code("1876fb7ce633ef5f")
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 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 the function
batch_size = 2
output_dim = 4

# pred_mu: mean predictions from model, shape (batch_size, output_dim)
pred_mu = torch.randn(batch_size, output_dim)

# pred_cov: covariance predictions (will be sqrt'd), shape (batch_size, output_dim)
# Use positive values since we take sqrt
pred_cov = torch.abs(torch.randn(batch_size, output_dim)) + 0.1

# y: target values, shape (batch_size, output_dim)
y = torch.randn(batch_size, output_dim)

# return_numpy: whether to return numpy array
return_numpy = True

ARGS = {
    "pred_mu": pred_mu,
    "pred_cov": pred_cov,
    "y": y,
    "return_numpy": return_numpy,
}
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 ndarray, 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
rmse_metric Ran
ran, violated the contract we drafted
rose-stl-lab/mfrnp/model/loss.py
code served (permissive licence) · get_code("2ee1f30cb19433c5")
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 float32, 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 numpy as np

# Create small numpy arrays for y_pred and y_true
# Using distinct shapes to make dimensions traceable: 2 samples, 4 features
np.random.seed(0)
y_pred = np.random.randn(2, 4).astype(np.float32)
y_true = np.random.randn(2, 4).astype(np.float32)

ARGS = {
    "y_pred": y_pred,
    "y_true": y_true,
}
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 float32, 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
split_data Ran
ran; our contract draft was wrong, not the code
rose-stl-lab/mfrnp/lib/utils.py
code served (permissive licence) · get_code("cfeb7bf253ab15eb")
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 torch
import numpy as np

torch.manual_seed(0)

# Create small sample data
x = torch.randn(10, 4)  # 10 samples, 4 features
y = torch.randn(10, 3)  # 10 samples, 3 targets

ARGS = {
    "x": x,
    "y": y,
    "train_ratio": 0.9
}
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 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

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

Multi-fidelity surrogate modeling aims to learn an accurate surrogate at the highest fidelity level by combining data from multiple sources. Traditional methods relying on Gaussian processes can hardly scale to high-dimensional data. Deep learning approaches utilize neural network based encoders and decoders to improve scalability. These approaches share encoded representations across fidelities without including corresponding decoder parameters. This hinders inference performance, especially in out-of-distribution scenarios when the highest fidelity data has limited domain coverage. To address these limitations, we propose Multi-fidelity Residual Neural Processes (MFRNP), a novel multi-fidelity surrogate modeling framework. MFRNP explicitly models the residual between the aggregated output from lower fidelities and ground truth at the highest fidelity. The aggregation introduces decoders into the information sharing step and optimizes lower fidelity decoders to accurately capture both in-fidelity and cross-fidelity information. We show that MFRNP significantly outperforms state-of-the-art in learning partial differential equations and a real-world climate modeling task. Our code is published at: https://github.com/Rose-STL-Lab/MFRNP

For agents

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

get_harvested_code_for_paper("2402.18846")
get_code_for_paper("2402.18846")
have("2402.18846")

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

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

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

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

Connect an agent — have() is free.