SeniorSentry: Correlation and Mutual Information-Based Contextual Anomaly Detection for Aging in Place
Abstract
:1. Introduction
- 1.
- Intentional anomalies: They refer to deviations from normal behavior that are created deliberately, rather than occurring naturally or by chance. These anomalies are created by malicious actors with the aim of disrupting the normal functioning of the system or causing harm. Tampering with sensors, performing network attacks and spoofing are all examples of methods that can create intentional anomalies.
- 2.
- Unintentional anomalies: They refer to deviations from normal behavior that are not intentionally created, but rather occur due to a variety of factors, such as sensor malfunctions, environmental interference, user error, improper installation and power fluctuations.
1.1. Contextual Anomaly Detection
1.2. Our Work
1.3. Paper Organization
2. Related Work
3. Datasets
3.1. AgeTech Sensors and Data
3.2. Open Smart-Home Dataset
3.3. Smart-Building Dataset
3.4. ISOT AgeTech Dataset
Collection Network Architecture
- 1.
- Two temperature sensors (DHT22).
- 2.
- Two humidity sensors (DHT22).
- 3.
- Two air-quality-measurement sensors (MQ135).
4. Exploring Normal and Anomalous Data
4.1. Normal Data of ISOT AgeTech Dataset
4.2. Anomalous Data of ISOT AgeTech Dataset
- 1.
- Distributed denial-of-service (DDOS) attacks: These attacks were conducted to disrupt the collection of sensor readings and effectively disable the fog node. To achieve this, we used an open-source tool called the PYbot Botnet [25].
- 2.
- Replay attacks: These attacks were executed by altering the payloads and replaying the previously captured HTTP requests sent by various sensors to the fog node.
5. Proposed Detection Model
- Data preprocessor: This component merges the values from various sensors against a single timestamp using a tolerance of T seconds. Additionally, it removes rows containing any missing values.
- Sliding window: This provides a context within which statistical scores are calculated.
- Statistical score computer: This component calculates the correlation and mutual-information scores between sensors over S rows within each window, creating a single new row in the transformed dataset. Consequently, each row in the transformed dataset represents the statistical relationship between sensor values across S rows of the original dataset.
- Supervised machine learning: Machine-learning classification models are subsequently trained with the transformed dataset to develop an anomaly-detection model.
5.1. Exploratory Data Analysis
- 1.
- A total of 85 sensor pairs were found to be very strongly positively correlated; 30 of them are shown in Figure 5.
- 2.
- No strong negatively correlated sensors were found.
5.2. Feature Model
5.3. Classification Models
6. Experimental Evaluation
6.1. Evaluation Metrics and Procedure
- 1.
- Accuracy: This is the proportion of observations that were correctly classified as either benign or anomalous. Accuracy is calculated as the ratio of the number of correct predictions to the total number of predictions.
- 2.
- True Positive Rate (TPR): This is the proportion of anomalous observations correctly identified by a model as anomalous. It is calculated as the ratio of the number of true positives (i.e., anomalous observations that are correctly classified as anomalous) to the total number of actual anomalous observations.
- 3.
- False Positive Rate (FPR): This is the proportion of benign observations that are incorrectly classified by a model as anomalous. It is calculated as the ratio of the number of false positives (i.e., benign observations that are classified as anomalous) to the total number of benign instances.
- 4.
- AUC-ROC: The area under the receive operating characteristic curve (AUC-ROC) is a commonly used evaluation metric. The ROC curve shows the relationship between a model’s TPR and FPR at different thresholds. AUC-ROC is a value between 0 and 1, which represents the overall performance of the model. A value of 1 indicates that the model has perfect performance and can perfectly distinguish between benign and anomalous instances, whereas a value of 0.5 indicates that the model’s performance is no better than random guessing.
6.2. Evaluation Results
Discussion
- Shared environment: When sensors are co-located, they often share a similar environment. This means that external factors such as temperature fluctuations, humidity or light exposure will impact them simultaneously. For example, if a human subject enters a room, there will be a simultaneous change in the readings of many sensors such as temperature, humidity, CO2, PIR (passive infrared) and more.
- Measurement of related phenomena: Some sensors, though distinct, measure phenomena that are inherently related. A classic example is that of temperature and humidity. As the air’s temperature increases, if no additional moisture is added to the air, the relative humidity will decrease. Thus, a change in one could lead to a change in the other.
- Sensor Interference: In some cases, the operation or output of one sensor can influence the readings of another sensor nearby. This is especially true if sensors operate on similar frequencies or if one emits a signal (like infrared) that another sensor can pick up.
7. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Redford, G. New Tech Options Are Helping Seniors Age in Place. 2018. Available online: https://www.scientificamerican.com/article/new-tech-options-are-helping-seniors-age-in-place (accessed on 24 July 2023).
- Chandola, V.; Banerjee, A.; Kumar, V. Anomaly detection: A survey. ACM Comput. Surv. 2009, 41, 1–58. [Google Scholar] [CrossRef]
- Cook, A.A.; Mısırlı, G.; Fan, Z. Anomaly detection for IoT time-series data: A survey. IEEE Internet Things J. 2019, 7, 6481–6494. [Google Scholar] [CrossRef]
- Hayes, M.A.; Capretz, M.A. Contextual anomaly detection framework for big sensor data. J. Big Data 2015, 2, 1–22. [Google Scholar] [CrossRef]
- Carmona, C.U.; Aubet, F.X.; Flunkert, V.; Gasthaus, J. Neural contextual anomaly detection for time series. arXiv 2021, arXiv:2107.07702. [Google Scholar]
- Deng, A.; Hooi, B. Graph neural network-based anomaly detection in multivariate time series. Proc. AAAI Conf. Artif. Intell. 2021, 35, 4027–4035. [Google Scholar] [CrossRef]
- Schneider, G.F.; Rasmussen, M.H.; Bonsma, P.; Oraskari, J.; Pauwels, P. Linked building data for modular building information modelling of a smart home. In eWork and eBusiness in Architecture, Engineering and Construction; CRC Press: Boca Raton, FL, USA, 2018; pp. 407–414. [Google Scholar]
- Hong, D.; Gu, Q.; Whitehouse, K. High-dimensional time series clustering via cross-predictability. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, Lauderdale, FL, USA, 20–22 April 2017; Volume 64, pp. 642–651. [Google Scholar]
- Hawkins, D.M. Identification of Outliers; Springer: Dordrecht, The Netherlands, 1980; pp. 1–67. [Google Scholar]
- Iglewicz, B.; Hoaglin, D.C. Volume 16: How To Detect and Handle Outliers; Quality Press: Seatle, WA, USA, 1993. [Google Scholar]
- Bhuyan, M.H.; Bhattacharyya, D.K.; Kalita, J.K. Network anomaly detection: Methods, systems and tools. IEEE Commun. Surv. Tutorials 2013, 16, 303–336. [Google Scholar] [CrossRef]
- Alghushairy, O.; Alsini, R.; Soule, T.; Ma, X. A review of local outlier factor algorithms for outlier detection in big data streams. Big Data Cogn. Comput. 2020, 5, 1. [Google Scholar] [CrossRef]
- Li, X.; Deng, S.; Li, L.; Jiang, Y. Outlier detection based on robust mahalanobis distance and its application. Open J. Stat. 2019, 9, 15–26. [Google Scholar] [CrossRef]
- Chen, Z.; Li, Y.F. Anomaly detection based on enhanced DBScan algorithm. Procedia Eng. 2011, 15, 178–182. [Google Scholar] [CrossRef]
- Kaur, H.; Singh, G.; Minhas, J. A review of machine learning based anomaly detection techniques. arXiv 2013, arXiv:1307.7286. [Google Scholar] [CrossRef]
- Artola, G.; Carrasco, E.; Rebescher, K.M.; Larburu, N.; Berges, I. Behavioral anomaly detection system for the wellbeing assessment and lifestyle support of older people at home. Procedia Comput. Sci. 2021, 192, 2047–2057. [Google Scholar] [CrossRef]
- Shahid, Z.K.; Saguna, S.; Åhlund, C. Detecting anomalies in daily activity routines of older persons in single resident smart homes: Proof-of-concept study. JMIR Aging 2022, 5, e28260. [Google Scholar] [CrossRef] [PubMed]
- Aran, O.; Sanchez-Cortes, D.; Do, M.T.; Gatica-Perez, D. Anomaly detection in elderly daily behavior in ambient sensing environments. In Proceedings 7, Proceedings of the Human Behavior Understanding: 7th International Workshop, HBU 2016, Amsterdam, The Netherlands, 16 October 2016; Springer: Cham, Switzerland, 2016; pp. 51–67. [Google Scholar]
- Fu, C.; Zeng, Q.; Du, X. HAWatcher: Semantics-Aware Anomaly Detection for Appified Smart Homes. In Proceedings of the 30th USENIX Security Symposium (USENIX Security 21), Virtual Event, 11–13 August 2021; pp. 4223–4240. [Google Scholar]
- Li, H.; Wang, X.; Yang, Z.; Ali, S.; Tong, N.; Baseer, S. Correlation-based anomaly detection method for multi-sensor system. Comput. Intell. Neurosci. 2022, 2022, 4756480. [Google Scholar] [CrossRef] [PubMed]
- Calikus, E.; Nowaczyk, S.; Dikmen, O. Context Discovery for Anomaly Detection. 2022. Available online: https://urn.kb.se/resolve?urn=urn:nbn:se:hh:diva-46402 (accessed on 24 July 2023).
- Nandikotkur, A. Aging in Place Security and Privacy. 2021. Available online: https://github.com/isotlaboratory/aip-security-and-privacy (accessed on 10 November 2021).
- Marino, C.; Nucara, A.; Peri, G.; Pietrafesa, M.; Rizzo, G. A generalized model of human body radiative heat exchanges for optimal design of indoor thermal comfort conditions. Sol. Energy 2018, 176, 556–571. [Google Scholar] [CrossRef]
- Wilhelm, S.; Jakob, D.; Ahrens, D. Human Presence Detection by monitoring the indoor CO2 concentration. In Proceedings of the Mensch und Computer 2020, Magdeburg, Germany, 6–9 September 2020. [Google Scholar]
- Wodxgod. PYbot: A Simple ddos Botnet with Basic Authentication System Written in Python. 2018. Available online: https://github.com/wodxgod/PYbot (accessed on 2 March 2022).
- Moustafa, N. A new distributed architecture for evaluating AI-based security systems at the edge: Network TON_IoT datasets. Sustain. Cities Soc. 2021, 72, 102994. [Google Scholar] [CrossRef]
- Booij, T.M.; Chiscop, I.; Meeuwissen, E.; Moustafa, N.; den Hartog, F.T. ToN_IoT: The role of heterogeneity and the need for standardization of features and attack types in IoT network intrusion data sets. IEEE Internet Things J. 2021, 9, 485–496. [Google Scholar] [CrossRef]
- Alsaedi, A.; Moustafa, N.; Tari, Z.; Mahmood, A.; Anwar, A. TON_IoT telemetry dataset: A new generation dataset of IoT and IIoT for data-driven intrusion detection systems. IEEE Access 2020, 8, 165130–165150. [Google Scholar] [CrossRef]
- Moustafa, N.; Keshky, M.; Debiez, E.; Janicke, H. Federated TON_IoT Windows datasets for evaluating AI-based security applications. In Proceedings of the 2020 IEEE 19th International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom), Guangzhou, China, 29 December–1 January 2020; pp. 848–855. [Google Scholar]
- Moustafa, N.; Ahmed, M.; Ahmed, S. Data analytics-enabled intrusion detection: Evaluations of ToN_IoT linux datasets. In Proceedings of the 2020 IEEE 19th International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom), Guangzhou, China, 29 December–1 January 2020; pp. 727–735. [Google Scholar]
- Moustafa, N. A systemic IoT–fog–cloud architecture for big-data analytics and cyber security systems: A review of fog computing. In Secure Edge Computing; CRC Press: Boca Raton, FL, USA, 2021; pp. 41–50. [Google Scholar]
- Ashraf, J.; Keshk, M.; Moustafa, N.; Abdel-Basset, M.; Khurshid, H.; Bakhshi, A.D.; Mostafa, R.R. IoTBoT-IDS: A novel statistical learning-enabled botnet detection framework for protecting networks of smart cities. Sustain. Cities Soc. 2021, 72, 103041. [Google Scholar] [CrossRef]
- Gaddam, A.; Wilkin, T.; Angelova, M.; Gaddam, J. Detecting sensor faults, anomalies and outliers in the internet of things: A survey on the challenges and solutions. Electronics 2020, 9, 511. [Google Scholar] [CrossRef]
- Nandikotkur, A. ISOT AgeTech Dataset. 2023. Available online: https://onlineacademiccommunity.uvic.ca/isot/datasets/ (accessed on 24 July 2023).
- Meghanathan, N. Assortativity Analysis of Real-World Network Graphs based on Centrality Metrics. Comput. Inf. Sci. 2016, 9, 7–25. [Google Scholar] [CrossRef]
- Gholamy, A.; Kreinovich, V.; Kosheleva, O. Why 70/30 or 80/20 relation between training and testing sets: A pedagogical explanation. J. Intell. Technol. Appl. Stat. 2018, 11, 105–111. [Google Scholar]
- Sidén, J.; Koptioug, A.; Gulliksson, M. The “smart” diaper moisture detection system. In Proceedings of the 2004 IEEE MTT-S International Microwave Symposium Digest (IEEE Cat. No. 04CH37535 ), Fort Worth, TX, USA, 6–11 June 2004; IEEE: Piscataway, NJ, USA, 2004; Volume 2, pp. 659–662. [Google Scholar]
- Casciaro, S.; Massa, L.; Sergi, I.; Patrono, L. A smart pill dispenser to support elderly people in medication adherence. In Proceedings of the 2020 5th International Conference on Smart and Sustainable Technologies (SpliTech), Split, Croatia, 23–26 September 2020; pp. 1–6. [Google Scholar]
- Xu, T.; Zhou, Y.; Zhu, J. New advances and challenges of fall detection systems: A survey. Appl. Sci. 2018, 8, 418. [Google Scholar] [CrossRef]
IoT Device | Protocol | Role in AgeTech | Potential Implementation |
---|---|---|---|
IP Cam | WiFi | Surveillance | ESP32-CAM with ESP32 MC |
Thermostat | WiFi/Bluetooth | Temperature Control | DHT22 with ESP32 MC |
Flame Detector | WiFi/Bluetooth | Fire Protection | MQ135, KY-026, with ESP32 MC. |
Smart Light | WiFi/Bluetooth | Illumination | BH1750 with ESP32 MC |
Smart Lock | WiFi/Bluetooth | Security | ZFM-20, Servo motor, with ESP32 MC |
SPO2, Heart Rate Monitor | Bluetooth | Monitoring Vitals | MAX30101 with ESP32 MC |
Fall Detection Sensors | Bluetooth/Others | Fall Detection | MEMS - MPU6050 with ESP32 MC |
Smart Pillbox | WiFi/Bluetooth | Medicine Administration | Chassis, Servo motors and ESP32 MC |
Smart Scale | WiFi/Bluetooth | Weight Measurement | FC2231, HX711 with ESP32 |
Smart Diaper | Bluetooth | Incontinence Measurement | SEN-13322 with ESP32 MC |
Location | Brightness | Humidity | Temperature | Thermostat |
---|---|---|---|---|
Bathroom | 1 | 1 | 1 | 1 |
Kitchen | 1 | 1 | 1 | 1 |
Room 1 | 1 | 1 | 1 | 1 |
Room 2 | 1 | 1 | 1 | 1 |
Room 3 | 1 | 1 | 1 | 2 |
Toilet | 1 | 1 | 1 | 1 |
Type | Counts of Samples |
---|---|
Brightness | 64,629 |
Humidity | 10,076 |
Temperature | 81,029 |
Thermostat Temp. | 74,046 |
Sensor Type | Counts of Samples |
---|---|
Luminance | 6,571,412 |
Temperature | 6,571,454 |
CO2 | 6,573,957 |
PIR | 3,593,902 |
Humidity | 6,571,414 |
Sensor | Description |
---|---|
DHT22 | The DHT22 is a low-cost digital temperature and humidity sensor. |
MQ135 | MQ135 is an air-quality sensor that is extremely sensitive to benzene, sulfide, smoke and other harmful gases. |
Timestamp | Temperature | Humidity | Type |
---|---|---|---|
1662689838001 | 44.09999851 | 20.29999924 | normal |
1662689868083 | 44.09999843 | 20.29999922 | normal |
1662689898161 | 44.09999847 | 20.29999926 | normal |
1662689928240 | 44.09999847 | 20.29999923 | normal |
1662689958321 | 44.20000076 | 20.20000036 | normal |
Time | Temp. (3R32) | Hum. (3R32) | Temp. (3U38) | Hum. (3U38) | AirQ. (3U46) | AirQ. (3U48) | Type |
---|---|---|---|---|---|---|---|
1662274800 | 49.09 | 21.0 | 49.70 | 20.70 | 290 | 238 | benign |
1662274830 | 49.09 | 21.0 | 49.70 | 20.79 | 291 | 243 | benign |
1662274860 | 49.20 | 20.9 | 49.70 | 20.70 | 290 | 242 | benign |
1662274890 | 49.20 | 20.9 | 49.78 | 20.70 | 289 | 244 | benign |
1662274920 | 49.20 | 20.9 | 49.77 | 20.70 | 273 | 245 | benign |
Type | Number of Samples |
---|---|
benign | 8550 |
intentional anomalies | 2190 |
unintentional anomalies | 418 |
Range | Level | Range | Level |
---|---|---|---|
0.8 to 1.0 | Very Strong Positive | −1.0 to −0.8 | Very Strong Negative |
0.6 to 0.79 | Strong Positive | −0.79 to −0.60 | Strong Negative |
0.4 to 0.59 | Moderate Positive | −1.0 to −0.8 | Moderate Negative |
0.2 to 0.39 | Weak Positive | −0.39 to −0.20 | Weak Negative |
0.00 to 0.19 | Very Weak Positive | −0.19 to −0.01 | Very Weak Negative |
Classifier | Accuracy | TPR | FPR | AUC |
---|---|---|---|---|
Random Forest | 85.15% | 59.45% | 0% | 79.72% |
k-NN | 85.15% | 65.57% | 4.68% | 81.44% |
Naive Bayes | 80.19% | 70.27% | 14.06% | 78.11% |
Classifier | Accuracy | TPR | FPR | AUC |
---|---|---|---|---|
Random Forest | 94.91% | 84.21% | 0% | 92.10% |
k-NN | 96.61% | 89.47% | 0% | 94.73% |
Naive Bayes | 72.88% | 36.84% | 10% | 63.42% |
Classifier | Accuracy | TPR | FPR | AUC |
---|---|---|---|---|
Random Forest | 87.50% | 65.0% | 0% | 82.50% |
k-NN | 89.28% | 70.0% | 0% | 85.0% |
Naive Bayes | 67.85% | 20.0% | 5.55% | 57.22% |
Classifier | Accuracy | TPR | FPR | AUC |
---|---|---|---|---|
LSTM | 91.62% | 72.45% | 2.24% | 85.10% |
Simple RNN | 96.81% | 86.80% | 0% | 93.40% |
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. |
© 2023 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
Nandikotkur, A.; Traore, I.; Mamun, M. SeniorSentry: Correlation and Mutual Information-Based Contextual Anomaly Detection for Aging in Place. Sensors 2023, 23, 6752. https://doi.org/10.3390/s23156752
Nandikotkur A, Traore I, Mamun M. SeniorSentry: Correlation and Mutual Information-Based Contextual Anomaly Detection for Aging in Place. Sensors. 2023; 23(15):6752. https://doi.org/10.3390/s23156752
Chicago/Turabian StyleNandikotkur, Achyuth, Issa Traore, and Mohammad Mamun. 2023. "SeniorSentry: Correlation and Mutual Information-Based Contextual Anomaly Detection for Aging in Place" Sensors 23, no. 15: 6752. https://doi.org/10.3390/s23156752
APA StyleNandikotkur, A., Traore, I., & Mamun, M. (2023). SeniorSentry: Correlation and Mutual Information-Based Contextual Anomaly Detection for Aging in Place. Sensors, 23(15), 6752. https://doi.org/10.3390/s23156752