RNA 3D Folding Pipeline
I explored a sequence-to-structure pipeline that combines nucleotide identity, evolutionary context, and geometric features. A dual-tower Transformer brings those representations together to predict a set of three-dimensional coordinates.
The problem
An RNA sequence lists nucleotides in order. Its spatial structure depends on relationships that can span distant positions in that sequence. A model has to represent those long-range interactions while producing a geometrically coherent output for a molecule of variable length.
This project investigates that connection through complementary biological and geometric representations. Sequence identity, alignment statistics, and heuristic pairing features supply different views of the same molecule.
My contribution
I built the preprocessing and modeling pipeline, including FASTA/MSA handling, geometric augmentation, dual encoders, and coordinate prediction. My focus was organizing the inputs so sequence relationships and structural features could interact within one experimental model.
Architecture
The project record describes a biology tower for sequence and MSA features and a geometry tower for structural features. Triangular attention represents pairwise relationships in the biological path. Cross-attention allows the two paths to exchange information before coordinate prediction.
The figures reconstruct this documented design. Their fixed 16-nucleotide example keeps sequence positions, feature rows, and coordinate rows aligned throughout the explanation.
Sequence features
One-hot encoding assigns each nucleotide a four-element vector in A, C, G, U order. A sequence of length L becomes an L-by-4 array. Pairing features add a second view: a matrix whose entries encode potential relationships between sequence positions.
The documented heuristic assigns scores to Watson–Crick and wobble pairs and applies a sequence-distance weight. These scores are constructed input features. The illustrative matrix uses a minimum separation of four positions and symmetric entries to make the indexing easy to follow.
Multiple sequence alignments contribute conservation and covariance information. Column entropy summarizes variation at a position; mutual information describes joint variation between positions. In the fixed alignment example, two A and two U observations produce one bit of entropy at column five.
Geometry and fusion
The project description includes rotation augmentation of target coordinates. A rotation changes the coordinate frame while preserving pairwise distances. This gives the training pipeline multiple orientations of the same geometric arrangement.
Cross-attention connects the two towers so that structural refinement can use sequence context. The final representation associates a three-dimensional coordinate row with each sequence position.
The opening animation interpolates between two authored arrangements of the same nucleotide chain. Its curves and the coordinates in Figure 3 are schematic fixtures. The animation illustrates a change of representation; model inference is outside the page’s execution path.
Evaluation
The available project material documents the experimental preprocessing and model architecture. The linked notebook’s contents were unavailable during preparation of this page, so the case study uses that record and reproducible illustrations.
The local checks verify one-hot encoding, sequence-to-coordinate row counts, pairing indices, alignment entropy, and distance preservation under rotation. Assessing structure-prediction quality requires the notebook’s saved predictions, target coordinates, and evaluation split.
Notebook
The original notebook contains the project’s experimental implementation.
Open the RNA notebook ↗