A Maximum Expected Utility Framework for Binary Sequence Labeling

Martin JanscheACL 2007

Abstract: In binary sequence labeling tasks, such as named entity recognition, models are typically evaluated using the F-score. However, standard decoding methods like Viterbi focus on Maximum A Posteriori (MAP) inference, picking the most likely sequence rather than the one that maximizes the expected evaluation metric. This paper, presented at ACL 2007, proposes a framework for Maximum Expected Utility (MEU) decoding. By treating the F-score as a "simple function" and utilizing a finite-state approach, the author demonstrates a polynomial-time algorithm to directly optimize for the expected F-score.

Introduction

The fundamental mismatch in sequence labeling lies between training/evaluation objectives and the inference phase. While the F-score is the gold standard for balancing precision and recall, MAP decoding finds the sequence $y$ that maximizes $Pr(y|x)$. This does not necessarily correspond to the sequence with the highest average F-score. Optimizing for the F-score through Maximum Expected Utility (MEU) decoding—finding a hypothesis $z$ that maximizes $E[F(z, y)]$—has historically been considered computationally prohibitive due to the non-decomposable nature of the F-score and the $2^n$ search space.

Methods

The author introduces a feasible MEU decoding framework using three primary algorithmic techniques:

  1. The Sorting Trick (Inner Maximization): For models with independent components (Markov order zero), the optimal hypothesis $\hat{z}$ is shown to be among only $n+1$ candidates. By sorting labels by their probability of being "1," the optimal sequence is found by setting the $m$ most probable labels to 1.
  2. The Simple Function Trick (Expectation Calculation): The F-score depends only on the number of true positives ($A$) and the total number of genuine positives ($T$). Since these are bounded by sequence length $n$, the F-score takes only $O(n^2)$ distinct values, allowing for efficient expectation calculation.
  3. Finite State Framework: A deterministic finite automaton (DFA) tracks the counts of $A$ and $T$ as the sequence is processed.
Figure 1: A deterministic finite automaton (DFA) representing the state space for tracking true positives (A) and total positives (T) in a binary sequence.

By composing this DFA with the probability model, expectations are computed via an algebraic path algorithm in $O(n^3)$ time, leading to an overall exact decoding complexity of $O(n^4)$.

Experimental Setup and Results

Experiments using synthetic data and simulated "over-trained" models (Beta distributions) validated the efficiency and accuracy of the algorithms. Key findings include:

  • Decoding vs. Thresholding: Maximizing expected F-score is distinct from simple thresholding (e.g., $p_i > 0.5$); the optimal threshold is globally dependent on the probability distribution across the entire sequence.
  • Approximation Efficiency: An approximate algorithm using a beam-search-like parameter $L$ reduces complexity to $O(n^3)$ or $O(n^2)$. In practice, even with $L=1$, the algorithm found the optimal hypothesis over 99% of the time, making it highly viable for real-world applications.

Conclusion and Limitations

While the $O(n^4)$ complexity and the independence assumption for the Sorting Trick present some scalability and modeling constraints, the framework provides a robust theoretical basis for aligning inference with evaluation metrics. Future work may extend this to higher-order Markov models (like CRFs) and other non-linear metrics such as the $P_k$ score used in text segmentation.

Summary updated

BibTeX
@inproceedings{jansche2007maximum,
  author = {Martin Jansche},
  title = {{A Maximum Expected Utility Framework for Binary Sequence Labeling}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2007},
}
Figure