1. Introduction
Waterflooding is one of the most widely used development strategies for maintaining reservoir pressure and improving oil recovery in mature oilfields. By injecting water into the reservoir, pressure support and displacement efficiency can be enhanced, thereby delaying production decline and improving the sweep efficiency of remaining oil. Classical waterflooding theory indicates that the effectiveness of water injection development is strongly controlled by reservoir heterogeneity, injection–production balance, and spatial communication between injectors and producers [
1,
2]. As waterflooding reservoirs enter the middle-to-high water-cut stage, the injection–production relationship becomes increasingly complex due to interwell interference, preferential flow paths, uneven displacement, and delayed production responses. These challenges are particularly prominent in offshore oilfields, where production operations are constrained by limited offshore intervention windows, high operation costs, and strict safety requirements.
Water injection allocation is a key operational task in waterflooding reservoir management. An appropriate injection allocation scheme can improve reservoir energy distribution, enhance the effective displacement of remaining oil, and reduce ineffective water circulation. In conventional field practice, injection–production adjustment is usually conducted based on production performance analysis, engineering experience, and periodic reservoir surveillance. Although these approaches have played an important role in reservoir management, they are often limited by low analysis frequency, strong dependence on expert knowledge, and insufficient quantitative description of dynamic injector–producer relationships. In addition, the production response to injection adjustment is usually delayed and nonlinear, making it difficult to rapidly evaluate candidate injection schemes and continuously update injection allocation strategies.
Injector–producer connectivity is an important concept for characterizing the dynamic relationship between water injectors and oil producers. It reflects the contribution of each injector to the production response of surrounding producers and provides an interpretable basis for injection allocation optimization. Albertoni and Lake [
3] proposed a practical method to infer interwell connectivity from well-rate fluctuations in waterfloods, demonstrating that production and injection rate data can provide useful information about interwell communication. Capacitance–resistance models have also been widely used as reduced-order tools for rapid waterflood performance evaluation and connectivity analysis [
4]. de Holanda et al. [
5] provided a comprehensive review of capacitance–resistance models and summarized their applications in reservoir characterization and performance forecasting. Compared with tracer tests, interference tests, and full-physics numerical reservoir simulations, these data-driven or semi-analytical methods are computationally efficient and easier to apply in field-scale production management. However, their performance may still be affected by simplified assumptions, limited nonlinear representation ability, and insufficient adaptability to complex dynamic production conditions.
In recent years, neural-network-based methods have further expanded the capability of dynamic interwell connectivity analysis. Jiang et al. [
6] developed an interpretable recurrent neural network with a self-attention mechanism to characterize flow disequilibrium in waterflooding reservoirs. Du et al. [
7] combined graph convolutional networks for adaptive interwell-connectivity correction with gated recurrent units for performance prediction. Huang et al. [
8] proposed an improved graph neural network for dynamic interwell connectivity analysis in multi-layer waterflooding reservoirs. More recently, attention-guided fusion and state-variable capacitance models have been introduced to improve the dynamic characterization of injector–producer relationships [
9,
10]. These studies indicate that combining dynamic production data with interpretable learning structures is a promising direction for connectivity-aware reservoir management.
With the development of digital oilfields and intelligent reservoir management, data-driven methods have also been increasingly used for production forecasting and injection optimization. Machine learning models can learn nonlinear mapping relationships from historical injection–production data without explicitly solving complex multiphase flow equations. Long short-term memory networks are particularly suitable for time-series modeling because they can capture temporal dependencies and delayed responses in sequential data [
11]. Previous studies have shown that LSTM and other deep learning models can provide efficient alternatives to traditional reservoir simulation for production forecasting and dynamic performance evaluation [
12,
13,
14,
15]. In addition, attention mechanisms can adaptively assign weights to different input features or response channels, thereby improving both representation ability and model interpretability [
16]. For example, Pan et al. [
17] proposed a CNN-LSTM model with a self-attention mechanism for oil well production prediction, and Lu et al. [
18] introduced a Transformer-based Seq2Seq method with attention for post-liquid-lifting production forecasting.
Although single-well production prediction has been widely studied, practical water injection allocation is generally performed at the well-group or pattern scale. Therefore, group-level production forecasting is more consistent with field-scale injection optimization than isolated single-well prediction. Yang et al. [
19] recently proposed a data-driven framework for well-group oil production prediction and water injection recommendation, showing the value of linking production forecasting with injection scheme optimization. These studies provide useful references for the present work, in which a group-level production surrogate is developed to support fast evaluation of candidate injection allocation schemes.
Optimization algorithms provide another important component for intelligent water injection management. Data-driven interwell numerical simulation has been used for waterflood history matching and production optimization, providing an efficient alternative to repeated full-physics simulation in some field-management tasks [
20]. Particle swarm optimization, originally proposed by Kennedy and Eberhart [
21], has been widely used for nonlinear and constrained engineering optimization problems because of its simple implementation, global search capability, and flexibility in handling complex objective functions. Multi-objective variants of PSO have also been developed for constrained engineering optimization [
22]. In reservoir engineering, PSO and related evolutionary algorithms have been applied to production optimization, well control optimization, and water injection allocation. Jia et al. [
23] proposed a data-driven optimization method for fine water injection in a mature oilfield. Farahi et al. [
24] used multi-objective particle swarm optimization for production optimization under geological and economic uncertainties. Rostamian et al. [
25] further reviewed multi-objective model-based oil and gas field development optimization and emphasized the computational burden of simulation-driven optimization workflows. These studies demonstrate the potential of PSO-based optimization, but the integration of dynamic connectivity identification, group-level production surrogate modeling, and constrained injection allocation remains insufficiently explored.
Despite these advances, three issues remain insufficiently resolved for practical water injection allocation. First, connectivity identification, production forecasting, and injection allocation are often treated as separate tasks, so the optimized scheme is difficult to interpret from an injector–producer-response perspective. Second, many data-driven optimization studies focus on numerical improvement but provide limited evidence that the learned relationships are consistent with reservoir-engineering intuition. Third, complete offshore field datasets with daily injection–production histories and independently verified interwell connectivity labels are rarely available, which makes controlled validation difficult. Therefore, a reproducible benchmark and an integrated workflow are required to evaluate whether dynamic injection–production sequences and static well-pair attributes can jointly support interpretable and constrained injection optimization.
The present study addresses these gaps by developing a connectivity-aware LSTM-PSO framework and testing it on a field-informed semi-synthetic waterflooding dataset. The dataset is not intended to replace a complete offshore field case. Instead, it provides a controlled validation environment in which interwell connectivity, response lags, operational constraints, and production responses are known and can be quantitatively assessed. This distinction is important because the proposed workflow should be interpreted as methodological validation before field deployment.
Recent machine-learning studies have demonstrated the value of integrating geological and operational factors for subsurface engineering problems, including fracture-stimulation design, shale-gas production forecasting, and neural-network-based geomechanical sensitivity analysis [
26,
27,
28]. These studies support the broader motivation of combining static geological-spatial descriptors with dynamic operational data, but the joint solution of connectivity identification, group-level forecasting, and constrained injection allocation remains insufficiently developed for offshore waterflooding scenarios.
The main contributions of this study are summarized as follows.
First, an attention-based injector–producer connectivity identification model is proposed. The model integrates historical injection sequences, producer-response sequences, and static well-pair features to infer normalized connectivity coefficients, providing an interpretable representation of dynamic interwell relationships.
Second, a group-level LSTM production surrogate model is developed for short-term oil production forecasting. Instead of predicting individual-well production separately, the model forecasts well-group oil production responses, which are directly consistent with the objective of injection allocation optimization.
Third, a constrained LSTM–PSO workflow is established for daily water injection allocation. The PSO algorithm searches for feasible injection allocation schemes under practical field constraints, including single-well injection-rate limits, total-injection balance, and adjustment-amplitude restrictions.
Fourth, a field-informed semi-synthetic dataset is constructed for reproducible evaluation of the proposed method. The dataset includes well locations, static well-pair attributes, daily injection data, production responses, prescribed connectivity ground truth, and optimization cases, enabling systematic validation of connectivity identification, production forecasting, and injection optimization.
The remainder of this paper is organized as follows.
Section 2 describes the construction of the field-informed semi-synthetic waterflooding dataset and formulates the injection allocation optimization problem.
Section 3 presents the proposed methodology, including the attention-based connectivity model, the group-level LSTM surrogate model, and the PSO-based optimization algorithm.
Section 4 reports the experimental results and performance evaluation.
Section 5 summarizes the main conclusions and discusses the limitations and future work.
2. Dataset Construction and Problem Formulation
2.1. Rationale and Dataset Overview
Complete offshore oilfield datasets that simultaneously contain daily injection records, production responses, operating constraints, and independently verified injector–producer connectivity labels are difficult to obtain because of confidentiality restrictions and the high cost of direct connectivity verification. In routine waterflooding management, interwell connectivity is usually inferred indirectly from tracer tests, interference tests, production response analysis, or calibrated reservoir models. Therefore, a field-informed semi-synthetic dataset was constructed in this study to provide a controlled and reproducible benchmark for method validation.
The dataset was not generated by arbitrary random sampling. Instead, it was constrained by typical offshore waterflooding characteristics, including practical injection-rate ranges, layered injection behavior, delayed injection–production responses, gradual water-cut increase, and feasible injection adjustment limits. This design allows the underlying connectivity coefficients to be prescribed as ground truth, while the generated dynamic data still retain the main engineering features of offshore waterflooding reservoirs.
The constructed well group contains five water injectors and ten oil producers. Daily dynamic data were generated over 720 days. A three-layer reservoir setting was considered to approximate layered injection and vertical heterogeneity. The dataset was used to support three connected tasks: injector–producer connectivity identification, well-group oil production forecasting, and constrained water injection allocation optimization.
Figure 1 illustrates the well pattern and prescribed injector–producer connectivity network, and
Figure 2 presents representative injection and production response dynamics.
The semi-synthetic dataset was designed as a field-informed benchmark rather than as a full substitute for a confidential offshore oilfield dataset. Its representativeness is reflected by practical injection-rate constraints, delayed and smoothed injection–production response, gradual water-cut increase, and prescribed dominant injector–producer communication patterns. Nevertheless, it cannot fully reproduce geological uncertainty, surveillance errors, workover events, facility constraints, or long-term reservoir evolution. Therefore, the results are used for controlled methodological validation, and further validation with anonymized field data or history-matched numerical models is required before deployment.
Table 1 and
Table 2 summarize the dataset components and key construction settings. The dataset contains five injectors, ten producers, 50 injector–producer pairs, and 720 daily records. The chronological LSTM sample split contains 669 sliding-window samples, including 468 training samples, 100 validation samples, and 101 test samples. Continuous input variables were standardized using statistics fitted only on the training set.
2.2. Static Well-Pair Features and Connectivity Ground Truth
For each injector–producer pair, a set of static features was constructed to describe the spatial and geological relationship between the two wells. These features include interwell distance, layer consistency, effective-thickness overlap, and a permeability-link proxy. The interwell distance between injector i and producer j was calculated using Equation (1):
where
is the interwell distance, and (
,
) and (
,
) are the coordinates of injector i and producer j, respectively.
Based on distance, layer consistency, thickness overlap, and permeability linkage, the static connectivity prior was constructed using Equation (2):
where
is the static prior between injector i and producer j,
D0 is the characteristic interwell influence distance,
is the layer-consistency indicator,
is the effective-thickness overlap ratio,
is the permeability-link proxy, and
is the normalization factor. In this benchmark,
was set to 700 m and
was set to 1.5, consistent with the scaling used for the permeability-link proxy.
The static prior was used only to guide dataset construction and to provide a baseline for comparison. It was not treated as the final connectivity result, because actual injector–producer communication is also affected by dynamic production responses, operational changes, and time-lag effects.
For each producer, the three injectors with the strongest prior scores were retained as dominant contributing injectors, while the remaining injectors were assigned weak background connectivity. A stochastic perturbation term was introduced to represent unresolved geological uncertainty. The resulting raw scores were normalized using Equation (3) to obtain the ground-truth connectivity coefficients:
where
represents the normalized contribution of injector i to the production response of producer j,
is the perturbed raw connectivity score, and
is the number of injectors. A larger coefficient indicates stronger injector–producer communication.
A response lag time was also assigned to each well pair. The lag time increases with interwell distance and decreases when the injector and producer share the same dominant layer, as expressed in Equation (4).
To make the prescribed connectivity labels reproducible, the static well-pair attributes were defined as interwell distance, layer-consistency flag, effective-thickness overlap, and permeability-link proxy. The static prior, stochastic perturbation, and normalization in Equations (2) and (3) define benchmark labels for controlled validation and should not be interpreted as universal physical laws.
where
is the response lag time,
is a random perturbation term, and the clipping function restricts the lag to 5–45 days. This setting is used to mimic delayed subsurface flow response in heterogeneous waterflooding reservoirs.
2.3. Generation of Dynamic Injection and Production Data
Daily injection data were generated for each injector by combining a base injection level, periodic operational fluctuation, gradual random variation, stepwise adjustment events, and short abnormal operating intervals. The injection rate was constrained within 300–1200 m
3/d. Injection pressure was generated according to Equation (5):
where
is the baseline injection pressure,
is the daily injection rate,
is the base injection rate,
is a phase term, and
is the pressure perturbation. In this benchmark,
was sampled from 10.5 to 16.5 MPa,
followed a zero-mean Gaussian perturbation with a standard deviation of 0.18 MPa, and the generated pressure was clipped to 8.0–22.5 MPa. This pressure variable was used to reproduce practical pressure-rate co-variation in the semi-synthetic benchmark, not to represent calibrated field bottom-hole pressure. Layer-wise allocation ratios were also generated for the three-layer system, with the ratios varying slowly over time to represent layered injection adjustment.
Producer responses were generated by combining natural production decline, delayed injection-driven response, operational fluctuation, and water-cut evolution. The liquid production response of each producer was controlled by the ground-truth connectivity coefficients and the corresponding response lags. Water cut was generated as a gradually increasing variable influenced by development time and cumulative injection influence. Daily oil production was then calculated from liquid production and water cut. The well-group oil production rate was obtained by summing the oil rates of all producers, as shown in Equation (6).
The semi-synthetic data generation procedure is summarized as follows. First, five injectors and ten producers were placed in a 2500 m × 1800 m well-group domain, with three reservoir layers and injector/producer effective-thickness and kh-proxy values sampled from the ranges reported in
Table 2. Second, static injector–producer attributes were calculated using interwell distance, same-layer flag, effective-thickness overlap, and permeability-link proxy. The static prior used D
0 = 700 m and K
0 = 1.5, top-three dominant injectors were retained for each producer, and non-dominant weak connections were multiplied by a random factor uniformly sampled from 0 to 0.08. The raw dominant-connectivity scores were perturbed by a lognormal factor with sigma = 0.18 and then normalized. Third, response lags were generated using Equation (4), where epsilon_ij follows N(0, 3
2) days. Fourth, daily injector rates were generated from a base rate of 520–920 m
3/d, a sinusoidal component with amplitude 40 m
3/d, a random-walk component with daily noise N(0, 1.8
2), five step-change events, and measurement/operation noise N(0, 18
2), followed by clipping to 300–1200 m
3/d. Fifth, injection pressure, layer-wise allocation ratios, producer liquid rates, water-cut evolution, and daily oil rates were generated using the rules described above. These parameter values define the reproducible benchmark used in this study rather than universal reservoir laws.
where
is the well-group oil production rate at time t,
is the daily oil production rate of producer j, and
is the number of producers.
2.4. Production Forecasting Samples
The production forecasting task was defined at the well-group level rather than the individual-well level. This design is consistent with the optimization objective, which aims to maximize the cumulative oil production of the whole well group under operational constraints. For each sample, a historical dynamic window was used as input. The input features include injector-level injection rates and pressures, total injection rate, average injection pressure, well-group oil production rate, well-group liquid production rate, well-group water cut, and smoothed or differential dynamic indicators.
A supervised sample is defined by one valid chronological sliding window of the well-group dynamic sequence. With 720 daily records, a 45-day look-back window, and a 7-day forecasting horizon, the valid windows are constructed chronologically and then split by target start date into training, validation, and test subsets. This definition avoids random shuffling across future dates and prevents information leakage from later production responses into earlier training windows.
The input dynamic sequence is denoted by Equation (7):
where
is the historical input sequence,
is the multivariate dynamic feature vector at time t, and
is the look-back window length.
A 7-day forecasting horizon was used in this study. The prediction target is defined by Equation (8).
The production surrogate was defined at the well-group level because the injection allocation decision is implemented under well-group constraints. The total injection rate is kept constant, and PSO redistributes daily injection among injectors to improve the predicted cumulative oil production of the entire group. However, group-level forecasting may mask adverse responses at individual producers, such as local water-channeling or early water breakthrough; field application therefore requires individual-well screening.
where
is the forecasting horizon. To improve training stability, the model was trained to predict the relative change in well-group oil production rather than directly predicting absolute production rates. The predicted relative changes were then converted back to absolute oil production rates for performance evaluation.
2.5. Water Injection Allocation Optimization Problem
The objective of water injection allocation optimization is to determine the daily injection rates of all injectors so that the predicted cumulative oil production of the well group over a future 30-day horizon is maximized. The decision variable is the injection allocation vector composed of the daily injection rates of all injectors, as defined in Equation (9):
The optimization objective is formulated in Equation (10):
where H = 30 days is the optimization horizon, and
is the predicted well-group oil production rate under the candidate injection allocation vector. A 30-day optimization horizon was selected to match short-term offshore injection allocation review and adjustment cycles. This horizon is long enough to capture delayed injection–production responses but short enough to limit cumulative surrogate uncertainty. Therefore, the optimization objective is interpreted as a short-term decision-support metric rather than long-term recovery optimization.
The optimization was performed under three practical constraints. First, each injector must satisfy its lower and upper injection-rate limits, as given by Equation (11):
Second, the total injection rate of the well group is kept equal to the current total injection rate to maintain injection balance, as given by Equation (12):
Third, the adjustment amplitude of each injector is limited to +/−15% of its current injection rate to ensure field operability, as given by Equation (13):
where
is the current injection rate before optimization, and gamma is the maximum allowable adjustment ratio. In this study, gamma was set to 15%. This formulation ensures that the optimized injection allocation scheme improves the predicted oil production response while remaining consistent with practical injection capacity and operational constraints.
2.6. Evaluation Metrics
The proposed framework was evaluated from three aspects: connectivity identification accuracy, production forecasting performance, and injection optimization effect. For connectivity identification, the predicted connectivity matrix was compared with the prescribed ground-truth matrix using MAE, RMSE, R2, cosine similarity, and Top-k overlap accuracy. The Top-k metric evaluates whether the model can correctly identify the dominant injectors for each producer.
For production forecasting, the group-level LSTM surrogate model was evaluated using MAE, RMSE, MAPE, and R
2. For injection optimization, the optimization effect was measured by the predicted incremental oil production over the 30-day horizon using Equation (14):
where
is the predicted 30-day cumulative oil production after optimization, and
is the predicted 30-day cumulative oil production under the initial injection allocation.
3. Methodology
3.1. Overall Workflow
The proposed workflow consists of three connected modules: attention-based injector–producer connectivity identification, group-level LSTM production forecasting, and PSO-based injection allocation optimization. The connectivity module first extracts normalized injector–producer influence coefficients from historical injection–production sequences and static well-pair attributes. The group-level LSTM model then acts as a fast production surrogate to predict short-term well-group oil production responses. Finally, the PSO algorithm searches for feasible daily injection allocation schemes under practical injection constraints.
This design links interpretability and optimization. The connectivity matrix explains which injectors dominate the response of each producer, while the LSTM surrogate provides rapid production evaluation for candidate injection schemes. The PSO module converts the predictive model into an operational injection allocation strategy.
Figure 3 summarizes the overall workflow,
Table 3 lists the main module inputs and outputs, and
Table 4 reports the implementation and hyperparameter settings.
3.2. Attention-Based Connectivity Identification Model
The attention-based connectivity model is designed to estimate the relative contribution of each injector to each producer. For a given producer, the model receives three types of inputs: the historical injection-rate sequence of all injectors, the historical production-response sequence of the target producer, and the static features of each injector–producer pair. These inputs allow the model to learn both dynamic response patterns and static spatial-geological relationships.
A recurrent encoder is first used to extract the temporal injection–production response context. Meanwhile, injector-specific temporal features and static pair features are encoded separately. These encoded features are then fused and passed to an attention scoring layer.
For injector i and producer j, the attention score is calculated using Equation (15):
where
is the learned attention score,
represents the encoded dynamic response feature,
represents the encoded static well-pair feature, and w,
,
, and b are trainable parameters.
The final connectivity coefficients are obtained using the Softmax normalization in Equation (16):
where
is the predicted normalized connectivity coefficient between injector i and producer j. This normalization ensures that the coefficients are non-negative and that their sum equals one for each producer.
The connectivity loss combines distribution similarity and numerical accuracy using the weighted KL-divergence and mean-square-error form in Equation (17):
where
is the prescribed ground-truth connectivity coefficient,
is the predicted coefficient, and lambda is the weight of the numerical error term. In the supplementary sensitivity test, lambda was varied from 0 to 2.0 to examine whether the numerical-error term changes coefficient-scale accuracy or dominant injector ranking. This design encourages the model to recover both the dominant injector ranking and the actual coefficient magnitude.
3.3. Group-Level LSTM Production Surrogate Model
The production forecasting module is formulated at the well-group level rather than at the individual-well level. This setting is consistent with the optimization objective, which focuses on maximizing the cumulative oil production of the entire well group. The model input is a historical dynamic window containing injector-level injection rates and pressures, total injection rate, mean injection pressure, group oil rate, group liquid rate, group water cut, and smoothed or differential dynamic indicators.
The LSTM network maps the historical dynamic sequence to the future well-group oil production response over a seven-day forecasting horizon using Equation (18):
where
is the multivariate historical dynamic sequence and
is the predicted future group oil production response.
To improve training stability, the model predicts relative production changes rather than absolute oil rates, as defined in Equation (19):
The predicted relative changes are then converted back to absolute group oil rates for evaluation. This strategy reduces the influence of production-level differences and improves the robustness of short-term forecasting.
3.4. PSO-Based Injection Allocation Optimization Method
The injection allocation problem is solved using particle swarm optimization. Each particle represents a candidate daily injection allocation vector for all injectors. The fitness value is calculated from the predicted 30-day cumulative oil production obtained from the production surrogate model, with penalties for constraint violations if necessary. Candidate solutions are restricted by single-well injection-rate bounds, total-injection balance, and adjustment-amplitude constraints.
For the 30-day optimization horizon, the candidate injection allocation is assumed to remain constant within the operational adjustment window. The 7-day LSTM surrogate is applied recursively in a rolling manner: after each 7-day prediction block, the dynamic input window is updated using the candidate injector rates and the predicted group-level production indicators until the 30-day horizon is covered. The last block is truncated to match the remaining days. The resulting daily predictions are accumulated to obtain the 30-day objective value. Because recursive use of a short-horizon surrogate can amplify forecast uncertainty, the optimized allocation is interpreted as a short-term decision-support recommendation rather than a deterministic field-control instruction.
The velocity and position of each particle are updated iteratively according to its own best historical position and the global best position of the swarm using Equations (20) and (21):
where
and
are the position and velocity of particle i at iteration k,
is the personal best position,
is the global best position, omega is the inertia weight,
and
are acceleration coefficients, and
and
are random factors.
The optimization target is written as Equation (22):
where q* is the optimized injection allocation vector. In this study, the maximum adjustment amplitude of each injector is set to +/−15%, and the total injection rate is kept unchanged before and after optimization to ensure field operability.
3.5. Implementation Details
The dataset was divided chronologically into training, validation, and test sets to avoid information leakage from future production data. The original 7-day LSTM samples consisted of 669 chronological sliding-window samples, including 468 training samples, 100 validation samples, and 101 test samples. For the additional direct multi-step experiments, independent 14-day and 21-day LSTM surrogates were trained using the same 45-day look-back window and chronological split protocol, resulting in 661 samples for the 14-day model and 654 samples for the 21-day model. All continuous input variables were standardized using statistics calculated only from the training set. The attention model used a 60-day injector-rate sequence, a 60-day producer-response sequence, and static pair features as inputs. The optimizer was Adam with a learning rate of 8 × 10−4 and early stopping. The PSO settings were 45 particles, 120 iterations, an inertia weight decreasing from 0.90 to 0.40, and acceleration coefficients c1 = c2 = 1.8. Candidate injection rates were constrained by 300–1200 m3/d single-well bounds, unchanged total injection, and a +/−15% adjustment limit.
The final implementation produced three categories of outputs: predicted connectivity matrices, group-level production forecasting results, and optimized injection allocation schemes. These outputs were further used to analyze model interpretability, forecasting stability, PSO convergence behavior, and the predicted oil-increment potential of the optimized injection strategies.