Unsupervised training data re-weighting for natural language understanding with local distribution approximation

Jose Garrido Ramas, Dieu-thu Le, Bei Chen, Manoj Kumar, Kay RottmannEMNLP 2022

TL;DR

This paper tackles the common problem of "distribution mismatch" in Natural Language Understanding (NLU) models, where training data doesn't reflect real-world usage. They propose an unsupervised method to re-weight training data based on local distribution approximations in an embedding space, effectively making the training data more representative of live data without needing new annotations. This approach shows promise in improving NLU model performance by mitigating sampling bias.

What Problem Does This Paper Address?

Production NLU models, like those powering voice assistants, are trained on offline datasets. However, the distribution of this training data often differs from the live, online data the model encounters in the real world. This mismatch can arise from various factors, including biased sampling schemes, seasonal changes in user behavior, or the inclusion of out-of-domain data. Consequently, models trained on this biased data can exhibit degraded accuracy and potentially unfair performance across different user groups. While manual upsampling of classes is a common mitigation strategy, it's often suboptimal due to the complexity and variability of natural language. Furthermore, obtaining accurate live data distributions for manual annotation can be challenging. This paper aims to address this gap by providing an unsupervised method to adjust training data distributions to better align with live data, without requiring manual annotation.

Methods

The core of the proposed method is unsupervised training data re-weighting using local distribution approximation in an embedding space. Here's a breakdown:

  1. Mapping to Embedding Space: Utterances from both offline training data and online live data are mapped into a shared embedding space. The paper uses Sentence-BERT (specifically paraphrase-MiniLM-L6-v2) for this, which is designed to create semantically meaningful embeddings where similar sentences are close together.
  2. Local Distribution Approximation: For each offline training utterance, the method estimates the local distribution of both training and live data within its neighborhood in the embedding space. This neighborhood is defined using either:
  3. K-Nearest Neighbors (KNN): The K nearest neighbors in the combined embedding space.
  4. K-Means Clustering: Where each cluster represents a neighborhood.
  5. Weight Calculation: A weight ($w_i$) is assigned to each offline training utterance. This weight is the ratio of the probability of an utterance belonging to the live data distribution within its neighborhood to the probability of it belonging to the training data distribution within the same neighborhood. A weight greater than 1 indicates the utterance is more representative of live data and should be upsampled, while a weight less than 1 suggests it's less representative and should be downsampled.
  6. Resampling: The offline training data is then resampled based on these calculated weights. This effectively adjusts the training data distribution to better match the live data distribution.

The paper also proposes a baseline method called "B-intent," which is an intent-based approach that upsamples/downsamples based on class labels, serving as a comparison to their unsupervised methods.

Datasets

The authors evaluated their methods on:

  • A large commercial voice assistant dataset: This dataset was de-identified, and a sample of unannotated live data from the previous month was used as representative of current usage.
  • Two public datasets:
    • SLURP (Spoken Language Understanding Resource Package): A benchmark for spoken language understanding.
  • SNIPS: A dataset for intent classification and slot labeling.

For the public datasets, the authors simulated distribution mismatches using two strategies:

  • Intent-based sampling bias: Intentionally downsampling certain intent classes.
  • Adding Out-of-Domain (OOD) data: Combining data from one task into the training set of another.

Key Insights and Ideas

  • Unsupervised re-weighting is effective: The core idea that you can adjust training data distribution without manual labels is powerful, especially for dynamic, real-world systems.
  • Local distribution matters: Focusing on the "neighborhood" in the embedding space, rather than just global distributions, allows for a more nuanced understanding of how specific utterances relate to live data.
  • Interpretability of R-KMeans: The R-KMeans approach, where weights are assigned per cluster, offers better interpretability. Researchers can inspect clusters to understand why certain utterances are up/down-weighted, which is valuable for debugging and understanding model behavior.
  • Generalizability: The unsupervised nature of the approach makes it applicable to various NLU tasks, not just intent classification and slot filling.

Key Results

  • Improved Performance: Both unsupervised methods (R-KNN and R-KMeans) generally outperformed the baselines (B-Bias and B-intent) on public datasets.
  • Statistical Significance: The improvements from R-KMeans over the baselines were statistically significant (95% confidence level).
  • Commercial Dataset Gains: On the commercial dataset, R-KMeans reweighting showed improvements, with the "Home Automation" domain seeing a significant 13.77% reduction in error rate and an overall improvement of 4.63%.
  • R-KNN vs. R-KMeans: While R-KMeans showed statistically significant improvements over baselines, the difference between R-KNN and R-KMeans was not statistically significant. However, R-KMeans was favored for its interpretability.

Limitations and Future Work

  • Need for Live Annotated Data for Evaluation: A significant limitation is that evaluating the performance of the reweighting methods requires live annotated data (test data), which is not available during model deployment. Obtaining this data can be a challenge in real-world applications.
  • Per-Population Accuracy Not Studied: The paper focuses on overall accuracy. There's a risk that improving overall accuracy might not benefit all user populations equally, and this impact hasn't been studied.
  • Future Work:
    • Experimenting with combining their method with data augmentation techniques.
  • Studying the impact of reweighting on fairness across different populations.
  • Investigating bias detection methods to automatically trigger the reweighting model.

Summary updated

BibTeX
@inproceedings{ramas2022unsupervised,
  author = {Jose Garrido Ramas and Dieu-thu Le and Bei Chen and Manoj Kumar and Kay Rottmann},
  title = {{Unsupervised training data re-weighting for natural language understanding with local distribution approximation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
}

Loading related content...

Figure