Random k conditional nearest neighbor for high-dimensional data

Jiaxuan Lu, Hyukjun GweonPeerj Comput. sci 2025

TL;DR

This paper introduces Random k Conditional Nearest Neighbor (RkCNN), an ensemble method designed to tackle the challenges of high-dimensional data, particularly in the presence of noisy features. By combining multiple kCNN classifiers trained on random feature subsets and weighting them based on their informativeness, RkCNN achieves robust and accurate classification performance.

What Problem Does This Paper Address?

The k-nearest neighbors (kNN) algorithm, a staple in machine learning, struggles with high-dimensional data. The presence of numerous irrelevant or noisy features can dilute the signal, leading to increased classification error and making distance-based calculations less effective. Existing kNN variants often fail to adequately address this "curse of dimensionality." This paper aims to improve kNN's performance in such scenarios by developing an ensemble approach that intelligently selects and combines information from subsets of features.

Methods

The core of the proposed method is the Random k Conditional Nearest Neighbor (RkCNN) algorithm. It builds upon the k Conditional Nearest Neighbor (kCNN) algorithm, which is known for its ability to provide class probabilities. RkCNN's novelty lies in its ensemble strategy:

  • Random Feature Subsets: The algorithm generates multiple feature subsets by randomly sampling features from the original high-dimensional space.
  • kCNN Classifiers: A kCNN classifier is trained on each of these random feature subsets.
  • Separation Score: A novel "separation score" is introduced to quantify the informativeness of each feature subset. This score is based on the between-group and within-group variances, effectively measuring how well classes are separated within that subset.
  • Weighted Averaging: The class probability estimates from individual kCNN classifiers are aggregated using weighted averaging. The weights are determined by the separation scores of their respective feature subsets, giving more importance to more informative subsets and downplaying noisy ones.
  • Top-r Subset Selection: To further enhance robustness and efficiency, RkCNN only considers the top 'r' feature subsets with the highest separation scores for the final prediction.

Datasets

The paper evaluates RkCNN using two main approaches:

  • Simulations: Synthetic datasets were generated to systematically investigate RkCNN's behavior under various conditions, including different numbers of informative and non-informative features, varying numbers of classes, and different levels of class overlap (controlled by parameters like 'w' and 'wc').
  • Gene Expression Datasets: Real-world gene expression datasets, specifically designed for cancer microarray data classification, were used. These datasets are characterized by high dimensionality and often exhibit class imbalance. The paper references a collection of these datasets available at https://file.biolab.si/biolab/supp/bi-cancer/main-2.html.

Key Insights and Ideas

  • Separation Score as a Proxy for Informativeness: The separation score effectively captures the discriminative power of a feature subset, correlating positively with the number of informative features it contains. This is a crucial insight for intelligently weighting ensemble members.
  • Bias-Variance Trade-off in Ensembles: The ensemble nature of RkCNN helps reduce variance without significantly impacting bias, a common goal in machine learning. This is particularly beneficial when individual kCNN models might have high variance due to noisy features.
  • Sensitivity to Noise: The study highlights that while RkCNN is robust, its performance is still affected by the level of noise. However, it consistently outperforms other methods in high-noise environments.
  • Parameter Tuning Importance: The performance of RkCNN is sensitive to its parameters (k, m, r, h). The paper provides guidance on optimal ranges, suggesting smaller 'k' and 'm', and larger 'r' for better performance, especially under challenging conditions.

Key Results

  • Outperforms Nearest-Neighbor Methods: RkCNN consistently outperformed other nearest-neighbor-based methods (kNN, kCNN, RkNN, ESKNN) in terms of misclassification rate and MCC across various simulated and real-world datasets, especially in high-dimensional and noisy scenarios.
  • Robustness to Noise: In experiments with up to 1,000 non-informative features, RkCNN maintained stable accuracy, demonstrating its resilience to noise.
  • Competitive with State-of-the-Art: On gene expression datasets, RkCNN achieved leading or high rankings, often performing comparably to or better than Random Forest (RF) and Support Vector Machines (SVM). Specifically, it outperformed RF and SVM on a significant number of datasets in terms of accuracy and MCC.
  • Parameter Effects: Increasing the number of non-informative features generally increased error rates for all methods, but RkCNN showed the least degradation. The choice of 'k' and 'm' was found to be more critical when class overlap was high.

Limitations and Future Work

  • Parameter Tuning: While the paper explores parameter tuning through simulations, it acknowledges that adaptive tuning or theoretical analysis of parameters could be beneficial for future work.
  • No Explicit Feature Selection: RkCNN filters subsets based on separation scores but does not perform explicit feature selection. The authors suggest that this concept could be adapted for individual feature selection in future research.
  • Computational Cost: While RkCNN is efficient, increasing the number of subsets ('h') can lead to higher computational costs, necessitating a balance between performance and efficiency.

Summary updated

BibTeX
@article{lu2025random,
  author = {Jiaxuan Lu and Hyukjun Gweon},
  title = {{Random k conditional nearest neighbor for high-dimensional data}},
  journal = {Peerj Comput. sci},
  year = {2025},
  doi = {10.7717/peerj-cs.2497},
}
Figure