journal article·2026-04-29Open access

Hybrid-Based Machine Incremental Learning in K-Nearest Neighbor Heterogeneous Drifting Environment

Japheth Otieno Ondiek, Kennedy Odhiambo Ogada, Tobias Mwalili

Applied Sciences· Volume 16· Issue 9

Abstract

The ability to continuously learn over time by incorporating new information while holding onto previously acquired expertise is known as incremental learning (IL). Although this concept is fundamental to human learning, existing machine learning techniques have a significant propensity to forget prior experience by overwriting previously learned patterns from classes. The continuous learning of new information in K-nearest neighbor (KNN) with lazy learning strategies compounds to loss of old knowledge upon learning new information and stability-plasticity dilemma. The change in new data points and data distributions in unforeseen ways impacts KNN’s ability to adapt to changes in class label distribution, leading to concept drift. This experiment models a hybrid 3WDKNN-based incremental learning algorithm (ILA) designed for application in a heterogeneous and dynamically changing environment. This model addresses the limitations of KNN by overcoming computational costs and inefficiencies associated with loss of information in classes, while facilitating incremental learning to attain high predictive accuracy in crop yield datasets. The algorithm employs weighted voting to identify optimal assigned classes for the nearest neighbor and uses memory reconstruction strategy for class incremental learning until the memory is full without forgetting. Using weighted voting for the best assigned classes for the nearest neighbor, the algorithm uses a local mean vector to determine the best distances for the shortest-term incremental learning to achieve the highest performance accuracy in a concept drift environment. The hybrid 3WDKNN_ILA was developed and evaluated alongside advanced algorithms within the same dataset context. The model improves performance in incremental learning contexts by utilizing current concepts and minimizing errors on both current and recent data to avoid parameterization. The model achieves optimal efficient incremental learning by mitigating intentional loss and minimizing errors associated with valuable class information derived from aggregated mean values through class rectification and transfer. The hybrid model achieves the best efficient performance accuracy in all the tested weighted averages of 200W, 500W, and 1000W with tested set K values of 5, 9, and 13K. This hybrid model demonstrates performance accuracy of 97% at a value of 13K, whereas 3WD_KNN achieves 96% at 9K, HoKNN attains 89% at 13K, and 1IKNN reaches 88% at 9K accuracy, respectively. The integrated novelty in the hybrid 3WDKNN_ILA proves superior in terms of computational efficiency, accuracy, and high-level incremental performance and learning in comparison with other tested models of algorithms.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Data Stream Mining Techniques · Machine Learning and Data Classification · Domain Adaptation and Few-Shot Learning

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

School of Computing and Information Technology, Jomo Kenyatta University of Agriculture and Technology, P.O. Box 62000, Nairobi 00200, Kenya

References (46)

Show source-provided references
1. Al-Amin, S.T., Nur, M.I., Farooque, A., Chen, G., Varghese, R., and Ordonez, C. (2022). A Different VIM: Visualizing Incremental Machine Learning. Proceedings of the 31st ACM International Conference on Information &Amp; Knowledge Management (CIKM ′22), Association for Computing Machinery.10.1145/3511808.3557175 ↗
2. Wu, Y., Chen, Y., Wang, L., Ye, Y., Liu, Z., Guo, Y., and Fu, Y. (2019, January 16–20). Large scale incremental learning. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA.10.1109/CVPR.2019.00046 ↗
3. Enhancing K-nearest neighbor algorithm: A comprehensive review and performance analysis of modifications10.1186/s40537-024-00973-y ↗
4. A comprehensive study of class incremental learning algorithms for visual tasks10.1016/j.neunet.2020.12.003 ↗
5. Gepperth, A., and Hammer, B. (2016, January 22–24). Incremental learning algorithms and applications. Proceedings of the 24th European Symposium on Artificial Neural Networks, ESANN, Bruges, Belgium.
6. Class-Incremental SAR Ship Detection and Classification via Context-Robust Exemplar Replay and Multi-Granularity Knowledge Distillation10.1109/TAES.2025.3550909 ↗
7. Interpretable SAM-KNN Regressor for Incremental Learning on High-Dimensional Data Streams10.1080/08839514.2023.2198846 ↗
8. Introduction to Distributed Nearest Hash: On Further Optimizing Cloud Based Distributed kNN Variant10.1016/j.procs.2023.01.135 ↗
9. Incremental Learning Through Deep Adaptation10.1109/TPAMI.2018.2884462 ↗
10. Learning system parameters from turing patterns10.1007/s10994-023-06334-9 ↗
11. Liu, Y., Su, Y., Liu, A.-A., Schiele, B., and Sun, Q. (2020, January 13–19). Mnemonics training: Multi-class incremental learning without forgetting. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA.10.1109/CVPR42600.2020.01226 ↗
12. Multilayer Neuroadaptive Reinforcement Learning of Disturbed Nonlinear Systems Via Actor-Critic Mechanism10.1109/TASE.2025.3639494 ↗
13. Przybyła-Kasperek, M., Marfo, K.F., and Sulikowski, P. (2024). Multi-Layer Perceptron and Radial Basis Function Networks in Predictive Modeling of Churn for Mobile Telecommunications Based on Usage Patterns. Appl. Sci., 14.10.3390/app14209226 ↗
14. Incremental learning algorithm for dynamic evolution of domain specific vocabulary with its stability and plasticity analysis10.1038/s41598-024-78785-6 ↗
15. Belouadah, E., Popescu, A., and Kanellos, I. (2020). Initial Classifier Weights Replay for Memoryless Class Incremental Learning. arXiv.10.5244/C.34.163 ↗
16. Yu, L., Twardowski, B., Liu, X., Herranz, L., Wang, K., Cheng, Y., Jui, S., and Weijer, J. (2020). Semantic Drift Compensation for Class-Incremental Learning. arXiv.10.1109/CVPR42600.2020.00701 ↗
17. Tree-cnn: A hierarchical deep convolutional neural network for incremental learning10.1016/j.neunet.2019.09.010 ↗
18. Mallya, A., and Lazebnik, S. (2018). PackNet: Adding Multiple Tasks to a Single Network by Iterative Pruning, IEEE.10.1109/CVPR.2018.00810 ↗
19. Theeramunkong, T., Kijsirikul, B., Cercone, N., and Ho, T.B. (2009). An Online Incremental Learning Vector Quantization. Proceedings of the Advances in Knowledge Discovery and Data Mining, PAKDD 2009; Lecture Notes in Computer Science, Springer.10.1007/978-3-642-01307-2 ↗
20. Kemker, R., and Kanan, C. (2017). FearNet: Brain-Inspired Model for Incremental Learning. arXiv.
21. Hayes, T.L., and Kanan, C. (2020). Lifelong Machine Learning with Deep Streaming Linear Discriminant Analysis. arXiv.10.1109/CVPRW50498.2020.00118 ↗
22. Pretrained back propagation based adaptive resonance theory network for adaptive learning10.1177/17483026231205009 ↗
23. Zhao, B., Xiao, X., Gan, G., Zhang, B., and Xia, S. (2020). Maintaining discrimination and fairness in class incremental learning. Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, 13–19 June 2020, IEEE.10.1109/CVPR42600.2020.01322 ↗
24. Zhao, H., Bi, Y., Tian, S., Wang, J., Zhang, P., Deng, Z., and Liu, K. (2024). Self-Knowledge Distillation via Progressive Associative Learning. Electronics, 13.10.3390/electronics13112062 ↗
25. Madi, S. (2025, April 16). Datafiles for Incremental Research.rar. Figshare. Dataset. Available online: https://figshare.com/articles/dataset/datafiles_for_incremental_research_rar/23623185/1?file=41.
26. Rebuffi, S.-A., Kolesnikov, A., Sperl, G., and Lampert, C.H. (2017). iCaRL: Incremental Classifier and Representation Learning. arXiv.10.1109/CVPR.2017.587 ↗
27. Continual Learning with Knowledge Distillation: A Survey10.1109/TNNLS.2024.3476068 ↗
28. An adaptive hybrid model for short-term urban traffic flow prediction10.1016/j.physa.2019.121065 ↗
29. Phuong, M., and Lampert, C. (2019, January 9–15). Towards Understanding Knowledge Distillation. Proceedings of the 36th International Conference on Machine Learning, Long Beach, CA, USA.
30. Rusu, A.A., Rabinowitz, N.C., Desjardins, G., Soyer, H., Kirkpatrick, J., Kavukcuoglu, K., Pascanu, R., and Hadsell, R. (2016). Progressive neural networks. arXiv.
31. Fan, X., Zhang, S., Xue, X., Jiang, R., Fan, S., and Kou, H. (2025). An Improved Self-Organizing Map (SOM) Based on Virtual Winning Neurons. Symmetry, 17.10.3390/sym17030449 ↗
32. A new hybrid incremental learning system for an enhanced KNN algorithm (hoKNN)10.1007/s12530-023-09531-y ↗
33. Tao, X., Hong, X., Chang, X., Dong, S., Wei, X., and Gong, Y. (2020, January 13–19). Few-shot class-incremental learning. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA.10.1109/CVPR42600.2020.01220 ↗
34. He, C., Wang, R., Shan, S., and Chen, X. (2018). Exemplar-supported generative reproduction for class incremental learning. Proceedings of the British Machine Vision Conference 2018, BMVC, Newcastle, UK, 3–6 September 2018, Northumbria University.
35. Zhou, P., Mai, L., Zhang, J., Xu, N., Wu, Z., and Davis, L.S. (2019). M2KD: Multi-model and multi-level knowledge distillation for incremental learning. arXiv.
36. Adaptive local Principal Component Analysis improves the clustering of high-dimensional data10.1016/j.patcog.2023.110030 ↗
37. Vedaldi, A., Bischof, H., Brox, T., and Frahm, J. (2020). Podnet: Pooled outputs distillation for small-tasks incremental learning. Proceedings of the Computer Vision—ECCV 2020—16th European Conference Proceedings, Part XX, Springer.10.1007/978-3-030-58565-5 ↗
38. Anna, V., Joaquin, V., Mohamed, R.B., and Thorsteinn, R. (August, January 29). Learning to Learn without Forgetting using Attention. Proceedings of the 3rd Conference on Lifelong Learning Agents (CoLLAs), Pisa, Italy.
39. Tscheschner, B., Veas, E., and Masana, M. (2025). Incremental Learning with Repetition via Pseudo-Feature Projection. arXiv.
40. Ferrari, V., Hebert, M., Sminchisescu, C., and Weiss, Y. (2018). Memory aware synapses: Learning what (not) to forget. Proceedings of the Computer Vision—ECCV 2018—15th European Conference Proceedings, Part III, Springer.10.1007/978-3-030-01219-9 ↗
41. Khawand, J., Hanappe, P., and Colliaux, D. (2023). Continual Learning with Deep Streaming Regularized Discriminant Analysis. arXiv.10.1109/ICCVW60793.2023.00370 ↗
42. Lu, Y., Tamas, F., and Penny, L. (2024). Exploring the roles of memory replay in targeted memory reactivation and birdsong development: Insights from computational models of complementary learning systems. bioRxiv.
43. Lomonaco, V., and Maltoni, D. (2017, January 13–15). CORe50: A new Dataset and Benchmark for continual Object Recognition. Proceedings of the 1st Annual Conference on Robot Learning, PMLR, Mountain View, CA, USA.
44. (2024, May 10). Crop Yield_1 Datasets. Available online: https://datasets.omdena.com/dataset/crop-yield-prediction.
45. (2024, May 10). Crop Yield_2 Datasets. Available online: https://www.kaggle.com/datasets/patelris/crop-yield-prediction-dataset.
46. (2025, April 10). CORe50 Datasets; CORe50, Designed for Continual Object Recognition, Consists of 50 Household Items Organized Into 10 Categories: Plug Adapters, Mobile Phones, Scissors, Light Bulbs, Cans, Glasses, Balls, Markers, Cups, and Remote Controls. Classification Can Be Conducted at the Object Level, Comprising 50 Classes, or at the Category Level, Consisting of 10 Classes. the Default Task Is Significantly More Challenging Because of the Difficulty in Differentiating Objects Within the Same Category at Specific Locations. the Dataset Was Collected over 11 Independent Sessions, Consisting of 8 Indoor and 3 Outdoor Environments, Each with Diverse Backgrounds and Lighting Conditions. Each Session and Item Was Documented as a 15-Second Video (at 20 fps) Utilizing a Kinect 2.0 Sensor, Yielding 300 RGB-D Frames. Available online: https://vlomonaco.github.io/core50/index.html#dataset.