Tureis: Transformer-based Unified Resilience for IoT Devices in Smart Homes

Alireza Borhani, Vafa Andalibi, Bahar Asgari

TL;DR

Tureis is a lightweight, self-supervised Transformer framework designed to detect and pinpoint sensor failures in complex, multi-resident smart homes. By using a "BERT-style" architecture to learn sensor correlations from unlabeled data, it can identify multiple simultaneous faults in real-time on edge devices like a Raspberry Pi, significantly outperforming existing methods in both accuracy and speed.

What Problem Does This Paper Address?

Smart homes rely on a dense web of low-cost IoT sensors (motion detectors, thermometers, door contacts) to automate everything from lighting to security. However, these sensors are notoriously fragile—prone to "stuck-at" values, signal drift, and battery-related spikes.

Existing solutions for monitoring sensor health face several hurdles:

  1. Complexity: Most models struggle in multi-resident homes where overlapping activities make it hard to distinguish a "weird" sensor reading from a second person entering a room.
  2. Scalability: Many methods assume only one sensor fails at a time. In reality, environmental stressors often cause multiple sensors to fail simultaneously.
  3. Resource Constraints: Sophisticated deep learning models are often too "heavy" for the low-power gateways (like a Raspberry Pi) that actually run smart homes.
  4. Label Scarcity: It is impractical to ask homeowners to manually label "normal" vs. "faulty" data for training.

Methods

Tureis introduces a three-stage pipeline to handle these challenges:

  • Bit-Level Feature Encoding: Instead of processing raw floating-point numbers (which is energy-intensive), Tureis converts heterogeneous sensor streams into compact bit-level features. It captures "activity intensity" (how often a sensor triggers) and "dynamics" (sudden jumps or bursts in numeric data).
  • BERT-style Masked Reconstruction: The core of Tureis is a lightweight Transformer encoder. During training, it uses a self-supervised objective: it "masks" (hides) the data from one sensor and tries to reconstruct it using the context of all other sensors over a short 5-minute window. If the model can't accurately reconstruct a sensor's current reading at run-time, that sensor is likely faulty.
  • Iterative Isolate-and-Continue: To handle multiple failures, Tureis employs a "detect and mask" loop. Once a sensor is flagged as faulty, the system masks its input in subsequent windows. This prevents the "garbage" data from one broken sensor from confusing the model's assessment of other, potentially healthy sensors.

Datasets

The authors evaluated Tureis using five diverse, public smart-home datasets:

  • HouseA: 1 resident, 14 binary sensors.
  • HH102: 1 resident, 33 binary and 79 numeric sensors.
  • Tulum: 2 residents, 31 binary and 5 numeric sensors.
  • Atmo1: 4 residents, 37 binary sensors.
  • Tokyo: 9 residents (the most complex scenario), 62 binary and 5 numeric sensors.

Key Insights and Ideas

  • The "Coactivation Gap": The authors discovered that a 5-minute window is the "Goldilocks zone" for smart home context. It’s long enough to capture related events (e.g., someone walking through a hallway to the kitchen) but short enough to avoid mixing in unrelated activities from other residents.
  • Self-Attention as a Correlation Map: By using multi-head self-attention, the model naturally factorizes sensor interactions into different "subspaces." This allows it to maintain high performance even in noisy, multi-resident environments where simple statistical correlations might fail.
  • Edge-First Design: By keeping the model under 1MB and using bit-level fusion, the authors prove that Transformers—often thought of as "compute hogs"—can be highly efficient for IoT if architected correctly.

Key Results

  • Localization Accuracy: In single-failure scenarios, Tureis improved the F1 score for pinpointing the broken sensor by +7.6% to +25.0% over strong baselines like ThingsDND and DICE.
  • Multi-Failure Resilience: In scenarios with up to five simultaneous faults, Tureis boosted the localization F1 score by up to +35.4%.
  • Responsiveness: Tureis is significantly faster at "catching" a failure, locating faulty sensors roughly 10x faster than previous context-aware methods.
  • Efficiency: On a Raspberry Pi 5, the model processes a minute of data in just 1.5 to 4 milliseconds, utilizing only ~0.5 GB of RAM.

Limitations and Future Work

  • Subtle "Stuck-at" Faults: The authors note that if a sensor gets "stuck" at a value that is very common (within the normal operating range), the model may take longer to flag it as a failure.
  • Spike Detection: While Tureis is excellent at detecting drift and noise, "spikes" (sudden, very brief errors) produce a smaller residual footprint, making them slightly more difficult to distinguish from legitimate, rare events.
  • Future Directions: The paper suggests moving beyond just localization to automated recovery—using the Transformer's reconstruction capability to "fill in" the missing data from a broken sensor so the smart home's automation logic can keep running smoothly until a repair is made.

Summary updated

Abstract

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.
BibTeX
@misc{borhani2026tureis,
  author = {Alireza Borhani and Vafa Andalibi and Bahar Asgari},
  title = {{Tureis: Transformer-based Unified Resilience for IoT Devices in Smart Homes}},
  year = {2026},
  eprint = {2603.10038},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.10038},
}
Figure