manifoldalign is an R package for aligning data from multiple domains into a shared latent space. It implements a broad family of manifold alignment and domain adaptation methods — from kernel-based and spectral approaches to optimal transport — preserving local manifold structure while matching samples across domains.
Alignment Methods
| Method | Function | Description |
|---|---|---|
| KEMA | kema() |
Kernel Manifold Alignment with exact and regression-based solvers |
| GPCA | gpca_align() |
Generalized PCA alignment via shared subspace estimation |
| GPA | generalized_procrustes() |
Generalized Procrustes Analysis for partial observations |
| CONE |
cone_align(), cone_align_multiple()
|
Spectral graph alignment with anchor-based matching |
| GRASP |
grasp(), grasp_multiset()
|
Graph Spectral alignment using structural descriptors |
| PARROT | parrot() |
Position-Aware Regularized OT alignment |
| FPGW | fpgw() |
Fused Partial Gromov-Wasserstein transport |
| Gromov-Wasserstein | gromov_wasserstein() |
Structure-preserving optimal transport |
| Low-Rank | lowrank_align() |
Memory-efficient alignment via low-rank factorization |
| MMA | mma_align_multiple() |
Multiset Manifold Alignment for >2 domains |
| Coupled Diag. | coupled_diagonalization() |
Joint diagonalization across modalities |
| Spectral MNN | spectral_mnn_align() |
Mutual nearest neighbor spectral alignment |
| Token-OT Graph | token_ot_graph_align() |
Token-level OT with graph structure |
| SSMA | ssma_align() |
Semi-Supervised Manifold Alignment |
Installation
Install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("bbuchsbaum/manifoldalign")Quick Start
library(manifoldalign)
# Create two domains with shared structure
set.seed(1)
X1 <- matrix(rnorm(100 * 20), 100, 20)
X2 <- matrix(rnorm(80 * 15), 80, 15)
labels1 <- rep(1:4, each = 25)
labels2 <- rep(1:4, each = 20)
# Build a hyperdesign (multi-domain container)
hd <- as_hyperdesign(
list(X1, X2),
labels = list(labels1, labels2)
)
# Align with KEMA
result <- kema(hd, ncomp = 5)
# Or align with Generalized Procrustes
result <- generalized_procrustes(hd, ncomp = 5)Unified Aligner Interface
All pairwise alignment methods share a consistent adapter interface:
# Create an aligner
aligner <- parrot_aligner(ncomp = 5)
# Fit a pair of domains
fit <- fit_pair(aligner, X1, X2, labels1, labels2)
# Align many domains at once
fit_many(aligner, list(X1, X2, X3), list(l1, l2, l3))Articles
Detailed tutorials are available as package vignettes:
- Quickstart: Building a hyperdesign and running KEMA/GPA
- Features, Correspondences, and Predictive Performance
- Benchmark Guidance by Problem Regime
- Kernel Manifold Alignment with KEMA
- Generalized PCA Alignment
- Pairwise Graph Alignment with CONE
- Multi-Domain Graph Alignment with CONE
- Spectral Graph Alignment with GRASP
- Position-Aware OT Alignment with PARROT
- Fused-Partial Gromov-Wasserstein
- Low-Rank Alignment
- Multiset Manifold Alignment
- Coupled Diagonalization
- Performance Overview
Documentation
Full API reference and articles at https://bbuchsbaum.github.io/manifoldalign/.