Skip to main content
     .  . .
  .  .. . . ..       .  . .
 . . .  . .. . . -->  . .. .  -->  λ(·)
  . ..  . .  .       .  . .
    .  . .

        m a n y l a t e n t s

  one geometry, learned through many latents

license python uv PyPI

Nine files ported from KrishnaswamyLab code (MIOFlow, cflows, AAnet) are Yale non-commercial, not Apache-2.0; see THIRD_PARTY_NOTICES.md.


install

uv add manylatents

Optional extras:

uv add manylatents[hf]         # HuggingFace trainer
uv add manylatents[torchdr]    # GPU-accelerated DR via TorchDR
uv add manylatents[jax]        # JAX backend (diffrax)
uv add manylatents[all]        # everything
as a command-line tool, or for one run
uv tool install manylatents                                            # the manylatents command
uv run --with manylatents manylatents algorithms/latent=pca data=swissroll   # one run, no project

quickstart

# embed a swiss roll with UMAP
manylatents algorithms/latent=umap data=swissroll

# add metrics
manylatents algorithms/latent=umap data=swissroll \
  metrics=trustworthiness

# sweep algorithms
manylatents --multirun \
  algorithms/latent=umap,phate,tsne \
  data=swissroll metrics=trustworthiness
development install
git clone https://github.com/latent-reasoning-works/manylatents.git
cd manylatents && uv sync
from manylatents.api import run

result = run(data="swissroll", algorithm="pca", metrics=["trustworthiness"])

embeddings = result["embeddings"]   # (n, d) ndarray
scores     = result["scores"]       # {"trustworthiness": 0.95}

# chain: PCA 50d -> PHATE 2d
result2 = run(input_data=result["embeddings"], algorithm="phate")

architecture

  CLI                         API
  manylatents ...             run(data=, algorithm=, ...)
       │                           │
       ▼                           ▼
  ┌─────────┐               ┌───────────┐
  │ main.py │               │  api.py   │
  │ Hydra   │               │ registries│
  └────┬────┘               └─────┬─────┘
       │    instantiate objects    │
       └──────────┬───────────────┘
                  ▼
        ┌──────────────────┐      ┌────────────────┐
        │  experiment.py   │─────►│  evaluate.py   │
        │  run_experiment()│      │  evaluate()    │
        │                  │      │  prewarm_cache │
        │  LatentModule    │      │  compute_knn   │
        │    fit/transform │      │  metric_fn(    │
        │  LightningModule │      │   cache=cache) │
        │    trainer.fit   │      └────────────────┘
        └──────────────────┘

Two base classes, one decision rule:

if the algorithm... use interface
has no training loop LatentModule fit(x) / transform(x)
trains with backprop LightningModule trainer.fit() / encode(x)

Both produce LatentOutputs — a dict keyed by "embeddings". All metrics receive a shared cache dict for deduplicated kNN and eigenvalue computation.


algorithms

17 algorithms -- 12 latent modules, 5 lightning modules

PCA, t-SNE, UMAP, PHATE, DiffusionMap, MDS, MultiscalePHATE, Merging, Classifier, Leiden, ReebGraph, SelectiveCorrection, Autoencoder, AANet, LatentODE, HF Trainer, Reconstruction AE.

neighborhood_size=k sweeps kNN uniformly across algorithms.


metrics

20+ metrics across three evaluation contexts

Embedding fidelity (trustworthiness, continuity, kNN preservation), spectral analysis (affinity spectrum, spectral decay rate), topological features (persistent homology), and dataset properties (stratification).

All metrics share a cache dict for deduplicated kNN computation. List-valued parameters expand via flatten_and_unroll_metrics() -- one kNN computation covers the entire sweep.

Config pattern: metrics=<name> (each metric config has an at: field for evaluation context)


data

6 synthetic manifolds + precomputed loader

Swiss roll, torus, saddle surface, gaussian blobs, DLA tree, and custom .npy/.npz files. Domain-specific datasets (genomics, single-cell) available via extensions.


citing

If manylatents was useful in your research, a citation goes a long way:

@software{manylatents2026,
  title     = {manyLatents: Unified Dimensionality Reduction and Neural Network Analysis},
  author    = {Valdez C{\'o}rdova, C{\'e}sar Miguel and Scicluna, Matthew and Ni, Shuang},
  year      = {2026},
  url       = {https://github.com/latent-reasoning-works/manylatents},
  license   = {Apache-2.0}
}



Apache-2.0 License · Latent Reasoning Works

Metadata

Release files for manylatents 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for manylatents 0.1.10
File Size Uploaded Provenance Actions
manylatents-0.1.10.tar.gz 814.2 kB With provenance Details for manylatents-0.1.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for manylatents 0.1.10
File Interpreter ABI Platform Actions
manylatents-0.1.10-py3-none-any.whl Python 3 none any Details for manylatents-0.1.10-py3-none-any.whl

Total release size: 1.4 MB

Release files / manylatents-0.1.10.tar.gz

Download URL manylatents-0.1.10.tar.gz
Size 814.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e08c0e918d3823ae32057c17a659bb0e5281dc43e869b2050d10d79a9c8b923c
BLAKE2b-256 checksum
How to use checksums
033a1335bd0a911248977a866fcd88e3a9848cd0367e96a5801e7911e2ec5da9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / manylatents-0.1.10-py3-none-any.whl

Download URL manylatents-0.1.10-py3-none-any.whl
Size 550.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fadfa3848b4e536506a2497dddf0ce4a221b6e69099fb3c6936ea583f5d77e3c
BLAKE2b-256 checksum
How to use checksums
f7e3927cb83f5f70f1b22a8044564082ab9dc011e99a7a40b2fd958fc29c6dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for manylatents 0.1.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for manylatents-0.1.10.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page