PipelineWatch β€” Leak Detector (Mass-Balance + LSTM-Autoencoder + NPW Localization)

Two complementary leak detectors plus a best-effort negative-pressure-wave (NPW) leak-location estimator, trained/calibrated on the fully synthetic pipelinewatch-scada-synthetic dataset. Part of the Aria AI Aria PetroOps β†’ "Pipeline Monitoring (midstream)" module validation.

Data honesty

Trained and evaluated entirely on a synthetic hydraulic/SCADA simulation (see the dataset card). Pipeline length, wave speed, and friction constants are assumed textbook values, not calibrated to any real pipeline. Do not treat the numbers below as a guarantee of field performance β€” they measure whether the methodology works on a controlled, honestly-labeled synthetic benchmark. A real pilot needs re-calibration against the target line's own historian data before any threshold is trusted operationally.

Two detectors, an explicit trade-off β€” not a single "best" model

Detector Overall detection rate Mean TTD (s) False-alarm episodes (of 30 normal test) Mean false alarms/hour
Mass-balance (primary) 100% 70.0 5 (16.7%) 0.36
LSTM-Autoencoder (fast secondary) 100% 41.25 21 (70.0%) 3.84

Mass-balance is recommended as the primary/first-line trigger because, at an identical 100% detection rate on the held-out test episodes, it has a far lower false-alarm rate. The LSTM-Autoencoder detects leaks roughly 30-40% faster on average (see the by-severity breakdown below) and is recommended as a fast corroborating secondary signal β€” e.g. "raise confidence" rather than "raise the alarm alone" β€” given its higher false-alarm rate on this synthetic data. This is a genuine, measured trade-off, not a modeling error; both directions are reported below rather than only publishing whichever number looks best.

By severity (time-to-detect, seconds after true onset)

Severity Mass-balance mean / median TTD LSTM-AE mean / median TTD
Small (1-3% of flow) 91.25 / 82.5 50.0 / 52.5
Medium (3-8% of flow) 66.25 / 70.0 43.1 / 42.5
Large (8-20% of flow) 52.5 / 52.5 30.6 / 35.0

Both detectors reach 100% detection on every severity band on the 54 held-out test episodes (8-8-8 per severity among the 24 test leak episodes) β€” but note the dataset is a controlled, low-instrumentation-noise simulation; see published_baselines in eval_results.json for how real fielded systems' sensitivity varies (often 0.5-40% of flow depending on sensor spacing and instrumentation quality).

Best-effort NPW leak localization

Standard negative-pressure-wave time-of-arrival technique (textbook pipeline-engineering method, not a vendor's proprietary algorithm): cross-correlating high-pass-filtered inlet/outlet pressure around the detection time estimates the arrival-time difference dt, and location_km_from_inlet = 0.5*(L + c*dt). Evaluated on all 24 test leak episodes (using the primary mass-balance detector's alarm time as the trigger):

Mean abs. error (km) Median abs. error (km)
Overall (pipe length 60 km) 13.37 8.43
Small leaks 12.68 15.27
Medium leaks 13.72 7.88
Large leaks 13.72 5.78

This is explicitly best-effort/demo-grade, reported honestly including the cases where it does not work well β€” accuracy is meaningfully worse for small leaks (weak signal-to-noise for the pressure transient) than for large ones. A real deployment would need a much better-instrumented, higher-sample-rate pressure system and a calibrated wave speed to get field-grade localization accuracy.

Files

  • lstm_ae.onnx / lstm_ae.pt β€” LSTM-Autoencoder (encoder LSTM β†’ latent β†’ MLP decoder, same architecture family as refineryguard-lstm-ae); ONNX used for CPU inference in the Space.
  • scaler.joblib β€” StandardScaler fit on the 4 detector columns from normal-only train episodes.
  • mass_balance_config.joblib β€” calibrated (window, persist, mu, sigma, k) for the mass-balance detector.
  • thresholds.joblib β€” LSTM-AE reconstruction-error alarm threshold (99th percentile of a held-out normal calibration split, never seen during gradient training).
  • eval_results.json / manifest.json β€” full reproducible evaluation protocol and dataset manifest.

Reproducibility note

The mass-balance detector's numbers above are exactly reproducible (python scripts/run_pipeline.py regenerates them bit-for-bit given the fixed seed). The LSTM-AE's numbers have minor run-to-run floating-point jitter from PyTorch's multi-threaded CPU kernels even with all seeds fixed β€” the qualitative finding (faster detection, higher false-alarm rate than mass-balance) is stable across reruns, but exact decimals may shift by a few percent.

Related

MIT Β· Aria AI Engineering Team

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using alirezaaminzadeh/pipelinewatch-leak-detector 1

Evaluation results

  • detection_rate_overall on PipelineWatch synthetic SCADA test episodes (54 held-out)
    self-reported
    1.000
  • mean_time_to_detect_seconds_mass_balance on PipelineWatch synthetic SCADA test episodes (54 held-out)
    self-reported
    70.000
  • mean_time_to_detect_seconds_lstm_ae on PipelineWatch synthetic SCADA test episodes (54 held-out)
    self-reported
    41.250
  • mean_false_alarms_per_hour_mass_balance on PipelineWatch synthetic SCADA test episodes (54 held-out)
    self-reported
    0.356
  • mean_false_alarms_per_hour_lstm_ae on PipelineWatch synthetic SCADA test episodes (54 held-out)
    self-reported
    3.842