yhsure nielsr HF Staff commited on
Commit
f401599
·
verified ·
1 Parent(s): 2702225

Add comprehensive dataset card for Riemannian generative decoder (#2)

Browse files

- Add comprehensive dataset card for Riemannian generative decoder (2dca8712d1bf3ec84b374a8bbe44ad5c8e7979fd)


Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +84 -0
README.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ task_categories:
3
+ - OTHER
4
+ tags:
5
+ - representation-learning
6
+ - manifold-learning
7
+ - biology
8
+ - genomics
9
+ - time-series
10
+ language:
11
+ - en
12
+ ---
13
+
14
+ # Riemannian generative decoder dataset
15
+
16
+ This repository contains the data related to the paper **"[Riemannian generative decoder](https://huggingface.co/papers/2506.19133)"**.
17
+
18
+ **Project Page:** [https://yhsure.github.io/riemannian-generative-decoder](https://yhsure.github.io/riemannian-generative-decoder)
19
+ **Code Repository:** [https://github.com/yhsure/riemannian-generative-decoder](https://github.com/yhsure/riemannian-generative-decoder)
20
+
21
+ ## Abstract
22
+ 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.
23
+
24
+ ## Dataset Contents
25
+ This dataset provides data for three case studies presented in the paper:
26
+ - **Cell cycle in human fibroblasts**: Data related to cell cycle gene regulation dynamics.
27
+ - **Synthetic branching diffusion process**: Data for a synthetic branching diffusion process.
28
+ - **Human mitochondrial DNA**: Data used to infer human migrations from mitochondrial DNA.
29
+
30
+ All the used data can also be downloaded directly from this Hugging Face dataset repository without cloning the full code repository.
31
+
32
+ ## Sample Usage
33
+
34
+ To reproduce results and figures from the paper, follow these steps. All notebooks will automatically fetch required data.
35
+
36
+ 1. **Setup environment**
37
+ ```bash
38
+ git clone --recurse-submodules https://github.com/yhsure/riemannian-generative-decoder.git
39
+ pip install -e data/geoopt
40
+ ```
41
+
42
+ 2. **Run the notebooks for case studies**
43
+ - **Cell cycle in human fibroblasts**: Notebook: `1) CellCycle.ipynb`
44
+ - **Synthetic branching diffusion process**: Notebook: `2) BranchingDiffusion.ipynb`
45
+ - **Human mitochondrial DNA**: Notebooks: `3) hmtDNA*.ipynb`
46
+ - For updating mitochondrial sequences, refer to the "Scraping new mitochondrial sequences" subsection below.
47
+
48
+ ### Scraping new mitochondrial sequences
49
+ If you wish to make an updated scrape of human mitochondrial sequences, run the following Python script:
50
+ ```python
51
+ from Bio import Entrez
52
+ from tqdm import tqdm
53
+
54
+ Entrez.email = "your_email@gmail.com"
55
+ 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])'
56
+
57
+ handle = Entrez.esearch(db="nuccore", term=query, retmax=100000)
58
+ record = Entrez.read(handle)
59
+ id_list = record["IdList"]
60
+ with open("seqs.fasta", "w") as outfile:
61
+ for start in tqdm(range(0, len(id_list), 500), desc="Downloading sequences"):
62
+ fetch_ids = id_list[start:start+500]
63
+ handle = Entrez.efetch(db="nuccore", id=fetch_ids, rettype="fasta", retmode="text")
64
+ records = handle.read()
65
+ outfile.write(records)
66
+ ```
67
+ Then, use *haplogrep3* to annotate the sequences using either an RSRS or rCRS tree:
68
+ ```bash
69
+ $ haplogrep3 classify --in "seqs.fasta" --out seqs_rsrs.txt --tree phylotree-rsrs@17.0 --extend-report
70
+ $ haplogrep3 classify --in "seqs.fasta" --out seqs_rcrs.txt --tree phylotree-fu-rcrs@1.2 --extend-report
71
+ ```
72
+
73
+ ## Citation
74
+ If you find this dataset or the associated work useful for your research, please cite the paper:
75
+
76
+ ```bibtex
77
+ @inproceedings{bjerregaard2025riemannian,
78
+ title={Riemannian generative decoder},
79
+ author={Bjerregaard, Andreas and Hauberg, S{\o}ren and Krogh, Anders},
80
+ booktitle={ICML 2025 Workshop on Generative AI and Biology},
81
+ month = {July},
82
+ year = {2025}
83
+ }
84
+ ```