Behavioral Sequence Modeling with Ensemble Learning

Maxime Kawawa-Beaudan, Srijan Sood, Soham Palande, Ganapathy Mani, Tucker Balch, Manuela Veloso

TL;DR

Modeling human behavior from temporal data often forces a trade-off between complex, overfit-prone deep neural networks and simplistic aggregated features that lose sequential context. The authors introduce HMM-e, an ensemble framework of Hidden Markov Models that normalizes likelihoods across variable-length sequences using pairwise voting. With only four daily behavioral features, HMM-e outperforms traditional machine learning baselines and approaches the performance of deep learning models at a fraction of the computational and parameter cost.

What Problem Does This Paper Address?

Human behavior—from financial fraud and trading patterns to mental health indicators—is inherently sequential. However, standard modeling pipelines struggle with two major issues:

  1. Loss of sequential context: Many industry solutions rely on event-level classification and aggregate summary statistics (e.g., total weekly activity), ignoring the order and transitions between actions.
  2. Pitfalls of deep sequential models: Deep architectures like RNNs or Transformers require massive datasets, are prone to overfitting in severe class-imbalance regimes, are computationally heavy, and act as black boxes.

While Hidden Markov Models (HMMs) are lightweight, interpretable, and natural fits for sequential transitions, standard HMMs degrade when comparing sequences of varying lengths (since sequence likelihood decays exponentially with length) and struggle to capture complex, multi-modal behavior using a single model per class.

Methods

The authors introduce HMM-e, a framework spanning sequence extraction and ensemble-based sequence classification:

  • Sequence Construction: Raw continuous streams are partitioned by agent/user, cleaned, and demarcated into distinct observation sequences using activity pauses (short pauses as wait states, long pauses as sequence boundaries).
  • Ensemble Hidden Markov Models (HMM-e): Rather than training a single HMM per class, the framework trains an ensemble of $N$ positive-class models $\{\lambda_1^+, \dots, \lambda_N^+\}$ and $M$ negative-class models $\{\lambda_1^-, \dots, \lambda_M^-\}$. Each model is trained on a small, random subsample ($s\%$, set to 1%) of the training data with 3 hidden states.
  • Implicit Length Normalization: To compare variable-length sequences without length bias, HMM-e evaluates the likelihood of an unseen sequence $O$ across all base models and calculates a pairwise rank-based composite score: $$s(O) = \sum_{i=1}^N \sum_{j=1}^M \mathbf{1}\{p(O \mid \lambda^+_i) > p(O \mid \lambda^-_j)\}$$ Because comparisons are strictly between models scoring the same sequence, the length-dependent penalty cancels out.

  • Feature Representation & Clustering: Model likelihoods can be $L_2$-normalized into fixed-dimensional embedding vectors $f_i$ for downstream classifiers or unsupervised clustering (e.g., K-Means + UMAP).

Datasets

The authors evaluate their method on the GLOBEM dataset, a benchmark for longitudinal human behavior modeling:

  • Task: Binary depression detection across 497 participants over four years (2018–2021).
  • Input Data: Filtered 28-day historical sequences consisting of just four daily continuous features:
  • Smartphone moving-to-static time ratio
  • Total screen time (minutes)
  • Total sleep time (minutes)
  • Total step count
  • Validation Strategy: "All-but-one" year cross-validation (training on three years and evaluating on the fourth).

Key Insights and Ideas

  • Pairwise rank voting bypasses length calibration: Calculating likelihood ratios across different sequences of unequal lengths is notoriously brittle. Comparing within a sequence across opposing class ensembles neatly sidesteps length-normalization math.
  • Subsampling yields diversity without overfitting: Training each base learner on only 1% of the class data encourages base models to specialize in distinct behavioral patterns, counteracting majority-class dominance in imbalanced datasets.
  • Minimalist feature sets rival dense feature engineering: Many GLOBEM benchmark models use tens to hundreds of engineered features. The authors demonstrate that modeling dynamic transitions across just four raw behavioral metrics yields competitive discriminative power.

Key Results

  • Outperforming Classical ML: On GLOBEM, HMM-e achieves 53.6% AUC-ROC and 52.5% Balanced Accuracy, outperforming standard SVM baselines (49.9% AUC / 49.8% Balanced Acc) and beating Random Forest on balanced accuracy (50.8%).
  • Competitive with Deep Learning: HMM-e approaches the performance of the benchmark's top deep learning model, Reorder (a CNN-based model with 56.3% AUC / 54.7% Balanced Acc), while remaining within 2.7 percentage points of AUC.
  • Efficiency & Parameter Footprint:
  • The entire HMM-e ensemble comprises 6,000 parameters compared to Reorder’s 10,099 parameters.
  • HMM-e trains in 5 minutes on CPU (no GPU required on an AWS r5.24xlarge instance), compared to 18 minutes for Reorder.

Limitations and Future Work

  • Performance Gap vs. Deep Networks: While much lighter, HMM-e still slightly trails tailored CNN architectures on raw AUC-ROC and balanced accuracy.
  • Empirical Scope: The quantitative evaluation is limited to the GLOBEM depression detection benchmark; real-world financial fraud and transaction network tasks mentioned in the motivation were not empirically reported in this paper.
  • Hyperparameter Sensitivity: The ensemble requires configuring the number of base learners ($N, M$) and the subsampling percentage ($s$), which must be balanced to ensure adequate coverage of the data distribution.

Summary updated

BibTeX
@inproceedings{kawawabeaudan2024behavioral,
  author = {Maxime Kawawa-Beaudan and Srijan Sood and Soham Palande and Ganapathy Mani and Tucker Balch and Manuela Veloso},
  title = {{Behavioral Sequence Modeling with Ensemble Learning}},
  booktitle = {Behavioral ML @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=YoZ525iS6Z},
}
Figure