SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.19636 · ICML · 2026

RiboSphere: Learning Unified and Efficient Representations of RNA Structures

Tianfan Fu, Cheng Tan, Fang Wu, Hanqun Cao, Ann Pheng, Heng, Zhou Zhang

arXiv · PDF · Open in the Atlas

Code that ran

8 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, 1 violated it and 0 have no contract verdict; 6 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/2603.19636.json · badge: /api/ran/2603.19636.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
Zhangz312/RiboSphere canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_adaptive_modulation Ran
ran; our contract draft was wrong, not the code
Zhangz312/RiboSphere/src/models/dit.py
code served (permissive licence) · get_code("ce0fbb319dbc318c")
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
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2
feature_dim = 4
seq_len = 3

# inputs: shape (batch, seq_len, feature_dim)
inputs = torch.randn(batch_size, seq_len, feature_dim)

# shift: shape (batch, feature_dim)
shift = torch.randn(batch_size, feature_dim)

# scale: shape (batch, feature_dim)
scale = torch.randn(batch_size, feature_dim)

ARGS = {
    "inputs": inputs,
    "shift": shift,
    "scale": scale
}
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, 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_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Zhangz312/RiboSphere/src/models/rotary.py
code served (permissive licence) · get_code("05d5a00632364e65")
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 torch import Tensor

torch.manual_seed(0)

# Create test tensors
# inputs: shape (batch=2, sequence=3, features=4)
# cosine: shape (batch=2, max_sequence=3, features=4)
# sine: shape (batch=2, max_sequence=3, features=4)

batch_size = 2
sequence_length = 3
feature_dim = 4

inputs = torch.randn(batch_size, sequence_length, feature_dim)
cosine = torch.randn(batch_size, sequence_length, feature_dim)
sine = torch.randn(batch_size, sequence_length, feature_dim)

ARGS = {
    "inputs": inputs,
    "cosine": cosine,
    "sine": sine,
}
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, 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
broadcast_time_like Ran
ran, violated the contract we drafted
Zhangz312/RiboSphere/src/models/cfm.py
code served (permissive licence) · get_code("2b2cf064a8af3586")
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, 1, 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)

# Test case 1: time is a float, reference is a 3D tensor
reference_3d = torch.randn(2, 4, 5)
time_float = 0.5

# Test case 2: time is a scalar tensor, reference is a 3D tensor
time_scalar = torch.tensor(1.0)

# Test case 3: time is a 1D tensor with one value, reference is a 3D tensor
time_1d_single = torch.tensor([2.0])

# Test case 4: time is a 1D tensor with batch size matching reference
time_1d_batch = torch.tensor([1.0, 2.0])

# Using the simplest valid case for ARGS
ARGS = {
    "time": torch.tensor([1.0, 2.0]),
    "reference": torch.randn(2, 4, 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 Tensor, ndim 3, dtype family float, shape (2, 1, 1) — shape (2, 1, 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
kabsch_rmsd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Zhangz312/RiboSphere/src/datasets/pdb_dataset.py
code served (permissive licence) · get_code("96e53980a523d618")
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

torch.manual_seed(0)

# Create two sets of 3D coordinates with the same shape
# Using shape (4, 3) to represent 4 atoms with xyz coordinates
predicted = torch.randn(4, 3, dtype=torch.float64)
target = torch.randn(4, 3, dtype=torch.float64)

ARGS = {
    "predicted": predicted,
    "target": target,
}
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
prepare_rna_coordinates Ran
ran, honoured the contract we drafted
Zhangz312/RiboSphere/src/datasets/pdb_dataset.py
code served (permissive licence) · get_code("ca3807dd47662b65")
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 float, shape (1, 2, 11, 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 numpy as np
import torch
from typing import Any

# Create a minimal AtomArray-like class that satisfies the function's needs
class MinimalAtomArray:
    def __init__(self):
        # Create a small RNA structure with 2 complete residues
        # Each residue needs 11 atoms (10 backbone + 1 base anchor)
        
        # Residue 1: Adenine (A) - needs N9 as base anchor
        # Residue 2: Guanine (G) - needs N9 as base anchor
        
        backbone_atoms = ("P", "C5'", "C4'", "C3'", "C2'", "C1'", "O5'", "O4'", "O3'", "O2'")
        
        # Build atom data for 2 residues, each with 11 atoms
        atom_names = []
        coords = []
        chain_ids = []
        res_ids = []
        ins_codes = []
        hetero_flags = []
        
        for res_idx, (res_name, base_anchor) in enumerate([('A', 'N9'), ('G', 'N9')]):
            chain_id = 'A'
            res_id = res_idx + 1
            ins_code = ' '
            
            # Add 10 backbone atoms
            for atom_idx, atom_name in enumerate(backbone_atoms):
                atom_names.append(atom_name)
                coords.append([float(atom_idx), float(res_idx), 0.0])
                chain_ids.append(chain_id)
                res_ids.append(res_id)
                ins_codes.append(ins_code)
                hetero_flags.append(False)
            
            # Add base anchor atom
            atom_names.append(base_anchor)
            coords.append([float(len(backbone_atoms)), float(res_idx), 0.0])
            chain_ids.append(chain_id)
            res_ids.append(res_id)
            ins_codes.append(ins_code)
            hetero_flags.append(False)
        
        self.atom_name = np.array(atom_names, dtype=object)
        self.coord = np.array(coords, dtype=np.float32)
        self.chain_id = np.array(chain_ids, dtype=object)
        self.res_id = np.array(res_ids, dtype=np.int32)
        self.ins_code = np.array(ins_codes, dtype=object)
        self.hetero = np.array(hetero_flags, dtype=bool)
        self.res_name = np.repeat(['A', 'G'], len(backbone_atoms) + 1)
    
    def __len__(self):
        return len(self.coord)
    
    def __getitem__(self, key):
        new_array = MinimalAtomArray.__new__(MinimalAtomArray)
        new_array.atom_name = self.atom_name[key]
        new_array.coord = self.coord[key]
        new_array.chain_id = self.chain_id[key]
        new_array.res_id = self.res_id[key]
        new_array.ins_code = self.ins_code[key]
        new_array.hetero = self.hetero[key]
        new_array.res_name = self.res_name[key]
        return new_array

torch.manual_seed(0)

atom_array = MinimalAtomArray()

ARGS = {
    'atom_array': atom_array,
    'atoms': 'a11',
    'max_residues': 512,
}
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 4, dtype family float, shape (1, 2, 11, 3) — shape (1, 2, 11, 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
root_mean_square_norm Ran
ran; our contract draft was wrong, not the code
Zhangz312/RiboSphere/src/models/attention.py
code served (permissive licence) · get_code("dd11772fb650ff3d")
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 (2, 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 torch import Tensor, nn
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small tensor with batch size 2 and final dimension 4
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor,
}
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 (2, 4) — shape (2, 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
rotate_half_dimension Ran
ran; our contract draft was wrong, not the code
Zhangz312/RiboSphere/src/models/rotary.py
code served (permissive licence) · get_code("17b7bc1313d50cf0")
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 (2, 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 torch import Tensor

torch.manual_seed(0)

# Create a small tensor with batch size 2 and even final dimension (4)
# Shape: (2, 4) - batch of 2, feature dimension of 4
inputs = torch.randn(2, 4)

ARGS = {
    "inputs": inputs
}
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 (2, 4) — shape (2, 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
straight_through_round Ran
ran; our contract draft was wrong, not the code
Zhangz312/RiboSphere/src/models/fsq.py
code served (permissive licence) · get_code("cca44f4a4b05ca3b")
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; 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
from torch import Tensor

torch.manual_seed(0)

# Create a small tensor with floating point values that benefit from rounding
inputs = torch.randn(2, 4, dtype=torch.float32)

ARGS = {
    "inputs": inputs
}
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 — no output shape is stated: observe_signature.py could not observe it (no_result)
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

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-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

Accurate RNA structure modeling remains difficult because RNA backbones are highly flexible, non-canonical interactions are prevalent, and experimentally determined 3D structures are comparatively scarce. We introduce RiboSphere, a framework that learns discrete geometric representations of RNA by combining vector quantization with flow matching. Our design is motivated by the modular organization of RNA architecture: complex folds are composed from recurring structural motifs. RiboSphere uses a geometric transformer encoder trained using mean-centered coordinates and random rotation augmentation to produce geometry-aware features, which are discretized with finite scalar quantization (FSQ) into a finite vocabulary of latent codes. Conditioned on these discrete codes, a flow-matching decoder reconstructs atomic coordinates, enabling high-fidelity structure generation. We find that the learned code indices are enriched for specific RNA motifs, suggesting that the model captures motif-level compositional structure rather than acting as a purely compressive bottleneck. Across benchmarks, RiboSphere achieves strong performance in structure reconstruction (RMSD 1.25 Å, TM-score 0.84), and its pretrained discrete representations transfer effectively to inverse folding and RNA-ligand binding prediction, with robust generalization in data-scarce regimes. Code is available here: https:// github.com/Zhangz312/RiboSphere

For agents

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

get_harvested_code_for_paper("2603.19636")
get_code_for_paper("2603.19636")
have("2603.19636")

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

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

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

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

Connect an agent — have() is free.