ST-Tahoe Fine-Tuning Case Study, Part 2: Representation, Strategy, and Results
Published:
ST-Tahoe Fine-Tuning: A Case Study in Representation and Strategy
TL;DR
A series of fine-tuning experiments on the ST-Tahoe model revealed critical lessons. Initial rounds with embedding-based inputs failed due to a representation mismatch with the evaluation metric. Switching the input to raw gene expression, to match the evaluator, dramatically improved the score from <0.2 to ~5.7. Subsequently, unfreezing the model’s backbone and continuing to train pushed the score to ~8.5. Key takeaways are: align your training and evaluation data spaces, analyze composite metrics over isolated pointwise loss, and use a staged freeze-then-unfreeze schedule.
Background & Goal
This post documents a series of fine‑tuning attempts on ST‑Tahoe, the State Transition module of the Arc Institute’s “State” model. The goal was to improve the cell‑eval score—computed across the 18,080‑dim gene‑expression space—by fine-tuning the model, which was originally trained on small-molecule perturbation data.
The cell-eval Evaluation Framework
To properly interpret training progression, it is essential to understand that cell-eval is not a simple pointwise scalar loss or MSE tracker. Instead, it is a multi-faceted composite evaluation suite designed to assess whether a single-cell perturbation model captures true biological phenotypes:
- Pointwise Expression Fidelity: Quantifies residual prediction error (e.g., MSE and MAE) across differentially expressed genes (DEGs) and highly variable genes.
- Distributional Divergence: Measures whether the predicted cell cloud faithfully mirrors the heterogeneous dispersion of real cell populations using distributional distances (such as Energy Distance, Maximum Mean Discrepancy (MMD), and Wasserstein metrics).
- Manifold & Correlation Geometry: Assesses cell-state topology via Pearson and Spearman correlations across expression profiles, ensuring that gene-gene covariance structures and developmental trajectory geometries are preserved rather than flattened.
Optimizing solely for pointwise regression residuals (MSE) without preserving distributional geometry can severely degrade the composite score.
The Experimental Journey: A Summary
- Round 1 — 2025-08-26
- Configuration:
tahoe-finetune-0826_config.yaml - Inputs: The model used 2,058-dim SE600M embeddings for the cell state (
X_state) and 5,120-dim ESM2 embeddings for the perturbations (fromprotein_embeddings.pt). - Model: The
PertSetsmodel was initialized from a pre-trained ST-Tahoe checkpoint. The loss function was a weighted sum of the embedding loss and the gene decoder loss (total_loss = loss_emb + weight * decoder_loss), with thedecoder_weightset to0.5. - Backbone: The transformer backbone was kept frozen (
freeze_pert_backbone: true). - Training: The model was trained for 8,000 steps with a learning rate of
0.0003and a batch size of32. - Inference: The 4,000-step checkpoint was used for inference.
- Outcome: The composite
cell-evalscore was extremely low (0.19), with a high mean absolute error (0.1909). This confirmed that the model was not effectively mapping perturbation responses onto the full 18,080-dimensional gene expression space, primarily due to input representation misalignment and an underweighted decoder head.
- Configuration:
- Round 2 — 2025-09-01 (The Decoder Tuning Mistake)
- Configuration:
tahoe-finetune-0901_config.yaml - Inputs: Same as Round 1.
- Model: Initialized from the best checkpoint of Round 1. In an attempt to force better gene expression predictions,
decoder_weightwas increased from0.5to1.0. - Backbone: The transformer backbone remained frozen.
- Training: Trained for 4,000 steps with a learning rate of
5.0e-05and a batch size of48. - Inference: The final 4,000-step checkpoint was used for inference.
- Outcome & Diagnosis: Looking solely at pointwise residual error, the mean absolute error improved dramatically from 0.1909 down to 0.0303. However, the overall composite
cell-evalscore collapsed from 0.19 down to 0.06. Treating this as a “validation success” would be a severe case of metric self-deception: aggressively forcing the model to minimize pointwise gene MSE distorted the underlying latent representation manifold. The network learned to predict smoothed population averages that lowered pointwise error at the cost of destroying variance, correlation structures, and cell population distribution geometry.
- Configuration:
- Round 3: Switching to Raw Expression (Backbone Frozen)
- Date: 2025-09-05 & 2025-09-06
- Configurations:
tahoe-finetune-0905_config.yaml,tahoe-finetune-0906_config.yaml - Key Change: Recognizing that embedding-space inputs were fundamentally misaligned with downstream evaluation, the model input was switched from compressed embeddings to the full 18,080-dimensional raw gene expression.
- Model & Training: The experiment began with a short 1,000-step test (
0905) with the backbone kept frozen. Validation loss dropped immediately to ~11 (compared to ~15 previously). This clear directional signal justified scaling up to a longer run (0906). - Outcome: Decisive breakthrough. Aligning the input representation with the evaluation space caused the final
cell-evalscore to surge from under 0.2 to ~5.7, confirming that input-space representation mismatch was the primary bottleneck.
- Round 4: Unfreezing the Backbone
- Date: 2025-09-07 & 2025-09-08
- Configurations:
tahoe-finetune-0907_config.yaml,tahoe-finetune-0908_config.yaml - Key Change: Based on Round 3’s success, the transformer backbone was unfrozen for end-to-end fine-tuning on raw expression profiles.
- Engineering Nuance (Checkpointing & Scheduler Glitches): As an operational detail, these runs were initialized from the last checkpoint of Round 3 (
0906) rather than the min-validation checkpoint. Additionally, the initial0907run (10,000 steps) exhibited periodic loss spikes caused by learning rate scheduler state leaking from the resumed checkpoint. In the follow-up0908run, the scheduler state had to be explicitly isolated. - Training: Trained for ~50,000 total steps across
0907and0908runs with a conservative base learning rate. - Outcome: Unfreezing the backbone yielded substantial additional performance gains. Step 18,000 achieved the lowest validation loss; evaluating this checkpoint drove the composite
cell-evalscore to an all-time high of ~8.5.
Key Lessons Learned
Representation Mismatch is a Primary Failure Mode: The model’s input space must directly align with the target evaluation space. Projecting through 2,058-dimensional pre-computed cell embeddings while evaluating against 18,080-dimensional expression distributions fundamentally bottlenecked information flow, which no amount of output head tuning could overcome.
Pointwise Loss Minimization Can Destroy Manifold Topology: The Round 2 failure demonstrated that obsessing over point-to-point MSE by escalating decoder loss weights can be disastrous. While MAE dropped from 0.1909 to 0.0303, the composite
cell-evalscore cratered from 0.19 to 0.06. In single-cell foundation models, over-optimizing for point prediction flattens phenotypic diversity and warps the latent manifold, ruining correlation and distributional fidelity.Optimizer and Scheduler States Persist Across Checkpoints: Resuming fine-tuning runs requires careful state hygiene. PyTorch Lightning and standard checkpointing routines package optimizer moments and LR scheduler step counters alongside model weights. Resuming from a decayed scheduler step can starve downstream training or induce periodic gradient oscillations unless scheduler states are intentionally re-initialized.
Practical Recommendations
- Representation & objective alignment
- If the evaluator is in 18,080 dims, optimize directly in that coordinate space.
- If utilizing pre-trained foundation embeddings (like SE600M), incorporate them via auxiliary contrastive alignment or feature distillation rather than rigid input substitution.
- Checkpoint policy
- Treat min-val checkpoints as canonical for evaluation and subsequent fine-tuning stages; reserve final-step checkpoints solely for convergence diagnostics.
- Freeze → Unfreeze schedule
- Stabilize custom projection heads with a frozen backbone first.
- Unfreeze with a low base learning rate, warmup, cosine decay schedule, and strict gradient clipping (
1.0).
- Engineering hygiene
- Enforce rigorous checkpoint naming conventions (
best-val-loss.pt). - Track detailed composite metrics in Weights & Biases (
wandb) rather than relying on a single aggregate training loss scalar.
- Enforce rigorous checkpoint naming conventions (
Reproducibility
- All runs can be reconstructed from the corresponding
***_config.yamlfiles. - Validation minima and training horizons are taken from
***_metrics.csvfiles.
Downloads
- cell-eval-score.csv
- tahoe-finetune-0826_config.yaml
- tahoe-finetune-0826_version_0_metrics.csv
- tahoe-finetune-0901_config.yaml
- tahoe-finetune-0901_version_0_metrics.csv
- tahoe-finetune-0905_config.yaml
- tahoe-finetune-0905_version_0_metrics.csv
- tahoe-finetune-0906_config.yaml
- tahoe-finetune-0906_version_0_metrics.csv
- tahoe-finetune-0907_config.yaml
- tahoe-finetune-0907_version_0_metrics.csv
- tahoe-finetune-0908_config.yaml
- tahoe-finetune-0908_version_0_metrics.csv

Leave a Comment