# Edge AI for Real-Time Anomaly Detection in Smart Homes
## 5 Results and Discussion
### Key Findings and Discussion
#### 5.3.2 Comparative Analysis of Detection Approaches  
Table 12 presents a comparative analysis of the Isolation Forest, LSTM Autoencoder, and the hybrid approach combining both models to explore further the trade-offs between accuracy, energy consumption, and retraining needs. This comparison highlights the strengths and limitations of each method, offering insights into their optimal deployment scenarios. By combining the strengths of both models, the proposed Edge AI framework ensures highly responsive and reliable anomaly detection, enabling proactive responses to security threats, device malfunctions, and operational risks in smart home environments. Integrating adaptive learning and hybrid detection strategies will further enhance system performance, paving the way for more intelligent and autonomous smart home security and efficiency solutions. A possible implementation of adaptive learning could involve monitoring the model's false positive rate over time and triggering incremental retraining only when performance degrades beyond a set threshold. This approach would minimize unnecessary retraining while ensuring consistent anomaly detection accuracy. Table 13 summarizes the strengths and limitations of Isolation Forest (IF), LSTM Autoencoder (LSTM-AE), and the proposed hybrid approach regarding anomaly detection accuracy, computational efficiency, and suitability for Edge AI deployment to illustrate the trade-offs between them better. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature** & **Cloud-Based Detection** & **Edge AI Detection (IF and LSTM-AE)** \\ \hline Latency & High latency due to data transmission to cloud servers before analysis & Low latency, real-time anomaly detection at the device level \\ Privacy & Data are transmitted over the internet, increasing privacy risks & Local processing minimizes data exposure, ensuring better user privacy \\ \hline \hline \end{tabular}
\end{table} 
Table 13: Comparative analysis of Isolation Forest (IF), LSTM Autoencoder (LSTM-AE), and Hybrid Approach (IF + LSTM-AE) in terms of anomaly detection accuracy, computational efficiency, energy consumption, and suitability for Edge AI deployment in smart home environments. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature** & **Isolation Forest (IF)** & \begin{tabular}{c} **LSTM Autoencoder** \\ **(LSTM-AE)** \\ \end{tabular} & \begin{tabular}{c} **Hybrid Approach (IF +** \\ LSTM-AE)** \\ \end{tabular} \\ \hline Anomaly Type Detection & \begin{tabular}{c} Point anomalies (e.g., \\ sudden energy spikes) \\ Moderate (higher false \\ positives) \\ \end{tabular} & \begin{tabular}{c} Temporal anomalies (e.g., \\ gradual changes over time) \\ High (better precision and \\ recall) \\ \end{tabular} & \begin{tabular}{c} Captures both types of \\ anomalies \\ balances (redduces false \\ positives and improves recall) \\ \end{tabular} \\ Computational Efficiency & \begin{tabular}{c} Very high (low complexity, \\ fast inference) \\ \end{tabular} & \begin{tabular}{c} High computational cost (deep \\ learning-based) \\ \end{tabular} & \begin{tabular}{c} Medium (uses IF for quick \\ filtering and LSTM-AE for \\ refinement) \\ \end{tabular} \\ Energy Consumption & \begin{tabular}{c} Low (suitable for low-power \\ devices) \\ Very low (real-time \\ inference possible) \\ \end{tabular} & \begin{tabular}{c} High (requires more processing \\ power) \\ Higher latency due to model \\ \end{tabular} & \begin{tabular}{c} Moderate (optimized through \\ event-triggered execution) \\ Lower latency than LSTM-AE \\ alone but higher than IF \\ Moderate (trade-off between \\ efficiency and detection quality) \\ \end{tabular} \\ Suitability for Edge Devices & Ideal for lightweight devices & \
\begin{tabular}{c} Best suited for \\ high-performance edge \\ hardware (e.g., Jetson Nano) \\ \end{tabular} &
\begin{tabular}{c} Optimized for mixed hardware \\ constraints \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table}