Page 143 - 《软件学报》2026年第2期
P. 143
622 软件学报 2026 年第 37 卷第 2 期
root cause analysis. However, mainstream score function-based intervention identification is often limited by the score function estimation
step. The analytical solutions used in existing methods struggle to effectively model the real distribution of high-dimensional complex data.
In light of recent advances in data generation, this study proposes a diffusion model-guided root cause analysis strategy. Specifically, the
proposed method first estimates the score functions corresponding to data distributions before and after the anomaly using diffusion
models. It then identifies the set of root cause variables by observing the variance of the first-order derivatives of the overall score
function after weighted fusion. Furthermore, to solve the issue of computational overhead raised by the pruning operation, an acceleration
strategy is proposed to estimate the score function from the initially trained diffusion model, avoiding the re-training cost of the diffusion
model after each pruning operation. Experimental results on simulated and real-world datasets demonstrate that the proposed method
accurately identifies the set of root cause variables. Furthermore, ablation studies show that the guidance provided by the diffusion model
is critical to the improved performance.
Key words: root cause analysis (RCA); diffusion model; structural causal model (SCM)
根因分析 (root cause analysis, RCA) 指的是结合异常发生前后的数据, 对系统中引起异常的根本原因进行定
位 [1–5] , 在识别引起系统故障的起因中起着至关重要的作用. 事实上, 现实世界中的复杂系统出现故障, 往往会造成
严重的影响 [4] . 如图 1(a) 所示, 为了确保云服务系统的可靠性和稳健性, 系统维护者通常会收集和分析关键性能指
标如延迟、CPU/内存使用等度量数据和日志数据, 以定位可能出错的原因 [3] . 然而, 大型复杂系统的复杂性和大量
的监控数据使得手动分析根因变量这一过程既昂贵又容易出错. 因此, 如何实现快速有效的根因分析对于快速恢
复系统服务、减少异常损失、确保大型复杂系统的持续运行至关重要 [6–8] .
10 20.0 20.0
17.5 17.5
8 15.0 15.0
异常值推荐 6 4 异常值推荐 12.5 异常值推荐 12.5
10.0
10.0
7.5
5.0 7.5
5.0
2
2.5 2.5
0 0 0
数据库服务 储存服务 计算服务 网络服务 手机云服务 数据库服务 储存服务 计算服务 网络服务 手机云服务 数据库服务 储存服务 计算服务 网络服务 手机云服务
服务类别 服务类别 服务类别
数据库服务 数据库服务 数据库服务
计算服务 网络服务 手机云服务 计算服务 网络服务 手机云服务 计算服务 网络服务手机云服务
储存服务 储存服务 储存服务
(a) 计算服务流程示意图 (b) 相关性驱动的根因分析 (c) 因果驱动的根因分析
图 1 云计算服务的根因分析示意图
相关性驱动的异常检测和异常归因理论面向根因分析做出了一定的贡献, 例如基于异常值或者夏普利
(Shapley) 归因值来进行根因变量的排序和推荐 [9] . 然而,基于相关关系的异常溯因方法往往会倾向于定位直接引
起异常变量的因素变量, 而无法识别可能位于上游的根节点变量, 如图 1(b) 所示 [10] . 与之相对地, 随着因果推断在
社会科学和计算机科学的广泛发展, 基于因果关系的根因分析在近些年逐渐受到了研究社区的重视和关注 [1–4,10,11] .
具体来说, 因果驱动的根因分析 (因果根因分析) 方法基于结构因果模型 [12] , 将异常的发生建模为某种形式的干预 [3,10] ,
例如外源变量干预 [10] 和软干预 [3] 等, 进而异常发生前后的数据可以被定义为观测数据 [12] 和干预后数据 [12] . 鉴于对
因果结构的考虑以及变量间因果关系的建模, 因果驱动的根因分析方法相较于相关驱动的根因分析, 具备了识别
上游根源节点的潜力, 如图 1(c) 所示.
进一步来说, 因果根因分析方法 (见图 1(c)) 大都遵循了因果骨架学习-根因变量定位这一两阶段的技术框架
和技术路线 [5,7,8] . 在第 1 阶段中, 因果根因分析旨在结合观测数据 (异常发生前) 和干预后数据 (异常发生后) 来识
别数据对应的因果图结构. 换言之, 这一阶段的任务是结合多环境数据进行因果发现 [13−15] . 基于第 1 阶段发现的因
果图 (或者结构方程 [10] ), 因果根因分析进而利用随机游走 [1] 、条件独立性检测 [3] 、Shapley 值 [9,10] 等技术来实现根

