Abstract
Multivariate time series data often originate from systems with complex, evolving structural relationships. Traditional unsupervised representation learning methods frequently overlook these underlying graph structures, treating variables as flat vectors. This paper introduces GraphTNC, a novel unsupervised framework designed to learn joint representations for multivariate time series and the dynamic graphs they inhabit. By integrating graph neural networks with temporal contrastive learning, GraphTNC identifies local windows of stationarity to produce embeddings that significantly enhance downstream classification performance, particularly in non-stationary environments.
Introduction
Modeling multivariate time series—such as sensor readings from power grids or EEG signals from the human brain—presents significant challenges. These datasets are often characterized by sparse labeling and non-stationarity, where the underlying statistical properties change over time. While self-supervised learning has advanced the field, most existing techniques fail to account for the structural dependencies between variables. In many real-world scenarios, these variables are linked by a graph (e.g., physical proximity or functional connectivity) that may itself be dynamic. GraphTNC addresses this gap by effectively learning joint representations that capture the co-evolution of the signal and the graph structure.
Methodology
The GraphTNC architecture is built upon a dual-component encoder and a specialized contrastive learning strategy derived from Temporal Neighborhood Coding (TNC).
1. The Joint Encoder ($f_{enc}$)
The encoder is designed to process spatial and temporal features simultaneously:
- Static Graph Encoding Module: A Graph Convolutional Network (GCN) generates node embeddings based on the current state of the graph. These structural features are then concatenated with the raw signal at each timestep.
- Temporal Module: A bi-directional Gated Recurrent Unit (GRU) processes the combined graph-signal features over a specific time window, capturing the temporal dynamics of the system.
2. Contrastive Learning Strategy
GraphTNC operates on the assumption that time series are "piecewise smooth." The framework utilizes the Augmented Dickey-Fuller (ADF) statistical test to identify local neighborhoods where the signal remains approximately stationary.
The training objective involves a discriminator tasked with distinguishing between "neighboring" windows in time (positive pairs) and windows that are temporally distant (negative pairs). To handle the complexity of non-stationary data, GraphTNC incorporates a weight-adjusted loss function. This adjustment accounts for the possibility that non-neighboring samples might still share underlying similarities, preventing the model from being overly aggressive in pushing away potentially relevant negative samples.
Experimental Setup
The researchers evaluated GraphTNC across two distinct data environments:
- Synthetic Data: Multivariate time series were generated using a Hidden Markov Model (HMM). In this setup, the graph structure changes according to the HMM state, and the adjacency matrix directly influences signal values. This allowed for controlled testing of the model's sensitivity to graph influence (parameter $r$).
- EEG Data: A real-world dataset consisting of 32-channel EEG recordings during hand-grasping tasks. In this instance, the graph is static, representing the physical layout of electrodes on the scalp.
Key Insights
- Structural Importance: Even in scenarios where the graph is static (e.g., EEG), incorporating spatial relationships into the encoding process yields superior classification accuracy compared to graph-blind baselines.
- Robustness to Non-Stationarity: Unlike non-contrastive methods such as BYOL or SimSiam, which often struggle when data distributions shift, GraphTNC’s neighborhood-based approach remains robust. It effectively captures the "state" of the data even as the underlying dynamics evolve.
- Synergistic Learning: By encoding the graph and signal together prior to temporal processing, the model successfully learns how the system's structure influences the flow of data over time.
Results and Discussion
GraphTNC demonstrated strong performance across both synthetic and real-world benchmarks:
- Synthetic Performance: On HMM-generated data with a graph influence of $r=0.1$, GraphTNC achieved an AUPRC of 0.86, outperforming the standard TNC baseline (0.83). The performance gap widened as the signal's dependence on the graph increased.
- Real-World Application: On the EEG dataset, GraphTNC achieved 92% accuracy in identifying hand-action states. Notably, this unsupervised model matched the performance of fully supervised alternatives while using significantly fewer parameters than competitors like BYOL (59k vs. 92k).
Limitations and Future Directions
While GraphTNC represents a significant step forward, several areas for improvement remain. The computational cost of GCNs and GRUs may scale poorly with very large graphs or long time windows. Additionally, the current framework often relies on predefined graphs; integrating "graph discovery"—where the structure is learned directly from the data—would expand its utility. Finally, replacing the GRU with Transformer-based architectures could better capture long-term dependencies in complex time series.
Summary updated