Source-linked AI summary

CRAFTER: Causality-based Self-adaptation for Autonomous IoT Systems

Houssam Hajj Hassan, Ajay Kattepur, Denis Conan, Georgios Bouloukakis

arXiv:2610.06320v1cs.AI

TL;DR

Dynamic IoT conditions make maintaining application QoS difficult, while threshold-based monitoring may detect issues only after violations. CRAFTER uses causal discovery to build models for adaptation agents and reports a 25% performance improvement over state-of-the-art RL approaches for self-adaptation.

  • Problem

    Dynamic IoT conditions challenge QoS maintenance, and monitored QoS thresholds often signal issues only after violations because metrics may be chosen arbitrarily or through expert knowledge.

    Source: §1 · p. 2, §3.2 · p. 5
  • Method

    CRAFTER discovers causes of performance degradation, generates causal models, and uses them to model states for adaptation agents making decisions in dynamic environments.

    Source: §5.3 · p. 8, §8 · p. 11
  • Results

    25% performance improvement over state-of-the-art RL approaches used for self-adaptation.

    Source: §8 · p. 11
  • Takeaways & Limitations

    Its application-independent causal-graph process supports a semi-automated design pipeline across IoT settings with minimal domain expertise.

    Source: §1 · p. 2

    CRAFTER depends on design-time IoT metrics datasets; missing, poorly measured, or insufficiently varied variables can make generated causal models incomplete or biased.

    Source: §7 · p. 11

Abstract

from arXiv · show

This paper presents CRAFTER, an automated framework for designing and deploying self-adaptive IoT systems using Causal Reinforcement Learning (CRL). As IoT devices increasingly populate pervasive computing spaces, smart environments are enabled with advanced monitoring and interactive services. The dynamic nature of these environments, such as fluctuating workloads and evolving application demands, poses significant challenges in maintaining consistent Quality of Service (QoS) levels of IoT applications. While existing self-adaptation techniques offer adaptive capabilities, they are often designed to deal with specific application domains, hindering the design of self-adaptive solutions that can be re-used across multiple IoT verticals. In addition, there is a lack of automated pipelines that act on identifying key performance drivers to take effective adaptation decisions. CRAFTER addresses these issues by using Causality as a formal framework for performance analysis of IoT systems. CRAFTER generates causal graphs to uncover dependencies among system components and guide adaptation decisions based on cause-effect relationships. Then, adaptation agents can leverage this knowledge to take more effective adaptation decisions in dynamic situations. Our experimental evaluation demonstrates how CRAFTER enables deriving causal graphs spanning diverse IoT use cases. Furthermore, we showcase how CRAFTER improves self-adaptation performance by 25% compared to state-of-the-art Reinforcement Learning-based approaches.

1 Introduction

Dynamic IoT environments make it difficult to maintain application QoS, while existing self-adaptation approaches are often reactive and domain-specific. CRAFTER uses causal analysis and reinforcement learning to support reusable, informed adaptation.

1 Introduction

  • Dynamic changes in devices, networks, and resources challenge QoS, while existing approaches often react after problems arise and remain domain-specific.Prior work also commonly bases decisions on QoS changes without formal analysis of their causes.Source: §1 · p. 2
  • CRAFTER generates application-independent causal graphs to identify context and performance variables that influence IoT system behavior.The approach is intended to support self-adaptation across smart cities, homes, and industrial settings with minimal domain expertise.Source: §1 · p. 2
  • Causal models are combined with reinforcement learning so adaptation decisions account for QoS and contextual factors affecting performance.Causality provides a formal methodology for identifying relationships among variables in a smart space.Source: §1 · p. 2
  • CRAFTER’s stated contributions include a semi-automated design approach, formal causal performance analysis, and an automated CRL pipeline for dynamic environments.The contribution list also includes an open-source prototype implementation.Source: §1 · p. 2

2 The CRAFTER Approach

The CRAFTER approach is motivated by the difficulty of adapting IoT applications across dynamic, multi-stakeholder environments. It uses causal graphs to support reusable design and runtime adaptation.

2.1 Le Louvre Scenario

  • The Louvre scenario combines a dynamic museum, remote visitors using a digital-twin replica, and applications with distinct QoS requirements.IoT data reflects lighting, acoustics, visitor movement, and artifact locations.Source: §2.1 · pp. 2–3

2.2 Challenges in Designing Portable and Generic Self-adaptation Solutions

  • Existing self-adaptation approaches are often ad hoc and domain-specific, while effective adaptation logic requires expertise and lacks systematic reuse.Many rely on reactive rules or domain-specific models that may not generalize or provide explainability.Source: §2.2 · p. 3

2 The CRAFTER Approach

  • CRAFTER is organized into design-time deployment and runtime decision-making phases.The approach is presented as a response to the need for reusable self-adaptation in dynamic environments.Source: §2.3 · p. 3, §2.2 · p. 3

2.3 CRAFTER Overview

  • CRAFTER’s design-time phase uses IoT metrics datasets to generate causal models, which identify performance and context factors for state modeling.Context enrichment is optional; domain knowledge can also be incorporated through expert elicitation or ontologies.Source: §2.3 · pp. 3–4
  • At runtime, causal relationships let the adaptation agent monitor leading factors such as occupancy and reconfigure resources before potential QoS degradation.The MAPE-K integration uses monitored metrics and causal graphs as knowledge, with the agent planning actions that are then executed on the IoT system.Source: §2.3 · p. 4

3 Modelling Dynamic IoT Environments

CRAFTER models smart spaces and their QoS requirements, then addresses how changing workloads, resources, and application demands challenge QoS management. It uses causal discovery over QoS and contextual variables to identify performance drivers and support earlier adaptation.

3.1 IoT System Formal Model

  • The model organizes a smart space into locations with IoT devices, shared switches, edge-hosted virtual sensors, and applications with specified QoS requirements.Applications can specify tail-latency and minimum-throughput bounds; devices produce data periodically or in response to events.Source: §3.1 · p. 4

3.2 The Self-Adaptive QoS Management Problem

  • Changes in device traffic, edge-resource utilization, or application QoS requirements motivate self-adaptation to maintain required service levels.Application requirements are represented by maximum latency, minimum throughput, and maximum loss.Source: §3.2 · p. 4
  • Monitored QoS metrics may trigger adaptation only after violations, while adding context variables can support earlier detection and more informed actions.The usual metrics may be chosen arbitrarily or through expert knowledge; relevant context can include time, location, weather, and occupancy.Source: §3.2 · p. 5

4 Enabling Causality-based Adaptation

CRAFTER uses causal models built from IoT metrics to identify QoS and context variables that affect system behavior. It uses graph-derived knowledge to inform reinforcement-learning adaptation decisions.

4.1 Identifying Causal Relationships in IoT Systems

  • Structural causal models describe mechanisms linking variables, while some influences, such as visitor behavior, may remain unobserved and outside monitored or controllable variables.The paper distinguishes observable system variables from unobservable variables.Source: §4.1 · p. 5
  • Causal discovery recovers a complete causal graph from a dataset to identify QoS and contextual variables relevant to system performance.The graph represents variables and cause-effect edges as a directed acyclic graph; contextual factors may affect QoS directly or indirectly.Source: §4.1 · pp. 5–6
  • Causal discovery algorithms can use expert-specified required and forbidden edges, but their outputs require expert validation and depend on dataset quality and richness.The paper names PC, GES, and FCI as examples of discovery algorithms.Source: §4.1 · p. 6

4.2 CRL-based Adaptation

  • CRAFTER uses causal graphs to define adaptation-agent states and actions, grounding reinforcement-learning decisions in causal relationships.The graph-to-state/action mapping may be manual or automated.Source: §4.2 · p. 6
  • CRAFTER uses a reward that minimizes QoS deviation, and selects policy-based methods such as PPO for complex environments with continuous action spaces.The reward also includes penalties for allocated bandwidth and resources to avoid over-allocation.Source: §4.2 · p. 6

5 Experimental Evaluation

CRAFTER is evaluated in a simulated Louvre smart-space scenario, from prototype and causal-model construction through RL training and comparisons with existing adaptation approaches. Its agents keep application response times within QoS requirements during peak conditions, while the context-only agent achieves a 25% better mean reward than SOTA-RL.

5 Experimental Evaluation

  • The evaluation pipeline emulates IoT data exchange, extracts causal relationships, trains adaptation agents, and compares them with RL, genetic-algorithm, and rule-based approaches.The prototype, models, datasets, solution, and results are publicly available.Source: §5 · p. 7, §5.5 · p. 9

5.1 CRAFTER Prototype Implementation

  • The Java prototype models spaces, devices, virtual sensors, applications, and QoS requirements, using MQTT clients, an EMQX broker, and Containernet-emulated network links.Edge and Cloud resources host virtual sensors and heavier computing tasks.Source: §5.1 · p. 7, Figure 5 · p. 7

5.2 Experimental Setup

  • The Louvre setup models seven exhibition halls with 112 IoT devices, two Edge nodes, four virtual-sensor types, and five application types with latency requirements.Table 2 allocates devices and visitors by location; Table 3 describes virtual sensors and applications.Source: §5.2 · p. 7, Table 2 · p. 7, Table 3 · p. 8

5.3 Extracting Causal Models

  • From 1,560 system configurations, PC-based causal discovery identifies bandwidth allocation, resource allocation, and resource consumption as direct causes of response time, alongside contextual effects.Day and time are direct causes; location affects response time indirectly through visitor distribution and resulting traffic and resource demand. CRAFTER also generated relevant causal graphs for three other IoT use cases.Source: Figure 6 · p. 7, §5.3 · p. 8

5.4 Learning Self-adaptation with Causal RL

  • The Context Only agent observes context variables, while the Mixed agent observes context and QoS variables; both select bandwidth and Edge-resource allocations using PPO.Agents interact with the simulated IoT environment and optimize a reward that balances response-time deviation against resource over-allocation.Source: §5.4 · pp. 8–9

5.5 CRAFTER Against Existing Approaches

  • 25% better mean reward for CRAFTER-Context Only than SOTA-RL across 100 evaluation episodes, with a smaller reward standard deviation, 2.21 versus 2.33.During training, Context Only improves by 22% over SOTA-RL, while Mixed reaches up to 30% improvement with lower training stability.Source: Figure 7 · p. 8, Figure 8 · p. 9, §5.5 · p. 9
  • CRAFTER-Context Only keeps all applications within their QoS requirements at peak visitor loads, including Metaverse response times below 20 ms; SOTA-RL exceeds 35 ms.The comparison covers average response times per application; CRAFTER-Mixed also keeps Metaverse below 20 ms.Source: §5.5 · pp. 9–10, Figure 9 · p. 10

6 Related Work

The related work covers self-adaptive IoT systems, RL-based adaptation, and causal discovery. It positions CRAFTER as combining causal discovery with adaptation for dynamic IoT systems, where earlier approaches are described as reactive or limited in scope.

Self-adaptive IoT

  • Prior self-adaptation approaches are described as reactive to detected QoS violations and as not identifying their causes; CRAFTER uses performance-impacting variables to support proactive adaptation.The survey spans application-layer, middleware, RL-based, planning, and control approaches, many designed for particular tasks or settings.Source: §6 · pp. 10–11

Causal discovery

  • Existing causal-discovery work covers networking, anomaly detection, intrusion detection, and root-cause analysis, while its use to drive self-adaptation remains sparse.The passage notes limitations in some prior approaches for complex dynamic systems or runtime adaptation.Source: §6 · p. 11
  • The authors characterize CRAFTER as the first automated Causal RL pipeline, to their knowledge, for analyzing QoS-violation causes and taking tailored actions in dynamic IoT systems.They contrast it with causality work focused on network layers or small-scale static IoT systems.Source: §6 · p. 11

7 Limitations

CRAFTER's causal discovery depends on design-time IoT metrics datasets, and the paper identifies data quality, causal-discovery scalability, RL stability and safety, and simulation-based evaluation as limitations.

7 Limitations

  • Dataset quality, diversity, and representativeness affect causal-graph accuracy; missing, poorly measured, or insufficiently varied variables can produce incomplete or biased models.Expert elicitation or ontologies can add domain knowledge, but fully mitigating sparsity and hidden confounders remains challenging.Source: §7 · p. 11
  • The PC-based discovery approach scales reasonably in evaluated scenarios, but larger datasets and variable sets may require dimensionality reduction, hierarchical modeling, or incremental discovery not integrated into CRAFTER.The passage identifies environments with thousands of devices, metrics, and contextual variables as a scaling concern.Source: §7 · p. 11
  • RL adaptation brings training overhead and potential learning instability; online retraining or frequent environment changes may cause delays or transient QoS degradation, and exploration lacks explicit safety constraints.The paper notes that causal graphs reduce the state space and improve convergence.Source: §7 · p. 11
  • Evaluation relies primarily on emulated environments and realistic datasets, so production deployments may expose noise, failures, and non-stationarity that create a sim-to-real gap.The boundary is especially noted for safety-critical or latency-sensitive applications.Source: §7 · p. 11

8 Conclusion and Future Work

The paper concludes that causal models can guide adaptation agents in dynamic IoT environments and reports a 25% performance improvement over state-of-the-art RL approaches. Future work includes predicting future system states, quantifying causal effects, and evaluating real deployments.

8 Conclusion and Future Work

  • CRAFTER uses causal discovery to identify performance-degradation causes and creates causal models for adaptation-agent states in dynamic environments.The paper reports a 25% performance improvement over state-of-the-art RL approaches used for self-adaptation.Source: §8 · p. 11
  • Future work will add MAML to predict future context and QoS states, investigate causal-effect quantification, and evaluate CRAFTER in real-life deployments.Source: §8 · p. 11
Loading 2610.06320v1…