Teaching Root-Cause Models How Failures Spread, Using Randomized Synthetic Microservices

When a cloud application built from dozens of small cooperating services slows down, the service that looks sickest is often not the one that broke. A slow database makes the services that call it queue up requests. Those callers then show high CPU, long latency and errors of their own. Engineers call this "backpressure": the symptom travels backward up the chain of calls. Root cause analysis tries to find the true origin. It works best when it is hierarchical, first naming the faulty service and then the specific cause inside it, such as CPU exhaustion, a memory leak, network delay or a code bug. Today's methods either learn a cause-and-effect graph separately for each system or rely on hand-tuned statistics. Both are brittle, and both tend to be good at one fault type and poor at the next.

We propose to pre-train a single diagnostic model entirely on randomly generated synthetic microservice systems, then apply it with no further training to telemetry from real deployed applications. The idea that is new here is what gets randomized. Prior work randomizes how individual signals look. We randomize the rules by which failures propagate: how much backpressure builds up, whether callers retry, how timeouts are set, how caches behave and how autoscalers react. Because of this, the model can only succeed by learning to tell a fault's origin apart from the places its effects spread to. Our core claim is testable. Zero-shot hierarchical localization should transfer from synthetic to real systems when propagation dynamics are diverse, but not when only the appearance of anomalies is diverse. The advantage should be concentrated in exactly the cases where the true root cause is not the most anomalous service.

What already exists and where this sits

The method we reuse comes from two synthetic-transfer results. TimeRCD trains a Transformer on 2.5 billion synthetic time-series points. Its generator builds multivariate series from causal graphs and injects more than 20 types of anomaly that break the expected context. The model detects real anomalies zero-shot, reaching a Standard-F1 of 0.827 on contextual anomalies where TimesFM and Chronos scored below 0.20. TimeRCD only answers whether and when a series is anomalous. It never attributes an anomaly across a dependency graph. We borrow its window-based tokenization and its practice of scoring each window against its surrounding context, and we extend the task from detection to attribution.

Aegis sabotages successful multi-agent LLM transcripts to create 9,533 labeled failures. A 14B model trained on these failures reaches an average score of 26.51 against 20.24 for o3, and it transfers to the human-annotated Who&When benchmark. Aegis also motivates our hierarchical design: in its results, naming the faulty agent ("who") was consistently easier than naming the error mode ("why"). Its corruptions are edits to text, so it says nothing about continuous metrics or call graphs.

The vision literature supplies the guiding principle. Shipard et al. show that diverse rather than realistic Stable Diffusion images let a synthetic-trained ResNet50 beat CLIP-ResNet50 on CIFAR10 (81.0% vs. 75.6%). Khirodkar et al. show that extreme randomization of textures and lighting beats COCO-pretrained detectors by over 6% average precision. We carry this "diversity over fidelity" idea from what pixels look like to how failures spread.

Several systems papers constrain the design. Sage builds a causal Bayesian network from distributed traces (records of which service called which) and asks counterfactual questions with graph variational autoencoders. It reports over 93% two-level accuracy, but it must be fit to each system's historical normal behavior. RUN identifies the "periodicity trap", in which normal daily peaks are mistaken for faults. BRCD depends on a causal graph estimated from pre-failure data, so errors in that graph degrade its rankings. ROCAS localizes hierarchically in autonomous driving: it detects change points in inter-module messages and then searches parameters, but each accident needs its own simulation and search. None of these trains a model that transfers across topologies it has never seen.

Finally, RCAEval injects 11 fault types into Online Boutique, Sock Shop and the 64-service Train Ticket application. It uses these injected faults only to evaluate 15 methods, and it documents severe specialization: BARO scores 1.0 on disk faults but 0.63 Avg@5 on network delay.

One honest caveat applies to the word "real." RCAEval failures are themselves injected, but into real running systems that produce real telemetry. Our synthetic-to-real gap is therefore the gap between simulated systems and real systems. It is not the gap between injected and organic production incidents, which the file offers no labeled benchmark for.

Core Claim

A model trained only on randomized synthetic service graphs can localize faults zero-shot on real microservice telemetry, at both the service level and the fault-type level. Its success should depend specifically on randomizing propagation mechanisms. If that is right, three predictions follow. Gains over per-system and heuristic baselines should be largest on "symptom-dominant" cases, where the root-cause service is not the top-ranked service by raw anomaly magnitude. A generator that randomizes only signal appearance should transfer markedly worse. Fault-type accuracy, the "why" level, should be more uniform across fault classes than the accuracy of existing specialized methods.

Research Program

The first component is the generator. It samples a service topology: the number of services, ranging over sizes that bracket the 10-to-64-service range in RCAEval, together with depth, fan-out, shared databases and cycles introduced by retries. It then simulates request flow as a stochastic queueing network. Each service emits CPU, memory, disk, network, latency and error-rate series, plus a trace-derived call graph.

Faults are injected at one service and one resource, with types aligned to RCAEval's classes: CPU hog, memory leak, disk pressure, network delay and packet loss, socket exhaustion, and code-level error spikes expressed through error rates. The randomized propagation layer is the central ingredient. Its parameters are drawn independently per edge or per service: backpressure gain, retry policy, timeout thresholds, cache hit rates, circuit breakers, autoscaler reaction delay, and propagation lag. Background randomization adds diurnal and weekly periodicity to defuse RUN's periodicity trap, bursty load, sensor noise, constant-valued metrics, and randomly missing series, the last mimicking BRCD's Petshop setting. Labels come free: the root-cause service and the fault type.

The second component is the model. Each service is a graph node. Its metric windows are tokenized as in TimeRCD, and each window is scored by how far it departs from its own pre-incident context. A graph Transformer attends along call-graph edges in both directions, plus a global token, so it can learn that an anomaly at a caller is explained by its callee. Two heads produce the hierarchy. A service head gives a distribution $p(s)$ over services $s$. A fault head gives $p(f \mid s)$ over fault types $f$, computed from the representation of service $s$. Training minimizes

$$ \mathcal{L} = -\log p(s^*) - \lambda \log p(f^* \mid s^*), $$

where $s^*$ and $f^*$ are the true service and fault and $\lambda$ weights the fine-grained term. At test time we rank (service, fault) pairs by $p(s)\,p(f \mid s)$. The call graph is given as input from traces rather than estimated, following Sage's choice. An ablation that replaces it with full attention tests the unresolved question of whether explicit structure is needed at all.

The third component is the analysis. We stratify every real test case by whether the true root service ranks first under a raw z-score. We then report results separately for symptom-dominant and origin-dominant cases and for each fault class.

Baselines

The naive reference ranks services by the largest z-score of any of their metrics over a window before and after the incident. It sets the floor and also defines the symptom-dominant split. The strongest coarse-level competitor is TraceRCA, which walks the trace graph to localize anomalies. RCAEval reports 0.77 Avg@5 for TraceRCA on Train Ticket (RE2). We also run BARO, which is RCAEval's strongest per-class statistical method (1.0 on disk faults, 0.63 Avg@5 on network delay), along with RUN and BRCD. For BRCD on Sock Shop and Online Boutique, the file reports only that it achieved the highest Top-$l$ accuracy; no reported number was found on Lacuna for BRCD's exact values.

All baselines run through RCAEval's released evaluation on identical incident windows and telemetry. Each gets its published default configuration plus the same small hyperparameter search we allow ourselves. Our model is tuned only on held-out synthetic data and never sees any target system.

Two constructed baselines target the claim directly. The first is a two-stage pipeline: TimeRCD anomaly scores per metric, aggregated per service, followed by personalized PageRank over the reversed call graph, as RUN does. It tests whether "zero-shot detector plus graph walk" already suffices. The second is real-to-real transfer: the same architecture trained on RCAEval incidents from two systems and tested on the third.

Ablations isolate the key ingredient. One generator keeps the injection and background randomization but uses a fixed propagation rule. A second uses a single fixed topology. A third replaces the hierarchical heads with a flat classifier over service-fault pairs. A fourth removes the call graph.

Beating the field means three things. On Train Ticket RE2 the model should exceed 0.77 Avg@5 without having seen Train Ticket. Its worst fault class should score above BARO's 0.63 on delay. It should outperform the TimeRCD-plus-PageRank pipeline on symptom-dominant cases by a margin larger than the spread across random seeds.

Why not just…?

Why not just chain a zero-shot anomaly detector with a graph walk? This is the most serious threat. TimeRCD already detects real anomalies zero-shot, and RUN shows that personalized PageRank can rank causes. If anomaly magnitude plus topology already separates cause from effect, our propagation-aware training adds nothing. We expect the pipeline to work well when the root is the most anomalous service and to fail under backpressure, which Sage identifies as the reason threshold methods mistake symptoms for causes. The stratified comparison settles this directly. If the pipeline matches us on symptom-dominant cases, the core claim is false and we will report it as such.

Why not just train on real injected faults from other systems? RCAEval provides 735 labeled cases, so leave-one-system-out training is cheap. It may perform comparably, especially because the injection tools are shared across systems. Its weakness is diversity: three topologies and one set of fault tools, against the much wider coverage that the vision results credit for transfer. We run it head to head. We also run a version that adds a fine-tuning stage on these real cases after synthetic pre-training. If real-to-real equals synthetic pre-training, the generator's value is limited to settings without any labeled incidents, and we will say so.

Why not just use trace heuristics or statistics such as TraceRCA or BARO? They are strong where their assumptions hold: 0.77 Avg@5 for TraceRCA on Train Ticket and 1.0 for BARO on disk faults. RCAEval documents that they break across fault classes, and trace traversal cannot see resource exhaustion that degrades metrics without breaking call paths. Per-class reporting will show whether our model trades a little peak accuracy for much smaller worst-case loss, or simply loses.

Why not just prompt a large proprietary language model with the telemetry? Aegis found zero-shot proprietary models weaker than a small model trained on synthetic failures, but in a text-agent setting. We have no telemetry-domain number, so we include GPT-4o-class prompting over summarized metrics and call graphs as an exploratory baseline rather than assume the outcome.

Proposed Experiments

The main experiment evaluates zero-shot performance on RCAEval RE1, RE2 and RE3 across all three systems. At the service level we report Avg@5 and AC@1. At the fault level we report accuracy and AC@3 given the service. We add Sock Shop and Online Boutique comparisons against RUN and BRCD, and a missing-telemetry stress test that drops series in the style of Petshop.

Two checks are decisive. The first is the symptom-dominant split. Full-generator gains over the pipeline baseline must appear there and shrink on origin-dominant cases. The second is the fixed-propagation ablation, which must lose most of that gain while keeping appearance diversity intact. If both hold, propagation diversity is what transfers.

A secondary scaling curve varies the number of distinct propagation regimes in the generator while holding sample count fixed. It tests whether transfer tracks propagation diversity rather than data volume. The "who versus why" gap is measured as the difference between service accuracy and fault-type accuracy, compared with the same gap for baselines that report fine-grained output.

We will also be explicit about one limitation. Code-level faults in RE3 often need logs, which our metric-only generator does not model, so we report RE3 separately as an expected weak spot rather than fold it into averages.