NeuralFLoC: Neural Flow-Based Joint Registration and Clustering of Functional Data
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.
💡 Research Summary
NeuralFLoC introduces a novel, fully unsupervised, end‑to‑end deep learning framework that jointly performs functional registration (alignment) and clustering for data exhibiting phase variation. The method leverages Neural Ordinary Differential Equations (Neural ODEs) to parameterize smooth, invertible warping functions γ_i(t) as continuous-time diffeomorphic flows. By enforcing monotonicity through a Softplus‑activated velocity field and boundary normalization, the model guarantees that each γ_i belongs to the space of valid warping functions Γ (strictly increasing, γ(0)=0, γ(1)=1).
A 1‑D convolutional encoder first maps raw functional observations x_i(t) into latent vectors z_i, which serve as initial conditions for the Neural ODE. Solving the ODE yields a trajectory τ_i(t); after scaling, the normalized flow ˆγ_i(t) is obtained. Crucially, the final warping for each curve is a mixture of class‑specific flows weighted by soft cluster assignments p_{ij}: γ_i(t)=∑j p{ij} ˆγ_{ij}(t). This “cluster‑conditional warping” allows the alignment process to be guided by the emerging cluster structure.
Alignment quality is measured in the Square‑Root Velocity Function (SRVF) space, which renders the Fisher‑Rao metric into a standard L2 distance. For each cluster j a weighted SRVF mean µ_j is computed, and the registration loss is defined as the expected within‑cluster dispersion L_reg = Σ_i Σ_j p_{ij}‖Q_i−µ_j‖², where Q_i is the SRVF of the warped curve. This loss encourages phase alignment that respects cluster membership, effectively disentangling phase and amplitude variation.
Clustering operates on low‑dimensional spectral representations obtained by projecting the aligned curves onto a Fourier basis (K basis functions). The resulting coefficient vectors a_i are compared to learnable centroids c_j using a Student‑t kernel, yielding soft assignments p_{ij}. A self‑training target distribution q_{ij}=p_{ij}²/∑i p{ij}² emphasizes confident assignments, and the clustering loss L_clu = KL(Q‖P) = Σ_i Σ_j q_{ij} log(q_{ij}/p_{ij}) penalizes divergence from this target.
The total objective combines geometric alignment and discriminative clustering: L_total = L_reg + α L_clu, with α controlling the trade‑off (default α=0.01). Gradients with respect to ODE parameters are computed via the adjoint sensitivity method, giving O(1) memory overhead. Computational complexity per iteration is O(N·(C·K + C·T + T)), linear in the number of samples N, making the approach scalable to large functional datasets.
Theoretical contributions include two theorems: (1) universal approximation—Neural ODE‑generated warping functions can approximate any element of Γ arbitrarily well; (2) asymptotic consistency—under standard regularity conditions, the joint estimator converges to the true warping and cluster parameters as N→∞. These results provide statistical guarantees despite the fully unsupervised setting.
Empirical evaluation on several benchmark functional datasets (e.g., ECG signals, growth curves, climate time series, handwritten trajectory data) and synthetic experiments demonstrates substantial improvements over baselines such as SRVF‑DTW + K‑means, Deep Embedded Clustering, and variational registration methods. NeuralFLoC achieves lower mean squared warping error (15–30 % reduction) and higher clustering metrics (NMI, ARI improvements of 0.05–0.12). The model remains robust to irregular sampling, up to 30 % missing observations, and low signal‑to‑noise ratios (SNR ≤ 5 dB). Extensions to multivariate functional data (2‑D and 3‑D trajectories) are straightforward, requiring only a shared warping process across dimensions.
In summary, NeuralFLoC unifies functional registration and clustering within a single differentiable optimization problem, eliminating error propagation between separate stages and removing restrictive parametric assumptions on warping functions. By integrating Neural ODEs, SRVF geometry, and spectral clustering, it delivers both theoretical rigor and practical scalability, representing a significant advance for functional data analysis. Future directions include Bayesian uncertainty quantification, application to non‑temporal functional objects (e.g., images, shapes), and interpretability of learned warping flows.
Comments & Academic Discussion
Loading comments...
Leave a Comment