Proceedings

NN-kNN for Regression: Accurate Prediction from Interpretable Retrieval

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 826-834.

https://doi.org/10.24963/ijcai.2026/93

Abstract

Neural Network k-Nearest Neighbor (NN-kNN) was proposed as an interpretable network model that learns feature weights and similarity to retrieve relevant cases for classification. This paper extends it to regression with the goal of generating accurate predictions based on neighboring cases with similar labels. Specifically, we introduce three modular components: an attention mechanism that weights the contribution of retrieved cases, a locality-aware regularizer that favors label-similar neighbors, and an optional case adaptation module that refines the retrieved estimate. Across synthetic and standard tabular regression benchmarks, NN-kNN achieves competitive predictive error against strong baselines (kNN-R, MLKR, and MLPs) while providing cases with similar labels as explanation (later referred as label-similar case). Moreover, NN-kNN supports manual knowledge injection through tuning weights for human-comprehensible features. The result is a simple, general, and interpretable approach to continuous-valued prediction that unifies retrieval, attention, and optional case adaptation within a single neural framework.

  1. [Aamodt and Plaza, 1994] Agnar Aamodt and Enric Plaza. Case-based reasoning: Foundational issues, methodolog- ical variations, and system approaches. AI Communica- tions, 7(1):39-59, 1994.
  2. [Bicego and Loog, 2016] Manuele Bicego and Marco Loog. Weighted k-nearest neighbor revisited. In Twenty-Third International Conference on Pattern Recognition (ICPR), pages 1642-1647. IEEE, 2016.
  3. [Breiman et al., 1984] Leo Breiman, Jerome H. Friedman, Richard A. Olshen, and Charles J. Stone. Classification and Regression Trees. Chapman and Hall/CRC, 1 edition, 1984.
  4. [Chen et al., 2019] Chaofan Chen, Oscar Li, Daniel Tao, Alina Barnett, Cynthia Rudin, and Jonathan K Su. This looks like that: Deep learning for interpretable image recognition. In Advances in Neural Information Process- ing Systems, volume 32. Curran, 2019.
  5. [Cortes and Vapnik, 1995] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine Learning, 20(3):273-297, 1995.
  6. [Cover and Hart, 1967] Thomas Cover and Peter Hart. Near- est neighbor pattern classification. IEEE Transactions on Information Theory, 13(1):21-27, 1967.
  7. [Deng et al., 2025] Kuo Deng, Xiaomeng Ye, Kun Wang, Angelina Pennino, Abigail Jarvis, and Yola Hall. Fully in- terpretable and adjustable model for depression diagnosis: A qualitative approach. The International FLAIRS Con- ference Proceedings, 38(1), May 2025.
  8. [Doshi-Velez and Kim, 2017] Finale Doshi-Velez and Been Kim. Towards a rigorous science of interpretable machine learning. arXiv preprint arXiv:1702.08608, 2017.
  9. [Doyle et al., 2006] Dónal Doyle, Padraig Cunningham, and Paul Walsh. An evaluation of the usefulness of explanation in a case-based reasoning system for decision support in bronchiolitis treatment. Computational Intelligence, 22(3- 4):269-281, 2006.
  10. [Gates et al., 2023] Lawrence Gates, David Leake, and Kait- lynne Wilkerson. Cases are king: A user study of case pre- sentation to explain CBR decisions. In Case-Based Rea- soning Research and Development, ICCBR 2023, pages 153-168. Springer, 2023.
  11. [Hanney and Keane, 1996] Kathleen Hanney and Mark T. Keane. Learning adaptation rules from a case-base. In Pro- ceedings of the Third European Workshop on Case-Based Reasoning, pages 179-192, Berlin, 1996. Springer.
  12. [Hastie and Tibshirani, 1986] Trevor Hastie and Robert Tib- shirani. Generalized additive models. Statistical science, 1(3):297-310, 1986.
  13. [He et al., 2016] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog- nition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016.
  14. [Jalali et al., 2017] V. Jalali, D. Leake, and N. Forouzan- dehmehr. Learning and applying case adaptation rules for classification: An ensemble approach. In Proceedings of the Twenty-Sixth International Joint Conference on Ar- tificial Intelligence, pages 4874-4878. International Joint Conferences on Artificial Intelligence, 2017. IJCAI
  15. [Keane and Kenny, 2019] Mark T. Keane and Eoin M. Kenny. How case-based reasoning explains neural net- works: A theoretical analysis of XAI using post-hoc explanation-by-example from a survey of ann-cbr twin- systems. In Case-Based Reasoning Research and Devel- opment, pages 155-171, Cham, 2019. Springer.
  16. Kelly et al., ] Markelle Kelly, Rachel Longjohn, and Kolby Nottingham. The uci machine learning repository. https: //archive.ics.uci.edu. Accessed: 2026-04-09. Link
  17. [Kulis, 2013] Brian Kulis. Metric learning: A survey. Foun- dations and Trends in Machine Learning, 5(4):287-364, 2013.
  18. [Leake and Ye, 2021] David Leake and Xiaomeng Ye. Har- monizing case retrieval and adaptation with alternating op- timization. In Case-Based Reasoning Research and Devel- opment, pages 125-139, Cham, 2021. Springer.
  19. [Leake, 1996] David B. Leake. CBR in context: The present and future. In David B. Leake, editor, Case-Based Reason- ing: Experiences, Lessons, and Future Directions, pages 3-30. AAAI Press, Menlo Park, CA, 1996.
  20. [LeCun et al., 2015] Yann LeCun, Yoshua Bengio, and Ge- offrey Hinton. Deep learning. Nature, 521(7553):436- 444, 2015.
  21. [Li et al., 2017] Oscar Li, Hao Liu, Chaofan Chen, and Cynthia Rudin. Deep learning for case-based reasoning through prototypes: A neural network that explains its pre- dictions. arXiv preprint arXiv:1710.04806, 2017.
  22. [Liao et al., 2018] Chieh-Kang Liao, Alan Liu, and Yu- Sheng Chao. A machine learning approach to case adapta- tion. In 2018 IEEE First International Conference on Ar- tificial Intelligence and Knowledge Engineering (AIKE), pages 106-109, 2018.
  23. [Papernot and Mcdaniel, 2018] Nicolas Papernot and Patrick Mcdaniel. Deep k-nearest neighbors: Towards confident, interpretable and robust deep learning. ArXiv preprint ArXiv:1803.04765, 2018.
  24. [Rousseeuw and Croux, 1993] Peter J. Rousseeuw and Christophe Croux. Alternatives to the median absolute deviation. Journal of the American Statistical Association, 88(424):1273-1283, 1993.
  25. [Rudin, 2019] Cynthia Rudin. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature Machine Intelligence, 1(5):206-215, 2019.
  26. [Smyth and Keane, 1998] Barry Smyth and Mark T. Keane. Adaptation-guided retrieval: Questioning the similarity as- sumption in reasoning. Artificial Intelligence, 102(2):249- 293, 1998.
  27. [The SciPy Community, 2025] The SciPy Community. scipy.stats.median abs deviation. SciPy Documentation (v1.16.2 Manual), 2025. Accessed: 2025-12-26.
  28. [Weinberger and Tesauro, 2007] Kilian Q. Weinberger and Gerald Tesauro. Metric learning for kernel regression. In Proceedings of the Eleventh International Conference on Artificial Intelligence and Statistics (AISTATS), pages 612-619. PMLR, 2007.
  29. [Wettschereck et al., 1997] Dietrich Wettschereck, David W. Aha, and Takao Mohri. A review and empirical evaluation of feature weighting methods for a class of lazy learning algorithms, page 273-314. Kluwer Academic Publishers, USA, 1997.
  30. [Ye et al., 2022] Xiaomeng Ye, David Leake, and David Crandall. Case adaptation with neural networks: Capa- bilities and limitations. In Mark T. Keane and Nirmalie Wiratunga, editors, Case-Based Reasoning Research and Development, pages 143-158, Cham, 2022. Springer.
  31. [Ye et al., 2024] Xiaomeng Ye, David Leake, Yu Wang, Zi- wei Zhao, and David Crandall. Towards network imple- mentation of CBR: Case study of a neural network K- NN algorithm. In Case-Based Reasoning Research and Development, ICCBR 2024, pages 354-370, Cham, 2024. Springer.
  32. [Ye et al., 2025] Xiaomeng Ye, David Leake, Yu Wang, and David Crandall. Run like a neural network, explain like k-nearest neighbor. In Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25, pages 6857-6865. International Joint Confer- ences on Artificial Intelligence, 2025. IJCAI
  33. [Zhang et al., 2017] Zhifei Zhang, Yang Song, and Hairong Qi. Age progression/regression by conditional adversarial autoencoder. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2017.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards