When modeling systems that change over time—such as speech, human behavior, or biological processes—we often turn to Hidden Markov Models (HMMs). HMMs assume that the system moves through a sequence of unobserved, discrete "hidden" states, and each state spits out observable data.
To make the math clean, standard HMMs rely on the Markov property: the probability of transitioning to the next state depends only on the current state, completely ignoring how long the system has already spent there. While computationally elegant, this assumption introduces a severe mathematical distortion known as the geometric duration bias.
The Memoryless Flaw of Standard Markov Models
In a standard discrete-time HMM, staying in the same state from one time step to the next is represented by a self-loop with a constant probability $p$.
┌───┐ p
│ ↺
┌─┴───┐
│State│ ───> Transition to next state (1 - p)
└─────┘
Because this probability $p$ never changes, the total time $t$ spent in any given state follows a geometric distribution:
$$P(t) = p^{t-1}(1-p)$$
For continuous-time models, like standard Continuous Time Bayesian Networks (CTBNs) or standard epidemiological models, this manifests as an exponential distribution.
Both geometric and exponential distributions are memoryless. If you flip a coin every second to decide whether to leave a room, the probability that you leave in the next second is always the same, regardless of whether you have been sitting there for five minutes or five hours.
This creates a fundamental absurdity for real-world modeling: the most likely duration for any state is always a single time step ($t=1$). The probability distribution decays monotonically.
Probability
▲
│█
│█ ▄
│█ █ ▄
│█ █ █ ▄
│█ █ █ █ ▄ ▄
└────────────────► Time steps (t)
1 2 3 4 5
As Nicholas P. Hughes et al. point out in Markov Models for Automated ECG Interval Analysis, this mathematical assumption is physically and biologically unrealistic. Most real-world processes have a non-zero minimum duration and a specific temporal spread. They do not peak at the very first instant and rapidly decay.
Real-World Consequences of the Geometric Bias
Forcing a memoryless distribution onto systems with inherent physical or behavioral rhythms causes models to break down in predictable ways:
- Oversegmentation: In time-series analysis, the model constantly guesses that a state is about to end. As Abdul Fatir Ansari et al. show in Deep Explicit Duration Switching Models for Time Series, this memoryless property causes "oversegmentation," where the model identifies spurious, rapid transitions between states instead of recognizing a single, stable, long-term behavior.
- Physiological Misalignment: Biological events have strict physical constraints. For example, a heart wave component or a disease incubation period cannot physically last for only a millisecond. Frederic Grabowski et al. demonstrate in Dynamics of COVID-19 pandemic at constant and time-dependent contact rates that standard exponential assumptions fail to capture the mandatory latent periods pathogens require before a host becomes infectious.
- Unnatural Synthesis: When HMMs are used to generate data, such as speech or physical gestures, the geometric duration constraint forces jerky transitions and unrealistic timing. Human actions have stable, non-exponential time spans, like a physical hold in a gesture (Pradeep Natarajan et al., Hierarchical Multi-channel Hidden Semi Markov Models).
The Solution: Explicit Duration Modeling
To fix this, researchers use Hidden Semi-Markov Models (HSMMs) or Explicit Duration HMMs (EDHMMs).
Instead of flipping a coin at every single time step to decide whether to stay or go, the model decouples where it goes from how long it stays. The generative process changes fundamentally:
- The system chooses a new state $S_i$ based on a transition matrix (where self-loops are forbidden, so $P(S_i \mid S_i) = 0$).
- Upon entering $S_i$, the system explicitly draws a duration $d$ from a dedicated probability distribution $P(d \mid S_i)$.
- The system stays in $S_i$ for exactly $d$ time steps, emitting observations, and only then transitions to the next state.
Standard HMM: [State A] ──(coin flip each step)──> [State B]
Explicit HMM: [State A] ──► Draw duration d=4 ──► Stay 4 steps ──► [State B]
By explicitly defining $P(d \mid S_i)$, we can choose distributions that match the physical reality of the domain:
- Poisson or Negative Binomial Distributions: Used by Michael Dewar et al. in Inference in Hidden Markov Models with Explicit State Duration Distributions to model realistic dwell times where the probability of staying peaks at a non-minimal interval.
- Gamma Distributions: Employed by Nicholas P. Hughes et al. to respect the minimum and maximum physiological timeframes of cardiac cycles.
- Erlang-Coxian Approximations: Introduced to continuous-time networks by Karthik Gopalratnam et al. in Extending Continuous Time Bayesian Networks to capture scenarios where the likelihood of an event increases as time progresses (such as travel times).
- Nonparametric Distributions: Utilized by Neil Dhir et al. in Interpreting Lion Behaviour as Probabilistic Programs to discover complex animal behaviors from accelerometer data without forcing a rigid parametric shape on the duration of activities.
Overcoming the Computational Cost
If explicit duration modeling is so much better, why isn't it the default? The answer is computational complexity.
In a standard HMM, running the forward-backward algorithm over a sequence of length $T$ with $N$ states takes $O(N^2 T)$ time. When you introduce explicit durations up to a maximum length $D$, the state space effectively expands because the model must track how long it has been in the current state. This bumps the complexity up to $O(N^2 T \cdot D)$ or worse, which becomes prohibitively expensive for long sequences or large state spaces.
Modern research focuses on making this inference tractable through clever algorithmic approximations:
- Beam Sampling: Michael Dewar et al. introduced a beam sampling inference procedure that adaptively restricts the duration trajectories considered, preventing computational explosion without sacrificing accuracy.
- Approximate Bayesian Computation (ABC): In Approximate Bayesian Computation for an Explicit-Duration Hidden Markov Model of COVID-19 Hospital Trajectories, Gian Marco Visani et al. leverage ABC to learn complex hospital stay durations using only aggregate public data, bypassing the need to compute exact individual likelihoods.
- Discriminative Formulations: Rather than computing full generative probabilities, Gunnar Ratsch et al. in Large Scale Hidden Semi-Markov SVMs frame the problem as a structured Support Vector Machine (SVM). They use a two-stage learning strategy—training local segment detectors first and then optimizing globally—allowing the model to scale to thousands of sequences for tasks like gene structure prediction.
By breaking free from the memoryless constraint, explicit duration modeling allows machine learning systems to respect the arrow of time as it exists in the physical world: where things take time to happen, persist for characteristic intervals, and don't just vanish at the next tick of the clock.
Key Foundational Work
Markov Models for Automated ECG Interval Analysis (2003) — contributed 2 concept elements to this direction.
Activity Recognition and Abnormality Detection with the Switching Hidden Semi-Markov Model (2005) — contributed 1 concept elements to this direction.
Efficient estimation of hidden state dynamics from spike trains (2005) — contributed 1 concept elements to this direction.