Open set domain adaptation and universal domain adaptation for enhancing activity recognition in smart buildings

Ons Abderrahim, Jawher Dridi, Manar Amayri, Nizar BouguilaBuilding 2025 · DOI

Abstract

Smart buildings provide a solution for global energy issues by intelligent automation improving sustainability. Accurate Activity Recognition (AR) plays a key role in energy management through enabling adaptive control. This paper proposes new OpenSet Domain Adaptation (OSDA) and Universal Domain Adaptation (UniDA) methods aimed to address the differences due to data variation and lack of labeled training data in changing environments. These methods robustly differentiate between known and unknown activities and thus generalize well to other domains. The experimental results show good classification accuracy and robust unknown detection of activities, which validates the feasibility of these approaches for real-world smart buildings.

Introduction

Smart buildings rely on Activity Recognition (AR) to optimize HVAC, lighting, and energy use. However, AR models face two major hurdles in real-world deployment. First, Domain Shift occurs when a model trained in one building fails in another due to differences in sensor layouts and occupant habits. Second, the Open-Set Problem arises because traditional models assume the target environment will only feature activities seen during training. In reality, new occupants perform novel activities (like using a new appliance) that can lead to misclassification and energy waste.

This research introduces two advanced domain adaptation frameworks—Open Set Domain Adaptation (OSDA) and Universal Domain Adaptation (UniDA)—to solve the "new building, new activity" problem in smart building automation.

Methodology

The study compares two distinct strategies for handling domain shifts and unknown activities:

  1. OSDA with Angular Margin Separation: This approach modifies the latent space of the neural network using an "angular margin" loss. By forcing the model to learn highly distinct clusters for known activities, it creates a clear decision boundary that facilitates flagging outliers as "unknown."
  2. UniDA via Unified Optimal Transport (UniOT): This flexible approach uses Optimal Transport (OT) theory to align the data distribution of the source domain with the target domain. Specifically, Unbalanced Optimal Transport aligns shared activities while automatically segregating unique activities in the target domain without requiring manual thresholds.
Conceptual comparison of Closed Set, Open Set, and Universal Domain Adaptation.

The feature extraction architecture utilizes CNN and LSTM layers to process 1D sensor time-series data (such as motion and temperature), capturing both immediate patterns and long-term temporal dependencies essential for generalizing across different room layouts.

Experimental Setup

The methods were validated using the WSU Tapia et al. (2004) dataset, featuring proximity sensor data from two different single-room apartments. Activities included preparing meals, toileting, and watching TV. To simulate an open-set environment, specific activities were withheld from the training (source) set but included in the testing (target) set to evaluate the models' ability to identify them as "unknown."

Results and Discussion

Experimental results demonstrated that UniDA consistently outperformed OSDA across primary metrics, achieving an accuracy of 88.3% and an Unknown Class Detection Rate (UCDR) of 81.5%.

Metric OSDA (%) UniDA (%)
Accuracy 84.7 88.3
F1-Score 85.4 87.9
UCDR (Unknown Detection) 78.2 81.5

UniDA proved more robust, handling the discovery of new activity patterns automatically through its mathematical framework. Furthermore, the inclusion of LSTM layers was critical, as temporal context proved more reliable than spatial sensor placement for cross-domain generalization. By accurately identifying "unknown" activities, these models prevent control systems from making "confident but wrong" decisions that could compromise occupant comfort.

Conclusion

This work demonstrates that Universal Domain Adaptation provides a robust, "hands-off" solution for activity recognition in changing environments. Future work will explore hybrid models combining the interpretability of OSDA with the flexibility of UniDA, as well as scaling these frameworks to large-scale commercial buildings where domain shifts are more extreme.

Summary updated

Abstract

Smart buildings provide a solution for global energy issues by intelligent automation improving sustainability. Accurate Activity Recognition (AR) plays a key role in energy management through enabling adaptive control. This paper proposes new OpenSet Domain Adaptation (OSDA) and Universal Domain Adaptation (UniDA) methods aimed to address the differences due to data variation and lack of labeled training data in changing environments. These methods robustly differentiate between known andunknown activities and thus generalize well to other domains. The experimental results show good classification accuracy and robust unknown detection of activities, which validates the feasibility of these approaches for real-world smart buildings.
BibTeX
@inproceedings{abderrahim2025open,
  author = {Ons Abderrahim and Jawher Dridi and Manar Amayri and Nizar Bouguila},
  title = {{Open set domain adaptation and universal domain adaptation for enhancing activity recognition in smart buildings}},
  booktitle = {Building},
  year = {2025},
  doi = {10.26868/25222708.2025.1331},
}
Figure