Clear Sky Science · en

CNN-LSTM model optimized by improved sparrow search algorithm for oil well production prediction

· Back to index

Smarter planning for underground energy

Oil and gas companies need to know how much oil a well will produce months in advance to plan investments, schedule maintenance, and avoid wasting water, energy, and money. Yet real wells behave in complex, changing ways that are hard to capture with traditional formulas. This study presents a new artificial intelligence (AI) approach that learns from past behavior of individual wells to forecast their future output more accurately and reliably.

Figure 1
Figure 1.

Why predicting a single well is so hard

The amount of oil a single well can deliver depends on many shifting factors: the geology of the rock, how water is injected into the reservoir, how the pump performs, and how fluids move underground over time. Classical engineering models can represent much of this physics but require huge amounts of data and long setup times, and they still struggle with messy real-world changes. Recent machine-learning methods, which learn patterns directly from data, have improved forecasts—but they often need careful manual tuning by experts. Choosing the right model settings, or hyperparameters, can be tedious, subjective, and prone to getting stuck in less-than-ideal solutions.

Combining patterns in space and time

The authors build on two powerful AI tools. Convolutional neural networks (CNNs) are very good at spotting local patterns and features in data, while long short-term memory (LSTM) networks are designed to track how signals evolve over long stretches of time. By combining CNN and LSTM, the model can first "distill" useful short-term patterns from multiple operating signals, then follow how those patterns play out month after month. The inputs include daily water production, pump efficiency, water cut, production time, and pump depth—chosen using a standard statistical test (Pearson correlation) to keep only the variables that truly matter for oil output. The single prediction target is the average monthly oil production of a given well.

A smarter way to tune the AI model

The key innovation is an improved version of the sparrow search algorithm, a technique inspired by how birds search for food as a group. In this approach, many candidate solutions "fly" through the space of possible model settings, sharing information about promising regions. The improved sparrow algorithm (ISSA) refines three core elements: it uses a special chaotic scheme to spread starting points evenly, and it upgrades how the virtual "producers" and "predators" move as they explore. These changes widen the search, speed up convergence on good settings, and reduce the chances of getting trapped in mediocre ones. ISSA is then used to automatically tune critical CNN-LSTM hyperparameters, such as the size and number of convolution filters and the size of the hidden layers.

Figure 2
Figure 2.

Testing on real wells in a tight reservoir

To see how well the new model works in practice, the team applied it to a tight sandstone reservoir in China’s Ordos Basin, using five years of data from two representative wells, TB987 and TB990. The data were split into a training portion to teach the model and a testing portion to evaluate its forecasts. The authors compared their ISSA-CNN-LSTM approach with several alternatives: versions using only LSTM or only CNN, models tuned with the original sparrow method, and models tuned with other popular swarm optimizers such as particle swarm, fruit fly, and grey wolf algorithms. Across several standard error measures, the improved model consistently produced predictions that tracked the real production curves more closely and with smaller fluctuations in error.

What the improved forecasts can do for operations

The higher accuracy of the ISSA-CNN-LSTM model is not just an academic gain; it has direct operational uses. In the short term, more reliable monthly forecasts can guide how much water to inject and how to share resources among wells, helping maintain stable output. When actual production deviates too far from the predicted range, operators can treat this as an early warning signal and inspect pumps, look for unexpected water breakthrough, or reassess reservoir conditions. Over longer periods, the model’s forecasts help reveal how quickly a reservoir is declining, supporting decisions about when to stimulate a well, drill new ones, or change the development plan.

Clearer insight into future oil from data

In plain terms, this work shows that letting an improved, bird-inspired search method automatically tune a combined CNN–LSTM network makes individual-well forecasts both sharper and more stable. For the two test wells, the model’s errors were reduced to around one percent on average, and the match between predicted and actual production was almost one-to-one. With further development on larger sets of wells and integration with other time-series tools, approaches like ISSA-CNN-LSTM could become practical decision aids, helping oil producers squeeze more information—and value—out of the data they already collect.

Citation: Zhang, R., Guo, L., Sun, J. et al. CNN-LSTM model optimized by improved sparrow search algorithm for oil well production prediction. Sci Rep 16, 13972 (2026). https://doi.org/10.1038/s41598-026-43674-7

Keywords: oil well production forecasting, machine learning, time series prediction, optimization algorithm, reservoir engineering