Skip to main content
QUICK REVIEW

[Paper Review] Metric-Optimized Example Weights

Sen Zhao, Mahdi Milani Fard|arXiv (Cornell University)|May 27, 2018
Machine Learning and Data ClassificationComputer Science6 citations
TL;DR

This paper proposes Metric-Optimized Example Weights (MOEW), a method that learns example weights during training to directly optimize complex, non-Ideal test metrics on a validation set. By adapting the loss function via learned weights, MOEW improves model performance on non-IID data and arbitrary metrics—including black-box and application-specific ones—demonstrating significant gains over uniform and domain adaptation weighting in real-world and benchmark tasks.

ABSTRACT

Real-world machine learning applications often have complex test metrics, and may have training and test data that are not identically distributed. Motivated by known connections between complex test metrics and cost-weighted learning, we propose addressing these issues by using a weighted loss function with a standard loss, where the weights on the training examples are learned to optimize the test metric on a validation set. These metric-optimized example weights can be learned for any test metric, including black box and customized ones for specific applications. We illustrate the performance of the proposed method on diverse public benchmark datasets and real-world applications. We also provide a generalization bound for the method.

Motivation & Objective

  • To address the gap between training objectives and real-world test metrics in machine learning applications.
  • To improve model performance when training and test data are not identically distributed (non-IID).
  • To enable optimization of arbitrary, possibly black-box or complex, test metrics through learned example weighting.
  • To reduce reliance on metric-specific surrogate losses by directly optimizing the target metric via adaptive weighting.
  • To limit validation data requirements by modeling weights in a low-dimensional embedding space.

Proposed method

  • The method learns a weighting function over training examples using a validation set that is IID with the test distribution.
  • Example weights are optimized to maximize the test metric on the validation set, using a differentiable or gradient-based optimization process.
  • The weighting function is defined over a low-dimensional embedding of the input features and labels, obtained via an autoencoder or similar method.
  • The final model is trained using a weighted loss function where each example’s contribution is scaled by its learned weight.
  • The approach generalizes to any test metric, including AUC, F-measure, precision at recall, and custom business objectives.
  • The method is robust to distribution shifts between training and test data, as long as validation data is representative of the test distribution.

Experimental results

Research questions

  • RQ1Can example weighting be effectively learned to optimize arbitrary, complex test metrics, including black-box and application-specific ones?
  • RQ2How does MOEW perform compared to uniform weighting and optimal domain adaptation (e.g., Shimodaira) in non-IID data settings?
  • RQ3Can MOEW achieve significant improvements in real-world applications with complex, multi-objective metrics?
  • RQ4Does learning weights in a low-dimensional embedding space reduce validation data requirements without sacrificing performance?
  • RQ5Can MOEW be used to guide active learning or data sampling by identifying high-weight regions in feature space?

Key findings

  • In a spam detection task, MOEW achieved a test metric score of 1.849 ± 0.133 (normalized to uniform = 1.0), significantly outperforming uniform weighting (1.000 ± 0.040) and Shimodaira’s domain adaptation (1.210 ± 0.063).
  • In a second spam detection study with large result providers, MOEW achieved 8.057 ± 0.923, compared to 1.010 ± 0.137 for Shimodaira and 1.000 ± 0.124 for uniform weighting.
  • In a web quality classification task, MOEW improved the mean fine-grained quality score of positively classified pages from 0.7113 ± 0.0004 (uniform) to 0.7176 ± 0.0004.
  • MOEW demonstrated effectiveness even when domain adaptation weighting reduced to uniform weighting, showing its superiority in non-IID settings.
  • The method generalizes to black-box metrics and complex objectives, such as cost-aware spam blocking, where it outperformed standard baselines.
  • The authors provide a generalization bound for the method, supporting its theoretical soundness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.