Streaming GPU Singular Value and Dynamic Mode Decompositions

Seth D. Pendergrass, J. Nathan Kutz, Steven L. Brunton · DOI

Abstract

This work develops a parallelized algorithm to compute the dynamic mode decomposition (DMD) on a graphics processing unit using the streaming method of snapshots singular value decomposition. This allows the algorithm to operate efficiently on streaming data by avoiding redundant inner-products as new data becomes available. In addition, it is possible to leverage the native compressed format of many data streams, such as HD video and computational physics codes that are represented sparsely in the Fourier domain, to massively reduce data transfer from CPU to GPU and to enable sparse matrix multiplications. Taken together, these algorithms facilitate real-time streaming DMD on high-dimensional data streams. We demonstrate the proposed method on numerous high-dimensional data sets ranging from video background modeling to scientific computing applications, where DMD is becoming a mainstay algorithm. The computational framework is developed as an open-source library written in C++ with CUDA, and the algorithms may be generalized to include other DMD advances, such as compressed sensing DMD, multi resolution DMD, or DMD with control.

Introduction

Dynamic Mode Decomposition (DMD) has emerged as a critical tool for extracting spatiotemporal patterns from complex systems, effectively combining the dimensionality reduction of Principal Component Analysis (PCA) with the frequency analysis of the Fourier Transform. It is widely employed in fluid dynamics, neuroscience, and video processing to isolate coherent structures from transient activity.

However, the primary computational bottleneck for DMD is the Singular Value Decomposition (SVD). For high-dimensional data streams—such as 4K video or massive scientific simulations—the $O(nm^2)$ complexity of traditional SVD is prohibitive. Furthermore, in streaming environments where data arrives continuously, recalculating the SVD from scratch for every new frame is inefficient. This research introduces a streaming-aware, GPU-optimized DMD algorithm designed to bridge this gap.

Methodology: Streaming GPU Acceleration

The core innovation lies in the Streaming Method of Snapshots SVD. In a sliding window of $m$ snapshots, most data remains unchanged from one time step to the next. By exploiting the symmetry of the inner product matrix (the Gram matrix, $X^T X$), the algorithm reuses previously calculated inner products. Only the new row and column corresponding to the latest data snapshot need to be computed, reducing the complexity to $O(nm)$.

Streaming data pipeline for updating the Gram matrix $X^T X$.

This approach is highly parallelizable and is implemented using C++, CUDA, and the MAGMA library to leverage the thousands of cores available on modern GPUs. To further optimize performance, the authors introduce a method to calculate DMD mode amplitudes ($b$) using Proper Orthogonal Decomposition (POD) coefficients, avoiding expensive high-dimensional least-squares fits.

Additionally, the framework addresses the "PCIe tax"—the latency of data transfer between CPU and GPU. By performing DMD directly on compressed data representations (e.g., Fourier or wavelet domains), the system minimizes bandwidth requirements and enables faster sparse matrix multiplications.

Key Insights and Results

The Streaming GPU (SGPU) implementation demonstrates significant performance gains and practical utility in real-time filtering. Because DMD naturally separates modes based on their growth/decay rates and frequencies, it can act as a sophisticated filter for video streams, separating static backgrounds (where eigenvalues $\lambda \approx 1$) from dynamic foreground objects.

DMD Engine for real-time video background subtraction.

Performance Benchmarks

Evaluation across datasets like the Yale Faces, PEViD high-resolution video, and the Background Modeling Challenge (BMC) yielded the following results:

  • Massive Speedups: The SGPU implementation achieved a 20x to 25x speedup over standard CPU-based SVD. For a $2560 \times 1440$ resolution video, processing time dropped from ~1.15 seconds per update on a CPU to just 0.06 seconds on the GPU.
  • Scalability: The SGPU version exhibited superior scaling, with processing times remaining relatively flat even as resolution and window sizes increased.
  • Accuracy: Relative error remained between $10^{-3}$ and $10^{-5}$. While the method of snapshots can be less stable than standard SVD in extreme-precision scenarios, this level of accuracy is more than sufficient for engineering and computer vision applications.

Conclusion and Future Work

This work provides a high-performance framework for real-time DMD on high-dimensional streams. While the current implementation is optimized for single-column updates, future work will explore batch processing to handle bursty data streams. Additionally, the authors plan to integrate more advanced mode selection techniques to better handle complex backgrounds, such as swaying trees or flickering lights, and to incorporate other DMD variants like multi-resolution DMD and DMD with control.

Summary updated

BibTeX
@misc{pendergrass2016streaming,
  author = {Seth D. Pendergrass and J. Nathan Kutz and Steven L. Brunton},
  title = {{Streaming GPU Singular Value and Dynamic Mode Decompositions}},
  year = {2016},
  eprint = {1612.07875},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1612.07875},
}
Figure