An Adaptive Metric Machine for Pattern Classification

Carlotta Domeniconi, Jing Peng, Dimitrios Gunopulos

Overview

Standard Nearest Neighbor (NN) classifiers often fail in high-dimensional spaces because they treat all features as equally important. To address this, researchers introduced ADAMENN (Adaptive Metric Nearest Neighbor), an algorithm that learns a custom, local distance metric for every query point. By "stretching" the search space along irrelevant dimensions and "shrinking" it along influential ones, ADAMENN significantly reduces classification bias and effectively combats the curse of dimensionality.

The Problem: The Curse of Dimensionality

The "curse of dimensionality" is a classic hurdle in machine learning. As the number of features (dimensions) increases, data points become increasingly sparse. The traditional $K$-Nearest Neighbor ($K$-NN) rule relies on Euclidean distance, which assumes the input space is isotropic—meaning it assumes the class labels change at the same rate in every direction.

In reality, most high-dimensional datasets have "irrelevant" dimensions where class probabilities stay constant, and "influential" dimensions where they change rapidly. Using a standard "spherical" neighborhood in these cases introduces severe bias. The neighborhood ends up capturing points that are far away in terms of class identity, even if they are "close" in Euclidean distance. The authors sought a way to adapt the distance metric locally to fit the actual shape of the data.

The ADAMENN Approach

The core innovation of ADAMENN is a query-based weighting scheme that dynamically adjusts the distance metric based on local feature relevance:

  1. Local Relevance Measure: For a specific query point $x_0$, the algorithm estimates how much each feature $i$ contributes to predicting the class posterior probabilities. It uses a weighted Chi-squared distance analysis to compare the local class probability to the probability conditioned on a specific feature.
  2. Neighborhood Warping: Instead of a rigid sphere, the algorithm creates an ellipsoidal neighborhood.
  3. If a feature is highly relevant, the metric "constricts" along that axis, making small differences in that feature count heavily.
  4. If a feature is irrelevant, the metric "elongates" along that axis, effectively ignoring large differences in that feature.
  5. Exponential Weighting: The relevance values are converted into weights using a Boltzmann-style exponential distribution. This allows the user to tune a parameter $c$ to control how aggressively the algorithm ignores less relevant features.
  6. Estimation: Since true class probabilities are unknown, the algorithm estimates them using two local neighborhoods: a smaller one ($N_1$) to estimate the posterior and a larger one ($N_2$) to estimate the feature-conditioned expectations.

Key Insights and Performance

Query-Based Adaptation

Unlike global dimensionality reduction techniques like PCA, ADAMENN is local. A feature might be irrelevant in one part of the feature space but vital in another. By calculating weights for every query, the model adapts to the local geometry of the class boundaries. It bridges the gap between recursive partitioning (like decision trees) and global discriminant analysis, providing the flexibility of local weighting without the data-hungry requirement of estimating full covariance matrices.

Robustness and Accuracy

The authors evaluated ADAMENN on nine real-world datasets from the UCI Machine Learning Repository (including Iris, Sonar, Vowel, Glass, and Image). ADAMENN achieved the best or near-best performance across all nine datasets. For example, on the 60-dimensional Sonar dataset, it achieved a 9.1% error rate, compared to 12.5% for standard $K$-NN and 23.1% for C4.5 decision trees.

Robustness ratio comparison across different classification algorithms. ADAMENN consistently shows the lowest median ratio, indicating superior robustness.

To measure overall reliability, the authors used a robustness ratio ($b_m$) to calculate how far a method's error was from the best possible result for each dataset. ADAMENN proved to be the most robust: in 5 out of 9 cases, it was the top performer (median $b_m = 1.0$), and in 8 out of 9 cases, it was within 18% of the best result.

Handling High-Dimensional Noise

In high-dimensional noise simulations, the authors found that while standard $K$-NN and DANN (Discriminant Adaptive Nearest Neighbor) saw their bias spike as noise variables were added, ADAMENN remained remarkably stable.

Squared bias as a function of the number of noise variables. ADAMENN maintains a stable, low bias compared to other methods as noise increases.

As shown above, ADAMENN effectively "averages out" the noise by assigning near-zero weight to irrelevant dimensions, preventing the bias inflation that plagues traditional distance-based classifiers.

Limitations and Future Work

While powerful, ADAMENN comes with trade-offs:

  • Computational Complexity: Because the metric is query-based, the algorithm must perform local probability estimations and weight calculations for every single test point. This makes it significantly more computationally expensive than a standard $K$-NN search.
  • Parameter Sensitivity: The method introduces several hyperparameters, such as $K$ (neighbors for the final classification), $L$ (points for local estimation), and $c$ (the weighting strength). These must be determined via cross-validation, adding to the pre-processing overhead.
  • Data Density: Like all local methods, ADAMENN's performance is bounded by the density of the training data. In extremely sparse settings, the local estimates for the Chi-squared distance may become unreliable.

Summary updated

BibTeX
@inproceedings{domeniconi2000adaptive,
  author = {Carlotta Domeniconi and Jing Peng and Dimitrios Gunopulos},
  title = {{An Adaptive Metric Machine for Pattern Classification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2000},
}
Figure