Abstract
The Internet of Things (IoT) generates vast amounts of data often organized into Knowledge Graphs (KGs) using ontologies like SAREF. However, standard KG structures are frequently "star-shaped," where measurement nodes act as isolated leaves, limiting the effectiveness of graph embedding algorithms such as RDF2vec. This paper investigates "semantic enrichment"—the process of explicitly adding implicit temporal and value-based relationships to the graph. Our results show that enrichment significantly improves the quality of entity embeddings, boosting classification accuracy from near-random levels (~50%) to over 80% in predicting environmental states from energy consumption data, while also enhancing computational efficiency.
1. Introduction
Knowledge Graphs provide a robust framework for making IoT data interoperable. To leverage this data for machine learning, researchers often use entity embeddings to transform graph nodes into numerical vectors. A common challenge is the structural connectivity of these graphs. In a typical SAREF-based KG, thousands of measurement nodes may point to a single device, but they lack direct relationships with one another. This "star-shaped" topology creates a connectivity gap for algorithms like RDF2vec, which rely on random walks to capture context. Without explicit links between measurements, the embedding model fails to perceive temporal flows or numerical similarities.
2. Methodology
We developed a pipeline to compare "Basic" IoT graphs against "Enriched" versions using RDF2vec for embedding generation. The embeddings were then evaluated using a Multilayer Perceptron (MLP) classifier tasked with predicting whether the outside temperature was "hot" or "cold" based on energy consumption patterns.
2.1 Semantic Enrichment
To bridge the connectivity gap, we implemented three primary enrichment techniques:
- Rounded Values: Measurements (e.g., 0.52 kW) were linked to "Rounded Value" entities (e.g., 0.5). This creates "hubs" of similarity, allowing measurements with similar values to share neighbors in the graph.
- Sequence Links: We introduced
nextMeasurementandpreviousMeasurementproperties to create a chronological chain, turning isolated points into a temporal narrative. - Timestamp Entities: Literal timestamps were converted into nodes, linking all concurrent measurements across different devices to a single temporal entity.
3. Experimental Setup
The study utilized the OPSD Household Data, featuring one-hour resolution energy consumption from six residential homes, mapped to the SAREF ontology. Weather data from worldweatheronline.com provided the ground truth for the classification task. The experiments scaled from a single-device graph (~89k triples) to a multi-home graph (~4.4M triples when enriched).
4. Results and Discussion
The results demonstrate a substantial performance jump across nearly all scenarios. While basic graphs often resulted in classifier accuracy hovering around 50% (equivalent to a random baseline), enrichment boosted accuracy to over 80% on the largest datasets (e.g., resAdevA).
Beyond accuracy, enrichment improved computational efficiency. In basic graphs, increasing "walk length" to capture more context led to a "compute explosion," with training times increasing from minutes to over 15 hours. In contrast, enriched graphs achieved superior accuracy with shorter walks because the relevant semantic information was structurally closer to the measurement nodes.
5. Conclusion and Future Work
Semantic enrichment transforms IoT Knowledge Graphs from simple data repositories into high-signal features for machine learning. By making implicit relationships explicit, we enable embedding models to capture the underlying context of sensor data. Future work should explore the impact of enrichment on more heterogeneous datasets (e.g., CO2, humidity) and investigate alternative embedding models like Graph Convolutional Networks (GCNs). Additionally, the privacy implications of sharing enriched data between homes remain a critical area for further research.
Summary updated