Learning mechanistic features across wells and assets
Even models with great test performance may suffer from lack of interpretability. If the explanatory variables depend on one another, it is difficult to isolate the effect of any individual variable. Can multi-task learning be the solution?
![Author Kristoffer Nesland portrait image](https://solutionseeker2021.imgix.net/images/people/kristoffer_avatar.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=160&q=90&w=160&s=cf830df2f9d7c2876ba22d5d3045090c)
- Author
- Kristoffer Nesland
- Publish date
- · 3 min read
One example is the observation that choke openings are continuously adjusted to counteract the declining reservoir pressure as described in a previous post. Models trained on data from a single well are vulnerable to such correlated explanatory variables and how data change with time. Training on data from multiple wells is one attempt to overcome these issues. We wanted to investigate whether learning across wells gave multi-task models properties more similar to those we would expect from a mechanistic interpretation than single-task models. By visualizing model predictions and creating a simple metric, we explored whether data sharing across assets made the models correspond to mechanistic expectations to a higher degree.
As described in the last post, we conducted a broad case study of 55 wells from four oil and gas assets and steady-state production data spanning several years. As part of the study we wanted to explore the robustness of different data-driven models on unseen data samples. Would the model predictions correspond to the mechanistic expectation that an increase in the upstream pressure should lead to increased flow rates?
To explore further, we selected a subset of 30 data points from the test sample for each well. For each of the 30 data points, we evaluated the corresponding single-task neural network model and the multi-task model trained on all assets in a neighborhood around the observed value by varying the upstream pressure.
![](https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=297&q=90&w=600&s=55ab2461bbec47608265d1802b1cff40 600w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=347&q=90&w=700&s=8f6e86390c4178e842f4051b6af143af 700w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=396&q=90&w=800&s=3fdea92442a9efc722ac141eb4af1bae 800w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=446&q=90&w=900&s=16e6c121ea646d51d76dd966b51e9cd5 900w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=496&q=90&w=1000&s=1ba192a710ee704568116888f2f85290 1000w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=545&q=90&w=1100&s=bfe0626a1d72e75d9bf57659f35d855d 1100w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=595&q=90&w=1200&s=dd28c7b01ee1332256b2ecc6e54d8b2b 1200w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=644&q=90&w=1300&s=454a76cf68f4fa9595d0caa856462fd4 1300w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=694&q=90&w=1400&s=f662d3eeccc09e63a6d5137f06818dd3 1400w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=743&q=90&w=1500&s=7b3818398be6c5844556e6b64d632af7 1500w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=793&q=90&w=1600&s=8e7dbd6c7c3c1e0cde8fa9733993e33a 1600w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=842&q=90&w=1700&s=d98a110763398611f0aea5362fc71157 1700w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=892&q=90&w=1800&s=2e91807231c28fca24a5b6f10357fdc4 1800w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=942&q=90&w=1900&s=0585a2ed668c1e8a9e80986e29a25be1 1900w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=991&q=90&w=2000&s=6aa600ffd228484cfe93c86783000b86 2000w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=1041&q=90&w=2100&s=2ee0fe940b7e3e1c335c38b9a9bd7bc5 2100w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=1090&q=90&w=2200&s=11ebdbe0f9edc0dc8698ddb502d4afd1 2200w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=1140&q=90&w=2300&s=b6e885c8fdc9241287585742c919d130 2300w, https://solutionseeker2021.imgix.net/images/2.4-nc_physicality.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=1189&q=90&w=2400&s=959cbbc24d9ca5fb23e95be226076838 2400w)
The results for one of the wells is shown in the figure. Both the corresponding single-task neural network model (STL-ANN, shown in blue) and the multi-task model trained on all assets (MTL-universal, shown in orange) had low test errors, with trimmed mean absolute percentage error of 2.2% and 1.6% respectively. Even so, the figure shows that there is a significant difference in how the models interpret upstream pressure as an explanatory variable. In this case, the multi-task learning model was able to identify the expected response, while the single-task model was not.
To generalize the comparison across wells and model types, we decided to create a simple metric of whether the sensitivity of the model corresponded to the mechanistic expectation. For each well data point and model, we compared the estimate from the model and the estimate from the model when all variables are kept constant except for an increase in the upstream pressure by 10 bar. For each model type we computed the fraction of predictions where an increase in upstream pressure led to a decrease in the flow rate estimate. The ratio of “bad” predictions, predictions that do not correspond to the mechanistic expectation, may then be compared between model types. Zero is the best score, indicating that all predictions behaved as expected. MTL-universal, with a score of 0.07, ended up beating the STL-ANN score of 0.28.
Most of the wells remain unchanged or achieve a better sensitivity score by sharing data with other wells. This is one clear advantage of the multi-task learning approach
Transferring knowledge among wells and assets seems valuable. Perhaps a hybrid modeling approach utilizing knowledge across assets and complementing with mechanistic insights would yield even better results?
Our next post will focus on how the multi-task learning approach affects value creation and simplifies model maintenance.
- Multi-task learning for virtual flow metering
-
Sandnes, A.T., Grimstad, B., Kolbjørnsen, O., 2021
Link