Manifold Embeddings
Manifold embedding turns raw observations into geometry that topology can read.
Time-Delay Embedding
For a scalar time series \(x_t\), dimension \(D\), and delay \(\tau\):
This converts a waveform into a point cloud. Periodic signals often become loops.
kNN Graph
For embedding points \(z_i\), define adjacency:
This graph can feed Mapper, graph Laplacian features, or graph-based PH.
Embedding Comparison
The docs will compare:
- PCA: linear, fast, weak for curled manifolds;
- Isomap: geodesic distances on a neighbor graph;
- LLE: local linear patches;
- t-SNE/UMAP: visualization-first, not metric-preserving proof.
The rule is simple: use graphs to explain, then use tests to prove.
Tensor Bundles For ML Spaces
A model may expose many spaces at once: token embeddings, hidden activations,
attention-head projections, graph node features, tangent features from a
trajectory, and dual features from gradients. The toolkit represents those
spaces with TensorBundleSpec:
where \(B\) is a named basis, \(g\) is a diagonal metric signature, \(\mu\) is a tangent order, and \(\nu\) is the number of tangent variables.
When two operations use different spaces, the active rule is explicit:
This is the Python runtime version of the DirectSum-style idea from tensor algebra systems. It makes mixed embedding, activation, and gradient spaces auditable before they become optimized Rust, C++, CUDA, Triton, or ASM kernels.
hidden = topoml.TensorBundleSpec(("h1", "h2"), (1.0, 1.0))
grad = topoml.TensorBundleSpec(("h2", "loss"), (1.0, -1.0))
ambient = topoml.interop_bundle(hidden, grad)