Active Sentence Learning by Adversarial Uncertainty Sampling in Discrete Space

Dongyu Ru, Yating Luo, Lin Qiu, Hao Zhou, Lei Li, Weinan Zhang, Yong Yu

TL;DR

This paper introduces Adversarial Uncertainty Sampling in Discrete Space (AUSDS), a novel active learning method for sentence understanding. By leveraging adversarial attacks within a pre-trained language model's latent space, AUSDS efficiently identifies informative unlabeled sentences, significantly reducing annotation costs and improving model performance compared to traditional methods.

What Problem Does This Paper Address?

Training effective natural language processing (NLP) models, especially deep neural networks, typically requires vast amounts of labeled data. Acquiring this labeled data is a bottleneck due to the significant human effort and cost involved. Active learning aims to mitigate this by intelligently selecting the most informative unlabeled data points for human annotation, thereby maximizing the model's learning from a limited budget.

Traditional uncertainty sampling methods, a popular active learning strategy, identify samples near the decision boundary by calculating their uncertainty (e.g., entropy). However, these methods are computationally expensive as they require iterating through all unlabeled data to find the most uncertain samples. This high computational cost prevents frequent sampling, leading to an "ineffective sampling" problem: in the early stages of training, the decision boundary shifts rapidly, making previously selected samples less relevant as the model updates. This can result in a biased model that doesn't truly reflect the overall data distribution.

Methods

The core innovation of this paper is the Adversarial Uncertainty Sampling in Discrete Space (AUSDS) framework. It addresses the limitations of traditional uncertainty sampling by:

  • Leveraging Pre-trained Language Models (PLMs): Sentences are first mapped into the latent space of a pre-trained language model (like BERT or ELMo). This continuous latent space allows for the application of adversarial techniques.
  • Adversarial Attack for Uncertainty: Instead of exhaustively searching the entire unlabeled dataset, AUSDS uses adversarial attacks to generate "adversarial data points" in the latent space. These points are designed to be close to the decision boundary.
  • Efficient Sample Retrieval (KNN Search): Since adversarial data points in the latent space don't directly correspond to specific sentences, a k-nearest neighbor (KNN) search is employed. This efficiently finds the actual unlabeled sentences whose latent representations are closest to the generated adversarial points. This significantly narrows down the search space compared to traditional methods.
  • Mitigating Sampling Bias: To further improve robustness, AUSDS mixes a small proportion of randomly selected samples with the adversarially identified uncertain samples. This helps balance exploration and exploitation, preventing the model from getting stuck in a narrow region of the data.
  • Information Entropy Ranking: Finally, the mixed samples are ranked by their information entropy to select the most uncertain ones for annotation.

The overall framework involves alternating between a training block (updating the model) and a sampling block (using AUSDS to select new data). The encoder is frozen during training to maintain a stable latent space for efficient sampling, and fine-tuned periodically.

Datasets

The paper evaluates AUSDS on five publicly available datasets across two NLP tasks:

  • Sequence Classification:
    • Stanford Sentiment Treebank (SST-2 / SST-5)
    • Microsoft Research Paraphrase Corpus (MRPC)
    • AG's News Corpus (AG News)
  • Sequence Labeling:
    • CONLL 2003 Named Entity Recognition dataset

The datasets vary in size and complexity, allowing for a comprehensive evaluation of the proposed method.

Key Insights and Ideas

  • Adversarial Attacks as a Tool for Active Learning: The paper cleverly repurposes adversarial attacks, typically seen as a security threat, as a mechanism to efficiently identify informative data points near the decision boundary. This is a novel application of adversarial techniques.
  • Bridging Discrete Text and Continuous Latent Space: The use of pre-trained language models is crucial. By mapping discrete text into a continuous latent space, the paper makes adversarial attacks feasible for sentence-level active learning, overcoming a significant challenge.
  • The "Ineffective Sampling" Problem is Real: The paper highlights how infrequent sampling in active learning, especially in the early stages of model training, can lead to suboptimal data selection due to a rapidly changing decision boundary. AUSDS's frequent and efficient sampling directly addresses this.
  • Efficiency Gains are Substantial: The proposed AUSDS method offers a significant speedup (over 10x) compared to traditional uncertainty sampling, making real-time active learning at the batch level achievable.

Key Results

  • Improved Sampling Effectiveness: AUSDS consistently outperforms random sampling and traditional uncertainty sampling across the tested datasets and tasks, achieving better model performance with the same amount of labeled data.
  • Significant Speedup: AUSDS demonstrates an average speedup of over 10x compared to traditional uncertainty sampling (US), making it computationally feasible for frequent application. For instance, on SST-2, AUSDS (FGV) is 38x faster than US.
  • Robustness Across Encoders: Experiments with both BERT and ELMo as encoders show that AUSDS's effectiveness is not heavily dependent on a specific PLM, indicating good generalization.
  • Qualitative Analysis: Figure 3 shows that samples selected by AUSDS have lower margins (indicating higher uncertainty and proximity to the decision boundary) compared to other methods.

Limitations and Future Work

  • Adversarial Attack Suitability: The paper notes that certain adversarial attack methods (DeepFool and C&W) are not suitable for sequence labeling tasks, requiring careful selection of attack strategies based on the task.
  • Hyperparameter Tuning: While the paper provides implementation details, the optimal choice of hyperparameters (e.g., the ratio p for mixing random samples, fine-tuning interval j, and step size k) might require further exploration for specific applications.
  • Future Work: The authors suggest that their framework's ability to efficiently identify critical data points could be extended to other areas of NLP and machine learning where active learning is beneficial. The paper also implies that further research into task-specific adversarial attack strategies could yield even better results.

Summary updated

BibTeX
@inproceedings{ru2020active,
  author = {Dongyu Ru and Yating Luo and Lin Qiu and Hao Zhou and Lei Li and Weinan Zhang and Yong Yu},
  title = {{Active Sentence Learning by Adversarial Uncertainty Sampling in Discrete Space}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.findings-emnlp.441},
}
Figure