# LLM-Driven Causal Discovery for Monitoring Metrics in Computing Continuum Systems: A Comparative Study

Ahmad Atwi, Abdelkader Lahmadi

► To cite this version:

Ahmad Atwi, Abdelkader Lahmadi. LLM-Driven Causal Discovery for Monitoring Metrics in Computing Continuum Systems: A Comparative Study. LCN 2025 - IEEE 50th Conference on Local Computer Networks, Oct 2025, Sydney, Australia. pp.1-8, 10.1109/LCN65610.2025.11146314. hal-05343924v2

HAL Id: hal-05343924

https://hal.science/hal-05343924v2

Submitted on 6 Nov 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# LLM-Driven Causal Discovery for Monitoring
Metrics in Computing Continuum Systems: A
Comparative Study

Ahmad Atwi, Abdelkader Lahmadi

Université de Lorraine, CNRS, Inria, Loria, F-54000 Nancy, France, {firstname.lastname}@inria.fr

***Abstract***—Monitoring large-scale systems such as the Cloud-Edge-IoT continuum is challenging due to their distributed, heterogeneous, and evolving nature. Tracking all components—from cloud servers to IoT devices—demands intensive probe deployment and frequent data collection, causing network traffic, computation, and storage overhead. These challenges are intensified by the lack of prior knowledge about which metrics matter most, often leading to redundant monitoring. To address this, we explore whether Large Language Models (LLMs) can uncover causal relationships between metrics using only their textual descriptions. We propose a novel batch prompting strategy that allows LLMs to reason over multiple variables simultaneously, reducing query complexity while preserving interpretability. Our evaluation across several instruction-tuned LLMs shows stronger inter-model alignment than existing pairwise methods and reveals overlaps with causal graphs from traditional numerical algorithms. These results suggest that LLMs can support intelligent monitoring by identifying influential metrics and minimizing redundancy.

***Index Terms***—Monitoring, Cloud-Edge-IoT, Causal Discovery, Large Language Models

## I. INTRODUCTION

Monitoring complex computing environments such as the Cloud-Edge-IoT continuum is a foundational yet difficult task. These systems span a wide range of heterogeneous devices—from high-capacity cloud servers to resource-constrained IoT nodes—distributed across geographic and administrative boundaries [1]. To ensure reliable performance, fault detection, and resource optimization, system components must be continuously observed using probes and monitoring metric collectors. However, this process is resource-intensive: deploying probes at scale and collecting high-frequency time-series data introduces considerable network traffic, computational overhead, and storage demands [2].

A central challenge lies in deciding which metrics to monitor, how frequently, and where to place probes, especially when little prior knowledge exists about the causal relationships between variables. Inefficient monitoring strategies can result in redundant measurements or blind spots, degrading system observability and increasing operational costs. This motivates the need for intelligent monitoring systems that can begin by prioritizing metrics based on their causal influence—thus focusing resources on the most informative signals.

Traditional causal discovery methods such as PCMCI+ [3] and VarLiNGAM [4] have been widely used to discover causal structure from observational data. These techniques rely

on statistical independence testing or functional assumptions applied to numerical time series data. While effective in many scenarios, they struggle with noisy, slowly varying, or sparse data, and require significant amounts of numerical input, which may not be always available since collecting such data can be costly, and in large-scale systems, it may not always be feasible due to limited observability in certain components.

Recently, Large Language Models (LLMs) have demonstrated impressive capabilities in reasoning, domain knowledge, and question answering [5]–[7]. Researchers have begun to explore whether LLMs can perform causal discovery directly from textual descriptions of variables [8], [9]. Initial efforts have shown that LLMs can recognize simple cause-effect patterns using pairwise prompts [8], [10], but these approaches suffer from poor scalability and limited global reasoning due to their quadratic query complexity.

In this work, we investigate whether LLMs can uncover causal relationships among system-level monitoring metrics using only their names and semantic descriptions, without requiring any numerical data. Additionally, we propose a novel batch prompting strategy that allows LLMs to reason over multiple variables simultaneously. This approach reduces the number of queries, enhances global consistency, and maintains interpretability—making it practical for real-world causal discovery tasks like monitoring in large-scale systems.

We evaluate this strategy across a set of open-source LLMs of varying sizes and architectures, and additionally test state-of-the-art GPT models to assess performance against leading proprietary systems. We also compare the discovered causal graphs against those obtained using traditional data-driven algorithms on real-world metrics collected from a computing continuum system deployed on the Grid’5000 testbed. Our results show that: (i) LLMs produce consistent causal structures across different models, particularly when using batch prompts; (ii) LLM-derived causal edges often overlap with those discovered by traditional statistical methods; the proposed batch strategy outperforms pairwise prompting in terms of model agreement and scalability.

To our knowledge, this is the first study to benchmark LLM-based causal discovery techniques for monitoring in the Cloud-Edge-IoT continuum using real-world infrastructure data.

The remainder of the paper is organized as follows. Sec-
tion II reviews prior work on causal discovery, including both classical algorithms and recent studies evaluating the capabilities of LLMs. Section III outlines our methodology, detailing the selected models, the monitoring metrics used, and a brief description of the causal discovery approaches alongside the evaluation metrics used. Section IV presents and analyzes the results obtained from the different experiments. Finally, Section V concludes the paper and outlines potential directions for future work.

## II. RELATED WORK

### A. Traditional Causal Discovery Methods

Causal discovery has traditionally relied on data-driven approaches that discover causal graphs from observational time-series or tabular data. Among the most widely used methods are constraint-based algorithms such as the PC algorithm [11], score-based methods like GES [12], and functional causal models including LiNGAM [13] and its vector autoregressive extension VarLiNGAM [4]. These algorithms typically assume access to complete and clean numerical datasets and often rely on assumptions such as causal sufficiency or acyclicity.

More recently, time-series specific methods like PCMCI+ [3] have gained traction for their ability to handle autocorrelated data and uncover both lagged and contemporaneous dependencies. PCMCI+ combines constraint-based search with conditional independence tests and has been successfully applied in scientific domains like climate analysis and neuroscience. However, these methods are sensitive to noise, rely heavily on statistical features, and may underperform in settings where metrics evolve slowly or display weak correlations—a common occurrence in operational monitoring.

### B. LLM-based Causal Discovery

Large Language Models (LLMs) have emerged as promising tools for performing reasoning tasks over natural language. Several recent studies have explored whether LLMs can discover causal relationships between variables based solely on their semantic descriptions. Long et al. [8] applied a pairwise prompting strategy in the medical domain, evaluating whether GPT-3 could detect the presence or absence of directed edges between variables by comparing the scores assigned to causality-implying versus non-causality statements. Similarly, Kıcıman et al. [10] assessed whether LLMs can determine the direction of causal relationships between variable pairs using only names and descriptions. Both studies found that instruction-tuned models can, in some cases, outperform traditional data-driven methods in structured benchmarks.

However, these pairwise prompting approaches scale poorly to large causal graphs due to their quadratic query complexity and lack of global context. To mitigate this, Jiralerspong et al. [14] proposed a breadth-first search (BFS) prompting framework, which significantly reduces the number of queries required for graph construction while maintaining competitive performance.

Despite such progress, some works suggest that LLMs still face fundamental limitations in performing reliable causal inference. In [15] they introduced the CORR2CAUSE benchmark to test whether LLMs can infer causation from correlational statements using formal reasoning. Their results showed that existing LLMs often perform close to random, even after fine-tuning, especially on out-of-distribution examples. These findings suggest that while LLMs may infer causal knowledge learned during pretraining, they often struggle with the structured logical reasoning required for robust causal inference. These findings reflect two contrasting perspectives in the literature—one viewing LLMs as promising causal reasoners, and the other highlighting their fundamental limitations. Our study contributes to this discussion by offering an empirical evaluation based on system-level monitoring metrics.

### C. Gaps and Motivation

To date, no study has applied LLM-based causal discovery to real-world monitoring metrics from large-scale infrastructures. Existing benchmarks focus on structured domains like medicine or simulations with clean ontologies. Moreover, the impact of prompting strategies on inter-model agreement and alignment with data-driven methods remains underexplored.

Although Jiralerspong et al. [14] proposed a BFS-style prompting method for scalability, it does not account for LLM context window limits—an issue in real-world setups with many metrics.

We address these gaps by evaluating LLM-based causal discovery on real monitoring data, comparing prompting strategies, and benchmarking against traditional algorithms. We also introduce a batch prompting strategy that balances scalability and interpretability under context constraints.

## III. METHODOLOGY

This section outlines the methods and experimental design used to evaluate the causal discovery capabilities of Large Language Models (LLMs) based on the semantic descriptions of system-level monitoring metrics. We describe the dataset, selected models, prompting strategies, traditional baselines, and evaluation metrics.

### A. Monitoring Metrics Dataset

To construct a representative dataset of monitoring variables, we deployed a computing continuum application within the Grid'5000 infrastructure using a Cloud-Edge-IoT architecture and running a video processing service on a K3s Kubernetes cluster. The deployed system relies on Prometheus-Grafana for service-level monitoring and Kwollect for node-level system metrics.

The experiment enabled the collection of a rich and diverse set of metrics that capture realistic infrastructure-level behaviors observed in operational settings. For each metric, we extracted both its name, textual description, and timestamps values to be used as input for LLM-based causal discovery relying solely on semantic metadata, and the traditional causal discovery algorithms. Table I provides examples of selected metrics and their respective descriptions used in our evaluation.
<table><caption>TABLE I: Sample Monitoring Metrics with Descriptions.</caption><thead><tr><td>Metric Name</td><td>Description</td></tr></thead><tbody><tr><td><code>prom_node_cpu_seconds_total</code></td><td>Total CPU time (user, system, idle)</td></tr><tr><td><code>prom_node_memory_Active_bytes</code></td><td>Memory actively or recently used</td></tr><tr><td><code>prom_node_disk_read_bytes_total</code></td><td>Bytes read from disk devices</td></tr><tr><td><code>bmc_node_power_watt</code></td><td>Power reported by the BMC</td></tr><tr><td><code>wattmetre_power_watt</code></td><td>Power measured by wattmeter</td></tr></tbody></table>

## B. Language Models

To evaluate the ability of LLMs to perform causal discovery over system-level and Cloud-Edge-IoT metric descriptions, we selected a range of open-source Large Language Models (LLMs), including several instruction-tuned variants spanning different sizes, architectures, and reasoning capabilities. In addition, we included GPT-4 Turbo, a state-of-the-art commercial model from OpenAI, to benchmark performance against proprietary systems.

* **LLaMA3.3-70B:** Known for its strong contextual understanding and reproducibility in local environments;

* **Mistral-Instruct-7B:** A lightweight yet competitive instruction-tuned model optimized for prompt-following and structured reasoning;

* **Gemma-27B:** A dense Transformer model offering efficient inference and strong performance on technical reasoning tasks;

* **Mixtral-8x7B:** A Mixture-of-Experts (MoE) model designed to balance computational efficiency and reasoning depth by activating a subset of experts per token;

* **DeepSeek-R1-70B:** Selected for its extended context window and robust performance on logical and causal reasoning tasks.

* **GPT-4 Turbo:** A commercial model by OpenAI, recognized for its strong reasoning and high-quality, consistent outputs.

All models were evaluated using both pairwise and batch prompting strategies, with the temperature set to zero to promote deterministic outputs. A consistent context length was applied across all models to ensure fairness. However, LLMs operate as black-box systems, and setting the temperature to zero does not always guarantee identical outputs [16]. Variability can arise from floating-point precision, context alignment, or GPU-level parallelism during inference. To mitigate these inconsistencies, each model was tested in isolation under identical environment conditions, ensuring reproducibility across multiple runs.

We further experimented with different batch sizes, showing that presenting LLMs with a broader context of variable descriptions can enhance their ability to identify causal relationships. This, however, comes with trade-offs: larger batches improve global reasoning but risk exceeding the model's context window or causing attention dilution. Selecting an appropriate batch size is thus crucial to balancing contextual richness and computational feasibility.

## C. Prompting Strategies

Prompting is the most widely adopted technique for enabling causal reasoning in large language models, as demonstrated in several recent studies [8], [10], [17], [18]. These works explore a variety of strategies ranging from basic zero-shot prompts to more advanced techniques such as in-context learning (ICL), chain-of-thought (CoT), and causality-specific designs like CausalCoT. Notably, simple changes in phrasing—such as framing the model as a “causal assistant”—have been shown to improve performance. Building on this foundation, our study employs two practical prompting strategies tailored for causal discovery from metric descriptions: a *pairwise prompting* approach, where the model is queried on each variable pair individually, and a more scalable *batch-based prompting* strategy, where the model is presented with all variables or subset of variables depending on the batch size, and asked to output a full set of causal relations. These two methods allow us to assess both the fine-grained local reasoning capabilities and the global structural understanding of the models under evaluation.

1) **Pairwise Prompting:** In the pairwise prompting approach, the LLM is queried on each pair of variables $(A, B)$ to determine the most likely causal direction—whether $A \to B$, $B \to A$, or if no causal relationship exists. This method enables fine-grained evaluation of edge-level causal links and has been used as a baseline in prior work [8], [10]. To ensure consistency across evaluations, we adopted a fixed natural language template for all queries. An example prompt is provided in Appendix A.

2) **Batch Prompting:** To address both the scalability limitations of the exhaustive pairwise prompting method and the context window constraints inherent to LLMs, we propose a more efficient framework for causal discovery using LLMs. Instead of querying the model for every possible pair of variables, we adopt a batched strategy where each variable is treated as a potential cause (or root), and the model is asked to identify which other variables it may directly or indirectly influence. This reduces the query complexity from $O(n^2)$ to a more manageable form, depending on the batch size and context limitations.

When working with small-scale environments, it is often possible to include all variables in a single prompt, resulting in only $O(n)$ queries—one for each root variable. However, due to context length constraints in many LLMs, especially for larger graphs, it may not be feasible to include all other variables in one query. In such cases, the remaining $n-1$ variables are divided into batches of size $b$, and each batch is queried separately.

Under this batched variant, for each of the $n$ root variables, approximately $\lfloor \frac{n-1}{b} \rfloor$ queries are required. Thus, the total number of queries becomes:

$$O\left(n \cdot \lfloor \frac{n}{b} \rfloor\right) = O\left(\frac{n^2}{b}\right)$$
This approach offers a practical compromise between the fully exhaustive pairwise method with $O(n^2)$ complexity and single-query, fully batched methods which may have problems with context length limitations and attention dilution. By adjusting the batch size, our method remains flexible and scalable across variable set sizes and LLM context limitations.

As highlighted in previous studies, framing the model as a helpful assistant and incorporating Chain-of-Thought (CoT) prompting strategies have been shown to enhance the logical coherence and accuracy of LLM responses, particularly in tasks involving causal reasoning. Accordingly, these elements were integrated into the prompts used in our batch-based approach. The final prompt design is shown in Appendix A.

## D. Traditional Causal Discovery Methods

To contextualize the performance of LLM-based causal discovery, we compare their outputs against two well-established traditional causal discovery algorithms: PCMCI+ and VarLiNGAM. PCMCI+ is a time-series-based method that combines constraint-based structure learning with conditional independence testing, making it effective for detecting both lagged and contemporaneous causal links in multivariate temporal data [3]. VarLiNGAM, on the other hand, is a functional causal model that assumes linear non-Gaussianity to identify causal directions, and is particularly suited for vector autoregressive systems [4].

Unlike LLMs, which rely solely on semantic descriptions, these methods discover causal structure directly from numerical time series. To ensure a fair comparison, we aligned the variable sets and evaluated all approaches on the same subsets of metrics. This allowed us to assess not only the degree of overlap between LLM- and data-driven outputs, but also to highlight potential limitations of statistical methods—particularly in environments where metrics evolve slowly or where statistical dependencies are weak or noisy. These scenarios are common in real-world monitoring, where LLMs may offer complementary value by leveraging semantic knowledge when traditional signals are inconclusive.

To ensure robust structure learning, we tested different parameter settings for both methods. PCMCI+ parameters included the conditional independence threshold $pc\_alpha$ and the post-selection threshold, both of which control the significance level and sparsity of the resulting graph. For VarLiNGAM, we tested multiple lag orders and evaluated structural stability. A detailed discussion of parameter choices and their effects is provided in Section IV.

## E. Evaluation Metrics

To quantitatively compare the causal graphs generated by different models and prompting strategies, we compute a set of standard structural similarity metrics. These include Jaccard Similarity, Edge Difference Ratio (EDR), and Structural Hamming Distance (SHD).

Jaccard Similarity is defined as the ratio of the number of overlapping edges between two graphs to the total number of unique edges. It provides an interpretable measure of

agreement between edge sets, particularly in sparse graphs. Given two graphs A and B with edge sets $E_A$ and $E_B$, the Jaccard similarity is:

$$J = \frac{|E_A \cap E_B|}{|E_A \cup E_B|}$$

In our implementation, the union is defined as:

$$|\text{Edges}_A \cup \text{Edges}_B| = |\text{Edges}_A| + |\text{Edges}_B| - |\text{Edges}_A \cap \text{Edges}_B|$$

This ensures that shared edges are not double-counted and the similarity score remains properly normalized.

Edge Difference Ratio (EDR) quantifies the proportion of differing edges relative to the union of both graphs:

$$EDR = \frac{|E_A \Delta E_B|}{|E_A \cup E_B|}$$

where $\Delta$ denotes the symmetric difference between the two edge sets.

Structural Hamming Distance (SHD) counts the number of edge additions, deletions, or direction reversals needed to transform one graph into another. It is a widely used metric in causal discovery benchmarks and captures topological similarity beyond simple overlap.

These metrics were chosen because they are well-established in the causal discovery literature and provide complementary perspectives on graph alignment. Importantly, we do not have access to ground-truth causal graphs in most real-world experiments, which makes it infeasible to compute supervised metrics such as precision, recall, or F1-score. Instead, we rely on pairwise comparisons between the outputs of different methods to assess consistency and structural similarity.

# IV. EXPERIMENTS AND RESULTS

In this section, we present the results of our experiments evaluating the ability of LLMs to perform causal discovery from textual metric descriptions. Both pairwise and batch-based prompting strategies were tested across a diverse set of instruction-tuned LLMs. Our evaluation focuses on the number of discovered causal edges, inter-model agreement, and alignment with traditional algorithmic baselines. These experiments aim to assess not only the reasoning capabilities of LLMs but also their practical utility in supporting monitoring tasks through lightweight, description-based causal discovery.

All experiments were conducted on a high-end GPU (NVIDIA RTX A6000), under consistent inference conditions.

Through our evaluations, we tested the ability of LLMs to discover both direct and indirect causal relationships. We define a direct edge as an immediate causal link between two variables (e.g., $A \to B$), while an indirect edge represents a mediated or transitive influence (e.g., $A \to B \to C$ implies an indirect effect from A to C). Distinguishing between these two types of edges is essential for capturing the complete causal structure and understanding how effects propagate across complex systems.

To ensure fairness across models, the following conditions were maintained: (i) identical input descriptions and
prompts were used for the same approach; (ii) all models were evaluated on the same causal inference task; (iii) the same evaluation metrics—such as Jaccard similarity and edge-difference ratio—were applied; and (iv) each test was executed in isolation, with only one process running on the GPU to ensure stable resource allocation and avoid contention.

Each LLM was tested in isolation with a temperature of zero, and the context length of 2048 across all runs. Models were evaluated on subsets of 10, 30, and 100 monitoring metrics collected from our dataset (See Section III-A)

### A. Prompting Strategies Effect

As shown in Table II, despite differences in architecture and training data, there is a notable overlap in the discovered causal edges. We conducted experiments using both prompting strategies—pairwise and batch—to identify direct causal relationships. The objectives were twofold: first, to examine how model alignment varies with different prompting strategies, and second, to demonstrate the consistent advantage of the proposed batch-based approach. In the pairwise setting, Gemma3 achieved a Jaccard similarity of 0.162 with Deepseek-r1. While this value is relatively low, it still indicates a degree of alignment between the models. Notably, this similarity increased to **0.476** when using the batch prompting strategy, highlighting the effectiveness of the proposed method. A similar trend is observed between LLaMA3.3 and Gemma3, where the Jaccard similarity increased from 0.410 in the pairwise setup to **0.412** in the batch setting. Although the improvement is modest, it still reflects a non-trivial level of inter-model agreement enhanced by batch prompting.

<table><caption>TABLE II: Comparison of batch (batch-size = 4) vs. pairwise prompting on direct relations on set of 10 metrics.</caption><thead><tr><th>Model A</th><th>Model B</th><th>Approach</th><th>Jaccard</th></tr></thead><tbody><tr><td>LLaMA3.3:70b</td><td>Mistral-Instruct</td><td>Pairwise Batch</td><td>0.080 <strong>0.417</strong></td></tr><tr><td>Gemma3:27b</td><td>LLaMA3.3:70b</td><td>Pairwise Batch</td><td>0.410 <strong>0.412</strong></td></tr><tr><td>Gemma3:27b</td><td>DeepSeek-r1:70b</td><td>Pairwise Batch</td><td>0.162 <strong>0.476</strong></td></tr><tr><td>GPT-4 Turbo</td><td>DeepSeek-r1:70b</td><td>Pairwise Batch</td><td>0.152 <strong>0.437</strong></td></tr></tbody></table>

### B. Direct-Indirect Causal Discovery

Understanding indirect causal relationships is particularly valuable in real-world monitoring scenarios, where effects often propagate through intermediate components. Capturing these transitive links enhances root-cause analysis and reduces monitoring redundancy, ultimately improving observability and efficiency in distributed systems.

To evaluate this further, we extended our experiments to include both direct and indirect causal relationships under the same conditions. The results revealed strong alignment between models across both prompting strategies, with notable increases in similarity compared to the earlier tests focused

only on direct relations. The batch prompting approach, in particular, demonstrated high consistency among Gemma3, DeepSeek-R1, LLaMA3.3, and GPT-4 Turbo.

As shown in Table III, DeepSeek-r1 and GPT-4 Turbo achieved a Jaccard similarity of 0.814—remarkably high for models relying solely on textual descriptions rather than numerical time-series data. Even more impressively, DeepSeek-R1 and LLaMA3.3 reached a similarity of 0.932, indicating that over 93% of the discovered causal edges are shared. This strong agreement reinforces the reliability of their inferred causal graphs, even across models of different sizes.

In contrast, models like Mixtral showed lower agreement across the board. This can be attributed to its Mixture-of-Experts (MoE) architecture, which activates only a subset of its internal networks per query. While efficient, this approach may reduce reasoning depth, especially when causal relationships are subtle or span multiple variables

### C. Batch-size Effect

To investigate how context richness influences causal discovery, we compared different batch sizes: 1 (pairwise), 4, 7, and 10. The goal was to assess whether providing a more comprehensive view of the variable set improves the consistency and quality of discovered causal graphs.

Our results confirm that larger batch sizes improve model agreement, with DeepSeek-r1 and LLaMA3.3 reaching a Jaccard of 0.978 and SHD of 1—indicating near-perfect alignment. This suggests that richer prompts enable LLMs to reason more coherently about the full causal structure.

This trend implies that exposing the models to a wider set of variable descriptions simultaneously helps them build a more global understanding, potentially reducing inconsistencies or hallucinated edges that may arise in isolated pairwise evaluations. Such a strategy is particularly valuable when attempting to discover both direct and indirect causal relations.

However, this improvement comes with trade-offs. Larger batch sizes increase prompt length, which can hit model context length limits—especially for models with smaller token windows. Additionally, very large batches may introduce attention dilution, where the model’s focus on specific relationships is weakened due to cognitive overload from too many variables. These effects could lead to missed or degraded discovery. To further explore this effect, we tested the larger models with a batch size of 7 and observed exceptional alignment—DeepSeek-r1 and LLaMA3.3 produced perfectly matching causal graphs, indicating complete agreement.

### D. Scalability Study

To evaluate scalability, we expanded our analysis to larger subsets containing 30 and 100 monitoring metrics. As expected, the number of discovered causal edges increased with the number of variables, leading to a natural decline in Jaccard similarity scores due to the larger comparison space. Despite this, inter-model agreement remained substantial.
REFERENCES

[1] A. Al-Dulaimy, M. Jansen, B. Johansson, A. Trivedi, A. Iosup, M. Ashjaei, A. Galletta, D. Kimovski, R. Prodan, K. Tserpes, G. Kousiouris, C. Giannakos, I. Brandic, N. Ali, A. B. Bondi, and A. V. Papadopoulos, "The computing continuum: From iot to the cloud," *Internet of Things*, vol. 27, p. 101272, 2024.

[2] M. Andreolini, M. Colajanni, and R. Lancellotti, "Assessing the overhead and scalability of system monitors for large data centers," in *Proceedings of the 1st ACM Workshop on Cloud Computing Platforms (CloudCP '11)*. Salzburg, Austria: ACM, 2011, pp. 1–10.

[3] J. Runge, "Discovering contemporaneous and lagged causal relations in autocorrelated nonlinear time series datasets," in *Proceedings of the 36th Conference on Uncertainty in Artificial Intelligence (UAI)*, vol. 124. Toronto, Canada: PMLR, 2020, pp. 1388–1397.

[4] A. Hyvärinen and K. Zhang, "Estimation of a structural vector autoregression model using non-gaussianity," *Journal of Machine Learning Research*, vol. 11, no. 5, pp. 1709–1731, 2010.

[5] J. Wei, X. Wang, D. Schuurmans, M. Bosma, B. Ichter, F. Xia, E. H. Chi, Q. V. Le, and D. Zhou, "Chain-of-thought prompting elicits reasoning in large language models," in *Advances in Neural Information Processing Systems*, vol. 35. New Orleans, LA: NeurIPS, 2022, pp. 24 917–24 929.

[6] S. Yao, D. Yu, J. Zhao, I. Shafran, T. L. Griffiths, Y. Cao, and K. Narasimhan, "Tree of thoughts: Deliberate problem solving with large language models," in *Proceedings of the 37th Conference on Neural Information Processing Systems (NeurIPS)*. New Orleans, LA: NeurIPS, 2023, pp. 24 700–24 712, oral presentation.

[7] Z. Zhao, W. S. Lee, and D. Hsu, "Large language models as common-sense knowledge for large-scale task planning," in *Proceedings of the 37th Conference on Neural Information Processing Systems (NeurIPS)*, 2023, accepted at NeurIPS 2023.

[8] S. Long, T. Schuster, and A. Piché, "Can large language models build causal graphs?" *arXiv preprint arXiv:2303.05279*, 2023, presented at NeurIPS 2022 Workshop on Causal ML for Real-World Impact.

[9] J. Gao, X. Ding, B. Qin, and T. Liu, "Is ChatGPT a good causal reasoner? a comprehensive evaluation," in *Findings of the Association for Computational Linguistics: EMNLP 2023*. Singapore: Association for Computational Linguistics, 2023, pp. 11 111–11 126.

[10] E. Kıcıman, R. Ness, A. Sharma, and C. Tan, "Causal reasoning and large language models: Opening a new frontier for causality," *arXiv preprint arXiv:2305.00050*, 2023.

[11] P. Spirites and C. Glymour, "An algorithm for fast recovery of sparse causal graphs," *Social Science Computer Review*, vol. 9, no. 1, pp. 62–72, 1991.

[12] D. M. Chickering, "Optimal structure identification with greedy search," *Journal of Machine Learning Research*, vol. 3, pp. 507–554, 2003.

[13] S. Shimizu, P. O. Hoyer, A. Hyvärinen, and A. Kerminen, "A linear non-gaussian acyclic model for causal discovery," *Journal of Machine Learning Research*, vol. 7, pp. 2003–2030, 2006.

[14] T. Jiralerspong, X. Chen, Y. More, V. Shah, and Y. Bengio, "Efficient causal graph discovery using large language models," *arXiv preprint arXiv:2402.01207*, 2024.

[15] Z. Jin, J. Liu, Z. Lyu, S. Poff, M. Sachan, R. Mihalcea, M. Diab, and B. Schölkopf, "Can large language models infer causation from correlation?" in *Proceedings of the International Conference on Learning Representations (ICLR)*, 2024.

[16] D. Kim, "Understanding batch size impact on LLM output: Causes and solutions," Medium article, 2024, accessed May 29, 2025.

[17] S. Chen, B. Peng, M. Chen, R. Wang, M. Xu, X. Zeng, R. Zhao, S. Zhao, Y. Qiao, and C. Lu, "Causal evaluation of language models," *arXiv preprint arXiv:2405.00622*, 2024.

[18] Z. Jin, Y. Chen, F. Leeb, L. Gresele, O. Kamal, Z. Lyu, K. Blin, F. Gonzalez Adauto, M. Kleiman-Weiner, M. Sachan, and B. Schölkopf, "CLadder: Assessing Causal Reasoning in Language Models," in *Advances in Neural Information Processing Systems*, vol. 36. New Orleans, LA: NeurIPS, 2023, pp. 31 038–31 065.

[19] P. Spirites, C. Glymour, and R. Scheines, *Causation, Prediction, and Search*, 2nd ed. Cambridge, MA: MIT Press, 2000. [Online]. Available: https://mitpress.mit.edu/books/causation-prediction-and-search

APPENDIX A
PROMPTS AND RESPONSES

Batch Prompt Template

Query:

You are a helpful assistant to an expert working on causality in cloud-edge-IoT monitoring data.

We are examining the causal relationship between a root variable and a batch of other variables.

Root variable:

prom_node_cpu_seconds_total - total accumulated CPU time, broken down by mode.

Other variables:

prom_node_disk_reads_completed_total - total completed disk read operations.

prom_node_disk_written_bytes_total - total number of bytes written to disks.

prom_node_hwmon_temp_celsius - current temperature from hardware sensors, in Celsius.

Instructions:

* Analyze whether each variable is **caused directly or indirectly** by the root variable.

* An indirect cause means the root may influence the variable through one or more intermediate variables.

* Only include variable names that are affected by the root variable in any way (directly or indirectly).

* Final answer format: <Answer>var1, var2, var3</Answer>

Let's work this out step by step to ensure the right answer.

LLM Response (Batch 3)

<think>

Okay, so I'm trying to figure out how prom_node_cpu_seconds_total affects these other variables. The root variable is CPU time, which makes sense because when the CPU is busy, it can influence other parts of the system.

First, looking at prom_node_disk_reads_completed_total. If the CPU is working more, maybe the system needs to read more data from the disk to process tasks. So higher CPU usage could lead to more disk reads as the system fetches necessary data. That seems like a direct effect.

Next, prom_node_disk_written_bytes_total. Similar logic here: if the CPU is busy processing data, it might write more data to the disk, either for storage or swapping if memory is full. So again, this could be directly influenced by CPU usage.

Now, prom_node_hwmon_temp_celsius. This one's a bit trickier. Higher CPU usage usually generates more heat. If the system doesn't have perfect cooling, the temperature sensors might pick up higher temperatures when the CPU is under load. I think it's an indirect effect.

So all three variables are influenced by the root variable, either directly or indirectly.

</think>

<Answer>prom_node_disk_reads_completed_total,
prom_node_disk_written_bytes_total,
prom_node_hwmon_temp_celsius</Answer>
Pairwise Prompt Template

You are a helpful assistant to an expert on cloud-edge data. We are examining the causal relationship between two variables:
**<disk read operations>:** total completed disk read operations
**<CPU time>:** total accumulated CPU time, broken down by mode

Here are the causal relations you know so far:

Given the above information, which of the following is the most likely?

A. "disk read operations" causes "CPU time"
B. "CPU time" causes disk read operations
C. There is no direct causal relationship between "disk read operations" and "CPU time"

Let's work this out step by step to ensure the right answer.
Then provide your final answer within the tags <Answer>A/B/C</Answer>.

APPENDIX B
ADDITIONAL EXPERIMENTAL RESULTS

<table><caption>TABLE V: Model-to-model comparison of discovered causal graphs (direct relations) for pairwise and batch approaches (batch of size 4) on set of 10 metrics.</caption><thead><tr><th>Model A</th><th>Model B</th><th>Approach</th><th>Edges A</th><th>Edges B</th><th>Overlap</th><th>Jaccard</th><th>Edge-Diff Ratio</th><th>SHD</th></tr></thead><tbody><tr><td rowspan="5">Mistral:8x7b</td><td>Mistral-Instruct</td><td>pairwise</td><td>9</td><td>4</td><td>0</td><td>0.000</td><td>1.000</td><td>13</td></tr><tr><td>Gemma3:27b</td><td>batch</td><td>1</td><td>8</td><td>1</td><td>0.125</td><td>0.875</td><td>7</td></tr><tr><td>LLaMA3.3:70b</td><td>pairwise</td><td>9</td><td>32</td><td>5</td><td>0.139</td><td>0.861</td><td>31</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>1</td><td>15</td><td>0</td><td>0.000</td><td>1.000</td><td>16</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>9</td><td>23</td><td>7</td><td>0.280</td><td>0.720</td><td>18</td></tr><tr><td rowspan="5">Mistral-Instruct</td><td>Gemma3:27b</td><td>batch</td><td>1</td><td>9</td><td>1</td><td>0.111</td><td>0.889</td><td>8</td></tr><tr><td>LLaMA3.3:70b</td><td>pairwise</td><td>4</td><td>11</td><td>5</td><td>0.333</td><td>0.667</td><td>10</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>9</td><td>11</td><td>5</td><td>0.000</td><td>1.000</td><td>17</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>4</td><td>32</td><td>0</td><td>0.000</td><td>1.000</td><td>36</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>8</td><td>15</td><td>5</td><td>0.278</td><td>0.722</td><td>13</td></tr><tr><td rowspan="5">Gemma3:27b</td><td>Gemma3:27b</td><td>pairwise</td><td>4</td><td>23</td><td>2</td><td>0.080</td><td>0.920</td><td>23</td></tr><tr><td>LLaMA3.3:70b</td><td>batch</td><td>8</td><td>9</td><td>5</td><td>0.417</td><td>0.583</td><td>7</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>4</td><td>11</td><td>1</td><td>0.071</td><td>0.929</td><td>13</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>8</td><td>16</td><td>4</td><td>0.200</td><td>0.800</td><td>16</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>32</td><td>23</td><td>16</td><td>0.410</td><td>0.590</td><td>23</td></tr><tr><td rowspan="5">LLaMA3.3:70b</td><td>Gemma3:27b</td><td>batch</td><td>15</td><td>9</td><td>7</td><td>0.412</td><td>0.588</td><td>10</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>32</td><td>11</td><td>6</td><td>0.162</td><td>0.838</td><td>31</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>1</td><td>16</td><td>10</td><td>0.476</td><td>0.524</td><td>11</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>23</td><td>11</td><td>10</td><td>0.417</td><td>0.583</td><td>14</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>9</td><td>16</td><td>5</td><td>0.250</td><td>0.750</td><td>15</td></tr></tbody></table>

<table><caption>TABLE VI: Model-to-model comparison of discovered causal graphs (direct and indirect relations) for pairwise and batch approaches (batch of size 4) on set of 10 metrics.</caption><thead><tr><th>Model A</th><th>Model B</th><th>Approach</th><th>Edges A</th><th>Edges B</th><th>Overlap</th><th>Jaccard</th><th>Edge-Diff Ratio</th><th>SHD</th></tr></thead><tbody><tr><td rowspan="5">Mistral:8x7b</td><td>Mistral-Instruct</td><td>pairwise</td><td>22</td><td>19</td><td>7</td><td>0.206</td><td>0.794</td><td>27</td></tr><tr><td>Gemma3:27b</td><td>batch</td><td>9</td><td>27</td><td>5</td><td>0.161</td><td>0.839</td><td>26</td></tr><tr><td>LLaMA3.3:70b</td><td>pairwise</td><td>22</td><td>44</td><td>9</td><td>0.158</td><td>0.842</td><td>48</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>22</td><td>44</td><td>13</td><td>0.245</td><td>0.755</td><td>40</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>22</td><td>44</td><td>9</td><td>0.205</td><td>0.795</td><td>35</td></tr><tr><td rowspan="5">Mistral-Instruct</td><td>Gemma3:27b</td><td>batch</td><td>19</td><td>44</td><td>7</td><td>0.125</td><td>0.875</td><td>49</td></tr><tr><td>LLaMA3.3:70b</td><td>pairwise</td><td>19</td><td>44</td><td>7</td><td>0.125</td><td>0.875</td><td>49</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>27</td><td>44</td><td>26</td><td>0.578</td><td>0.422</td><td>19</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>19</td><td>37</td><td>4</td><td>0.077</td><td>0.923</td><td>48</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>27</td><td>41</td><td>23</td><td>0.511</td><td>0.489</td><td>22</td></tr><tr><td rowspan="5">Gemma3:27b</td><td>Gemma3:27b</td><td>pairwise</td><td>44</td><td>44</td><td>28</td><td>0.467</td><td>0.533</td><td>32</td></tr><tr><td>LLaMA3.3:70b</td><td>batch</td><td>38</td><td>44</td><td>38</td><td>0.864</td><td>0.136</td><td>6</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>44</td><td>37</td><td>26</td><td>0.473</td><td>0.527</td><td>29</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>38</td><td>41</td><td>35</td><td>0.795</td><td>0.205</td><td>9</td></tr><tr><td>DeepSeek-r1:70b</td><td>pairwise</td><td>44</td><td>37</td><td>36</td><td>0.800</td><td>0.200</td><td>9</td></tr><tr><td>DeepSeek-r1:70b</td><td>batch</td><td>44</td><td>41</td><td>41</td><td>0.932</td><td>0.068</td><td>3</td></tr></tbody></table>

<table><caption>TABLE VII: Model-to-model comparison of discovered causal graphs (direct and indirect) for batch sizes 4, 7 and 10.</caption><thead><tr><th>Model A</th><th>Model B</th><th>Batch Size</th><th>Edges A</th><th>Edges B</th><th>Overlap</th><th>Jaccard</th><th>Edge-Diff Ratio</th><th>SHD</th></tr></thead><tbody><tr><td rowspan="5">Mistral:8x7b</td><td>Mistral-Instruct</td><td>4</td><td>9</td><td>27</td><td>5</td><td>0.161</td><td>0.839</td><td>26</td></tr><tr><td>Gemma3:27b</td><td>4</td><td>9</td><td>38</td><td>9</td><td>0.237</td><td>0.763</td><td>29</td></tr><tr><td>LLaMA3.3:70b</td><td>4</td><td>9</td><td>44</td><td>9</td><td>0.250</td><td>0.795</td><td>35</td></tr><tr><td>DeepSeek-r1:70b</td><td>4</td><td>9</td><td>41</td><td>8</td><td>0.244</td><td>0.756</td><td>34</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>9</td><td>37</td><td>9</td><td>0.243</td><td>0.757</td><td>28</td></tr><tr><td rowspan="5">Mistral-Instruct</td><td>Gemma3:27b</td><td>4</td><td>27</td><td>38</td><td>24</td><td>0.585</td><td>0.415</td><td>17</td></tr><tr><td>LLaMA3.3:70b</td><td>4</td><td>23</td><td>39</td><td>21</td><td>0.512</td><td>0.488</td><td>20</td></tr><tr><td>DeepSeek-r1:70b</td><td>4</td><td>27</td><td>44</td><td>26</td><td>0.578</td><td>0.422</td><td>19</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>23</td><td>45</td><td>23</td><td>0.511</td><td>0.489</td><td>22</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>27</td><td>44</td><td>23</td><td>0.523</td><td>0.477</td><td>21</td></tr><tr><td rowspan="5">Gemma3:27b</td><td>Gemma3:27b</td><td>4</td><td>27</td><td>37</td><td>21</td><td>0.658</td><td>0.342</td><td>13</td></tr><tr><td>LLaMA3.3:70b</td><td>4</td><td>27</td><td>38</td><td>19</td><td>0.452</td><td>0.548</td><td>23</td></tr><tr><td>DeepSeek-r1:70b</td><td>4</td><td>38</td><td>44</td><td>38</td><td>0.864</td><td>0.136</td><td>6</td></tr><tr><td>DeepSeek-r1:70b</td><td>4</td><td>39</td><td>42</td><td>42</td><td>0.933</td><td>0.067</td><td>3</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>38</td><td>41</td><td>35</td><td>0.795</td><td>0.205</td><td>6</td></tr><tr><td rowspan="5">LLaMA3.3:70b</td><td>Gemma3:27b</td><td>4</td><td>38</td><td>42</td><td>42</td><td>0.933</td><td>0.067</td><td>9</td></tr><tr><td>DeepSeek-r1:70b</td><td>4</td><td>39</td><td>44</td><td>38</td><td>0.844</td><td>0.156</td><td>3</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>38</td><td>32</td><td>32</td><td>0.762</td><td>0.238</td><td>10</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>45</td><td>35</td><td>35</td><td>0.778</td><td>0.222</td><td>10</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>39</td><td>38</td><td>33</td><td>0.75</td><td>0.25</td><td>11</td></tr><tr><td rowspan="5">LLaMA3.3:70b</td><td>DeepSeek-r1:70b</td><td>4</td><td>44</td><td>41</td><td>41</td><td>0.932</td><td>0.068</td><td>3</td></tr><tr><td>DeepSeek-r1:70b</td><td>4</td><td>42</td><td>42</td><td>42</td><td>1.000</td><td>0.000</td><td>0</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>45</td><td>44</td><td>44</td><td>0.978</td><td>0.022</td><td>1</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>44</td><td>37</td><td>36</td><td>0.8</td><td>0.2</td><td>9</td></tr><tr><td>GPT-4 Turbo</td><td>4</td><td>45</td><td>35</td><td>33</td><td>0.75</td><td>0.25</td><td>11</td></tr></tbody></table>

<figure><img src="image_2.png" /><figcaption>Fig. 1: Adjacency matrices discovered by PCMI+ and DeepSeek-r1 on a 10-metric dataset.</figcaption></figure>