Downloads · 30 days
0
alirezaaminzadeh/pipelinewatch-leak-detector
pipelinewatch-leak-detector is a time series forecasting model from alirezaaminzadeh. Use it for the time series forecasting task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
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 Petro…
Downloads · 30 days
0
Access
Public
Updated Sep 8, 2026
Repo size
88.8 KB
Likes
0
Public
Click a slice to open those files.
.pt44.3 KB · 42%
From the Hugging Face model README
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.
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.
| 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.
| 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).
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.
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.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.
MIT · Aria AI Engineering Team