SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.21681 · 2026

LLM4Fluid: Large Language Models as Generalizable Neural Solvers for Fluid Dynamics

Shuai Li, Jie Liu, Zhichao Wang, Rui Xia, Yunfei Liu, Xinhai Chen, Qinglin Wang, Xiaowei Guo, Weifeng Chen, Hang Zou, Qisong Xiao, Binglin Wang, and 1 more

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 2 failures of our instrument; 1 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/2601.21681.json · badge: /api/ran/2601.21681.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
BaratiLab/FactFormer community
Papers with Code archive
9 ran · 1 no recorded run
FunctionStatusWhere it lives
GaussianFourierFeatureTransform Ran
ran on a synthesized input · constructed an object; no result was computed
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("f152d8d9992d0dbe")
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 an instance of its own class, GaussianFourierFeatureTransform: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

ARGS = {
    "num_input_channels": 3,
    "mapping_size": 16,
    "scale": 10,
    "learnable": False,
    "num_heads": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GaussianFourierFeatureTransform — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GaussianFourierFeatureTransform 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
GeAct Ran
ran on a synthesized input · constructed an object; no result was computed
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("3780d6b50daca0b3")
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 an instance of its own class, GeAct: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

# GeAct expects act_fn to be a callable that applies an activation function
# Looking at the forward method, it splits the input tensor in half along the last dimension,
# applies act_fn to the first half, and multiplies by the second half.
# So act_fn just needs to be callable and take a tensor.

act_fn = nn.ReLU()

ARGS = {
    "act_fn": act_fn
}
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 GeAct — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GeAct 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
GroupNorm Ran
ran on a synthesized input · constructed an object; no result was computed
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("6c5857b7cb22eb93")
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 an instance of its own class, GroupNorm: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

# Construct arguments for GroupNorm.__init__
# Parameters: num_groups, num_channels, domain_wise, eps, affine

ARGS = {
    'num_groups': 2,
    'num_channels': 4,
    'domain_wise': False,
    'eps': 1e-8,
    'affine': True
}
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 GroupNorm — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GroupNorm 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
LowRankKernel Ran
ran on a synthesized input · constructed an object; no result was computed
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("2986d3faa315d965")
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 an instance of its own class, LowRankKernel: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Build minimal input tensors
# u_x and u_y are the main inputs to forward()
# Shape: [batch, n, dim]
batch_size = 2
n_points = 3
input_dim = 4

u_x = torch.randn(batch_size, n_points, input_dim)
u_y = torch.randn(batch_size, n_points, input_dim)

# pos_x and pos_y are coordinate tensors for positional embeddings
# They should have shape compatible with pos_dim
pos_x = torch.randn(batch_size, n_points, 1)  # pos_dim=1 by default
pos_y = torch.randn(batch_size, n_points, 1)

ARGS = {
    'dim': 4,
    'dim_head': 2,
    'heads': 2,
    'positional_embedding': 'rotary',
    'pos_dim': 1,
    'normalize': False,
    'softmax': False,
    'residual': True,
    'dropout': 0.0,
    'scaling': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LowRankKernel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LowRankKernel 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
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("e5636fd204187221")
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 an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

class GeAct(nn.Module):
    """Gated activation function"""

    def __init__(self, act_fn):
        super().__init__()
        self.fn = act_fn

    def forward(self, x):
        c = x.shape[-1]
        return self.fn(x[..., :int(c // 2)]) * x[..., int(c // 2):]

# Define activation function
act_fn = GeAct(nn.GELU())

# Define dimension list for MLP
# Input dim: 8, hidden dim: 6, output dim: 4
dims = [8, 6, 4]

# Define dropout rate
dropout = 0.1

ARGS = {
    "dims": dims,
    "act_fn": act_fn,
    "dropout": dropout
}
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 MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP 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
PoolingReducer Ran
ran on a synthesized input · constructed an object; no result was computed
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("4b2524756da04433")
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 an instance of its own class, PoolingReducer: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_dim": 4,
    "hidden_dim": 3,
    "out_dim": 5,
}
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 PoolingReducer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PoolingReducer 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
RotaryEmbedding Ran
ran on a synthesized input
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("5e01bb00ee32827d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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
import torch.nn as nn

class RotaryEmbedding(nn.Module):

    def __init__(self, dim, min_freq=1 / 64, scale=1.0):
        super().__init__()
        inv_freq = 1.0 / 10000 ** (torch.arange(0, dim, 2).float() / dim)
        self.min_freq = min_freq
        self.scale = scale
        self.register_buffer('inv_freq', inv_freq)

    def forward(self, coordinates, device):
        t = coordinates.to(device).type_as(self.inv_freq)
        t = t * (self.scale / self.min_freq)
        freqs = torch.einsum('... i , j -> ... i j', t, self.inv_freq)
        return torch.cat((freqs, freqs), dim=-1)


INIT_ARGS = {
    'dim': 4,
    'min_freq': 1 / 64,
    'scale': 1.0,
}

ARGS = {
    'coordinates': torch.randn(2, 3),
    'device': torch.device('cpu'),
}

if __name__ == '__main__':
    model = RotaryEmbedding(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
apply_2d_rotary_pos_emb Ran
ran; our contract draft was wrong, not the code
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("315e9b795ca77e1b")
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, 3, 4) 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

torch.manual_seed(0)

# Create small tensors for testing
# t: shape (batch, seq_len, d) where d must be even for splitting
t = torch.randn(2, 3, 4)  # batch=2, seq_len=3, d=4

# freqs_x and freqs_y: should have shape compatible with half the last dimension
# They need to broadcast with t_x and t_y which have shape (2, 3, 2)
freqs_x = torch.randn(2, 3, 2)
freqs_y = torch.randn(2, 3, 2)

ARGS = {
    "t": t,
    "freqs_x": freqs_x,
    "freqs_y": freqs_y,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) 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
apply_rotary_pos_emb Ran
ran; our contract draft was wrong, not the code
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("c3acddf93e491a49")
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, 3, 4) 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, repeat

torch.manual_seed(0)

# The function apply_rotary_pos_emb takes two parameters:
# - t: a tensor that gets multiplied element-wise with freqs.cos() and rotate_half(t) * freqs.sin()
# - freqs: a tensor that needs .cos() and .sin() methods (so it's a torch.Tensor)

# Looking at rotate_half(x):
# - It rearranges x as '... (j d) -> ... j d' with j=2
# - This means the last dimension must be even (it's split into 2 * d)
# - Then it unbinds along dim=-2 to get x1, x2
# - Finally concatenates them back

# For apply_rotary_pos_emb:
# - t and freqs should have compatible shapes for broadcasting
# - The last dimension of t should be even (for rotate_half to work)
# - freqs needs to support .cos() and .sin()

# Create t: shape (batch=2, seq=3, dim=4)
# The last dimension is 4 (even), which is required for rotate_half
t = torch.randn(2, 3, 4)

# Create freqs: shape (batch=2, seq=3, dim=4)
# Same shape as t for proper broadcasting
freqs = torch.randn(2, 3, 4)

ARGS = {
    "t": t,
    "freqs": freqs,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) 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
FABlock2D Not yet run
unverified (harvested, no recorded run)
BaratiLab/FactFormer/libs/factorization_module.py
code served (permissive licence) · get_code("c809fe6a031ace71")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 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.

FunctionAlso present inEarliest-datedOthers named
apply_2d_rotary_pos_emb
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2310.12487 (2023-10)
Improved Operator Learning by Orthogonal Attention
2509.24332 (2025-09)
Towards Generalizable PDE Dynamics Forecasting via Physics-Guided Invariant Learning
apply_rotary_pos_emb
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2310.12487 (2023-10)
Improved Operator Learning by Orthogonal Attention
2509.24332 (2025-09)
Towards Generalizable PDE Dynamics Forecasting via Physics-Guided Invariant Learning
RotaryEmbedding
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2509.24332 (2025-09)
Towards Generalizable PDE Dynamics Forecasting via Physics-Guided Invariant Learning

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

Deep learning has emerged as a promising paradigm for spatio-temporal modeling of fluid dynamics. However, existing approaches often suffer from limited generalization to unseen flow conditions and typically require retraining when applied to new scenarios. In this paper, we present LLM4Fluid, a spatio-temporal prediction framework that leverages Large Language Models (LLMs) as generalizable neural solvers for fluid dynamics. The framework first compresses high-dimensional flow fields into a compact latent space via reduced-order modeling enhanced with a physics-informed disentanglement mechanism, effectively mitigating spatial feature entanglement while preserving essential flow structures. A pretrained LLM then serves as a temporal processor, autoregressively predicting the dynamics of physical sequences with time series prompts. To bridge the modality gap between prompts and physical sequences, which can otherwise degrade prediction accuracy, we propose a dedicated modality alignment strategy that resolves representational mismatch and stabilizes long-term prediction. Extensive experiments across diverse flow scenarios demonstrate that LLM4Fluid functions as a robust and generalizable neural solver without retraining, achieving state-of-the-art accuracy while exhibiting powerful zero-shot and in-context learning capabilities. Code and datasets are publicly available at https://github.com/qisongxiao/LLM4Fluid.

For agents

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

get_harvested_code_for_paper("2601.21681")
get_code_for_paper("2601.21681")
have("2601.21681")

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

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

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

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

Connect an agent — have() is free.