Abstract
Providing sequence tagging that minimize Hamming loss is a challenging, but important, task. Directly minimizing this loss over a training sample is generally an NP-hard problem. Instead, existing sequence tagging methods minimize a convex upper bound that upper bounds the Hamming loss. Unfortunately, this often either leads to inconsistent predictors (e.g., max-margin methods) or predictions that are mismatched on the Hamming loss (e.g., conditional random fields). We present adversarial sequence tagging, a consistent structured prediction framework for minimizing Hamming loss by pessimistically viewing uncertainty. Our approach pessimistically approximates the training data, yielding an adversarial game between the sequence tag predictor and the sequence labeler. We demonstrate the benefits of the approach on activity recognition and information extraction/segmentation tasks.
Introduction
In sequence tagging tasks—such as identifying parts of speech in a sentence or activities in a video stream—the primary objective is to minimize the Hamming loss, which represents the total number of mislabeled elements. However, direct minimization of this loss is computationally intractable (NP-hard).
To circumvent this, traditional methods rely on surrogate loss functions. Conditional Random Fields (CRFs) utilize logarithmic loss, while Structural Support Vector Machines (SSVMs) employ hinge loss. A critical limitation of these surrogates is their potential misalignment with the Hamming loss. Specifically, SSVMs have been proven to be "Fisher inconsistent," meaning that even with infinite training data, they may fail to converge to the most accurate labels. This paper introduces Adversarial Sequence Tagging (AST) to address these inconsistencies through a robust, minimax framework.
Methods: The Adversarial Framework
AST frames sequence tagging as a zero-sum game between two players:
- The Predictor: Aims to select labels that minimize the expected Hamming loss.
- The Adversary: Aims to choose a distribution of labels that maximizes this loss, subject to constraints that ensure the distribution matches the feature statistics of the training data.
Algorithmic Strategies
Because the space of possible label sequences grows exponentially with sequence length, the authors developed two strategies to find the Nash equilibrium efficiently:
- Double Oracle Method: An iterative approach that considers a small subset of "best response" sequences for both players.
- Single Oracle Method: A specialized version for sequence tagging that exploits the decomposable nature of the loss function over time steps. This allows the predictor's choices to become independent, significantly speeding up computation for long sequences.
Experimental Setup
The framework was evaluated across three distinct sequence data domains:
- Human Activity Recognition: 12 activity classes (e.g., walking, sitting) derived from smartphone sensor data.
- Baboon Activity Recognition: GPS and accelerometer data used to classify troop behaviors in the wild.
- FAQ Segmentation: A natural language processing task labeling document lines as "head," "question," "answer," or "tail."
Key Results
AST consistently outperformed both CRFs and SSVMs across all benchmarks. The theoretical advantage of Fisher consistency translated into tangible accuracy gains, particularly in complex segmentation and recognition tasks.
Performance Highlights
- Accuracy: In the FAQ Segmentation task, AST achieved 94.42% accuracy, surpassing both CRFs (87.62%) and SSVMs (94.23%). In the Baboon dataset (Day 1), AST reached 77.30%, a significant improvement over the 75.63% achieved by the baseline models.
- Computational Efficiency: While SSVMs remain the fastest due to mature optimization, AST proved to be an order of magnitude faster than CRFs. This efficiency stems from avoiding the expensive normalization term (partition function) required by CRFs.
- Robustness: By training against a "pessimistic" adversary, the model becomes inherently more robust to data uncertainty.
Conclusion
Adversarial Sequence Tagging provides a mathematically rigorous and consistent framework for minimizing Hamming loss. By treating uncertainty as an adversarial game, AST achieves superior accuracy and better scalability than traditional probabilistic models like CRFs. Future research may extend this adversarial approach to other structured losses, such as F1-scores or precision-recall metrics, further broadening its applicability in information retrieval and beyond.
Summary updated