Phase-Type Variational Autoencoders for Heavy-Tailed Data

Abdelhakim Ziani, Andras Horvath, Paolo Ballarini

Introduction: The Problem with "Black Swans"

In fields ranging from finance and insurance to natural language processing, the most critical data points are often the rarest. These "heavy-tailed" distributions—where extreme events are significantly more likely than a standard bell curve would suggest—dominate underlying risk and variability.

Standard Variational Autoencoders (VAEs) struggle to model these "black swan" events. They typically employ a Gaussian (Normal) distribution in their decoder, which decays exponentially fast. Consequently, the model effectively ignores the tails of the data distribution, leading to a phenomenon known as tail collapse. When a model suffers from tail collapse, it severely underestimates both the magnitude and frequency of extreme events.

While previous research has attempted to integrate "heavy-tail-aware" distributions like the Student-t or Pareto into VAEs, these parametric families are often too rigid. They force the model to assume a specific mathematical shape for the tail prior to seeing the data. The core challenge lies in engineering a decoder that is mathematically tractable yet flexible enough to learn complex tail behaviors directly from empirical observations.

The Phase-Type Variational Autoencoder (PH-VAE)

To bridge the gap between applied probability and representation learning, researchers have introduced the Phase-Type Variational Autoencoder (PH-VAE). The primary innovation of this architecture is replacing the standard decoder likelihood with a Phase-Type (PH) distribution.

How It Works

  • The Markov Chain Approach: A Phase-Type distribution models the time it takes for a continuous-time Markov chain (CTMC) to reach an "absorbing" state. Conceptually, imagine a particle jumping between various transient "phases" (or states) at different rates until it eventually stops. The total time elapsed before absorption is the continuous value the model predicts.
  • Composition of Scales: By combining multiple exponential time scales within this Markov chain, the PH distribution can approximate virtually any positive-valued distribution. It can seamlessly mimic the shapes of Pareto, Weibull, or Lognormal distributions with high precision.
  • Series Canonical Form: Unrestricted Markov chains can be computationally expensive. To maintain efficiency, the PH-VAE utilizes an "acyclic series" structure. Instead of a complex, fully connected web of states, the phases are arranged sequentially. This structural choice reduces the number of parameters from $m^2$ to just $2m-1$ (where $m$ is the number of phases), making it highly tractable for neural network optimization.
  • Uniformization for Stability: To train the model end-to-end using backpropagation, the authors employ a technique called "uniformization" to compute matrix exponentials. This ensures that likelihood calculations remain numerically stable, even when processing extreme values.

Experimental Validation

The PH-VAE was rigorously evaluated across three distinct data regimes, demonstrating significant improvements over Gaussian, Student-t, and extreme-value-based VAE decoders.

  1. Synthetic 1D Benchmarks: On data generated from known heavy-tailed families (Weibull, Pareto, Lognormal, and Burr), the PH-VAE consistently achieved the lowest KStail (a metric evaluating tail shape fidelity) and Q99 error (accuracy of the 99th percentile). In several instances, it outperformed the next best model by an order of magnitude.
  2. Real-World 1D Diagnostics: The model was tested on the Danish Fire Insurance dataset (classic large insurance claims) and the Google Web Trillion Word Corpus (word-frequency counts following Zipf’s Law). Log-log plots revealed that the PH-VAE successfully tracked empirical data points deep into the tail, whereas the Gaussian VAE collapsed entirely.
  3. Multivariate Settings: The model was applied to synthetic 5D data and real financial returns (absolute daily returns for AAPL, MSFT, AMZN, GOOGL, and META from 2010 to 2024). Despite the mathematical complexity of Markov chains, training time per epoch remained nearly constant as the number of phases increased, proving the model's scalability.

Key Insights

  • Pragmatism over Asymptotics: Theoretically, PH distributions are "light-tailed" at infinity, meaning they eventually decay exponentially. However, the authors demonstrate that over any finite, data-relevant range, PH distributions can approximate heavy tails so accurately that the theoretical difference is negligible for practical engineering.
  • Learning the Mechanism, Not the Family: Instead of assigning a rigid "Pareto" or "Student-t" label, the PH-VAE learns the transition rates of an underlying stochastic process. This allows it to adapt to "hybrid" tails that do not fit neatly into classical parametric families.
  • Shared Latent Dependence: In multivariate settings, the decoder treats dimensions as independent given the latent variable $z$. However, the shared latent space allows the model to capture tail co-exceedance. In financial terms, the model successfully learns that when one major tech stock experiences an extreme drop, others are highly likely to follow suit.

Limitations and Future Directions

While highly effective, the PH-VAE has theoretical and practical boundaries. Because PH distributions eventually decay exponentially, they cannot model true power-law behavior at literal infinity. Furthermore, like all tail-focused models, the PH-VAE requires observing at least some extreme events during training to accurately learn the tail structure; heavily truncated training data will degrade its extrapolation capabilities.

Looking forward, this framework opens exciting avenues for deep generative modeling. The authors suggest extending the PH-VAE to high-dimensional data modalities (such as images) and structured "time-to-event" applications like survival analysis, where accurately modeling the time until a critical failure is paramount.

Summary updated

BibTeX
@inproceedings{ziani2026phase,
  author = {Abdelhakim Ziani and Andras Horvath and Paolo Ballarini},
  title = {{Phase-Type Variational Autoencoders for Heavy-Tailed Data}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=QN1iaHy54s},
}
Figure