Confidence interval estimation of mixed oil length with conditional diffusion model

Yanfeng Yang, Lihong Zhang, Ziqi Chen, Miaomiao Yu, Lei ChenarXiv 2024

Abstract: Accurately estimating the mixed oil length plays a big role in the economic benefit for oil pipeline network. While various proposed methods have tried to predict the mixed oil length, they often exhibit an extremely high probability (around 50%) of underestimating it. This is attributed to their failure to consider the statistical variability inherent in the estimated length of mixed oil. To address such issues, we propose to use the conditional diffusion model to learn the distribution of the mixed oil length given pipeline features. Subsequently, we design a confidence interval estimation for the length of the mixed oil based on the pseudo-samples generated by the learned diffusion model. To our knowledge, we are the first to present an estimation scheme for confidence interval of the oil-mixing length that considers statistical variability, thereby reducing the possibility of underestimating it. When employing the upper bound of the interval as a reference for excluding the mixed oil, the probability of underestimation can be as minimal as 5%, a substantial reduction compared to 50%. Furthermore, utilizing the mean of the generated pseudo samples as the estimator for the mixed oil length enhances prediction accuracy by at least 10% compared to commonly used methods.

Introduction: The Mixed Oil Challenge

In multi-product oil pipeline networks, different products like gasoline, diesel, and jet fuel are transported sequentially through the same pipe. Without physical barriers between batches, a transition zone known as "mixed oil" inevitably forms at the interface.

Figure 1: The formation of mixed oil during pipeline transportation from a refinery to the market.

Accurately predicting the length of this mixed section is critical for economic and operational efficiency. If operators underestimate this length, they risk contaminating pure product batches, leading to significant financial losses and potential equipment damage. Conversely, overestimation leads to unnecessary reprocessing costs. Most current methods rely on point estimates—a single "best guess" value. Statistically, these estimates have a roughly 50% chance of underestimating the actual mixed oil length, providing no safety margin for operators.

Methodology: From Point Estimates to Distribution Modeling

To address the inherent variability in mixed oil formation, this research introduces a framework based on Conditional Diffusion Models. Unlike traditional regression models that aim to predict a single mean value, diffusion models learn to generate samples from the entire conditional probability distribution of the target variable.

Figure 4: Comparison between traditional point estimation (top) and the proposed conditional diffusion model approach (bottom). The diffusion model captures the full distribution rather than just the expected value.

The proposed method incorporates several key technical innovations:

  • Residual Learning: The model is trained to predict the distribution of the error (residual) relative to a baseline physics-based formula. This approach allows the model to generalize better across different pipeline infrastructures.
  • Ensemble Pre-training: Five tree-based machine learning models (XGBoost, GBDT, LightGBM, CatBoost, and HistGradientBoosting) are used to provide an initial "anchor" point, which the diffusion model then refines.
  • Confidence Interval Estimation: By generating 200 "pseudo-samples" for each scenario, the model can calculate precise confidence intervals. Operators can then use the upper bound of these intervals (e.g., the 95th percentile) as a reliable "safety cut" point.

Data and Experimental Setup

The model was validated using real-world industrial data from Supervisory Control and Data Acquisition (SCADA) systems across three operational pipelines. The dataset included 1,781 samples for training and validation, and a separate test set of 528 samples from a pipeline not seen during training. This rigorous testing ensures the model's robustness to varying pipeline characteristics.

Key Results

The conditional diffusion model significantly outperforms both traditional empirical formulas and modern machine learning baselines:

  • Safety and Reliability: By utilizing the 95% upper confidence bound, the probability of underestimating mixed oil length was reduced to just 4.9%. In contrast, the best existing baseline (Yuan’s method) had an underestimation rate of 47.4%, and standard industry formulas reached 98.3%.
  • Improved Accuracy: Even when used as a point estimator (by taking the mean of generated samples), the model achieved a 14% reduction in Mean Absolute Error (MAE) compared to previous state-of-the-art methods.
  • Statistical Calibration: The model's 95% confidence interval captured the true value 95.1% of the time, demonstrating high reliability for real-world deployment.

Conclusion and Future Directions

This work represents the first application of conditional diffusion models to the problem of oil-mixing length estimation. By shifting the focus from point estimates to confidence intervals, the researchers have provided a mathematically grounded way to manage industrial risk.

Future work will focus on integrating these models into automated pipeline control systems and addressing the computational overhead of iterative sampling to enable real-time applications. While the current model requires 1,000 timesteps for generation, its superior accuracy and safety profile make it a compelling choice for pipeline scheduling and logistics.

Summary updated

Abstract

Accurately estimating the mixed oil length plays a big role in the economic benefit for oil pipeline network. While various proposed methods have tried to predict the mixed oil length, they often exhibit an extremely high probability (around 50\%) of underestimating it. This is attributed to their failure to consider the statistical variability inherent in the estimated length of mixed oil. To address such issues, we propose to use the conditional diffusion model to learn the distribution of the mixed oil length given pipeline features. Subsequently, we design a confidence interval estimation for the length of the mixed oil based on the pseudo-samples generated by the learned diffusion model. To our knowledge, we are the first to present an estimation scheme for confidence interval of the oil-mixing length that considers statistical variability, thereby reducing the possibility of underestimating it. When employing the upper bound of the interval as a reference for excluding the mixed oil, the probability of underestimation can be as minimal as 5\%, a substantial reduction compared to 50\%. Furthermore, utilizing the mean of the generated pseudo samples as the estimator for the mixed oil length enhances prediction accuracy by at least 10\% compared to commonly used methods.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Test-set mixed oil length predictionConditional diffusion model (Our method)MAE123.991-20.55 vs baselinesplit: test
Source quote
L315: Our method │ 171.913 │ 0.974 │ 123.991
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
Test-set mixed oil length predictionYuan's method baselineMAE144.543split: test
Source quote
L314: Yuan's method │ 185.849 │ 0.970 │ 144.543
BibTeX
@misc{yang2024confidence,
  author = {Yanfeng Yang and Lihong Zhang and Ziqi Chen and Miaomiao Yu and Lei Chen},
  title = {{Confidence interval estimation of mixed oil length with conditional diffusion model}},
  year = {2024},
  eprint = {2406.18603},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.18603},
}
Figure