SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.10541 · 2026

FASTLSQ: SOLVING PDES IN ONE SHOT VIA FOURIER FEATURES WITH EXACT ANALYTICAL DERIVATIVES

Antonin Sulc

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 2 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-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/2602.10541.json · badge: /api/ran/2602.10541.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
sulcantonin/FastLSQ canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
block_concat Ran
ran, honoured the contract we drafted
sulcantonin/FastLSQ/fastlsq/block.py
code served (permissive licence) · get_code("d5f9b302d5f2d6cb")
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 2, dtype family float, shape (7, 7) 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 valid 2-D nested list of tensors for block_concat
# The function expects blocks to be rectangular (same number of columns per row)
# and will infer sizes of None blocks from non-None siblings

# Simple 2x2 block matrix:
# [A  B ]
# [C  D ]
# where A is 2x3, B is 2x4, C is 5x3, D is 5x4

A = torch.randn(2, 3)
B = torch.randn(2, 4)
C = torch.randn(5, 3)
D = torch.randn(5, 4)

blocks = [
    [A, B],
    [C, D]
]

ARGS = {
    "blocks": blocks
}
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 2, dtype family float, shape (7, 7) — shape (7, 7) 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
check_problem Ran
ran; our contract draft was wrong, not the code
sulcantonin/FastLSQ/fastlsq/diagnostics.py
code served (permissive licence) · get_code("8e37ed57359213e7")
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 torch
import numpy as np

torch.manual_seed(0)

class SimpleProblem:
    """Minimal problem class satisfying check_problem's requirements."""
    
    def __init__(self, dim=4):
        self.dim = dim
    
    def get_test_points(self, n_test):
        """Return n_test points in dim-dimensional space."""
        return torch.randn(n_test, self.dim)
    
    def exact(self, x):
        """Return exact solution: sum of x along dimension 1."""
        return torch.sum(x, dim=1, keepdim=True)
    
    def exact_grad(self, x):
        """Return gradient: all ones (derivative of sum is 1 for each dimension)."""
        return torch.ones(x.shape[0], self.dim)
    
    def get_train_data(self, n_pde=100, n_bc=20):
        """Return training data: PDE points, boundary conditions, and optional RHS."""
        x_pde = torch.randn(n_pde, self.dim)
        
        # Create simple boundary conditions as a list of tuples
        # Each BC: (points on boundary, values)
        x_bc = torch.randn(n_bc, self.dim)
        u_bc = self.exact(x_bc)
        bcs = [(x_bc, u_bc)]
        
        # Right-hand side for PDE (optional, return 3 items)
        f_pde = torch.zeros(n_pde, 1)
        
        return x_pde, bcs, f_pde


problem = SimpleProblem(dim=4)

ARGS = {
    'problem': problem,
    'n_test': 100,
    'verbose': True,
}
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 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
pack_beta Ran
ran; our contract draft was wrong, not the code
sulcantonin/FastLSQ/fastlsq/block.py
code served (permissive licence) · get_code("ca94e19d769d12a7")
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 2, dtype family float, shape (8, 1) 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)

# beta should be a 2D tensor of shape (N, k)
# The function flattens it to (N*k, 1) in component-major order
# Let's use distinct dimensions: N=2, k=4
beta = torch.randn(2, 4)

ARGS = {
    "beta": beta
}
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 2, dtype family float, shape (8, 1) — shape (8, 1) 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
suggest_scale Ran
ran, honoured the contract we drafted
sulcantonin/FastLSQ/fastlsq/diagnostics.py
code served (permissive licence) · get_code("f852a37e19f9ed36")
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 float, 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)

class Problem:
    def __init__(self, dim):
        self.dim = dim

# Test with a problem of dimension 3
problem = Problem(dim=3)

ARGS = {
    'problem': problem,
    'n_trials': 3,
    'verbose': True,
}
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 float, 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
unpack_beta Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sulcantonin/FastLSQ/fastlsq/block.py
code served (permissive licence) · get_code("ef7b6ec363a624a0")
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 2, dtype family float, shape (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
import numpy as np

torch.manual_seed(0)

# Construct test arguments for unpack_beta
# The function reshapes a flat coefficient vector back to (N, k) format
# n_features: N (number of features)
# n_outputs: k (number of outputs)

# Case 1: n_outputs == 1, should return shape (n_features, 1)
n_features_1 = 4
n_outputs_1 = 1
beta_flat_1 = torch.randn(n_features_1 * n_outputs_1, 1)

# Case 2: n_outputs > 1, should return shape (n_features, n_outputs)
n_features_2 = 4
n_outputs_2 = 3
beta_flat_2 = torch.randn(n_outputs_2 * n_features_2, 1)

# Use the second case for ARGS as it exercises both branches
ARGS = {
    "beta_flat": beta_flat_2,
    "n_features": n_features_2,
    "n_outputs": n_outputs_2
}
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 Tensor, ndim 2, dtype family float, shape (4, 3) — shape (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
resolve_device Not yet run
unverified (harvested, no recorded run)
sulcantonin/FastLSQ/fastlsq/device.py
code served (permissive licence) · get_code("de40615f353e4aaf")
How it ran

no invocation recorded.

set_device Not yet run
unverified (harvested, no recorded run)
sulcantonin/FastLSQ/fastlsq/device.py
code served (permissive licence) · get_code("2dfdb1e1b1adde16")
How it ran

no invocation recorded.

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

We present FastLSQ, a framework for PDE solving and inverse problems built on trigonometric random Fourier features with exact analytical derivatives. Trigonometric features admit closed-form derivatives of any order in O(1), enabling graph-free operator assembly without autodiff. Linear PDEs: one least-squares call; nonlinear: Newton-Raphson reusing analytical assembly. On 17 PDEs (1-6D), FastLSQ achieves 10 -7 in 0.07 s (linear) and 10 -8 -10 -9 in <9 s (nonlinear), orders of magnitude faster and more accurate than iterative PINNs. Analytical higher-order derivatives yield a differentiable digital twin; we demonstrate inverse problems (heat-source, coil recovery) and PDE discovery. Code: github.com/sulcantonin/FastLSQ and pip install fastlsq.

For agents

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

get_harvested_code_for_paper("2602.10541")
get_code_for_paper("2602.10541")
have("2602.10541")

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

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

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

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

Connect an agent — have() is free.