Human Activity Recognition (HAR) in smart homes is a critical component for ambient assisted living and healthcare monitoring. However, interpreting data from low-level binary sensors (e.g., motion detectors and door contact sensors) presents significant challenges due to data sparsity, redundancy, and environment-specific variations. Traditional approaches often rely on handcrafted features or Recurrent Neural Networks like LSTMs, which can be computationally expensive and struggle with short-duration event sequences.
This research proposes a novel framework that bridges the gap between Natural Language Processing (NLP) and Time Series Classification (TSC). By treating sensor event streams as a "language," the authors utilize word embeddings to bootstrap a Fully Convolutional Network (FCN), achieving superior performance in both accuracy and training efficiency.
Methodology: The Sensor-as-Language Paradigm
The core innovation of this approach is the transformation of raw sensor data into a structured format suitable for NLP techniques. The process follows a multi-stage pipeline designed to capture the semantic context of household activities.
Preprocessing and Encoding
- Word Transformation: Sensor events are converted into "words" by concatenating the sensor ID with its state (e.g.,
M001+ONbecomesM001ON). - Frequency Indexing: These words are indexed based on their frequency in the dataset. This ensures that the model can more easily distinguish between common background events and rare, high-information activities.
- Embedding Layer: Instead of using one-hot encoding or raw indices, the model passes these tokens through an embedding layer. This maps each sensor event into a 64-dimensional vector space, allowing the network to learn latent relationships between different sensors (e.g., the relationship between a kitchen motion sensor and a fridge door sensor).
FCN Architecture
Unlike standard sequence models that rely on recurrent connections, the proposed architecture utilizes a 1D Fully Convolutional Network. This choice allows for massive parallelization during training and better capture of local temporal dependencies.
The network consists of three primary convolutional blocks with 128, 256, and 128 filters, respectively. Each block is followed by Batch Normalization (BN) and a ReLU activation function. A critical component is the 1D Global Average Pooling (GAP) layer, which replaces traditional dense layers. This makes the model robust to spatial translations and enables it to handle input sequences of varying lengths without requiring fixed-size windows.
Experimental Results
The model was evaluated using the CASAS benchmark datasets, specifically the Aruba (single inhabitant) and Milan (inhabitant plus a pet) datasets. The inclusion of a pet in the Milan dataset introduces significant noise, providing a rigorous test for the model's robustness.
- Accuracy and F1-Score: The FCN + Embedding model achieved a near-perfect 99% F1-score on the Aruba dataset and 94.33% on the Milan dataset. The addition of the embedding layer alone provided an average boost of 10 percentage points in balanced accuracy compared to models without embeddings.
- Efficiency: Due to the convolutional nature of the architecture, the FCN models trained 2 to 6 times faster than traditional LSTM-based models.
- Short-Window Performance: The model maintained high accuracy even with small sensor event windows (as few as 25 events). This is a significant advantage for real-time applications where low latency in activity detection is crucial.
Conclusion
By treating sensor streams as a language and leveraging the efficiency of Fully Convolutional Networks, this framework provides a scalable and high-performance solution for smart home activity recognition. The use of embeddings allows the model to learn the "semantics" of a home's layout and inhabitant habits automatically, reducing the need for handcrafted features. Future work will focus on adapting this approach for real-time "online" monitoring and exploring more advanced embedding techniques like Word2Vec or ELMo to further capture complex sensor relationships.
Summary updated