Expectation maximization algorithms for conditional likelihoods

Jarkko Salojärvi, Kai Puolamäki, Samuel Kaski

Introduction

In machine learning, models are generally categorized into generative models (which model the joint probability $p(x, c)$ of data and labels) and discriminative models (which model the conditional probability $p(c|x)$). The standard Expectation-Maximization (EM) algorithm is the gold standard for optimizing generative models with hidden variables because it mathematically guarantees that every step increases the likelihood.

However, applying EM to discriminative models is notoriously difficult. The conditional likelihood is a ratio: $p(c|x) = p(x, c) / p(x)$. Maximizing this requires simultaneously maximizing the numerator and minimizing the denominator. Historically, researchers have relied on the Extended Baum-Welch (EBW) algorithm for this task. Unfortunately, EBW depends heavily on heuristics and "magic numbers" to determine step sizes. If the step size is too large, the model overshoots the optimum; if it is too small, convergence is painfully slow.

This paper introduces a rigorous mathematical framework to replace these heuristics, proposing a "Discriminative EM" algorithm that offers automatic step-size selection and significantly smoother convergence.

Methodology: Discriminative EM

The core innovation of the proposed Discriminative EM algorithm lies in its handling of the denominator $p(x|\theta)$. The authors develop a robust theoretical foundation through several key steps:

  1. Bounding the Log-Ratio: To create a global lower bound for the log-ratio $\log p(y) - \log p(x)$, the authors apply Jensen’s inequality to the first term and derive a novel global upper bound for the second term.
  2. Curvature Control: A valid upper bound must exhibit a larger "curvature" than the objective function itself. By analyzing the Hessian (second derivative) of the log-likelihood, the authors identify a constant ($\Lambda$) that ensures the bound remains global.
  3. Local Approximation: To maintain computational feasibility, the algorithm employs a local approximation of the hidden variable distribution. While this makes the algorithm slightly less "global," it drastically improves speed and practical utility.
  4. Application to HMMs: The authors derive specific update formulas for Discriminative Hidden Markov Models (HMMs). This includes priors, transition probabilities, and observation densities for both Gaussian and Multinomial distributions.
Distribution parameters for Gaussian and Multinomial models

Datasets

The proposed algorithm was evaluated on two distinct classification tasks:

  • Exon Data: A subset of the Homo sapiens splice sites dataset, comprising DNA sequences (introns and exons) shorter than 135 base pairs.
  • Eye Movement Data: A dataset designed to predict the relevance of text based on a user's eye-tracking measurements.

Key Results and Insights

The Discriminative EM algorithm provides a theoretical justification for the formulas that speech recognition engineers have used for decades, effectively framing EM as a form of gradient ascent where the step size is automatically dictated by the model's structure. A key breakthrough was solving the "curvature secret": because the Bregman divergence for multinomial distributions isn't constant, the authors used a specific distance function $D(\mu, \hat{\mu})$ that simplifies the update rules into solvable second-order polynomials.

Smoother Convergence

In head-to-head tests against the industry-standard EBW, the Discriminative EM algorithm demonstrated vastly superior stability. EBW frequently overshoots the minimum and oscillates, requiring careful manual tuning of regularization parameters. In contrast, the proposed method converges smoothly without manual intervention, as the step length is determined by the data's internal correlation rather than empirical trial-and-error.

Convergence comparison: Discriminative EM (solid) vs. EBW (dashed)

Complexity Trade-offs

The computational cost for HMMs under this new algorithm is $O(S^3 T^2)$, where $S$ represents the number of states and $T$ is the sequence length. While this is higher than the $O(S^2 T)$ complexity of standard EM, the authors argue that the significant gains in stability and theoretical rigor make it a worthwhile trade-off.

Limitations and Future Work

  • Scalability: The $O(S^3 T^2)$ complexity implies that the algorithm may struggle with exceptionally long sequences or models featuring a massive number of hidden states when compared to standard gradient-based methods.
  • Local Approximation: Although the local approximation of $p(s|x, \theta)$ makes the algorithm computationally viable, it technically sacrifices the strict "guaranteed increase" property of a purely global EM. However, empirical experiments suggest this is not a practical issue.
  • Broader Exponential Families: The current work focuses primarily on Gaussian and Multinomial distributions. Extending this rigorous framework to encompass the entire exponential family remains an open direction for future research.

Summary updated

BibTeX
@inproceedings{salojarvi2005expectation,
  author = {Jarkko Salojärvi and Kai Puolamäki and Samuel Kaski},
  title = {{Expectation maximization algorithms for conditional likelihoods}},
  booktitle = {International Conference on Machine Learning},
  year = {2005},
  doi = {10.1145/1102351.1102446},
}
Figure