Temporally Disentangled Representation Learning under Unknown Nonstationarity

Xiangchen Song, Weiran Yao, Yewen Fan, Xinshuai Dong, Guangyi Chen, Juan Carlos Niebles, Eric Xing, Kun Zhang

Introduction

In the field of representation learning, the goal is to extract the fundamental latent variables—the "true" underlying causes—from high-dimensional, complex observations like video pixels or sensor streams. While significant progress has been made in stationary environments where the rules of the system remain constant, real-world data is rarely so stable. Most existing methods for nonstationary data rely on "side information," such as manual labels or domain indices, to signal when the underlying distribution has shifted.

This paper introduces NCTRL (Nonstationary Causal Temporal Representation Learning), a framework designed to "unmix" complex time-series data and identify latent causal variables even when the governing dynamics change over time, and crucially, without any prior knowledge of when those changes occur.

The Challenge: Nonstationarity Without Labels

Consider a video of a biological subject, such as a mouse. The subject's movement dynamics—how its current position influences its next move—change drastically depending on whether it is sprinting, grooming, or sleeping. This shift in the underlying "physics" of the system is known as nonstationarity.

Traditional nonlinear Independent Component Analysis (ICA) and representation learning models often fail in these scenarios. They typically assume that the environment is either stationary or that an external label is provided to identify different "regimes." Without these labels, models often struggle to distinguish between the actual causal dynamics of the system and the shifts in the environment itself. NCTRL addresses this by treating unknown nonstationarity not as a hurdle, but as a source of information to help triangulate the true latent variables.

The NCTRL Framework

NCTRL is built upon a principled estimation framework supported by a mathematical proof of identifiability. This proof ensures that, under specific conditions, the model is guaranteed to recover the true latent variables (up to simple permutations or scaling) rather than arbitrary representations that merely fit the data.

The architecture consists of three integrated components:

  1. Autoregressive Hidden Markov Module (ARHMM): This serves as an unsupervised "phase detector." It assumes that the unknown environment states (domains) follow a Markov Chain. By learning the transition rules between these hidden states purely from raw data, it identifies when the system shifts from one regime to another.
  2. Prior Network: This module models the "physics" of the latent space. It captures how hidden variables ($z_t$) evolve over time, specifically accounting for time-delayed causal influences. This allows the model to understand how one hidden variable might influence another in subsequent time steps.
  3. VAE-based Encoder-Decoder: This acts as the translator between the high-dimensional observation space and the low-dimensional latent space. The encoder maps observations (e.g., pixels) into the causal latent space, while the decoder ensures the mapping is reversible by reconstructing the original data.

By training these components end-to-end, NCTRL simultaneously segments the time series into distinct regimes and identifies the causal "gears" driving the system within each regime.

Experimental Validation

The researchers evaluated NCTRL across three distinct domains to test its robustness and real-world applicability:

  • Synthetic Datasets: Using complex Multi-Layer Perceptrons (MLPs) to mix latent variables, the authors tested the model's mathematical limits. NCTRL achieved a Mean Correlation Coefficient (MCC) of 0.989, indicating near-perfect recovery of the true latent variables, significantly outperforming baselines that lacked causal modeling or required domain labels.
  • Modified CartPole Video: In this classic reinforcement learning task, nonstationarity was introduced by altering physical parameters like gravity or pole mass. NCTRL achieved an MCC of 96.06%, successfully isolating "Cart Position" and "Pole Angle" as the primary latent factors from raw video frames.
  • MoSeq Biological Data: When applied to depth-camera footage of mice, NCTRL successfully segmented the video into "Active" and "Inactive" phases. It discovered consistent patterns in the latent components that aligned with these natural behavioral shifts, demonstrating its utility for discovery in biological sciences.

Key Insights and Future Directions

NCTRL represents a shift in how we handle distribution shifts in temporal data. By allowing for time-delayed causal relations and assuming Markovian domain shifts, the model finds a balance between flexibility and structural rigors.

However, some limitations remain. The current model assumes that causal influences are time-delayed rather than instantaneous. Furthermore, it models nonstationarity as a series of discrete hidden states; future iterations could explore continuous "drifting" distributions. Despite these constraints, NCTRL provides a powerful, unsupervised path toward identifying the true causal structures hidden within complex, changing environments.

Summary updated

BibTeX
@inproceedings{song2023temporally,
  author = {Xiangchen Song and Weiran Yao and Yewen Fan and Xinshuai Dong and Guangyi Chen and Juan Carlos Niebles and Eric Xing and Kun Zhang},
  title = {{Temporally Disentangled Representation Learning under Unknown Nonstationarity}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=V8GHCGYLkf},
}
Figure