Spectral Components of Honey Bee Sound Signals Recorded Inside and Outside the Beehive: An Explainable Machine Learning Approach to Diurnal Pattern Recognition
Abstract
Highlights
- Near-perfect classification of time-of-day categorized honey bee sounds is possible using both deep learning methods and classical machine learning.
- The most important frequency bands for categorization of honey bee sound time-of-day are between 100 and 600 Hz, in any case not exceeding 2 kHz.
- Complex and computational costly models may not be required in certain cases for analyzing honey bee sounds.
- Data collection of honey bee sound signals for AI-based honey bee diurnal pattern monitoring may be performed with sampling rates as low as 4 kHz.
Abstract
1. Introduction
- Analysis of bee activity data across different times of day.
- Design of a protective cage within a brood frame to house an internal microphone and prevent propolization.
- Preprocessing of audio signals acquired from microphones placed inside and outside the beehive using three representations based on Power Spectral Density (PSD).
- Training of Extra Trees and Convolutional Neural Network (CNN) classifiers to identify standard diurnal patterns of honey bee activity.
- Derivation of practical conclusions regarding bee sound analysis and the identification of important spectral features for differentiating bee activity at various times of day, obtained by the feature selection methods of Mean Decrease Impurity (MDI) and Recursive Feature Elimination with Cross-Validation (RFECV) combined with the Extra Trees classifier.
2. Materials and Methods
2.1. Data Collection
2.2. Data Analysis Methods
2.3. Feature Importance Investigation
- PSD—Power spectral density data with the spectrogram window length at 1024 samples and 50% overlap.
- PSD-D—Power spectral density data with the spectrogram window length considerably increased to allow a frequency step of 5 Hz with 50% overlap.
- PSD-D-LC—PSD-D dataset with a fifth-order high-pass Butterworth filter applied with a cutoff frequency of 75 Hz. This dataset was created to cut power grid prime harmonic noise from the analysis as well as to ensure that frequencies below the pass-band of the microphone used in measurement were not considered in the classification.
3. Results
3.1. Feature Investigation Results
3.1.1. Extra Trees Importance Metric
3.1.2. RFECV Importance Ranking
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
AI | Artificial Intelligence |
CNN | Convolutional Neural Network |
MDI | Mean Decrease Impurity |
MFCC | Mel-Frequency Cepstral Coefficients |
PSD | Power Spectral Density |
RFECV | Recursive Feature Elimination with Cross Validation |
References
- Gil-Lebrero, S.; Quiles-Latorre, F.J.; Ortiz-López, M.; Sánchez-Ruiz, V.; Gámiz-López, V.; Luna-Rodríguez, J.J. Honey Bee Colonies Remote Monitoring System. Sensors 2017, 17, 55. [Google Scholar] [CrossRef] [PubMed]
- Yunus, M.A.M.; Ibrahim, S.; Kaman, K.K.; Anuar, N.H.K.; Othman, N.; Majid, M.A.; Muhamad, N.A. Internet of Things (IoT) Application in Meliponiculture. Int. J. Integr. Eng. 2017, 9, 57–63. [Google Scholar]
- Szczurek, A.; Maciejewska, M.; Batog, P. Monitoring System Enhancing the Potential of Urban Beekeeping. Appl. Sci. 2023, 13, 597. [Google Scholar] [CrossRef]
- Zacepins, A.; Pecka, A.; Osadcuks, V.; Kviesis, A.; Engel, S. Solution for automated bee colony weight monitoring. Agron. Res. 2017, 15, 585–593. [Google Scholar]
- Zgank, A. Bee Swarm Activity Acoustic Classification for an IoT-Based Farm Service. Sensors 2020, 20, 21. [Google Scholar] [CrossRef] [PubMed]
- Ramsey, M.T.; Bencsik, M.; Newton, M.I.; Reyes, M.; Pioz, M.; Crauser, D.; Delso, N.S.; Le Conte, Y. The prediction of swarming in honeybee colonies using vibrational spectra. Sci. Rep. 2020, 10, 9798. [Google Scholar] [CrossRef] [PubMed]
- Khairul Anuar, N.H.; Md Yunus, M.A.; Baharudin, M.A.; Ibrahim, S.; Sahlan, S.; Faramarzi, M. An assessment of stingless beehive climate impact using multivariate recurrent neural networks. Int. J. Electr. Comput. Eng. (IJECE) 2023, 13, 2030–2039. [Google Scholar] [CrossRef]
- Woods, E.F. Means for Detecting and Indicating the Activities of Bees and Conditions in Beehives. U.S. Patent 2806082, 10 September 1957. [Google Scholar]
- Terenzi, A.; Cecchi, S.; Spinsante, S. On the importance of the sound emitted by honey bee hives. Vet. Sci. 2020, 7, 168. [Google Scholar] [CrossRef] [PubMed]
- Zhu, Y.; Abdollahi, M.; Maucourt, S.; Coallier, N.; Guimarães, H.R.; Giovenazzo, P.; Falk, T.H. MSPB: A longitudinal multi-sensor dataset with phenotypic trait measurements from honey bees. Sci. Data 2024, 11, 860. [Google Scholar] [CrossRef] [PubMed]
- Nolasco, I.; Benetos, E. To bee or not to bee: An annotated dataset for beehive sound recognition. Zenodo 2018. [Google Scholar] [CrossRef]
- Rustam, F.; Sharif, M.Z.; Aljedaani, W.; Lee, E.; Ashraf, I. Bee detection in bee hives using selective features from acoustic data. Multimed. Tools Appl. 2024, 83, 23269–23296. [Google Scholar] [CrossRef]
- Iqbal, K.; Alabdullah, B.; Al Mudawi, N.; Algarni, A.; Jalal, A.; Park, J. Empirical Analysis of Honeybees Acoustics as Biosensors Signals for Swarm Prediction in Beehives. IEEE Access 2024, 12, 148405–148421. [Google Scholar] [CrossRef]
- De Simone, A.; Barbisan, L.; Turvani, G.; Riente, F. Advancing Beekeeping: IoT and TinyML for Queen Bee Monitoring Using Audio Signals. IEEE Trans. Instrum. Meas. 2024, 73, 2527309. [Google Scholar] [CrossRef]
- Mezquida Atauri, D.; Llorente Martínez, J. Platform for bee-hives monitoring based on sound analysis. A perpetual warehouse for swarm’s daily activity. Span. J. Agric. Res. 2009, 7, 824–828. [Google Scholar] [CrossRef]
- Kulyukin, V.; Reka, S.K. Toward sustainable electronic beehive monitoring: Algorithms for omnidirectional bee counting from images and harmonic analysis of buzzing signals. Eng. Lett. 2016, 24, 317–327. [Google Scholar]
- Kulyukin, V.; Mukherjee, S.; Amlathe, P. Toward Audio Beehive Monitoring: Deep Learning vs. Standard Machine Learning in Classifying Beehive Audio Samples. Appl. Sci. 2018, 8, 1573. [Google Scholar] [CrossRef]
- Aumann, H.M.; Aumann, M.K.; Emanetoglu, N.W. Janus: A Combined Radar and Vibration Sensor for Beehive Monitoring. IEEE Sensors Lett. 2021, 5, 1500204. [Google Scholar] [CrossRef]
- Aumann, H.; Payal, B.; Emanetoglu, N.W.; Drummond, F. An index for assessing the foraging activities of honeybees with a Doppler sensor. In Proceedings of the 2017 IEEE Sensors Applications Symposium (SAS), Glassboro, NJ, USA, 13–15 March 2017; pp. 1–5. [Google Scholar] [CrossRef]
- Aldabashi, N.; Williams, S.M.; Eltokhy, A.; Palmer, E.; Cross, P.; Palego, C. A Machine Learning Integrated 5.8-GHz Continuous-Wave Radar for Honeybee Monitoring and Behavior Classification. IEEE Trans. Microw. Theory Tech. 2023, 71, 4098–4108. [Google Scholar] [CrossRef]
- Moore, D.; Angel, J.E.; Cheeseman, I.M.; Fahrbach, S.E.; Robinson, G.E. Timekeeping in the honey bee colony: Integration of circadian rhythms and division of labor. Behav. Ecol. Sociobiol. 1998, 43, 147–160. [Google Scholar] [CrossRef]
- Meikle, W.G.; Holst, N.; Colin, T.; Weiss, M.; Carroll, M.J.; McFrederick, Q.S.; Barron, A.B. Using within-day hive weight changes to measure environmental effects on honey bee colonies. PLoS ONE 2018, 13, e0197589. [Google Scholar] [CrossRef] [PubMed]
- Cejrowski, T.; Szymański, J.; Logofătu, D. Buzz-based recognition of the honeybee colony circadian rhythm. Comput. Electron. Agric. 2020, 175, 105586. [Google Scholar] [CrossRef]
- Amlathe, P. Standard Machine Learning Techniques in Audio Beehive Monitoring: Classification of Audio Samples with Logistic Regression, K-Nearest Neighbor, Random Forest and Support Vector Machine. Master’s Thesis, Utah State University, Logan, UT, USA, 2018. [Google Scholar]
- Kulyukin, V. Audio, Image, Video, and Weather Datasets for Continuous Electronic Beehive Monitoring. Appl. Sci. 2021, 11, 4632. [Google Scholar] [CrossRef]
- Zgank, A. IoT-Based Bee Swarm Activity Acoustic Classification Using Deep Neural Networks. Sensors 2021, 21, 676. [Google Scholar] [CrossRef] [PubMed]
- Mitchell, T.M. Machine Learning; McGraw-Hill: New York, NY, USA, 1997. [Google Scholar]
- Welch, P. The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms. IEEE Trans. Audio Electroacoust. 1967, 15, 70–73. [Google Scholar] [CrossRef]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Louppe, G.; Wehenkel, L.; Sutera, A.; Geurts, P. Understanding variable importances in forests of randomized trees. In Proceedings of the Advances in Neural Information Processing Systems; Burges, C., Bottou, L., Welling, M., Ghahramani, Z., Weinberger, K., Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2013; Volume 26. [Google Scholar]
- Geurts, P.; Ernst, D.; Wehenkel, L. Extremely Randomized Trees. Mach. Learn. 2006, 63, 3–42. [Google Scholar] [CrossRef]
- Alsariera, Y.A.; Adeyemo, V.E.; Balogun, A.O.; Alazzawi, A.K. AI Meta-Learners and Extra-Trees Algorithm for the Detection of Phishing Websites. IEEE Access 2020, 8, 142532–142542. [Google Scholar] [CrossRef]
- Awad, M.; Fraihat, S. Recursive Feature Elimination with Cross-Validation with Decision Tree: Feature Selection Method for Machine Learning-Based Intrusion Detection Systems. J. Sens. Actuator Netw. 2023, 12, 67. [Google Scholar] [CrossRef]
- Jankauski, M.A. Measuring the frequency response of the honeybee thorax. Bioinspiration Biomimetics 2020, 15, 046002. [Google Scholar] [CrossRef] [PubMed]
Category | Time of Day | Hours |
---|---|---|
1 | night | 20:00–8:00 |
2 | morning | 8:00–10:00 |
3 | midday | 10:00–14:00 |
4 | afternoon | 14:00–18:00 |
5 | evening | 18:00–20:00 |
Feature | Location | Accuracy | F1 | Recall |
---|---|---|---|---|
MFCC | Inside | 98.33% | 98.68% | 98.33% |
Outside | 98.54% | 98.83% | 98.54% | |
PSD | Inside | 76.19% | 78.28% | 76.19% |
Outside | 77.44% | 78.41% | 77.44% |
Dataset | Location | Extra Trees Accuracy | CNN Accuracy |
---|---|---|---|
PSD | Inside | 98.28% | 76.19% |
Outside | 61.06% | 77.44% | |
PSD-D | Inside | 99.37% | 86.49% |
Outside | 71.78% | 86.34% | |
PSD-D-LC | Inside | 99.23% | 87.04% |
Outside | 62.04% | 86.65% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Książek, P.; Libal, U.; Król-Nowak, A. Spectral Components of Honey Bee Sound Signals Recorded Inside and Outside the Beehive: An Explainable Machine Learning Approach to Diurnal Pattern Recognition. Sensors 2025, 25, 4424. https://doi.org/10.3390/s25144424
Książek P, Libal U, Król-Nowak A. Spectral Components of Honey Bee Sound Signals Recorded Inside and Outside the Beehive: An Explainable Machine Learning Approach to Diurnal Pattern Recognition. Sensors. 2025; 25(14):4424. https://doi.org/10.3390/s25144424
Chicago/Turabian StyleKsiążek, Piotr, Urszula Libal, and Aleksandra Król-Nowak. 2025. "Spectral Components of Honey Bee Sound Signals Recorded Inside and Outside the Beehive: An Explainable Machine Learning Approach to Diurnal Pattern Recognition" Sensors 25, no. 14: 4424. https://doi.org/10.3390/s25144424
APA StyleKsiążek, P., Libal, U., & Król-Nowak, A. (2025). Spectral Components of Honey Bee Sound Signals Recorded Inside and Outside the Beehive: An Explainable Machine Learning Approach to Diurnal Pattern Recognition. Sensors, 25(14), 4424. https://doi.org/10.3390/s25144424