license: mit
task_categories:
- feature-extraction
- zero-shot-classification
tags:
- representation-learning
- manifold-learning
- biology
- scRNA-seq
- mtDNA
- genomics
- time-series
language:
- en
size_categories:
- 10K<n<100K
Riemannian generative decoder dataset
This repository contains the data related to the paper "Riemannian generative decoder".
Project Page: https://yhsure.github.io/riemannian-generative-decoder
Code Repository: https://github.com/yhsure/riemannian-generative-decoder
Abstract
Riemannian representation learning typically relies on an encoder to estimate densities on chosen manifolds. This involves optimizing numerically brittle objectives, potentially harming model training and quality. To completely circumvent this issue, we introduce the Riemannian generative decoder, a unifying approach for finding manifold-valued latents on any Riemannian manifold. Latents are learned with a Riemannian optimizer while jointly training a decoder network. By discarding the encoder, we vastly simplify the manifold constraint compared to current approaches which often only handle few specific manifolds. We validate our approach on three case studies -- a synthetic branching diffusion process, human migrations inferred from mitochondrial DNA, and cells undergoing a cell division cycle -- each showing that learned representations respect the prescribed geometry and capture intrinsic non-Euclidean structure. Our method requires only a decoder, is compatible with existing architectures, and yields interpretable latent spaces aligned with data geometry.
Dataset Contents
This dataset provides data for three case studies presented in the paper:
- Cell cycle in human fibroblasts: Data related to cell cycle gene regulation dynamics.
- Synthetic branching diffusion process: Data for a synthetic branching diffusion process.
- Human mitochondrial DNA: Data used to infer human migrations from mitochondrial DNA.
All the used data can also be downloaded directly from this Hugging Face dataset repository without cloning the full code repository.
Sample Usage
To reproduce results and figures from the paper, follow these steps. All notebooks will automatically fetch required data.
Setup environment
git clone --recurse-submodules https://github.com/yhsure/riemannian-generative-decoder.git pip install -e data/geooptRun the notebooks for case studies
- Cell cycle in human fibroblasts: Notebook:
1) CellCycle.ipynb - Synthetic branching diffusion process: Notebook:
2) BranchingDiffusion.ipynb - Human mitochondrial DNA: Notebooks:
3) hmtDNA*.ipynb - For updating mitochondrial sequences, refer to the "Scraping new mitochondrial sequences" subsection below.
- Cell cycle in human fibroblasts: Notebook:
Scraping new mitochondrial sequences
If you wish to make an updated scrape of human mitochondrial sequences, run the following Python script:
from Bio import Entrez
from tqdm import tqdm
Entrez.email = "[email protected]"
query = '(00000015400[SLEN] : 00000016700[SLEN]) AND "Homo"[Organism] AND mitochondrion[FILT] NOT (unverified[All Fields] OR ("Homo sapiens subsp. \'Denisova\'"[Organism] OR Homo sp. Altai[All Fields]) OR ("Homo sapiens subsp. \'Denisova\'"[Organism] OR Denisova hominin[All Fields]) OR neanderthalensis[All Fields] OR heidelbergensis[All Fields] OR consensus[All Fields])'
handle = Entrez.esearch(db="nuccore", term=query, retmax=100000)
record = Entrez.read(handle)
id_list = record["IdList"]
with open("seqs.fasta", "w") as outfile:
for start in tqdm(range(0, len(id_list), 500), desc="Downloading sequences"):
fetch_ids = id_list[start:start+500]
handle = Entrez.efetch(db="nuccore", id=fetch_ids, rettype="fasta", retmode="text")
records = handle.read()
outfile.write(records)
Then, use haplogrep3 to annotate the sequences using either an RSRS or rCRS tree:
$ haplogrep3 classify --in "seqs.fasta" --out seqs_rsrs.txt --tree [email protected] --extend-report
$ haplogrep3 classify --in "seqs.fasta" --out seqs_rcrs.txt --tree [email protected] --extend-report
Citation
If you find this dataset or the associated work useful for your research, please cite the paper:
@inproceedings{bjerregaard2025riemannian,
title={Riemannian generative decoder},
author={Bjerregaard, Andreas and Hauberg, S{\o}ren and Krogh, Anders},
booktitle={ICML 2025 Workshop on Generative AI and Biology},
month = {July},
year = {2025}
}