A Bayesian Approach for Accurate Classification-Based Aggregates

Q. A. Meertens, C. G. H. Diks, H. Jaap van den Herik, Frank W. Takes

TL;DR

This paper tackles the problem of biased aggregates (like sums or averages) derived from automated classification, especially when dealing with imbalanced datasets. The authors introduce a novel Bayesian approach that imposes constraints on classification error rates, effectively correcting for bias and preventing impermissible estimates, particularly in scenarios with limited labeled data.

What Problem Does This Paper Address?

Many real-world applications involve aggregating data based on classifications made by machine learning models. For instance, estimating the total area of different land cover types from satellite imagery or determining the overall sentiment of social media posts requires summing up values associated with predicted classes. However, if the classification model makes errors, these aggregates can become statistically biased. This bias can be significant, even with highly accurate classifiers, and is exacerbated by class imbalance (where some classes have far fewer examples than others). Existing methods for correcting this bias often struggle when the classification error rates are estimated from small test sets, leading to nonsensical results like negative counts. This paper aims to provide a robust bias correction method that works well even with limited labeled data.

Methods

The core of the paper is a novel Bayesian bias correction method. It builds upon existing work that uses a classification error model, where the true class is a stochastic variable dependent on the predicted class. The authors' key innovation lies in:

  • Bayesian Parameter Estimation: They formulate the likelihood function and posterior distribution for the classification error rates and base rates, using Dirichlet distributions as conjugate priors. This allows for analytical derivation of the posterior.
  • Imposing Parameter Constraints: Crucially, they introduce constraints on the model parameters. These constraints are derived to ensure that the corrected aggregate estimates are non-negative, addressing the "peculiar example" where a negative count was estimated. This is achieved by ensuring that the predicted aggregate vector falls within the convex hull of the possible aggregate vectors given the true, but unknown, classification error rates.
  • Three-Step Approach: The proposed method involves:
  • Choosing a prior (e.g., Jeffreys prior) and finding the posterior distribution of the classification error rates.
  • Drawing samples from the posterior and accepting only those that satisfy the imposed constraints.
  • Computing the bias-corrected aggregate for each accepted draw.

This approach allows for a numerical approximation of the posterior distribution of the corrected aggregate vector.

Datasets

The paper uses two main sources of data:

  • Simulated Data: Used to illustrate the "Peculiar Example" and to demonstrate the convergence of the Jeffreys prior to the true parameter value with increasing test set size.
  • Real-World Company Tax Returns Data: This dataset, previously studied in [14], contains information on the annual turnover of 18,939 companies. It was used to evaluate the proposed bias correction method against existing approaches. For the simulation, the predicted classifications from a separate study were used as the "true" classifications to enable accuracy assessment.

Key Insights and Ideas

  • Bias Doesn't Vanish with Data Size: The relative bias of classification-based aggregates does not depend on the total dataset size (N), meaning it won't disappear even with very large datasets if classification errors persist.
  • Small Test Sets are Problematic: Impermissible estimates (like negative counts) arise when classification error rates are estimated from small test sets, even if the overall dataset is large.
  • Constraints are Key: Imposing constraints on the model parameters is essential to prevent nonsensical estimates and improve the reliability of bias correction, especially with limited data.
  • Bayesian Approach Offers Flexibility: The Bayesian framework, particularly with the use of MCMC methods, allows for the incorporation of prior knowledge and the handling of non-conjugate priors, making the method adaptable to various real-world scenarios.

Key Results

  • Peculiar Example Correction: The proposed method corrected the impermissible estimate of -75 webshops in the "Peculiar Example" to a more reasonable posterior mean of 5.0 webshops.
  • Empirical Evaluation (Company Tax Returns):
    • For small test sets (n=50), the proposed constrained Bayesian method significantly reduced Mean Squared Error (MSE) compared to unconstrained Bayesian methods.
  • For larger test sets (n=2000), the proposed method performed comparably to the baseline method and unconstrained Bayesian methods in terms of MSE.
  • All bias correction methods (including the proposed one) showed substantial improvements over no correction, significantly reducing bias without drastically increasing variance.
  • The constrained method effectively eliminated impermissible estimates, even at the cost of a slightly increased MSE in some cases.

Limitations and Future Work

  • Assumption of Homogeneity: The current method assumes homogeneity of contingency matrices (i.e., classification error rates are the same for all data points). The authors suggest that relaxing this assumption, allowing error rates to depend on features or other data characteristics, would be a valuable future direction.
  • Reducing MSE Further: While the method reduces bias and prevents impermissible estimates, further work could focus on reducing the Mean Squared Error (MSE) by studying the bias-variance trade-off in more detail.
  • MCMC for Non-Conjugate Priors: The paper mentions that MCMC methods can be used for non-conjugate priors, but the empirical evaluation primarily focused on conjugate priors. Further exploration of MCMC's performance and efficiency would be beneficial.

Summary updated

BibTeX
@inproceedings{meertens2019bayesian,
  author = {Q. A. Meertens and C. G. H. Diks and H. Jaap van den Herik and Frank W. Takes},
  title = {{A Bayesian Approach for Accurate Classification-Based Aggregates}},
  booktitle = {SDM},
  year = {2019},
  doi = {10.1137/1.9781611975673.35},
}
Figure