Project — topos

A gated protocol decides when latent structure in biological data has earned enough evidence to act on

AbstractHigh-dimensional biological analysis has a well-known failure mode: embed the data, cluster it, find something that looks structured, and interpret it. Nonlinear methods are very good at finding a structure, and offer no built-in signal for whether that structure would survive a different sample, preprocessing choice, or equally defensible embedding. The individual remedies — stability under resampling, confound auditing, structure-robust kinship — are established, but nothing combines them into a decision. Here we describe topos, an eight-stage protocol that treats “is this structure real” as a certification problem rather than a modeling choice: each stage gates entry into the next, each stage's rules are written down before its data is analyzed, and a final value audit issues an explicit GO/KILL/HOLD verdict. Stability under resampling is a necessary gate, never a sufficient one, and heavy compute is conditional on a candidate structure surviving the cheaper stages first. In its first case study, on strawberry, the protocol invalidated its own first GO on audit, then closed the nonlinear-structure question with a KILL: the stable structure was real, and a linear embedding found it. A protocol built to make kills cheap has, so far, delivered exactly that.

High-dimensional biological analysis has a well-known failure mode: embed, cluster, find something that looks structured, and interpret it10,13. Nonlinear methods are very good at finding a structure, and offer no built-in signal for whether that structure would survive a different sample, preprocessing choice, or equally defensible embedding1,2,3.

The pieces of an answer exist. Assessing whether a clustering is stable under resampling of the data is well established1,2,3,4, with the adjusted Rand index5 as a standard agreement measure. In population genetics PCA remains the linear baseline6,7; UMAP and HDBSCAN have been applied to large genotype cohorts8,9,11, and both low-dimensional embeddings and STRUCTURE-style bar plots are known to invite over-interpretation10,13. Genotype-specific artifacts are known too: batch effects and differential missingness create spurious structure14,15, array ascertainment biases diversity estimates16, and ordinary relationship estimates confuse population structure with kinship, which KING's robust estimator corrects12. The closest existing tool, CARVE20, selects a clustering from a grid by resampling; it does not issue a go/kill decision, audit confounds, or compare matched linear and nonlinear pipelines.

topos adds no new statistics. It combines these checks with pre-registration18 and the stability principle of veridical data science19 into a gated protocol with an explicit decision, treating “is this structure real” as a certification problem rather than a modeling choice (Box 1).

Eight stages order the evidence from cheap to expensive

The protocol runs eight stages, each gating entry into the next: data landscape audit, structural plausibility, methodological gap analysis, nonlinear structure certification, robustness stress testing, cross-modal validation, representation-space agreement, and a final value audit issuing an explicit go/kill/hold decision. Matched-model comparison, density-aware validation, and mandatory confound auditing14,15 run throughout. Each stage's rules are written down before its data is analyzed18, in the spirit of the stability and documentation principles of veridical data science19. Heavy compute — genome foundation model embeddings, long-context reasoning — is evidence-gated: conditional on a candidate structure surviving the earlier, cheaper stages first.

One case study has run, and it killed its own question

Table 1 | Where the case studies stand.

Case studyOrganismStage
fragariaStrawberry, cultivated and wild0 GO; nonlinear-structure question closed (KILL) on two wild panels; crossing value reported; paused
glymaSoybean (SoySNP50K)0 specified, not yet run
sorghumSorghum (TIP analysis)0–1 specified, not yet run

Only fragaria has run anything (Table 1). It passed Stage 0 and then answered its structural question in the negative: across three panels, the stable structure was real and a linear embedding found it. That is the protocol working as intended, since a kill at a cheap stage is its purpose, but it means topos still has no nonlinear biological finding of its own.

An invalid first run rewrote the protocol's rules

fragaria's first Stage 0 returned GO, and an audit found it invalid. Its missing calls were never decoded, three rubric criteria passed by construction, and the pipeline that won was chosen by the same metric that made it look perfect. Two pre-registered rebuilds followed; the second, on accessions pruned to no relatives, returns a GO that holds across sensitivity runs, for structure that PCA6,7 and UMAP with HDBSCAN8,11 agree on exactly wherever both cluster. The rules that came out of it now belong to the protocol rather than to one case study:

  • Missing-value codes are declared and decoded at load, and a declared-missing value surviving into the analysis is an error: differential missingness is a known source of spurious structure14,15.
  • Stability comes from resampling the data1,2,4, scored as the adjusted Rand index between resampled partitions5. Agreement across seeds says nothing about a deterministic pipeline, where it is perfect by construction. Stability is necessary, not sufficient: a wrong partition can be perfectly stable3.
  • A confound with no variance is untestable and blocks a GO, and external coherence is never defined as the confound result. Associations are scored with Cramér's V and a permutation test; the uncorrected V runs high in small samples17, so the permutation p, not V, carries the decision.
  • Parameter grids are deduplicated before a rule counts settings, and missingness is tested within groups when it may be biological, as array ascertainment16 made it in strawberry.
  • Relatedness is capped with a structure-robust kinship estimator12. The standard relationship matrix read population structure as kinship, and pruning with it would have removed almost all of the diverse accessions.
  • Non-redundancy is measured on the rows both pipelines cluster, with coverage reported beside it. Over all rows, fragaria's linear and nonlinear partitions disagreed (ARI 0.68); on the rows both clustered they were identical. The difference was coverage, not structure, though the rows both methods cluster are also the easiest to separate, which is why coverage is reported too.

Discussion

topos is a certification protocol, and what its first certification produced was a kill: in strawberry the stable structure was real, a linear embedding found it, and the nonlinear-structure question was closed at a cheap stage. That is the intended behavior — the protocol exists to make kills cheap and GOs earned — but it also fixes the honest bound on what topos has shown: it has certified rigor, not yet a nonlinear biological finding of its own. The invalid first GO is part of the same account. It was caught by audit, not by the metric that produced it, and each of its failure modes — undecoded missing values, criteria passed by construction, a pipeline selected by its own success metric — was converted into a standing rule rather than a one-off fix.

The protocol's scope is currently narrower than its specification. Eight stage specifications exist, but the tested Python package (27 tests) implements the Stage 0 checks: its modules enforce the rules above — loading, stability, confounds, kinship, grids, matched comparison and the decision record. fragaria's scored stages run on the package, and the port reproduces every committed Stage 0 result byte for byte. Use has begun to spread beyond its own case studies: veridian's Explore uses the package to choose a cluster count.

What comes next is set by the case studies, not the framework: glyma and sorghum have their early stages specified and not yet run (Table 1), and Stage 3's nonlinear-structure certification gets built when a case study reaches it.

Code availability

The topos repository is private; this write-up is its public account. The stage specifications and the standing rules above summarize the protocol, and the case studies that run on it report their results in their own write-ups, beginning with fragaria.

Competing interests

None.

References

  1. Ben-Hur A, Elisseeff A, Guyon I. A stability based method for discovering structure in clustered data. Pacific Symposium on Biocomputing 7, 6–17 (2002). doi:10.1142/9789812799623_0002.
  2. Lange T, Roth V, Braun ML, et al. Stability-based validation of clustering solutions. Neural Computation 16, 1299–1323 (2004). doi:10.1162/089976604773717621.
  3. von Luxburg U. Clustering stability: an overview. Foundations and Trends in Machine Learning 2, 235–274 (2010). doi:10.1561/2200000008.
  4. Hennig C. Cluster-wise assessment of cluster stability. Computational Statistics & Data Analysis 52, 258–271 (2007). doi:10.1016/j.csda.2006.11.025.
  5. Hubert L, Arabie P. Comparing partitions. Journal of Classification 2, 193–218 (1985). doi:10.1007/BF01908075.
  6. Patterson N, Price AL, Reich D. Population structure and eigenanalysis. PLoS Genetics 2, e190 (2006). doi:10.1371/journal.pgen.0020190.
  7. Novembre J, Johnson T, Bryc K, et al. Genes mirror geography within Europe. Nature 456, 98–101 (2008). doi:10.1038/nature07331.
  8. Diaz-Papkovich A, Anderson-Trocmé L, Ben-Eghan C, et al. UMAP reveals cryptic population structure and phenotype heterogeneity in large genomic cohorts. PLoS Genetics 15, e1008432 (2019). doi:10.1371/journal.pgen.1008432.
  9. Diaz-Papkovich A, Zabad S, Snell H, et al. Topological stratification of continuous genetic variation in large biobanks. PLoS Genetics 22, e1012068 (2026). doi:10.1371/journal.pgen.1012068.
  10. Chari T, Pachter L. The specious art of single-cell genomics. PLoS Computational Biology 19, e1011288 (2023). doi:10.1371/journal.pcbi.1011288.
  11. Campello RJGB, Moulavi D, Sander J. Density-based clustering based on hierarchical density estimates. Advances in Knowledge Discovery and Data Mining (PAKDD), LNCS 7819, 160–172 (2013). doi:10.1007/978-3-642-37456-2_14.
  12. Manichaikul A, Mychaleckyj JC, Rich SS, et al. Robust relationship inference in genome-wide association studies. Bioinformatics 26, 2867–2873 (2010). doi:10.1093/bioinformatics/btq559.
  13. Lawson DJ, van Dorp L, Falush D. A tutorial on how not to over-interpret STRUCTURE and ADMIXTURE bar plots. Nature Communications 9, 3258 (2018). doi:10.1038/s41467-018-05257-7.
  14. Leek JT, Scharpf RB, Bravo HC, et al. Tackling the widespread and critical impact of batch effects in high-throughput data. Nature Reviews Genetics 11, 733–739 (2010). doi:10.1038/nrg2825.
  15. Clayton DG, Walker NM, Smyth DJ, et al. Population structure, differential bias and genomic control in a large-scale, case-control association study. Nature Genetics 37, 1243–1246 (2005). doi:10.1038/ng1653.
  16. Albrechtsen A, Nielsen FC, Nielsen R. Ascertainment biases in SNP chips affect measures of population divergence. Molecular Biology and Evolution 27, 2534–2547 (2010). doi:10.1093/molbev/msq148.
  17. Bergsma W. A bias-correction for Cramér's V and Tschuprow's T. Journal of the Korean Statistical Society 42, 323–328 (2013). doi:10.1016/j.jkss.2012.10.002.
  18. Nosek BA, Ebersole CR, DeHaven AC, et al. The preregistration revolution. Proceedings of the National Academy of Sciences 115, 2600–2606 (2018). doi:10.1073/pnas.1708274114.
  19. Yu B, Kumbier K. Veridical data science. Proceedings of the National Academy of Sciences 117, 3920–3929 (2020). doi:10.1073/pnas.1901326117.
  20. Wycik KR, Tang TM, Zikry TM, et al. Cluster analysis with resampling for validation and exploration (CARVE). arXiv 2606.00327 (2026, preprint). doi:10.48550/arXiv.2606.00327.