SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.02780 · ICML · 2026

Scaling-Aware Adapter for Structure-Grounded LLM Reasoning

Yan Li, Boyu Wang, Yan Sun, Qiuhao Zeng, Ruiyi Fang, Pingzhao Hu, Zihao Jing

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 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/2602.02780.json · badge: /api/ran/2602.02780.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
zihao-jing/Cuttlefish canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
load_encoder_weights_from_checkpoint Ran
ran; our contract draft was wrong, not the code
zihao-jing/Cuttlefish/utils/model_utils.py
code served (permissive licence) · get_code("05dfbece9b7485c4")
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 AAEncoder. 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 os
import tempfile
import torch
import torch.nn as nn
from safetensors.torch import save_file

torch.manual_seed(0)

# Create a minimal encoder module
class AAEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.conv = nn.Conv1d(4, 8, kernel_size=3, padding=1)
    
    def forward(self, x):
        return self.linear(x)

# Create a temporary checkpoint directory with model weights
temp_dir = tempfile.mkdtemp()

# Create a state dict with encoder weights
encoder_state_dict = {
    'encoder.linear.weight': torch.randn(3, 4),
    'encoder.linear.bias': torch.randn(3),
    'encoder.conv.weight': torch.randn(8, 4, 3),
    'encoder.conv.bias': torch.randn(8),
}

# Save as safetensors file
safetensors_path = os.path.join(temp_dir, 'model.safetensors')
save_file(encoder_state_dict, safetensors_path)

# Create encoder instance
encoder = AAEncoder()

ARGS = {
    'encoder': encoder,
    'checkpoint_path': temp_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
safetensors, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AAEncoder — a AAEncoder output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AAEncoder 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
merge_molecule_graphs Ran
ran; our contract draft was wrong, not the code
zihao-jing/Cuttlefish/src/data_loader/graph_batch_utils.py
code served (permissive licence) · get_code("777a8182ca915a49")
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

torch.manual_seed(0)

# Create sample molecule graphs
graph1 = {
    'node_feat': torch.randn(3, 4),  # 3 nodes, 4 features
    'pos': torch.randn(3, 3),  # 3 nodes, 3D positions
    'edge_index': torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long),  # 3 edges
    'edge_feat_dist': torch.randn(3, 2),  # 3 edges, 2 distance features
    'chem_edge_index': torch.tensor([[0, 1], [1, 2]], dtype=torch.long),  # 2 chemical edges
    'chem_edge_feat_cat': torch.randn(2, 5),  # 2 chemical edges, 5 features
}

graph2 = {
    'node_feat': torch.randn(2, 4),  # 2 nodes, 4 features
    'pos': torch.randn(2, 3),  # 2 nodes, 3D positions
    'edge_index': torch.tensor([[0, 1], [1, 0]], dtype=torch.long),  # 2 edges
    'edge_feat_dist': torch.randn(2, 2),  # 2 edges, 2 distance features
    'chem_edge_index': torch.tensor([[0], [1]], dtype=torch.long),  # 1 chemical edge
    'chem_edge_feat_cat': torch.randn(1, 5),  # 1 chemical edge, 5 features
}

ARGS = {
    'graphs': [graph1, graph2],
}
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 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
merge_nucleic_acid_graphs Ran
ran; our contract draft was wrong, not the code
zihao-jing/Cuttlefish/src/data_loader/graph_batch_utils.py
code served (permissive licence) · get_code("b583f96753c4c721")
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

torch.manual_seed(0)

# Create sample nucleic acid graph dictionaries
# Each graph has node features, positions, edge indices, edge attributes, and edge distance features

graph1 = {
    'node_feat': torch.randn(3, 4),  # 3 nodes, 4-dim features
    'pos': torch.randn(3, 3),  # 3 nodes, 3D coordinates
    'edge_index': torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long),  # edges
    'edge_attr': torch.randn(3, 2),  # 3 edges, 2-dim attributes
    'edge_feat_dist': torch.randn(3, 1),  # 3 edges, 1-dim distance features
}

graph2 = {
    'node_feat': torch.randn(2, 4),  # 2 nodes, 4-dim features
    'pos': torch.randn(2, 3),  # 2 nodes, 3D coordinates
    'edge_index': torch.tensor([[0, 1], [1, 0]], dtype=torch.long),  # edges
    'edge_attr': torch.randn(2, 2),  # 2 edges, 2-dim attributes
    'edge_feat_dist': torch.randn(2, 1),  # 2 edges, 1-dim distance features
}

graph3 = {
    'node_feat': torch.randn(4, 4),  # 4 nodes, 4-dim features
    'pos': torch.randn(4, 3),  # 4 nodes, 3D coordinates
    'edge_index': torch.tensor([], dtype=torch.long).reshape(2, 0),  # no edges
}

ARGS = {
    'graphs': [graph1, graph2, graph3]
}
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 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
merge_protein_graphs Ran
ran; our contract draft was wrong, not the code
zihao-jing/Cuttlefish/src/data_loader/graph_batch_utils.py
code served (permissive licence) · get_code("61bb0f5c1ac55af4")
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

torch.manual_seed(0)

# Create sample protein graph dictionaries
graph1 = {
    'node_feat': torch.randn(3, 4),  # 3 nodes, 4 features
    'pos': torch.randn(3, 3),  # 3 nodes, 3D positions
    'edge_index': torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long),  # 3 edges
    'edge_attr': torch.randn(3, 2),  # 3 edges, 2 attributes
    'edge_feat_dist': torch.randn(3, 1),  # 3 edges, 1 distance feature
}

graph2 = {
    'node_feat': torch.randn(2, 4),  # 2 nodes, 4 features
    'pos': torch.randn(2, 3),  # 2 nodes, 3D positions
    'edge_index': torch.tensor([[0, 1], [1, 0]], dtype=torch.long),  # 2 edges
    'edge_attr': torch.randn(2, 2),  # 2 edges, 2 attributes
    'edge_feat_dist': torch.randn(2, 1),  # 2 edges, 1 distance feature
}

ARGS = {
    'graphs': [graph1, graph2],
}
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 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
soft_patch_grow Ran
ran; our contract draft was wrong, not the code
zihao-jing/Cuttlefish/src/models/gates.py
code served (permissive licence) · get_code("38f220114151f76b")
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 PatchOutput. 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
from dataclasses import dataclass
from typing import Optional

torch.manual_seed(0)

# Define the helper function and classes from the provided code
def _mlp(in_dim: int, hidden_dim: int, out_dim: int, dropout: float=0.0) -> nn.Sequential:
    return nn.Sequential(nn.Linear(in_dim, hidden_dim), nn.SiLU(), nn.Dropout(dropout), nn.Linear(hidden_dim, out_dim))

class AnchorGate(nn.Module):
    def __init__(self, node_dim: int, instr_dim: int, hidden_dim: int=256, dropout: float=0.0):
        super().__init__()
        self.net = _mlp(node_dim + instr_dim, hidden_dim, 1, dropout=dropout)

    def forward(self, instr: torch.Tensor, x: torch.Tensor, batch: torch.Tensor) -> torch.Tensor:
        u = instr[batch]
        h = torch.cat([x, u], dim=-1)
        return self.net(h).squeeze(-1)

    def freeze(self):
        for param in self.parameters():
            param.requires_grad = False

# Set up small tensors for testing
# G = 2 graphs
# N = 6 nodes total (3 per graph)
# D = 4 node embedding dimension
# Di = 5 instruction embedding dimension
# pos_dim = 3 position dimension

G = 2
N = 6
D = 4
Di = 5
pos_dim = 3

# Instruction embeddings: [G, Di]
instr = torch.randn(G, Di)

# Node embeddings: [N, D]
x = torch.randn(N, D)

# Positions: [N, pos_dim]
pos = torch.randn(N, pos_dim)

# Batch assignments: [N] - maps nodes to graphs
batch = torch.tensor([0, 0, 0, 1, 1, 1], dtype=torch.long)

# Create AnchorGate
anchor_gate = AnchorGate(node_dim=D, instr_dim=Di, hidden_dim=16, dropout=0.0)

ARGS = {
    "instr": instr,
    "x": x,
    "pos": pos,
    "batch": batch,
    "anchor_gate": anchor_gate,
    "k_max": 3,
    "r_max": 4,
    "dynamic_k_mass": 0.5,
    "beta": 2.0,
    "tau": 0.1,
    "use_anchor_bias": True,
    "return_membership": False,
}
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 PatchOutput — a PatchOutput output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PatchOutput 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

Also present in other papers' code

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

Large language models (LLMs) are enabling reasoning over 2D and 3D structures, yet existing methods remain modality-specific and typically compress structural inputs through sequencebased tokenization or fixed-length query connectors. Such architectures either omit the geometric grounding requisite for mitigating structural hallucinations, or impose inflexible modality fusion bottlenecks that concurrently overcompress and suboptimally allocate structural tokens, thereby impeding the realization of generalized all-atom reasoning. We introduce Cuttlefish, a unified multimodal LLM that grounds language reasoning in geometric cues while scaling modality tokens with structural complexity. First, Scaling-Aware Patching leverages an instruction-conditioned gating mechanism to generate variable-size patches over structural graphs, adaptively scaling the query token budget with structural complexity to mitigate fixed-length connector bottlenecks. Second, Geometry Grounding Adapter refines these adaptive tokens via cross-attention to modality embeddings and injects the resulting modality tokens into the LLM, exposing explicit geometric cues to reduce structural hallucination. Experiments across interdisciplinary all-atom benchmarks demonstrate that Cuttlefish achieves superior performance in heterogeneous structure-grounded reasoning. Code: github.com/zihao-jing/Cuttlefish.

For agents

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

get_harvested_code_for_paper("2602.02780")
get_code_for_paper("2602.02780")
have("2602.02780")

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

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

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

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

Connect an agent — have() is free.