# High-Performance Tensor Formulation of the Viterbi Algorithm for Hidden Semi-Markov Models

arXiv: https://arxiv.org/abs/2609.16500 · HTML: https://mlsanity.com/paper/2609.16500/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 4 of its 38 references that are in the map.
- First posted on arXiv 15 Sep 2026.

## Builds on (most cited first, 4 of 4)

- [Temporal Parallelization of Inference in Hidden Markov Models](https://mlsanity.com/paper/2102.05743/) (2021)
- [CUDAMPF++: A Proactive Resource Exhaustion Scheme for Accelerating Homologous Sequence Search on CUDA-enabled GPU](https://mlsanity.com/paper/1707.09683/) (2017)
- [ApHMM: Accelerating Profile Hidden Markov Models for Fast and Energy-Efficient Genome Analysis](https://mlsanity.com/paper/2207.09765/) (2022)
- [High-Throughput and Memory-Efficient Parallel Viterbi Decoder for Convolutional Codes on GPU](https://mlsanity.com/paper/2011.09337/) (2020)

## Abstract (arXiv)

Hidden Semi-Markov Models (HSMMs) are fundamental probabilistic models widely adopted across diverse domains, from computational biology to finance and signal processing. The Viterbi algorithm decodes the most likely state sequence given an HSMM and can be applied iteratively for ab initio model learning. However, existing Viterbi implementations remain sequential, and GPU-accelerated solutions are entirely absent, making HSMM decoding impractical for large-scale workloads. We present a tensor-based formulation of the Viterbi algorithm for HSMMs, restructuring the inner loops into tensor operations that naturally map onto SIMD units and massively parallel architectures. Building on this formulation, we provide optimized implementations spanning single- and multi-core CPUs, and, for the first time, GPU. Experimental evaluation demonstrates speedups of up to 14x on a single core, over 200x with multi-core, and over 570x on GPU over the state-of-the-art sequential baseline, establishing a new performance baseline for large-scale HSMM decoding.
