Skip to content
AI.info

Research

NeuralFLoC: Neural Flow-Based Joint Registration and Clustering of Functional Data

Overview Research area: Functional Data Analysis (FDA) combined with deep learning — specifically unsupervised joint registration (alignment) and clustering of functional/curve data. Technical level:

NeuralFLoC: Neural Flow-Based Joint Registration and Clustering of Functional Data
arXiv
2602.03169
Published
2026-02-03
Authors
Xinyang Xiong, Siyuan jiang, Pengcheng Zeng

AI summary

Overview

Research area: Functional Data Analysis (FDA) combined with deep learning — specifically unsupervised joint registration (alignment) and clustering of functional/curve data.

Technical level: Advanced. The paper assumes familiarity with Neural Ordinary Differential Equations, the Square Root Velocity Function (SRVF) framework, diffeomorphisms, Fisher–Rao geometry, Karcher means, and spectral clustering.

Scope (one sentence): The paper presents NeuralFLoC, an end-to-end unsupervised deep learning framework that uses Neural ODE-driven diffeomorphic flows together with Fourier-domain spectral clustering to simultaneously align and cluster functional data, supported by universal approximation and asymptotic consistency guarantees.

What This Paper Is About

Functional data — curves such as biological signals, motion paths, and financial trajectories — often contain two distinct sources of variability: amplitude variation (differences in vertical magnitude) and phase variation (horizontal/temporal misalignment). Phase variation can obscure the real shape differences between curves, so standard clustering algorithms end up grouping curves by how misaligned they are rather than by their underlying structure. Most existing methods either treat alignment and clustering as two separate steps (so registration errors propagate into clustering) or use restrictive parametric assumptions about the warping functions. NeuralFLoC's goal is to learn smooth, invertible warping functions and cluster-specific templates at the same time, in one end-to-end unsupervised model.

Key Contributions

  1. A continuous diffeomorphic registration model based on Neural ODEs. The vector field is constrained so warping functions are smooth, strictly monotonic, and invertible by construction, avoiding the monotonicity/invertibility failures of some elastic registration methods.

  2. A fully unsupervised deep learning framework for joint alignment and clustering. It integrates SRVF-based registration with spectral clustering, using cluster-specific templates to separate phase variation from amplitude variation during training rather than in a post-hoc stage.

  3. Theoretical guarantees. Theorem 4.1 gives an approximation-consistency result for the neural registration module (any admissible warping can be approximated arbitrarily well in the SRVF metric under stated assumptions), and Theorem 4.2 gives a consistency result for the joint registration-clustering estimator as sample size grows.

  4. A scalable optimization procedure. Per-iteration complexity of O(N(CK + CT + T)) that scales linearly with sample size N, with O(1) memory via the adjoint sensitivity method — described as a substantial improvement over O(T²) dynamic-programming registration such as DTW. The framework also extends directly to d-variate functional inputs (d ≥ 2) by assuming a shared warping process across dimensions.

Main Findings

  • Best registration and clustering on every benchmark setting tested. Across the five dataset configurations (Shapes, Wave d=1, Wave d=3, Symbols 2-class, Symbols 3-class), the full model achieved ATV of 8.1, 4.1, 8.5, 3.1, and 1.6, with ACC of 0.937, 0.993, 0.992, 0.930, and 0.951 and NMI of 0.651, 0.941, 0.942, 0.639, and 0.835. Lower ATV indicates better phase-variability reduction; higher ACC and NMI indicate better clustering.

  • Continuous-flow warping outperforms discrete warping. Replacing the Neural ODE warper with SrvfRegNet while keeping joint training (Ours (N-ODE→SrvfRegNet)) degraded performance on every dataset. The largest gap was on Wave (d=1), where the discrete variant reached ACC 0.552 and NMI 0.009 while the full model reached ACC 0.993 and NMI 0.941. The authors attribute this to optimization instability, weaker regularization permitting over-warping, and difficulty adapting a pretrained alignment module alongside clustering.

  • Joint training beats classical joint methods and sequential pipelines. The classical joint baselines SRC, BSRC, and JPCCA all produced markedly lower clustering accuracy — for example, JPCCA on Wave (d=3) gave ATV 46.7, ACC 0.531, and NMI 0.053. Sequential pipelines (SrvfRegNet followed by FPCA, B-spline, FAE, RandomNet, or K-graph) risk "over-warping" and do not use cluster structure to inform alignment.

  • The Fourier basis outperforms STFT features. Swapping the truncated Fourier basis for short-time Fourier transform features (Ours (Fourier→STFT)) consistently degraded performance. The authors argue that after SRVF alignment most residual amplitude variation lies in a low-frequency subspace, while STFT overemphasizes high-frequency artifacts of imperfect warping.

  • Both modules are necessary. Removing registration entirely (Ours w/o Reg) severely degraded clustering — ACC 0.884 on Shapes, 0.948 on Wave d=1, 0.954 on Wave d=3, 0.787 on Symbols 2-class, and 0.849 on Symbols 3-class. Disabling clustering (Ours w/o Clu) impaired alignment, with ATV of 24.1, 5.8, 14.0, 7.0, and 2.9, all worse than the full model. Paired t-tests over 10 random seeds confirmed that ablating any component caused a statistically significant decline (p < 0.01 for most comparisons).

  • Cluster number can be estimated without labels. Running an elbow analysis on the Total Variation metric from Fisher–Rao alignment on the five datasets produced cluster estimates of (3, 2, 2, 2, 3), close to the true numbers (2, 2, 2, 2, 3).

  • Hyperparameter sensitivity is mild. Increasing the loss weight α gave modest gains up to α ≈ 0.010, after which performance saturated. Increasing the number of Fourier basis functions K improved results until K ≈ 10; performance stayed stable for K ≤ 14 and degraded beyond that. All reported experiments used α = 0.010 and K = 10.

  • Robustness to missing data, irregular sampling, and noise. Removing 5%, 10%, and 20% of points from half of each dataset (with Fourier-spline imputation) kept performance comparable to the complete-data setting. Under irregular sampling with perturbation levels σ_T ∈ {0.1, 0.2, 0.3}, performance stayed stable on all datasets except Shapes, where it degraded moderately. Under injected Gaussian noise with σ ∈ {0.02, 0.05, 0.10} on z-score-normalized data, performance remained stable at σ = 0.02; for σ ≤ 0.05 it degraded gradually, and at σ = 0.10 the decline was moderate on most datasets.

Methodology in Plain English

NeuralFLoC has three connected modules trained end to end:

  1. Encoder. Three 1D-CNN blocks (channels 16 → 32 → 64, kernel size 3) plus a final linear layer turn each raw curve into a latent vector with one coordinate per cluster. The paper emphasizes that this vector is not a free embedding — its j-th coordinate initializes the j-th cluster-specific flow, so the dimensionality is structural rather than a representational bottleneck.

  2. Warping module. Each latent coordinate drives its own Neural ODE, a continuous flow whose velocity field is a multilayer perceptron with architecture (C + 1) → 64 → 64 → C. A Softplus activation on the vector field output enforces strict monotonicity, and a boundary-scaling step maps the flow onto the unit interval so the warping starts at 0 and ends at 1. The final warp for a curve is a weighted mixture of these cluster-specific flows, weighted by the current soft cluster-assignment probabilities, starting from uniform weights. The curve is then warped by 1D linear interpolation, chosen for stable gradient flow.

  3. Clustering module. Aligned curves are projected onto K = 10 Fourier basis functions, and a Student's t-distribution kernel with ε₀ = 1 converts distances to cluster centroids into soft-assignment probabilities.

Training minimizes a joint objective combining two losses. The registration loss is the expected within-cluster SRVF dispersion to per-cluster weighted Karcher means, which makes alignment class-aware instead of aligning everything to one global template. The clustering loss is a KL divergence between the soft assignments and a sharpened target distribution (in the style of deep embedded clustering) that emphasizes confident assignments and avoids degenerate solutions. The two terms are weighted by α = 0.01. Cluster centroids are learnable parameters initialized by K-means on the Fourier coefficients of the raw curves. Adam is used with an initial learning rate of 10⁻³, decayed by a factor of 10 every 100 epochs for 300 epochs total; each experiment is repeated 10 times and the mean is reported. Gradients through the ODE solver are computed with the adjoint sensitivity method, giving O(1) memory.

Why This Matters

Impact on research. The paper argues it is the first end-to-end deep learning approach to simultaneous functional registration and clustering. It connects continuous normalizing flows and diffeomorphic mappings to the classical SRVF/Fisher–Rao elastic FDA tradition, and it supplies approximation and consistency theory — something the authors present as missing from the joint registration-clustering literature. It also provides a label-free way to choose the number of clusters, which most clustering benchmarks sidestep by fixing C to the ground-truth value.

Real-world applications:

  • Biomedical signal analysis — ECG, EEG, and gait waveforms where subjects' cycles are time-shifted relative to one another; the authors cite biomedical signals as a setting where phase variability dominates shape differences.
  • Motion and gesture recognition — accelerometer recordings, such as the Wave dataset used in the experiments, where the same gesture is performed at different speeds.
  • Handwriting and pen-trajectory analysis — the Symbols dataset, where stroke timing varies between writers.
  • Financial and sensor trajectory analysis — the paper's motivating examples include financial trajectories and motion paths that require alignment before pattern discovery.

Industry relevance. The linear-in-N per-iteration complexity and O(1) memory usage make the method relevant to large sensor and monitoring datasets where O(T²) dynamic-programming alignment would be prohibitive. Robustness to missing data, irregular sampling, and noise matters for real deployments where sensors drop readings or sample at uneven rates. Handling multivariate inputs (d ≥ 2) with a shared warping process extends the approach to multi-axis or multi-channel recordings without adding new structural assumptions.

Future Directions

  • More extensive validation of cluster-number selection. The elbow-on-Total-Variation heuristic was applied to five datasets and produced estimates of (3, 2, 2, 2, 3) against true values of (2, 2, 2, 2, 3). Broader empirical study, and theory explaining when the criterion identifies C correctly, remain open.

  • Relaxing the shared-warping assumption for multivariate data. The current extension to d-variate inputs assumes one warping process applies across all dimensions; cases where different channels are misaligned differently are not addressed.

  • Robustness at higher noise levels. The reported behavior indicates a gradual decline for σ ≤ 0.05 and moderate decline at σ = 0.10; the provided text is truncated mid-sentence after noting that noisy observations exhibit considerably higher total variation, so the full analysis of the noise limits is beyond the excerpt.

  • Wider benchmark coverage and inference of C in the main comparison. The experiments fix C to the ground-truth number of classes for all methods "to ensure a fair comparison." Evaluating every baseline under estimated C, and testing on datasets beyond the UCR selections used here, would clarify how much of the advantage persists without that oracle information.

Target Audience

This paper is most useful to statisticians and machine learning researchers working on functional data analysis, curve registration, and unsupervised learning, particularly those already comfortable with SRVF/elastic shape analysis or Neural ODEs. It also suits methodologists who need both empirical benchmarks and theoretical guarantees before adopting a deep model, and applied researchers in biomedical signal processing, motion analysis, and time-series clustering who face strongly misaligned data and large sample sizes. Readers without a background in diffeomorphisms, Fisher–Rao geometry, or continuous-depth models will find the theoretical section demanding.

Authors’ abstract

Clustering functional data in the presence of phase variation is challenging, as temporal misalignment can obscure intrinsic shape differences and degrade clustering performance. Most existing approaches treat registration and clustering as separate tasks or rely on restrictive parametric assumptions. We present \textbf{NeuralFLoC}, a fully unsupervised, end-to-end deep learning framework for joint functional registration and clustering based on Neural ODE-driven diffeomorphic flows and spectral clustering. The proposed model learns smooth, invertible warping functions and cluster-specific templates simultaneously, effectively disentangling phase and amplitude variation. We establish universal approximation guarantees and asymptotic consistency for the proposed framework. Experiments on functional benchmarks show state-of-the-art performance in both registration and clustering, with robustness to missing data, irregular sampling, and noise, while maintaining scalability. Code is available at https://anonymous.4open.science/r/NeuralFLoC-FEC8.

Read the original paper