SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.16429 · ICML · 2026

(Sparse) Attention to the Details: Preserving Spectral Fidelity in ML-based Weather Forecasting Models

Max Welling, Ana Lucic, Jan-Willem Van De Meent, Maksim Zhdanov

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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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.16429.json · badge: /api/ran/2604.16429.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
maxxxzdn/mosaic canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
attn_topk Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
maxxxzdn/mosaic/primitives.py
code served (permissive licence) · get_code("126d89f933b46bd5")
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 4, dtype family int, shape (2, 5, 4, 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
from einops import rearrange, reduce, repeat

torch.manual_seed(0)

# Construct valid arguments for attn_topk
# The function expects:
# - q: query tensor with shape (batch, time, heads_q, dim)
# - k: key tensor with shape (batch, time, heads_k, dim)
# - block_count: integer for top-k selection

batch_size = 2
time_steps = 5
heads_q = 8
heads_k = 4
feature_dim = 4
block_count = 3

q = torch.randn(batch_size, time_steps, heads_q, feature_dim)
k = torch.randn(batch_size, time_steps, heads_k, feature_dim)

ARGS = {
    "q": q,
    "k": k,
    "block_count": block_count
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family int, shape (2, 5, 4, 3) — shape (2, 5, 4, 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
compute_day_year_progress Ran
ran, honoured the contract we drafted
maxxxzdn/mosaic/inference.py
code served (permissive licence) · get_code("93327ce52a98560a")
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 pandas as pd

# Create a valid pd.Timestamp object for testing
# Using a timestamp in the middle of a leap year for interesting progress values
timestamp = pd.Timestamp('2024-06-15 14:30:45')

ARGS = {
    'timestamp': timestamp
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
compute_latitude_weights Ran
ran; our contract draft was wrong, not the code
maxxxzdn/mosaic/losses.py
code served (permissive licence) · get_code("ec99fa68db1cae9b")
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 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 torch

torch.manual_seed(0)

# Create a small latitude tensor representing latitudes in degrees
# Shape: (5,) - representing 5 different latitude values
latitude = torch.tensor([-60.0, -30.0, 0.0, 30.0, 60.0])

ARGS = {
    "latitude": latitude,
}
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 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
compute_weighted_mse Ran
ran; our contract draft was wrong, not the code
maxxxzdn/mosaic/losses.py
code served (permissive licence) · get_code("83200761aa31eb8b")
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)

# Create small tensors with distinct dimensions for each parameter
batch_size = 2
ensemble_size = 3
lon_size = 4
lat_size = 5
channels = 6

# predictions: (batch, ensemble, lon, lat, channels)
predictions = torch.randn(batch_size, ensemble_size, lon_size, lat_size, channels)

# targets: (batch, lon, lat, channels)
targets = torch.randn(batch_size, lon_size, lat_size, channels)

# var_weights: should broadcast with the MSE computation
# The computation does: var_weights * lat_weights[None, None, None, :, None] * (predictions - targets[:, None]) ** 2
# predictions - targets[:, None] has shape (batch, ensemble, lon, lat, channels)
# lat_weights[None, None, None, :, None] has shape (1, 1, 1, lat, 1)
# So var_weights needs to broadcast with (batch, ensemble, lon, lat, channels)
var_weights = torch.randn(batch_size, ensemble_size, lon_size, lat_size, channels)

# lat_weights: (lat,)
lat_weights = torch.randn(lat_size)

ARGS = {
    "predictions": predictions,
    "targets": targets,
    "var_weights": var_weights,
    "lat_weights": lat_weights,
}
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
get_neighbors Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
maxxxzdn/mosaic/utils.py
code served (permissive licence) · get_code("94c83c976790c117")
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 2, dtype family int, shape (3, 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 numpy as np
from sklearn.neighbors import BallTree

# Create sample position data
# pos_from: positions to build the tree from (lat, lon format)
# pos_to: positions to query from (lat, lon format)
# Using degrees (which get converted to radians by reversing to lon, lat)

np.random.seed(0)

# Create pos_from with shape (4, 2) - 4 locations with (lat, lon)
pos_from = np.array([
    [40.7128, -74.0060],  # New York
    [34.0522, -118.2437], # Los Angeles
    [41.8781, -87.6298],  # Chicago
    [29.7604, -95.3698]   # Houston
], dtype=np.float64)

# Create pos_to with shape (3, 2) - 3 query locations with (lat, lon)
pos_to = np.array([
    [39.7392, -104.9903], # Denver
    [33.7490, -84.3880],  # Atlanta
    [47.6062, -122.3321]  # Seattle
], dtype=np.float64)

k = 2

ARGS = {
    "pos_from": pos_from,
    "pos_to": pos_to,
    "k": k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (3, 2) — shape (3, 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
rad_to_xyz Ran
ran; our contract draft was wrong, not the code
maxxxzdn/mosaic/utils.py
code served (permissive licence) · get_code("a75361bff3f0b743")
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 3, dtype family float, shape (2, 4, 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

torch.manual_seed(0)

# The function takes lonlat tensor with shape [..., 2]
# where the last dimension contains [lon, lat] in radians
# It performs element-wise operations and stacks results along last axis
# So we need a tensor with last dimension = 2

lonlat = torch.randn(2, 4, 2)  # shape: (batch=2, seq=4, lon_lat=2)

ARGS = {
    "lonlat": lonlat
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
block_attention Not yet run
unverified (harvested, no recorded run)
maxxxzdn/mosaic/primitives.py
code served (permissive licence) · get_code("b44187738fdda137")
How it ran

no invocation recorded.

mosaic_block_mask Not yet run
unverified (harvested, no recorded run)
maxxxzdn/mosaic/ops.py
code served (permissive licence) · get_code("54839d257d003f89")
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-23.

Repositories linked to this paper

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

Abstract

We introduce MOSAIC, a probabilistic weather forecasting model that addresses three failure modes of spectral degradation in ML-based weather prediction: spectral damping (statistical), high-frequency aliasing (architectural), and residual high-frequency leakage (parametric). MOSAIC generates ensemble members through learned functional perturbations and operates on native-resolution grids via mesh-aligned blocksparse attention, a hardware-aligned mechanism that captures long-range dependencies at linear cost by sharing keys and values across spatially adjacent queries. At 1.5°resolution with 214M parameters, MOSAIC matches or outperforms models trained on 6× finer resolution on key variables and achieves stateof-the-art results among 1.5°models, producing well-calibrated ensembles whose individual members exhibit near-perfect spectral alignment across all resolved frequencies. A 24member, 10-day forecast takes under 12 s on a single H100 GPU. Code is available at github.com/maxxxzdn/mosaic.

For agents

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

get_harvested_code_for_paper("2604.16429")
get_code_for_paper("2604.16429")
have("2604.16429")

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

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

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

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

Connect an agent — have() is free.