SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.05578 · ICML · 2020

Multiresolution Tensor Learning for Efficient and Interpretable Spatial Analysis

Yisong Yue, Jung Park, Kenneth Carr, Stephan Zheng, Rose Yu

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-21; 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/2002.05578.json · badge: /api/ran/2002.05578.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/mrtl canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
Rose-STL-Lab/mrtl marked official in Papers with Code
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
climate_spatial_regularizer Ran
ran; our contract draft was wrong, not the code
Rose-STL-Lab/mrtl/train/climate/multi.py
code served (permissive licence) · get_code("98ab1e851ade21b7")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a model with 'w' attribute (not 'low' in class name)
class RegularModel(nn.Module):
    def __init__(self):
        super().__init__()
        # w should be a 3D tensor for unfold(mode=2)
        self.w = nn.Parameter(torch.randn(2, 3, 4))
    
    def forward(self, x):
        return x

# Create a low model with 'C' attribute
class LowModel(nn.Module):
    def __init__(self):
        super().__init__()
        # C should be a 2D tensor for pdist
        self.C = nn.Parameter(torch.randn(5, 4))
    
    def forward(self, x):
        return x

# Test with regular model
regular_model = RegularModel()

# K matrix for spatial regularization (should be same size as pdist output)
# pdist of unfold(w, mode=2) will have shape [4, 4] (X.size(mode) x X.size(mode))
K = torch.randn(4, 4)

device = torch.device('cpu')

ARGS = {
    'model': regular_model,
    'K': K,
    'device': device
}
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
grad_stats Ran
ran, honoured the contract we drafted
Rose-STL-Lab/mrtl/train/climate/multi.py
code served (permissive licence) · get_code("bb774496fce74c4d")
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

torch.manual_seed(0)

# The function expects avg_grads to be a list/iterable of tensors
# It concatenates them after flattening, so we need multiple gradient-like tensors
avg_grads = [
    torch.randn(4, 3),
    torch.randn(2, 5),
    torch.randn(3)
]

# Ensure all values are positive for entropy calculation (log of negative numbers is undefined)
avg_grads = [torch.abs(g) + 0.1 for g in avg_grads]

ARGS = {
    "avg_grads": avg_grads
}
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 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
kr Ran
ran, honoured the contract we drafted
rose-stl-lab/mrtl/train/climate/model.py
code served (permissive licence) · get_code("2ec6818f783b7632")
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 (40, 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 numpy as np

torch.manual_seed(0)

# The function kr takes a list of matrices and computes their Khatri-Rao product
# It expects matrices to have shape (rows, n_col) where n_col is consistent across all matrices
# The function accesses .shape[1] and reshapes, so we need real torch tensors or numpy arrays

# Create a list of matrices with consistent number of columns (n_col=3)
# but different numbers of rows to make dimensions distinct
matrix1 = torch.randn(2, 3)  # 2 rows, 3 columns
matrix2 = torch.randn(4, 3)  # 4 rows, 3 columns
matrix3 = torch.randn(5, 3)  # 5 rows, 3 columns

matrices = [matrix1, matrix2, matrix3]

ARGS = {
    "matrices": matrices
}
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 Tensor, ndim 2, dtype family float, shape (40, 3) — shape (40, 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
kruskal_to_tensor Ran
ran, honoured the contract we drafted
rose-stl-lab/mrtl/train/climate/model.py
code served (permissive licence) · get_code("cde70e138795d924")
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, shape (2, 4, 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
import numpy as np

torch.manual_seed(0)

# The function kruskal_to_tensor expects a list of factor matrices
# Each factor matrix should have shape (dimension_i, rank)
# The function will:
# 1. Extract shape from each factor's first dimension
# 2. Compute Khatri-Rao product of factors[1:]
# 3. Matrix multiply factors[0] with the KR product transposed
# 4. Reshape to the final tensor shape

# Create factor matrices with distinct sizes
# Factor 0: shape (2, 3) - first mode dimension 2, rank 3
factor_0 = torch.randn(2, 3)

# Factor 1: shape (4, 3) - second mode dimension 4, rank 3
factor_1 = torch.randn(4, 3)

# Factor 2: shape (5, 3) - third mode dimension 5, rank 3
factor_2 = torch.randn(5, 3)

factors = [factor_0, factor_1, factor_2]

ARGS = {
    "factors": factors
}
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 Tensor, ndim 3, dtype family float, shape (2, 4, 5) — shape (2, 4, 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
pdist Ran
ran; our contract draft was wrong, not the code
Rose-STL-Lab/mrtl/train/climate/multi.py
code served (permissive licence) · get_code("843c878babbef8b4")
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, 2) 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)

# X is a tensor that will have pow, sum, addmm, transpose, add_, clamp_min_ called on it
# The function computes pairwise distances, so X should be a 2D tensor of shape (batch, features)
X = torch.randn(2, 4)

ARGS = {
    "X": X
}
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 2, dtype family float, shape (2, 2) — shape (2, 2) 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
unfold Ran
ran; our contract draft was wrong, not the code
Rose-STL-Lab/mrtl/train/climate/multi.py
code served (permissive licence) · get_code("7fb23389effa6eb9")
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 (3, 40) 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 unfold takes a tensor X and an integer mode
# It permutes dimensions and reshapes the tensor
# X needs to be a multi-dimensional tensor
# mode needs to be a valid dimension index

# Create a small multi-dimensional tensor
# Using distinct sizes: 2, 3, 4, 5 for different dimensions
X = torch.randn(2, 3, 4, 5)

# mode should be a valid dimension index (0 to X.dim()-1)
mode = 1

ARGS = {
    "X": X,
    "mode": mode
}
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 2, dtype family float, shape (3, 40) — shape (3, 40) 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
Multi Not yet run
unverified (harvested, no recorded run)
Rose-STL-Lab/mrtl/train/climate/multi.py
code served (permissive licence) · get_code("4774afb08c7fa5ea")
How it ran

no invocation recorded.

accum_grad Not yet run
unverified (harvested, no recorded run)
Rose-STL-Lab/mrtl/train/climate/multi.py
code served (permissive licence) · get_code("cc31eb725f81c6cf")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Efficient and interpretable spatial analysis is crucial in many fields such as geology, sports, and climate science. Tensor latent factor models can describe higher-order correlations for spatial data. However, they are computationally expensive to train and are sensitive to initialization, leading to spatially incoherent, uninterpretable results. We develop a novel Multiresolution Tensor Learning (MRTL) algorithm for efficiently learning interpretable spatial patterns. MRTL initializes the latent factors from an approximate full-rank tensor model for improved interpretability and progressively learns from a coarse resolution to the fine resolution to reduce computation. We also prove the theoretical convergence and computational complexity of MRTL. When applied to two real-world datasets, MRTL demonstrates 4 ∼ 5x speedup compared to a fixed resolution approach while yielding accurate and interpretable latent factors.

For agents

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

get_harvested_code_for_paper("2002.05578")
get_code_for_paper("2002.05578")
have("2002.05578")

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

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

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

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

Connect an agent — have() is free.