SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.20161 · 2026

SMART: A Spectral Transfer Approach to Multi-Task Learning

Mladen Kolar, Boxin Zhao, Jinchi Lv

arXiv · PDF

Code that ran

7 of 7 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 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/2604.20161.json · badge: /api/ran/2604.20161.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
boxinz17/smart canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
aggregate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
boxinz17/smart/simulation/visualize_simulation.py
code served (permissive licence) · get_code("0081a5c9782d6868")
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 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 numpy as np

# The function aggregate takes a list/iterable of errors and computes mean and std error
# It checks if errors is truthy, converts to numpy array, computes mean and standard error
# We need to provide a list of numeric values

# Create a simple list of error values
errors_list = [0.5, 0.3, 0.7, 0.4, 0.6, 0.55]

ARGS = {
    "errors": errors_list
}
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, 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
build_path Ran
ran; our contract draft was wrong, not the code
boxinz17/smart/simulation/visualize_simulation.py
code served (permissive licence) · get_code("dbbc6298b658598b")
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 str. 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 sys
import json
import pickle

model_list = ['model1', 'model2', 'model3']

model_id = int(sys.argv[1]) if len(sys.argv) > 1 else 2

model_name = model_list[model_id]

results_base = f'result/{model_name}'

methods = {'RRR': {'ext': 'json', 'loader': lambda f: json.load(f)}, 'SRRR': {'ext': 'json', 'loader': lambda f: json.load(f)}, 'SOFAR': {'ext': 'json', 'loader': lambda f: json.load(f)}, 'RSSVD': {'ext': 'json', 'loader': lambda f: json.load(f)}, 'SMART': {'ext': 'pkl', 'loader': lambda f: pickle.load(f)}, 'SMARTCV': {'ext': 'pkl', 'loader': lambda f: pickle.load(f)}}

def build_path(method, exp, var_name, var_value, seed):
    ext = methods[method]['ext']
    return f'{results_base}/{exp}/{method}_result_{model_name}_{exp}_{var_name}={var_value}_rd_seed_id={seed}.{ext}'

ARGS = {
    'method': 'RRR',
    'exp': 'experiment_01',
    'var_name': 'learning_rate',
    'var_value': 0.001,
    'seed': 42
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
evaluate_model_avg_err Ran
ran, honoured the contract we drafted
boxinz17/smart/smart/smart/utils.py
code served (permissive licence) · get_code("0091b13e6f82861d")
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

# Create sample coefficient matrices with distinct dimensions
# C_hat: estimated coefficient matrix (4x3)
# C_true: ground truth coefficient matrix (4x3)

np.random.seed(0)

C_hat = np.random.randn(4, 3)
C_true = np.random.randn(4, 3)

ARGS = {
    "C_hat": C_hat,
    "C_true": C_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 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
evaluate_model_relav_err Ran
ran, honoured the contract we drafted
boxinz17/smart/smart/smart/utils.py
code served (permissive licence) · get_code("8246991c52fb799f")
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)

# Create small coefficient matrices
# C_hat: estimated coefficient matrix (4x3)
C_hat = np.random.randn(4, 3)

# C_true: ground truth coefficient matrix (4x3)
# Make it slightly different from C_hat to get non-zero error
C_true = np.random.randn(4, 3)

ARGS = {
    "C_hat": C_hat,
    "C_true": C_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 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
generate_data Ran
ran; our contract draft was wrong, not the code
boxinz17/smart/smart/smart/utils.py
code served (permissive licence) · get_code("42cf52dc429d354f")
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 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 numpy as np

ARGS = {
    "n": 10,
    "p": 8,
    "q": 6,
    "sigma0": 0.01,
    "sigma": 0.5,
    "r0_star": 4,
    "r_star": 2,
    "random_seed": 42,
}
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 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_input Ran
ran, honoured the contract we drafted
boxinz17/smart/simulation/run_SMART.py
code served (permissive licence) · get_code("c011ef8168be1e6a")
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 int, ndim 0, dtype family int, 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 sys

def get_input(arg, min_val, max_val, label):
    try:
        val = int(arg)
        if not min_val <= val <= max_val:
            raise ValueError
        return val
    except ValueError:
        print(f'{label} must be between {min_val} and {max_val}')
        sys.exit(1)


ARGS = {
    "arg": "42",
    "min_val": 0,
    "max_val": 100,
    "label": "Test Parameter"
}
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 int, ndim 0, dtype family int, 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_errors Ran
ran, honoured the contract we drafted
boxinz17/smart/simulation/visualize_simulation.py
code served (permissive licence) · get_code("7898bea360f57625")
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 list, 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 os
import sys
import json
import pickle
import tempfile
import shutil

# Create a temporary directory for test results
test_dir = tempfile.mkdtemp()

# Create directory structure
model_name = 'model2'
exp = 'test_exp'
results_base = os.path.join(test_dir, f'result/{model_name}')
exp_dir = os.path.join(results_base, exp)
os.makedirs(exp_dir, exist_ok=True)

# Create sample result files for a few seeds
var_name = 'param1'
var_value = 0.5
method = 'RRR'

for seed in [0, 1, 5]:
    filename = f'{method}_result_{model_name}_{exp}_{var_name}={var_value}_rd_seed_id={seed}.json'
    filepath = os.path.join(exp_dir, filename)
    result_data = {'avg_err': 0.123 + seed * 0.01}
    with open(filepath, 'w') as f:
        json.dump(result_data, f)

# Also create a SMART method result (pkl format)
method_pkl = 'SMART'
for seed in [0, 2]:
    filename = f'{method_pkl}_result_{model_name}_{exp}_{var_name}={var_value}_rd_seed_id={seed}.pkl'
    filepath = os.path.join(exp_dir, filename)
    result_data = {'avg_err': 0.456 + seed * 0.02}
    with open(filepath, 'wb') as f:
        pickle.dump(result_data, f)

# Patch the module-level variables to use our test directory
model_list = ['model1', 'model2', 'model3']
rd_seed_ids = range(100)

methods = {
    'RRR': {'ext': 'json', 'loader': lambda f: json.load(f)},
    'SRRR': {'ext': 'json', 'loader': lambda f: json.load(f)},
    'SOFAR': {'ext': 'json', 'loader': lambda f: json.load(f)},
    'RSSVD': {'ext': 'json', 'loader': lambda f: json.load(f)},
    'SMART': {'ext': 'pkl', 'loader': lambda f: pickle.load(f)},
    'SMARTCV': {'ext': 'pkl', 'loader': lambda f: pickle.load(f)}
}

def build_path(method, exp, var_name, var_value, seed):
    ext = methods[method]['ext']
    return os.path.join(results_base, exp, f'{method}_result_{model_name}_{exp}_{var_name}={var_value}_rd_seed_id={seed}.{ext}')

def load_errors(method, exp, var_name, var_value):
    loader = methods[method]['loader']
    errors = []
    for seed in rd_seed_ids:
        path = build_path(method, exp, var_name, var_value, seed)
        if os.path.exists(path):
            with open(path, 'rb') as f:
                result = loader(f)
                errors.append(result['avg_err'])
    return errors

ARGS = {
    'method': 'RRR',
    'exp': 'test_exp',
    'var_name': 'param1',
    'var_value': 0.5
}
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 list, ndim 1, dtype family float — a list 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

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 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.

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-task learning is effective for related applications, but its performance can deteriorate when the target sample size is small. Transfer learning can borrow strength from related studies; yet, many existing methods rely on restrictive bounded-difference assumptions between the source and target models. We propose SMART, a spectral transfer method for multi-task linear regression that instead assumes spectral similarity: the target left and right singular subspaces lie within the corresponding source subspaces and are sparsely aligned with the source singular bases. Such an assumption is natural when studies share latent structures and enables transfer beyond the bounded-difference settings. SMART estimates the target coefficient matrix through structured regularization that incorporates spectral information from a source study. Importantly, it requires only a fitted source model rather than the raw source data, making it useful when data sharing is limited. Although the optimization problem is nonconvex, we develop a practical ADMM-based algorithm. We establish general, non-asymptotic error bounds and a minimax lower bound in the noiseless-source regime. Under additional regularity conditions, these results yield near-minimax Frobenius error rates up to logarithmic factors. Simulations confirm improved estimation accuracy and robustness to negative transfer, and analysis of multi-modal single-cell data demonstrates better predictive performance. The Python implementation of SMART, along with the code to reproduce all experiments in this paper, is publicly available at https://github.com/boxinz17/smart.

For agents

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

get_harvested_code_for_paper("2604.20161")
get_code_for_paper("2604.20161")
have("2604.20161")

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

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

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

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

Connect an agent — have() is free.