Skip to content

xiRT

PEPTIDE SEQUENCES, CHROMATOGRAPHIC BEHAVIOR

Retention-time prediction
for peptide sequences.

Train PyTorch models for linear and crosslinked peptides. Predict continuous retention times or fractions, adapt a saved model, and keep the preprocessing and split information with every result.

Get started Try a notebook

Python 3.12-3.14   /   CPU or CUDA   /   Apache-2.0

Two peptide inputs pass through a shared recurrent encoder and task-specific prediction heads.

From input table to reusable model

  • Train with your data


    Choose continuous RT, categorical fractions or ordinal targets. Make input columns, modification encoding and scientific partitions explicit.

    Configure a model

  • Adapt a checkpoint


    Update the full recurrent model, train frozen-encoder heads, or add GRU LoKr or LoRA adapters. Reuse the base vocabulary and target transformations.

    Explore fine-tuning

  • Keep results traceable


    Retain the model, encoder, effective configuration and split IDs together. Distinguish held-out predictions from training and validation rows.

    Understand the outputs

Start with a working example

Install the xirt-torch distribution; import and run xirt. Use Python 3.12-3.14 in an isolated environment.

pip install xirt-torch
xirt --version
xirt -p xirt_params.yaml -s learning_params.yaml

Edit the generated configurations for your table's columns and targets. The installation guide covers environments, optional dependencies and the full training command.

git clone https://github.com/gieses/xiRT.git
cd xiRT
uv sync --locked --extra cpu
uv run --no-sync xirt --version

The cpu extra selects CPU-only PyTorch wheels. Use the mutually exclusive cuda extra on a compatible NVIDIA host.

# From a source checkout:
uv sync --locked --extra cpu
uv run --no-sync marimo edit examples/train_predict.py
# Or run both notebooks without a server:
make examples

The CPU notebooks include 2,048 observed peptide pairs, checkpoint-based prediction, all four fine-tuning strategies and saved PNGs. Training uses validation-based early stopping.

Compare the measured results

The framework comparison uses five modification-aware RP cohorts, shared partitions and three initialization seeds. PyTorch has lower mean RMSE on two cohorts; TensorFlow remains more accurate on three.

Full fine-tuning has the lowest mean RMSE on all five cohorts in the separate, fixed four-strategy comparison. The cohorts are correlated views of two studies, not independent external-transfer tests.

TF versus PyTorch Fine-tuning results

Held-out E. coli crosslink predictions from the archived TensorFlow and PyTorch comparison.

Archived predictions, shared held-out pairs. See the protocol before comparing errors.

Find your next step

Task Read
Run your first model Installation and CLI
Follow a complete, runnable example Training and fine-tuning notebooks
Work directly in Python API reference
Reuse a 1.x workflow Migration guide
Evaluate optional protein-language-model features ESM-C and adapters
Contribute or publish a release Development guide

A new backend, not an HDF5 converter

xiRT 2.0 uses native PyTorch checkpoints. TensorFlow/Keras .h5 and .hdf5 models cannot be loaded; keep legacy predictions for comparison and retrain for 2.0. Optional ESM-C features are experimental here and do not preserve the recurrent model's modification-aware input representation.

xiRT models peptide separation behavior; its predictions can be used in downstream rescoring, but do not themselves establish identification confidence. See the citation and scientific references for the original crosslinking mass-spectrometry study.