Smart-home IoT systems rely on heterogeneous sensor networks whose correctness shapes application behavior and the physical environment. However, these low-cost, resource-constrained sensors are highly prone to failure under real-world stressors. Prior methods often assume single-failure, single-resident settings, offer only failure detection rather than sensor-level localization, cover limited fault types and sensor modalities, require labels and human intervention, or impose overheads hindering edge deployment. To overcome these limitations, we propose Tureis, a self-supervised, context-aware method for failure detection and faulty-sensor localization in smart homes, designed for multi-failure, multi-resident edge settings. Tureis encodes heterogeneous binary and numeric sensor streams into compact bit-level features. It then trains a lightweight BERT-style Transformer with sensor-wise masked reconstruction over short-horizon windows, capturing spatial and short-term temporal correlations without mixing unrelated events. This self-supervised objective removes the need for labels or curated semantics. Then, at run-time, Tureis converts reconstruction residuals into sensor-level failure evidence and uses an iterative isolate-and-continue loop that masks flagged sensors, allowing other failures to surface and enabling resilient, fine-grained localization. Across five datasets with up to nine residents, Tureis improves single-failure localization F1 by +7.6%, +21.0%, and +25.0% over three strong baselines. In multi-failure scenarios with up to five faulty sensors, it further boosts localization F1 by +17.6% and +35.4% over two baselines, while the third does not extend to this setting. These gains come with minute-scale localization and an edge-friendly footprint, as a sub-megabyte model that processes each minute of data in a few milliseconds with ~0.5 GB peak memory on a Raspberry Pi 5.
Figures & tables
Work
Domain
Lightweight
Multi-failure
Multi-resident
Fail-stop
Outlier
Spike
Stuck-at
High-noise
Drift
Localization
Heterogeneous
Unlabeled
Method
Mallick et al. [ 25 ]
SH
◐
×
×
✓
✓
✓
✓
×
×
✓
✓
×
SEM (Freq. Itemsets + Spatiotemp. Rules)
ElHady et al. [ 12 ]
SH
●
×
×
✓
×
×
×
×
×
×
×
✓
SEM (Assoc. Rule Mining)
Fu et al. [ 15 ]
SH
○
×
×
×
✓
×
×
×
×
×
✓
×
SEM (Semantic Corr. + Shadow Exec.)
Nguyen et al. [ 27 ]
SH
●
×
×
×
✓
×
×
×
×
×
×
×
SEM (Spatial/Depend. Corr.)
Li et al. [ 23 ]
SH
●
✓
×
✓
✓
✓
✓
×
×
✓
✓
×
SEM (GNN + Attn.)
Xiao et al. [ 33 ]
SH
◐
×
×
×
×
×
✓
✓
×
×
✓
✓
SEM (Transformer + Loss-Guided Mask)
TABLE I: Comparison of Prior Work on Sensor Failure Detection & Localization in Smart Homes and Related Domains.
Fig. 1: Tureis overview: An offline phase performs feature extraction and trains a BERT-style encoder via sensor-wise masked reconstruction. Then, a run-time execution phase applies the model to each window to derive per-sensor failure scores and iteratively mask tripped sensors for resilient operation.
Fig. 2: Coactivation gap between correlated and uncorrelated sensor pairs versus window length L : The curve peaks at five minutes, and thus, L=5 is selected for all modules.
Fig. 3: Five-interval window (i.e., sequence) produced by the context-aware feature extraction module: Rows are consecutive interval feature vectors ∈{0,1}D obtained via early fusion across channels, B1,…,Bm denote binary sensors (2 bits per sensor) and N1,…,Nn denote numeric sensors (4 bits per sensor).
Fig. 4: Transformer-based Modeling: masked reconstruction in Tureis . In this illustration, the numeric channel N1 is masked across all L intervals. However, in general, each training sequence masks a random subset of sensor channels by replacing their bit positions with a learnable [MASK] token.
Fig. 5: Run-time execution and streaming inference in Tureis : Reconstruction logits are converted to per-sensor residuals, EWMA-smoothed, and compared to calibrated per-sensor thresholds for failure localization. Flagged sensors are then masked in subsequent sequences to prevent interference and maintain uninterrupted streaming.
Fig. 6: Single-failure detection: precision, recall, and F1 score for Tureis , ThingsDND, DICE, and AT on five smart homes (the number of residents is shown in parentheses). F1 score (i.e., the harmonic mean of precision and recall) is shown with a bold outline to emphasize its role as the primary summary metric.
Fig. 7: Single-failure localization: precision, recall, and F1 score across the five smart homes (resident counts as in labels). F1 score is bolded as the primary summary metric.
Fig. 8: Single-failure localization time: Mean delay (minutes) from ground-truth failure start to the first correct localization for Tureis , ThingsDND, DICE, and AT across five homes.
Fig. 9: Multi-failure detection: precision, recall, and F1 score across the five smart homes (resident counts shown in labels). Up to five simultaneous failures are injected, and F1 score is bolded as the primary summary metric.
Fig. 10: Multi-failure localization: precision, recall, and F1 score across five smart homes (resident counts in labels). Up to five simultaneous failures are injected, and F1 score is bolded as the primary summary metric. Moreover, AT is not applicable to multi-failure localization and is shown as N/A.
Fig. 11: Multi-failure localization time: mean delay (minutes) from failure onset to the first correct localization. Up to five simultaneous failures are injected. N/A indicates that AT is not applicable to multi-failure localization.
Fig. 12: Per-fault-type results: percentage of injected failures that are detected and located for six fault types. Results are aggregated over all five smart homes.
On-device fault detection enables real-time diagnostics without cloud dependency, but deploying machine learning models on resource-constrained hardware demands careful tradeoffs between accuracy, latency, and model size. We present a benchmark comparing traditional ML methods (Random Forest, XGBoost, SVM, Logistic Regression) against lightweight transformer architectures (DistilBERT, TinyBERT-6L, TinyBERT-4L, MobileBERT) for binary fault detection across three public datasets: NASA C-MAPSS turbofan degradation, SECOM semiconductor manufacturing, and UCI AI4I 2020 predictive maintenance. We evaluate classification performance (F1-score, AUC), model size, and CPU inference latency, and further assess INT8 dynamic quantization and a two-stage adaptive inference pipeline. Our results reveal that on well-separated sensor data (C-MAPSS), lightweight transformers match traditional ML at 87.8% F1 but at 100x the model size and 9000x the latency. TinyBERT-4L emerges as the most deployment-friendly transformer at 55 MB and 18 ms CPU latency. INT8 quantization reduces size by 25% while preserving 86.9% F1. Our adaptive pipeline, routing 97.9% of predictions through a quantized triage model and only 2.1% to a larger expert, achieves 87.6% F1 at 19.5 ms average latency. On severely imbalanced datasets (SECOM, UCI-PM), both traditional and transformer methods struggle significantly, highlighting fundamental limitations of current approaches for extreme class imbalance in fault detection. All code is publicly available.
Disha Patel
Department of Computer Science California State University, Fullerton
Human Activity Recognition (HAR) from ambient sensors enables smart-home applications such as health monitoring and assisted living. In realistic deployments, however, sensor events arrive as a continuous stream and activity boundaries are unknown. Sliding-window inference therefore produces many windows that straddle transitions and contain mixed activities, creating boundary contamination that violates the pre-segmented instance assumption used by most benchmarks and models. Moreover, many pipelines under-use spatial context by treating sensor IDs as independent tokens. We present LastAct, a trajectory-centric framework for streaming smart-home HAR that targets the most recent activity under mixed windows while explicitly modeling spatial structure. LastAct projects sensor events onto the home floorplan to form a layout-aligned trajectory image sequence that preserves spatial continuity. A lightweight gate identifies contaminated windows, and a boundary localizer estimates the last transition to enable boundary-guided masking that emphasizes post-boundary evidence and suppresses stale context. For efficiency, we reuse a precomputed layout-aligned template cache to avoid repeated rendering. Empirically, across four public smart-home datasets under near-realistic mixed-activity protocols, LastAct achieves competitive or superior performance on pure windows and yields substantial Macro-F1 gains on cross/mixed windows, demonstrating improved robustness under near-realistic sliding-window regimes.
Some low-cost Internet of Things (IoT) sensor deployments lack device-level source authentication, leaving them vulnerable to impersonation or injected sensor readings. We present a lightweight approach to sensor impersonation detection in a small proof-of-concept study. We formulate detection as a sequence-prediction problem. A model with three LSTM layers and two fully connected layers is trained only on univariate temperature readings from a genuine sensor, and a window of readings is flagged when its mean absolute prediction error exceeds the mean genuine error by more than six standard deviations. The model is converted to TensorFlow Lite in three variants, non-quantized (554 KB), 16-bit weight quantized (298.5 KB), and 8-bit weight quantized (185 KB), targeting an Arduino Nano 33 BLE aggregator. The variants were evaluated with the TensorFlow Lite interpreter on the local server, since on-device execution of LSTM models was not yet supported by TensorFlow Lite for Microcontrollers at the time of the study. On a controlled testbed with the impostor sensor placed in a hotter outdoor location, the three variants reached detection accuracies of 99.980%, 99.972%, and 98.206%, and each flagged the change point when a test sequence switched from genuine to impostor data. Quantization made the model smaller but slower in our measurements. The genuine and impostor distributions were well separated, so these results show detection of a controlled distribution shift and should not be read as evidence of general device authentication.
Nahom Birhan
Department of Electrical and Computer Engineering Old Dominion University Virginia, USA