Activity Recognition and Abnormality Detection with the Switching Hidden Semi-Markov Model

Thi V. Duong, Hung Hai Bui, Dinh Q. Phung, Svetha VenkateshCVPR 2005

Abstract

This paper addresses the problem of learning and recognizing human activities of daily living (ADL), which is an important research issue in building a pervasive and smart environment. In dealing with ADL, we argue that it is beneficial to exploit both the inherent hierarchical organization of the activities and their typical duration. To this end, we introduce the switching hidden semi-markov model (S-HSMM), a two-layered extension of the hidden semi-Markov model (HSMM) for the modeling task. Activities are modeled in the S-HSMM in two ways: the bottom layer represents atomic activities and their duration using HSMMs; the top layer represents a sequence of high-level activities where each high-level activity is made of a sequence of atomic activities. We consider two methods for modeling duration: the classic explicit duration model using multinomial distribution, and the novel use of the discrete Coxian distribution. In addition, we propose an effective scheme to detect abnormality without the need for training on abnormal data. Experimental results show that the S-HSMM performs better than existing models including the flat HSMM and the hierarchical hidden Markov model in both classification and abnormality detection tasks, alleviating the need for presegmented training data. Furthermore, our discrete Coxian duration model yields better computation time and generalization error than the classic explicit duration model.

Introduction

Recognizing Activities of Daily Living (ADL)—such as preparing a meal or performing a morning routine—is a cornerstone of pervasive computing and elder care. However, standard modeling techniques like the Hidden Markov Model (HMM) face two primary challenges. First, human activities are inherently hierarchical; a high-level goal like "making breakfast" is composed of atomic steps like "opening the fridge." Second, HMMs typically assume state durations follow a geometric distribution, implying that a person is most likely to leave a state immediately. In reality, activities like cooking have specific, non-instantaneous duration ranges.

To address these issues, this paper introduces the Switching Hidden Semi-Markov Model (S-HSMM). This two-layered architecture models both the hierarchy of activities and their typical durations, utilizing a novel discrete Coxian distribution for timing to achieve high accuracy and computational efficiency.

Methodology: The S-HSMM Framework

The S-HSMM architecture consists of two distinct layers. The Top Layer is a Markov chain representing high-level activities (e.g., "Making Coffee" transitioning to "Reading Paper"). The Bottom Layer consists of a sequence of Hidden Semi-Markov Models (HSMMs) that represent atomic, "switched" activities (e.g., being "at the cupboard" or "at the sink").

The Dynamic Bayesian Network (DBN) representation of the S-HSMM, showing the hierarchical relationship between high-level activities (z), atomic activities (x), and observations (y).

To facilitate inference and learning, the S-HSMM is represented as a Dynamic Bayesian Network (DBN). This allows the use of standard algorithms like Expectation-Maximization (EM) to train the model on unsegmented data, effectively learning the transitions between complex activities without manual labeling.

Discrete Coxian Duration Modeling

A key innovation of this work is the use of the discrete Coxian distribution to model state durations. Traditional "explicit duration" models often use multinomial distributions, which require a parameter for every possible time unit, leading to high computational costs. Conversely, standard HMMs use geometric distributions that fail to capture realistic human timing.

Comparison of duration probability mass functions (pmf): (a) empirical data, (b) the discrete Coxian model, and (c) the standard geometric distribution used in HMMs. The Coxian model closely approximates reality while remaining computationally efficient.

The Coxian distribution models duration as a sequence of "phases," allowing it to capture complex, multi-modal timing patterns with significantly fewer parameters than multinomial models. This acts as a form of temporal compression, avoiding the "curse of dimensionality."

Experimental Evaluation

The model was evaluated in a real-world kitchen environment quantized into 28 cells (1m² each) and monitored by four ceiling-mounted cameras. The dataset included:

  • Morning Routine: 40 unlabeled sequences of a six-step routine (entering, breakfast, washing dishes, coffee, reading, leaving).
  • Abnormality Detection: 18 sequences where subjects spent significantly too much or too little time at specific locations.

Key Results and Discussion

The S-HSMM demonstrated significant improvements over both flat HSMMs and standard Hierarchical HMMs (HHMMs).

  1. Recognition Accuracy: The S-HSMM achieved near-perfect accuracy (92.5% to 100%) in recognizing high-level activities. In contrast, the HHMM (which lacks duration modeling) failed to correctly segment several tasks, proving that both hierarchy and duration are necessary for robust ADL recognition.
  2. Computational Efficiency: The Coxian-based model was 4 times faster than the multinomial version (0.8s vs 3.0s per time slice), making it viable for real-time monitoring applications.
  3. Unsupervised Abnormality Detection: By "inverting" the learned duration model, the system could flag behavioral deviations in real-time. It achieved an 84% true positive rate for detecting abnormal durations with only a 10% false alarm rate, without requiring any abnormal data during the training phase.

Conclusion

The S-HSMM provides a robust framework for tracking complex human behavior by integrating hierarchical structure with efficient temporal modeling. While the current study utilized a two-layer hierarchy and fixed Coxian phases, future work will explore deeper hierarchies and automated hyperparameter tuning to scale the system for multi-occupant, whole-house environments.

Summary updated

BibTeX
@inproceedings{duong2005activity,
  author = {Thi V. Duong and Hung Hai Bui and Dinh Q. Phung and Svetha Venkatesh},
  title = {{Activity Recognition and Abnormality Detection with the Switching Hidden Semi-Markov Model}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2005},
  url = {https://openreview.net/forum?id=rkWUFRbd-S},
}
Figure