Next Article in Journal
Privacy and Trust Redefined in Federated Machine Learning
Next Article in Special Issue
Special Issue “Selected Papers from CD-MAKE 2020 and ARES 2020”
Previous Article in Journal
Templated Text Synthesis for Expert-Guided Multi-Label Extraction from Radiology Reports
Previous Article in Special Issue
Property Checking with Interpretable Error Characterization for Recurrent Neural Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Transfer Learning in Smart Environments †

1
Lero—The Irish Software Research Centre, National University of Ireland, H91 CF50 Galway, Ireland
2
Insight Centre for Data Analytics, National University of Ireland, H91 CF50 Galway, Ireland
*
Author to whom correspondence should be addressed.
This paper is an extended version of our paper published in International Cross-Domain Conference for Machine Learning and Knowledge Extraction (CD-MAKE 2020), Dublin, Ireland, 25–28 August 2020.
Mach. Learn. Knowl. Extr. 2021, 3(2), 318-332; https://doi.org/10.3390/make3020016
Submission received: 31 December 2020 / Revised: 1 March 2021 / Accepted: 19 March 2021 / Published: 29 March 2021
(This article belongs to the Special Issue Selected Papers from CD-MAKE 2020 and ARES 2020)

Abstract

:
The knowledge embodied in cognitive models of smart environments, such as machine learning models, is commonly associated with time-consuming and costly processes such as large-scale data collection, data labeling, network training, and fine-tuning of models. Sharing and reuse of these elaborated resources between intelligent systems of different environments, which is known as transfer learning, would facilitate the adoption of cognitive services for the users and accelerate the uptake of intelligent systems in smart building and smart city applications. Currently, machine learning processes are commonly built for intra-organization purposes and tailored towards specific use cases with the assumption of integrated model repositories and feature pools. Transferring such services and models beyond organization boundaries is a challenging task that requires human intervention to find the matching models and evaluate them. This paper investigates the potential of communication and transfer learning between smart environments in order to empower a decentralized and peer-to-peer ecosystem for seamless and automatic transfer of services and machine learning models. To this end, we explore different knowledge types in the context of smart built environments and propose a collaboration framework based on knowledge graph principles for describing the machine learning models and their corresponding dependencies.

1. Introduction

Today, our built environment is not only producing large amounts of data but—driven by the Internet of Things (IoT) paradigm—it is also starting to talk back and communicate with its inhabitants and the surrounding systems and processes. Inspired by these developments, the front runners in information and communication technology (ICT) are now exploiting the power of artificial intelligence and machine learning to facilitate human interaction with smart environments and space services such as thermal comfort and ambient assisted living [1]. IoT-based systems typically follow a three-layer model (cf. Figure 1) that consists of: (i) a sensing layer, which acquires the observation of interest from the environment; (ii) a cognitive layer, which is concerned with context acquisition, modeling, and reasoning; and (iii) an actuation layer that triggers actions or invokes services according to some predefined logic. The main effort required for supporting automatic change management and adaptive systems in an IoT-enabled space lies in the cognitive layer. Unlike the sense and actuate layers that usually undertake straightforward tasks, the creation and configuration of the cognitive layer is rather a complicated task that is not necessarily based on syntactic or deterministic models. Instead, it needs a deep understanding of incoming events as well as the context of those events. Rule-based workflows and machine learning models are among common approaches for realizing the cognitive components.
Creating machine learning models is a costly process that requires large amounts of well-prepared and curated datasets for training and testing processes. This gives smart environments the incentive to share and reuse the existing models beyond the boundaries of smart environments. Currently, transferring such cognitive components beyond the building boundaries is a challenging task that requires human intervention to evaluate the existing models and adopt the appropriate model based on the criteria and requirements of target environments. although human intervention for personalizing the smart environments works well, such methods may soon be infeasible due to the following challenges:
  • Versatile IoT configurations: Human contribution cannot cope with the ever-increasing number of IoT devices. By introducing new devices or applying changes to the smart environment, the configurations and rules need to be revisited and checked. As such, we need a configuration management approach that supports flexibility, dynamicity, and incremental change in smart environments.
  • IoT service transfer: While users can manage, train, and configure the services in their private environment, it is not easy to transfer such configurations to semi-private spaces, such as hotel rooms, cars, hospital rooms, open city spaces, and offices. For instance, suppose an individual has defined some rules to maintain his/her thermal comfort at home based on services such as a motion detector, an air conditioning system, and the body temperature measured by a wearable device. To achieve the same thermal comfort in a semi-private environment such as hotel rooms or offices, the rules need to be adjusted based on the semantics and standards of the target spaces.
  • Transfer learning: The smart space services, embodied in machine learning models, are commonly associated with time-consuming and costly processes, such as large-scale data collection, data labeling, network training, and fine-tuning models. Sharing and reuse of these elaborated models in a different space would facilitate the adoption of services for the inhabitants and accelerate the uptake of machine learning in smart building applications. The model adoption process, which is referred to as transfer learning, is commonly undertaken by a human who is capable of understanding the implicit semantics of spaces, devices, and the relevant information resources and services. Therefore, self-explaining and machine-understandable models are the key requirements to accelerate the transfer learning between smart spaces.
This study set out to investigate the potential of communication and reuse of cognitive knowledge between smart environments for a seamless and automatic transfer of services and machine learning models. To this end, we propose a semantic framework that lays out the description of machine learning processes and makes the corresponding digital assets explainable and interoperable. This is achieved by creating a knowledge graph that is aware of the IoT infrastructure of target environments, the semantics of datasets and features, and the models trained based on those features. The knowledge graph also includes the evaluation indicators of machine learning models that facilitate sharing and reuse of models beyond the organizational boundaries. In this paper, we first present the different knowledge types in built environments. Then, we introduce the generic transfer learning framework based on knowledge graph principles. To demonstrate the feasibility and usefulness of this approach, we showcase a transfer learning scenario between smart environments. The rest of this paper is structured as follows. In Section 2 we present the related work in the knowledge graph and machine learning domains. Section 3 presents the classification of knowledge types in smart environments and introduces a five-star schema to assess the maturity level of knowledge sharing and reuse between smart environments. Section 4 describes the knowledge sharing approaches in smart environments, which is followed by an occupancy prediction case-study in Section 5. Finally, in Section 6, conclusions are drawn and future work is discussed.

2. Related Work

Recent advances in the knowledge graph [2] and machine learning domains have revealed their complementary nature and advantages of combining knowledge graphs and machine learning techniques [3]. More specifically, knowledge graphs and ontologies are introduced as key technologies for creating explainable and comprehensible machine learning models for both humans and machines [4]. This includes applying the explainable artificial intelligence (XAI) methods to overcome the incompleteness in formalization of trust in machine learning solutions [5], as well as explainable machine learning pipelines to capture the chain of artifacts that are used to build the cognitive models. An example of this approach is given in [6], where the authors used knowledge graphs to explain the transferability of features between domains and offer human-understandable explanations for transfer learning scenarios. However, this study does not cover the model creation processes and pipelines. In our proposed approach, the transferred models can be tracked down to the original models and datasets used for their training/fine-tuning. Another example of knowledge graph applications in transfer learning is given in [7], where the authors proposed a rule-learning method for measuring the structural similarity of concepts between knowledge graphs of source and target domains. In the context of smart buildings, knowledge graphs can be used as an efficient medium for capturing digital representations of both physical and functional characteristics of buildings. More importantly, knowledge graphs can narrow the physical-digital gap via applying a network of digital elements around our physical built environment for integration of brick-based (i.e., physical space and IoT devices) and bit-based (i.e., cyberspace and information services) elements [8]. To build and populate the knowledge graph of smart environments, several methods and standards have been introduced. For instance, the Industry Foundation Classes (IFC) developed by the BuildingSMART alliance [9] is one of the most mature Building Information Modeling (BIM) standards and defines an object-based hierarchy of building entities and concepts for data exchange and data sharing. In this context, several researchers have proposed domain-specific ontology schemas based on BIM and linked data principles for supporting the interoperability and data integration in smart built environments [10,11,12]. Although the BIM standards provide a comprehensive description of buildings’ physical elements and address many interoperability challenges between building systems and services, they fail to capture the relationship between static building information and the real-time dynamic of IoT ecosystems in smart buildings [13]. To this end, the Brick schema [14] provides a broader coverage of concepts for smart buildings by standardizing semantic descriptions of the physical, logical and virtual assets in buildings and the relationships between them. However, the Brick schema does not cover the specific requirements of machine learning processes and knowledge transfer scenarios.
Several research works, such as [15,16], have explored the potential of transfer learning for IoT and edge devices but were not geared towards capturing the semantics of space, IoT devices, or the machine learning models. One of the promising approaches to describe the semantics of machine learning processes is ML-Schema [17], which offers an interchangeable format for the description of machine learning experiments. ML-Schema also provides us with a set of classes, properties, and restrictions for representing and interchanging information on machine learning algorithms, datasets, and experiments. In this research, we have used and extended the ML-Schema to address the specific requirements of transfer learning scenarios. This extended schema is the building block of our proposed knowledge graph that bridges the gap among IoT infrastructure, machine learning artifacts, and space information.
As machine learning models cross the boundaries of source environments, we need to assure the integrity and traceability of adopted digital assets such as training datasets or transferred models and describe the chain of artifacts in creating or transferring the machine learning models. To address this requirement in machine learning processes, the feature store concept [18] has been introduced, which supports the feature curation process and the reuse of machine learning models in various pipelines. One of the first implementations of feature store is Michelangelo [19], which was introduced by Uber in 2017 and has been used in Uber’s machine learning platform. Another feature store implementation is MLFlow [20], which offers a metadata store to tackle the challenges of machine learning lifecycle in experimentation, reproducibility, and reliable production deployment. TensorFlow Extended (TFX) [21] is Google’s solution for the orchestration of components in machine learning pipelines, and it provides a configuration framework to express machine learning pipelines based on the predefined metadata of artifacts, executions, and pipelines. Hopsworks [22] presented another feature store that defines a metadata model for describing the machine learning artifacts and also provides a framework to engineer and store machine learning features at scale.

3. Characteristics of Knowledge Sharing in Built Environments

Before discussing the inter-space learning methods and concepts, we need to identify the different types of knowledge embodied in a physical space. Our built environment is made up of various complex and interrelated systems and services that draw upon interdisciplinary areas such as economics, law, public policy, public health, management, geography, design, technology, and environmental sustainability. Consequently, the embodied knowledge in built environments comes in various types that cover different aspects of space information. The embodied knowledge ranges from simple facts and concepts such as basic space information to more complex knowledge types such as rules, procedures, and models. Part of this knowledge, which is known as explicit knowledge, can be readily articulated, codified, stored, and accessed by humans and machines [23] and is communicated through various mediums [24]. On the other hand, cognitive knowledge cannot be explicitly defined and can be acquired through observation and experimentation.
In this section, we introduce the main categories of knowledge in built environments and then present a five-star maturity scheme to describe the learning and sharing capability of smart spaces.

3.1. Knowledge Types in Built Environments

Knowledge is a broad concept that has been extensively debated in philosophy for many centuries, and still, there is no universal agreement about its definition and different categories. However, due to the increasing interest in organizational knowledge and knowledge management systems, we need to take a pragmatic approach and define the required knowledge types in the domains of interest to solve our day-to-day problems. Based on the previous research in knowledge management and knowledge management systems [25], we have identified five knowledge types, namely Basic (Priori) knowledge, Inferred (Posteriori) knowledge, Procedural knowledge, Cognitive knowledge, and Descriptive knowledge. These categories establish the basis of our inter-space learning framework. As shown in Figure 2, knowledge types are interrelated and we may infer new facts about the domain of interest by applying rules to the basic knowledge, executing a procedure, or using cognitive models (e.g., machine learning models) to extract new facts from descriptive knowledge.
When it comes to capturing and sharing the embodied knowledge of the built environment, there is a handful of machine-interpretable methods and formats for explicit knowledge categories (i.e., basic, inferred, and procedural categories). Additionally, the descriptive knowledge (e.g., text documents and images) can be captured and shared as raw data and used for further processing. However, cognitive knowledge cannot be explicitly defined and is acquired through observation and experimentation. An example of this type of knowledge is machine learning models that create explicit and actionable knowledge from descriptive knowledge resources. For instance, a machine learning model trained to do face recognition, will receive descriptive knowledge resources such as images or video streams as input and generate explicit knowledge to be used in business processes of smart environments.
In the context of smart built environments, the training process of these models benefits from the big amount of data generated by IoT-enabled spaces. Such models could yield a significant profit over the lifetime of a building. However, due to the high cost of training and the need for a large amount of training and testing datasets, the uptake of machine learning applications in built environments is slow. For instance, a speech recognition model trained on a rather big and elaborated local dataset, might not work efficiently in an unknown space, as it cannot cope with the surrounding noise of the target space. This gives smart environments the incentive to reuse and re-purpose the existing models via techniques such as transfer learning, where models trained on one task are re-purposed for a second related task.

3.2. Maturity Levels of Knowledge Sharing and Reuse

The methods of knowledge sharing and reuse between smart environments can range from simple sharing of basic information to more complex methods such as service composition and transfer learning. In a space collaboration scenario, spaces should on the one hand be capable of sharing and advertising their own resources (e.g., data and services) in an efficient way, and on the other hand, should be able to reuse the available resources to address the raised queries and problems. In order to classify and study different levels of learning between smart environments, we use the following five-star maturity scheme to describe the learning/sharing capability of spaces. These five levels are shown in Table 1 and defined as follows:
  • Data level (one star): A one-star space is capable of making its static data available to other spaces and at the same time use the available static data of other spaces. Examples of such data in a smart environment include basic space information, space relationships to other building entities, static datasets, and available IoT devices. At this maturity level, information can be captured in static files, building management systems, or more elegantly via a knowledge graph that binds various domains together and makes the data machine-interpretable.
  • Stream level (two stars): When space is capable of offering or processing real-time data streams using stream processing techniques, space is considered to be a two-star space. In this context, spaces may share their data streams (e.g., via publishing or broadcasting nodes) or use the available data streams (e.g., via subscription or API calls) to access and process the stream data. Similar to data level, the dynamic level resources can be offered and consumed by means of plain data objects, or by following the principles of Linked Data and using linked stream data. For example, space may offer the data of its temperature sensor as linked stream data that can be consumed by other spaces and systems for various use cases.
  • Service level (three stars): A space that is capable of offering services to other spaces or use the offered services of other spaces is a three-star space. At this level, services are considered to be black-box components that can be accessed based on their advertised description. In other words, spaces offer their services as is, and let other spaces call those exposed services to achieve their goals. For example, space can offer its ML model as a service and let other spaces use it based on the advertised service signature. Similar to the data and stream levels, services level can also benefit from a semantic framework in order to present their signature in a machine-interpretable way.
  • Inference level (four stars): A space that is capable of inferring new knowledge or customizing the available services is a four-star space. At this level, space can interpret the semantics of available resources such as sensors, actuators, and data streams to create a solution or adopt and customize an existing solution based on its settings and requirements. Space can achieve this by means of an inference engine, expert system, or other available services. As an example, consider an IoT application that depends on a number of sensors, actuators, and data streams. In order to transfer such a service chain to a new space, we would need to adopt the blueprint of that IoT application and customize it based on the available sensors and actuators in the target space.
  • Learning level (five stars): A five-star space is capable of undertaking a task by monitoring its resources or learning from other spaces. For instance, consider the occupancy prediction use case. A five-star space is able to find ML models from other spaces with similar goals, create a pipeline to acquire the necessary input features from its sensor data, and predict the number of people in the space. Additionally, in an advanced scenario, space may undertake a transfer learning process that re-purposes existing ML models to achieve better predictions for the target space.

4. Learning in Smart Spaces

The communication and learning solutions between smart environments may range from simple sharing of data and information to more complex knowledge transfer methods such as transfer learning. In the case of transfer learning, the cognitive knowledge gained in a specific space is applied to a different space configuration. In this section, we explore the potential ways of inter-space communication for knowledge sharing and knowledge reuse purposes.

4.1. Knowledge Communication Methods

Based on the introduced knowledge types in the previous section, we will now focus on the different methods for sharing and reuse of embodied knowledge in building spaces or zones. These communication methods are depicted in Figure 3 and are classified as follows:
  • The first and simplest method of communication between spaces is running queries on the explicit knowledge. Since the explicit knowledge can be articulated and codified, the spaces with a common understanding of domain concepts can formulate relevant queries based on common shared concepts (ontologies) and interpret the returning results to complete their inferred knowledge. For instance, two spaces that belong to the same thermal zone of a building can share information about the corresponding Air Handling Unit (AHU) and its power meter.
  • Procedures can be shared as a whole (e.g., black-box service on a cloud) or get adopted and customized for use in the context of the target space. As an example, consider a procedure that requires interaction with specific types of sensors/actuators or the need to communicate with external services to accomplish a task. To adopt such procedures, we might need to replace the sensors and adjust their communications based on the resources available at the target space. For instance, in a temperature control scenario that includes a simple sense-actuate cycle, we need to adjust the procedure based on the available IoT services in the target space.
  • Some domain knowledge can be captured by elaborated models. These models can transform parts of human tacit knowledge into explicit knowledge that can be used by machines. Machine learning models are examples of such a knowledge acquisition method that facilitates the sharing of cognitive-based approaches. Such models can be repurposed and retrained in the target zone to satisfy the contextual requirements. For instance, a speech recognition model can be adapted and repurposed to cope with the noise in the target space.
  • A common type of communication between spaces is sharing data in different formats, frequencies, and structures. Such data could be in the form of raw data that are shared for data integration purposes or labeled data (e.g., images with labeled objects) for machine learning purposes.
There is already a handful of research works that exploit the power of semantic webs, linked data, and knowledge graphs for the capturing and conceptualization of information and procedures in smart environments. In the next subsection, we focus on inter-space communication methods for cognitive knowledge and then, in Section 3, through a case study, the potential of transfer learning between spaces and zones will be investigated.

4.2. Cognitive Knowledge Reuse

As mentioned earlier, machine learning models are one of the known mediums for capturing the cognitive knowledge of built environments. Such models can then be shared and reused in a new domain or repurposed to handle a related new task. In this subsection, we will take a closer look at different machine learning approaches for the realization of knowledge transfer in smart environments.
As depicted in Figure 4, models are initially trained using a training dataset and evaluated based on a test dataset. In a typical machine learning process, the training and test datasets are built from a common dataset of the target space. For instance, in the example depicted in Figure 4, “Model A” is trained based on “Training Dataset A” and evaluated based on “Test Dataset A” to generate the training evaluation.
The simplest method for reusing the cognitive knowledge of a machine learning model is to borrow the original model and reuse it in target space without any modifications to the model. Due to the high cost of training, using such pre-trained models is a common practice in the machine learning domain. However, we might experience a decrease in the performance of the pre-trained models when applied in a new domain with slightly different features that have not been encountered during the training process. To this end, there are several techniques in the transfer learning domain for adopting and repurposing original models to achieve better performance for the target domain. For instance, a machine learning engineer might freeze the layers of a source model and add some new layers and train them based on a smaller dataset for the target domain. A complementary method is to retrain the source model using a small learning rate based on a small dataset of the target domain. For instance, in the example depicted in Figure 4, “Model B” is built based on the source “Model A” using the “Training Dataset B” from the target space, and then it is evaluated based on a test dataset.

5. Case Study: Occupancy Prediction

To demonstrate the feasibility and effectiveness of transfer learning in smart built environments, we use an occupancy prediction use case that plays an important role in energy efficiency applications of smart buildings. Counting space occupants can be implemented using various sensing technologies, such as passive infrared sensors (PIR), visual cameras, Wi-Fi and Bluetooth-enabled devices, and door sensors. Recently, there is an increasing interest in measuring the occupant count based on environmental sensor data such as temperature, humidity, and CO2 level of target spaces. Due to the long response time and calibration errors, the environmental-based methods are not as accurate as other sensing methods such as visual cameras; however, because of privacy and cost concerns as well as the recent advances in machine learning approaches, these methods are gaining momentum. To this end, there are various research works regarding occupancy prediction based on environmental sensor data [26,27,28] that provide sophisticated methods based on a combination of sensor types to offer high-accuracy prediction results. In our paper, rather than creating high-accuracy prediction results, we aim to demonstrate the sharing and reuse of knowledge between spaces. Hence, we use a simple logistic regression algorithm [29] to create the occupancy prediction model based on the CO2 level of a source space and then measure the efficiency of this model when reused in a different space.

5.1. Dataset

We used an open dataset [30] that includes Room level occupant counts and the related data on indoor environmental indicators including airflow, CO2, relative humidity, illuminance, and temperature. The dataset comprises 44 full days, collated from March 2018 to April 2019 for a lecture room and two study zones in a public building in the University of Southern Denmark, Odense campus. Table 2 lists the spaces of this dataset and their attributes.
To mitigate the long response times of CO2 sensor data to room accupancy, we have limited the study time to the building’s peak hours (6:00 am to 2:00 pm) and aggregated the data to 30 min intervals. Then, a collection of statistical metadata was calculated and added to the description of the dataset. We may use this metadata for finding top candidate models when a specific service such as occupancy prediction is offered by more than one space. For describing the statistical metadata, we use and extend the terms and relations defined by ML-Schema [17]. Figure 5 depicts part of the knowledge graph that describes the dataset as well as statistical metadata. This dataset includes separate data splits for training, testing, and fine-tuning/retraining purposes.

5.2. Knowledge Graph

As described previously, the knowledge graph should include both the space information and the dataset description. Thus, in addition to the ML-Schema, we would also need a schema to describe the metadata of smart spaces including sensors, subsystems, and the relationships among them. To this end, we use the Brick schema [14] that is a uniform schema for representing metadata in IoT-enabled environments. In the knowledge graph proposed in this research, we created a bridge between ML-Schema and Brick schema to describe the dataset, building information, and machine learning processes. As depicted in Figure 6, machine learning processes can be characterized based on their input data, output model, and model evaluation indicators, such as the Mean Absolute Error (MAE) or Mean Squared Error (MSE) of learning processes. Furthermore, each model is dedicated to a specific task defined by ML-Schema, which helps spaces find the relevant models shared by other spaces. As such, the models are presented in a self-explainable and interpretable way to both human users and space agents (machines).
The training process depicted in Figure 6 undertakes a transfer learning process. In this specific case, the process includes a fine-tuning step that takes the trained model of another room (model of Room 2) as input and retrains it based on a small fine-tuning dataset of the target room (Room 3).
In the case of multiple competing models, the system needs to assess the fitness of offered models based on the metadata of source and target spaces. This can be achieved by one or a combination of the following strategies:
  • Several spaces may have similar properties and use (e.g., library or classroom). As such, the models of space that depend on those properties can be shared and reused by other similar spaces. The space similarity, depending on the use case, can be characterized by features such as the room’s function, size, or capacity. In the case of our occupancy prediction model, rooms of the same size and capacity are expected to behave similarly.
  • The training dataset also plays an important role in the accuracy of model predictions. If the machine learning model is created based on a small or low variance feature, its behavior in a new space will be unpredictable. Since all such statistical metadata are included in the proposed knowledge graph, the space agent can compare the range of its input features to those of the training dataset of the adopted model and make sure the model is adequately good for transfer learning purposes.
  • The machine learning models are also characterized by their performance indicators. For instance, the loss indicator, which is widely used in machine learning processes, can be used for comparison and ranking of the available models for a given task.

5.3. Transfer Learning

During the operation phase, buildings are now producing more data than ever before. Examples of such data is energy usage statistics, utility information, occupancy patterns, scheduling information, and financial data. However, this information cannot be used directly for machine learning purposes and requires time-consuming processes to create elaborated datasets and features which are vital for training of high-quality machine learning models. In the machine learning domain, transfer learning aims to eliminate the high cost of data preparation processes through the sharing and reuse of pre-trained models.
In the proposed use case, we have used the CO2 time series of each room as input and created a simple logistic regression model [29] to predict the room occupancy count. Next, we used these models in other rooms and investigated their fitness and performance compared to the model trained by the target room’s data. Figure 7 depicts the performance matrix of these models on the test dataset of each room. The rows in this matrix show the regression models and columns specify the applied test data.
As expected, the model performance was best when it was applied to the test data of the room itself. Furthermore, rooms with similar characteristics (e.g., size and volume) show similar performances and as a result, can adopt the models from each other. For instance, Room 2 and Room 3 in our use case have similar properties, and also their training datasets are consistent (similar statistical indicators) and as shown in Figure 7, the performances of transferred models are within an acceptable range. However, Room 1 has a different characteristics and as a result, the performance of the adopted models compared to room’s self-created model is not acceptable.
So far we have shown the reuse of applying a model from source space in a different space as it is and have not applied any transfer learning techniques to adapt it to the target domain and improve its performance. In practice, the transferred models are partially retrained based on a smaller dataset from the target domain or undergo a fine-tuning process with a small learning rate. In the context of the proposed use case, we used the Room 2 model and applied a simple fine-tuning process to make it fit for the Room 3 environment. To this end, we used a small dataset (100 records compared to the original training dataset of 700 records) from the target space (Room 3) and retrained the source model with a small learning rate ( 10 5 compared to 10 3 of the original training process). The corresponding transfer learning process was captured in our knowledge graph and Figure 6 shows how the new fine-tuned model is created and which data is used to retrain the model. Furthermore, the new model definition includes the evaluation indicators that can be used to evaluate the model performance and decide about its deployment in the new space.
Finally, the evaluation results of models for a given task are presented for the following three cases:
  • Training evaluation: In this case, both training and testing datasets are from the same space and originate from the same raw dataset or sensors. As discussed earlier, this model usually offers the best performance.
  • Reuse evaluation: In this case, the model is adopted as-is and tested based on a test dataset from target space. Provided that the source and target spaces have similar characteristics, this method yields acceptable results at a low cost (no training costs and a small test dataset for evaluation).
  • Transfer learning and/or fine-tuning evaluation: In this case, the original model is retrained based on a small training dataset from the target space and usually provides better results compared to the as-is reuse of original models.
Figure 8 depicts a view of our implemented prototype where the evaluation results of all relevant models for the occupancy prediction task are summarized. In this view, we can compare the mean absolute errors of various occupancy prediction models to select the fittest models to reuse. The blue dots represent the training evaluation where the model is tested based on the test dataset from the same room. As expected, these models offer the best performance (smallest error). The red dots in this view represent the reuse scenarios where a model is evaluated against test datasets of target spaces. Surprisingly, some of these evaluations (e.g., the Room-1 model) functioned better than the self-dataset evaluation, which is ideal in a transfer learning scenario. Finally, the green dots represent the fine-tune cases. As we see in this view, the performance of the newly created model (Room-2 fine-tuned model) in Room-3 was better than the performance of the original model (Room-2 model) in Room-3. Furthermore, the performance of the fine-tuned model is comparable to the best-case scenario where the model is trained based on the Room-3’s own data.

6. Conclusions and Future Work

Buildings are an integral part of urban settlements and nowadays are getting equipped with more IoT devices than ever before. In this context, IoT industries and service providers strive to find more efficient ways to benefit from the growing IoT ecosystem and combine it with other available information resources to create smarter environments equipped with cognitive models. Share and reuse of these elaborated and costly models are among the key enabling methods for uptake of adaptive services and inter-space collaborations.
Currently, the knowledge transfer between spaces is commonly undertaken by a human who can understand the implicit semantics of environments, features, and the relevant information resources and services. However, human contribution cannot cope with the ever-increasing number of IoT devices. Therefore, self-explaining and machine-understandable digital assets (e.g., features and models) are the key enablers of transfer learning beyond the organizational borders. In this paper, we discussed various knowledge types in built environments and described the relationship between them. This includes the cognitive knowledge of smart environments, captured in machine learning models that can be shared and reused via transfer learning methods. We also introduced the communication methods and potential use cases for knowledge sharing and reuse between smart environments. We proposed knowledge graphs as a holistic and efficient medium for communicating the semantics of smart environments and bridging the information gap among IoT infrastructure, spaces, and machine learning processes. Knowledge graphs can encompass the semantics of cognitive models and their corresponding resources and boost transfer learning between smart spaces. Finally, the presented showcase for occupancy prediction exhibits the feasibility of this approach and how knowledge graphs can facilitate the transfer of cognitive artifacts between spaces.
As future work, we aim to investigate challenges such as the fitness of adopted models and the integrity of machine learning artifacts for cross-organizational transfer learning applications. Furthermore, we will explore the application of real-time linked dataspaces [31] for enriching the cognitive layer of IoT-enabled spaces and address the transparency and trust requirements of transfer learning use cases.

Author Contributions

Conceptualization, A.A.; methodology, A.A.; software, A.A.; validation, A.A. and E.C.; data curation, A.A.; writing—original draft preparation, A.A.; writing—review and editing, A.A. and E.C.; visualization, A.A.; supervision, E.C. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Science Foundation Ireland grant 13/RC/2094 and co-funded under the European Regional Development Fund through the Southern & Eastern Regional Operational Programme to Lero—the Irish Software Research Centre (www.lero.ie, accessed on 28 March 2021). This project has also received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 754489.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Singh, D.; Merdivan, E.; Psychoula, I.; Kropf, J.; Hanke, S.; Geist, M.; Holzinger, A. Human activity recognition using recurrent neural networks. In Proceedings of the International Cross-Domain Conference for Machine Learning and Knowledge Extraction, Hamburg, Germany, 27–30 August 2017. [Google Scholar]
  2. Hogan, A.; Blomqvist, E.; Cochez, M.; d’Amato, C.; de Melo, G.; Gutierrez, C.; Gayo, J.E.L.; Kirrane, S.; Neumaier, S.; Polleres, A.; et al. Knowledge Graphs. arXiv 2020, arXiv:cs.AI/2003.02320. [Google Scholar]
  3. Bonatti, P.A.; Decker, S.; Polleres, A.; Presutti, V. Knowledge Graphs: New Directions for Knowledge Representation on the Semantic Web (Dagstuhl Seminar 18371). Available online: https://drops.dagstuhl.de/opus/volltexte/2019/10328/pdf/dagrep_v008_i009_p029_18371.pdf (accessed on 19 March 2021).
  4. Holzinger, A. From machine learning to explainable AI. In Proceedings of the 2018 World Symposium on Digital Intelligence for Systems and Machines (DISA), Košice, Slovakia, 23–25 August 2018; pp. 55–66. [Google Scholar]
  5. Dosilovic, F.; Brcic, M.; Hlupic, N. Explainable Artificial Intelligence: A Survey. In Proceedings of the 2018 41st International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 21–25 May 2018; pp. 0210–0215. [Google Scholar]
  6. Geng, Y.; Chen, J.; Jiménez-Ruiz, E.; Chen, H. Human-centric transfer learning explanation via knowledge graph. arXiv 2019, arXiv:1901.08547. [Google Scholar]
  7. Omran, P.G.; Wang, Z.; Wang, K. Knowledge graph rule mining via transfer learning. In Pacific-Asia Conference on Knowledge Discovery and Data Mining; Springer: Berlin/Heidelberg, Germany, 2019; pp. 489–500. [Google Scholar]
  8. Ishii, H.; Ullmer, B. Tangible bits: Towards seamless interfaces between people, bits and atoms. In Proceedings of the ACM SIGCHI Conference on Human Factors in Computing Systems, Atlanta, GA, USA, 1 March 1997. [Google Scholar]
  9. Wikipedia. BuildingSMART, Industry Foundation Classes (IFC). Available online: https://en.wikipedia.org/wiki/BuildingSMART (accessed on 14 April 2020).
  10. Törmä, S. Semantic linking of building information models. In Proceedings of the 2013 IEEE Seventh International Conference on Semantic Computing, Irvine, CA, USA, 16–18 September 2013; pp. 412–419. [Google Scholar]
  11. Anjomshoaa, A.; Shayeganfar, F.; Mahdavi, A.; Tjoa, A. Toward constructive evidence of linked open data in AEC domain. In Proceedings of the 10th European Conference on Product and Process Modelling (ECPPM2014), Vienna, Austria, 17–19 September 2014; pp. 535–542. [Google Scholar]
  12. Curry, E.; O’Donnell, J.; Corry, E.; Hasan, S.; Keane, M.; O’Riain, S. Linking building data in the cloud: Integrating cross-domain building data using linked data. Adv. Eng. Inform. 2013, 27, 206–219. [Google Scholar] [CrossRef] [Green Version]
  13. Anjomshoaa, A. Blending Building Information with Smart City Data. In S4SC@ ISWC; Citeseer: State College, PA, USA, 2014; pp. 1–2. [Google Scholar]
  14. Balaji, B.; Bhattacharya, A.; Fierro, G.; Gao, J.; Gluck, J.; Hong, D.; Johansen, A.; Koh, J.; Ploennigs, J.; Agarwal, Y.; et al. Brick: Towards a unified metadata schema for buildings. In Proceedings of the 3rd ACM International Conference on Systems for Energy-Efficient Built Environments, Palo Alto, CA, USA, 16–17 November 2016. [Google Scholar]
  15. Xing, T.; Sandha, S.S.; Balaji, B.; Chakraborty, S.; Srivastava, M. Enabling edge devices that learn from each other: Cross modal training for activity recognition. In Proceedings of the 1st International Workshop on Edge Systems, Analytics and Networking, Munich, Germany, 10 June 2018. [Google Scholar]
  16. Deng, L.; Li, D.; Yao, X.; Cox, D.; Wang, H. Mobile network intrusion detection for IoT system based on transfer learning algorithm. Clust. Comput. 2019, 22, 9889–9904. [Google Scholar] [CrossRef]
  17. Publio, G.C.; Esteves, D.; Ławrynowicz, A.; Panov, P.; Soldatova, L.; Soru, T.; Vanschoren, J.; Zafar, H. ML-Schema: Exposing the Semantics of Machine Learning with Schemas and Ontologies. arXiv 2018, arXiv:cs.LG/1807.05351. [Google Scholar]
  18. Mour, V.; Dey, S.; Jain, S.; Lodhe, R. Feature Store for Enhanced Explainability in Support Ticket Classification. In CCF International Conference on Natural Language Processing and Chinese Computing; Springer: Berlin/Heidelberg, Germany, 2020; pp. 467–478. [Google Scholar]
  19. Hermann, J.; Del Balso, M. Meet Michelangelo: Uber’s Machine Learning Platform. 2017. Available online: https://eng.uber.com/michelangelo (accessed on 19 March 2021).
  20. Zaharia, M.; Chen, A.; Davidson, A.; Ghodsi, A.; Hong, S.A.; Konwinski, A.; Murching, S.; Nykodym, T.; Ogilvie, P.; Parkhe, M.; et al. Accelerating the Machine Learning Lifecycle with MLflow. IEEE Data Eng. Bull. 2018, 41, 39–45. [Google Scholar]
  21. Baylor, D.; Breck, E.; Cheng, H.T.; Fiedel, N.; Foo, C.Y.; Haque, Z.; Haykal, S.; Ispir, M.; Jain, V.; Koc, L.; et al. Tfx: A tensorflow-based production-scale machine learning platform. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, 13–17 August 2017. [Google Scholar]
  22. Ismail, M.; Gebremeskel, E.; Kakantousis, T.; Berthou, G.; Dowling, J. Hopsworks: Improving user experience and development on hadoop with scalable, strongly consistent metadata. In Proceedings of the 2017 IEEE 37th International Conference on Distributed Computing Systems (ICDCS), Atlanta, GA, USA, 5–8 June 2017. [Google Scholar]
  23. Hélie, S.; Sun, R. Incubation, insight, and creative problem solving: A unified theory and a connectionist model. Psychol. Rev. 2010, 117, 994. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  24. Handzic, M. Knowledge management: A research framework. In Proceedings of the European Conference on Knowledge Management, Bled, Slovenia, 8–9 November 2001. [Google Scholar]
  25. Alavi, M.; Leidner, D.E. Knowledge management and knowledge management systems: Conceptual foundations and research issues. MIS Q. 2001, 107–136. [Google Scholar] [CrossRef]
  26. Sangogboye, F.C.; Arendt, K.; Singh, A.; Veje, C.T.; Kjærgaard, M.B.; Jørgensen, B.N. Performance comparison of occupancy count estimation and prediction with common versus dedicated sensors for building model predictive control. In Building Simulation; Springer: Berlin/Heidelberg, Germany, 2017; Volume 10, pp. 829–843. [Google Scholar]
  27. Wang, W.; Chen, J.; Hong, T. Occupancy prediction through machine learning and data fusion of environmental sensing and Wi-Fi sensing in buildings. Autom. Constr. 2018, 94, 233–243. [Google Scholar] [CrossRef] [Green Version]
  28. Arief-Ang, I.B.; Hamilton, M.; Salim, F.D. A scalable room occupancy prediction with transferable time series decomposition of CO2 sensor data. ACM Trans. Sens. Netw. (TOSN) 2018, 14, 1–28. [Google Scholar] [CrossRef]
  29. Kleinbaum, D.G.; Dietz, K.; Gail, M.; Klein, M.; Klein, M. Logistic Regression; Springer: Berlin/Heidelberg, Germany, 2002. [Google Scholar]
  30. Schwee, J.H.; Johansen, A.; Jørgensen, B.N.; Kjærgaard, M.B.; Mattera, C.G.; Sangogboye, F.C.; Veje, C. Room level occupant counts and environmental quality from heterogeneous sensing modalities in a smart building. Sci. Data 2019, 6, 1–11. [Google Scholar] [CrossRef] [PubMed]
  31. Curry, E. Real-Time Linked Dataspaces: Enabling Data Ecosystems for Intelligent Systems; Springer: Berlin/Heidelberg, Germany, 2020. [Google Scholar]
Figure 1. Three-layer model of an Internet of Things (IoT)-based system including sensing, context, and actuation layers.
Figure 1. Three-layer model of an Internet of Things (IoT)-based system including sensing, context, and actuation layers.
Make 03 00016 g001
Figure 2. Knowledge types and their interrelations.
Figure 2. Knowledge types and their interrelations.
Make 03 00016 g002
Figure 3. Zone communication methods.
Figure 3. Zone communication methods.
Make 03 00016 g003
Figure 4. Methods for reusing the cognitive knowledge captured as machine learning models.
Figure 4. Methods for reusing the cognitive knowledge captured as machine learning models.
Make 03 00016 g004
Figure 5. Part of the knowledge graph describing dataset features such as occupancy, CO2, and their corresponding metadata.
Figure 5. Part of the knowledge graph describing dataset features such as occupancy, CO2, and their corresponding metadata.
Make 03 00016 g005
Figure 6. Part of the knowledge graph describing a fine-tuned model.
Figure 6. Part of the knowledge graph describing a fine-tuned model.
Make 03 00016 g006
Figure 7. Predicting space occupancy by self-trained model vs. transferred models. The histogram plot in each cell shows the distribution of errors for the occupancy counting task.
Figure 7. Predicting space occupancy by self-trained model vs. transferred models. The histogram plot in each cell shows the distribution of errors for the occupancy counting task.
Make 03 00016 g007
Figure 8. Snapshot of inter-space learning prototype for evaluation of occupancy prediction models. On the y-axis the available models for fulfilling the occupancy prediction are shown and the x-axis represents the Mean Absolute Error (MAE) for comparing the performance of those models.
Figure 8. Snapshot of inter-space learning prototype for evaluation of occupancy prediction models. On the y-axis the available models for fulfilling the occupancy prediction are shown and the x-axis represents the Mean Absolute Error (MAE) for comparing the performance of those models.
Make 03 00016 g008
Table 1. The five-star maturity level of knowledge sharing and reuse in smart environments.
Table 1. The five-star maturity level of knowledge sharing and reuse in smart environments.
LevelShared KnowledgeDescription
Data LevelSpace is capable of making its static data available to other spaces and using the available static data of other spaces
★★Stream LevelSpace is capable of offering or processing real-time data streams using stream processing techniques
★★★Services LevelSpace is capable of offering services as a black-box component to other spaces or using the offered services of other spaces
★★★★Inference LevelSpace is capable of inferring new knowledge or customizing the available services based on available rules
★★★★★Learning LevelSpace is capable of undertaking a task by monitoring its resources or learning from other spaces
Table 2. Summary of target spaces.
Table 2. Summary of target spaces.
Room IDRoom TypeSize (m2)Seating CapacityVolume (m3)
Room 1lecture13984461.48
Room 2study zone12532418.75
Room 3study zone12532418.75
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Anjomshoaa, A.; Curry, E. Transfer Learning in Smart Environments. Mach. Learn. Knowl. Extr. 2021, 3, 318-332. https://doi.org/10.3390/make3020016

AMA Style

Anjomshoaa A, Curry E. Transfer Learning in Smart Environments. Machine Learning and Knowledge Extraction. 2021; 3(2):318-332. https://doi.org/10.3390/make3020016

Chicago/Turabian Style

Anjomshoaa, Amin, and Edward Curry. 2021. "Transfer Learning in Smart Environments" Machine Learning and Knowledge Extraction 3, no. 2: 318-332. https://doi.org/10.3390/make3020016

APA Style

Anjomshoaa, A., & Curry, E. (2021). Transfer Learning in Smart Environments. Machine Learning and Knowledge Extraction, 3(2), 318-332. https://doi.org/10.3390/make3020016

Article Metrics

Back to TopTop