Next Article in Journal
Research on Optimization of Lifter of an SAG Mill Based on DEM Simulation and Orthogonal Tests and Applications
Previous Article in Journal
Geochemical Insights and Mineral Resource Potential of Rare Earth Elements (REE) in the Croatian Karst Bauxites
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Prediction of Mine Waste Rock Drainage Quantity Using a Machine Learning Model with Physical Constraints

1
Department of Materials Engineering, University of British Columbia, 309-6350 Stores Road, Vancouver, BC V6T 1Z4, Canada
2
Clean Energy Innovation Research Centre, National Research Council Canada, 4250 Wesbrook Mall, Vancouver, BC V6T 1W5, Canada
*
Authors to whom correspondence should be addressed.
Minerals 2025, 15(2), 194; https://doi.org/10.3390/min15020194
Submission received: 18 December 2024 / Revised: 3 February 2025 / Accepted: 11 February 2025 / Published: 19 February 2025
(This article belongs to the Section Environmental Mineralogy and Biogeochemistry)

Abstract

:
Mining activities generate substantial amounts of waste rock, which are often disposed of in waste rock piles. Drainage from these piles can pose serious environmental risks. It is crucial to reliably predict drainage properties in order to effectively manage them. In previous work, we developed a machine learning model to predict waste rock drainage quantity using weather monitoring data as the input and drainage flow rate as the output. However, this model lacked physical constraints, limiting its interpretability, reliability, and applicability. In this study, we introduced a new machine learning model designed with physical constraints to improve the predictions of drainage quantity. This new model incorporates a weather refining sub-model and integrates physical constraints to enhance the overall reliability of the model predictions. The weather refining sub-model transforms primary weather features (total precipitation and temperature) into secondary features (rainfall, snowmelt, and evaporation) through established mathematical relationships. These secondary features were then used as inputs for the machine learning model to predict drainage quantity. To embed physical principles within the machine learning model, we integrated a water balance equation into the neural network architecture and modified the loss function accordingly. In addition, we included an adjustable bias term to optimize the balance between model performance and interpretability. Compared with our previous model, the incorporation of physical constraints into the machine learning model improved the accuracy of the drainage quantity predictions. More importantly, this approach ensures that the model outputs adhere to physical laws, thereby enhancing its interpretability, reliability, and applicability.

1. Introduction

Large amounts of waste rocks with diverse sizes and compositions are generated by mining activities and disposed of in waste rock piles. The drainage from these piles, which often contain acid, elevated concentrations of sulfate, and heavy metal(loid)s, can pose serious environmental risks and must be properly managed. Understanding the hydrology of waste rock piles is a crucial component of effective mine waste management [1]. Numerous studies have been conducted to characterize the hydrologic properties of these piles [2,3,4,5]. The highly heterogeneous nature of waste rock piles results in the formation of vastly different flow paths, causing the infiltration rate to vary significantly, ranging from a few hours for preferential flow to several years for matrix flow to fully penetrate a waste rock pile [5,6,7,8]. Consequently, drainage flow is influenced not only by the present surface infiltration rate but also by those from previous periods.
Significant efforts have been made to develop models for predicting drainage quantity, which can generally be classified into three categories. The first category includes the basic water balance models that correlate drainage quantity with precipitation and surface infiltration/run-off on a monthly or annual basis [9]. While useful, these models only provide rough estimates of drainage quantity based on weather monitoring data. The second category consists of the models that incorporate fundamental principles, such as mass conservation, and constitutive equations, such as the Richards equation, to describe water movement in unsaturated porous media [10,11]. These models offer a more detailed and accurate prediction of the dynamic processes within waste rock piles [12]. Reactive transport models have also been developed to simulate drainage flow within heterogeneous waste rock piles [13,14,15]. However, it is often challenging for these models to fully capture the complex interactions among various factors influencing drainage flow, even though different methods such as the probability density functions of physical and geochemical properties have been applied to simulate different degrees of heterogeneities [16]. In general, the application of these models requires comprehensive characterizations of each geologic unit within a waste rock pile to reliably predict drainage quantity. These characterizations can be prohibitively expensive or impossible to obtain.
Emerging machine learning models fall into the third category. Most of these models correlate drainage hydrological properties with directly monitored weather characteristics, such as temperature and precipitation [17,18,19]. Given that the relationship between weather characteristics and drainage quantity is often complex, these models typically use deep learning algorithms. However, training these models requires a large volume of data, which is often unavailable, to ensure that these models do not violate certain physical phenomena. To reduce the amount of data required for training, prior knowledge based on the first principles has to be introduced into a model to improve the performance of the learning algorithms [20]. A common method for introducing physics into neural networks is by adding regularization terms derived from partial differential equations into the loss function [21]. However, the use of partial differential equations requires characterization data that are often difficult to obtain in the field, which can undermine the effectiveness of these physics-informed neural networks. For example, when introducing the Richards equation into neural networks, the data required on soil water retention curves and unsaturated hydraulic conductivities are typically difficult to access, especially for waste rock piles with a high degree of heterogeneity.
In this research, we developed a machine learning model with physical constraints to predict drainage quantity. We applied a weather refining sub-model to first transform the directly monitored primary weather features into secondary ones, which were then used as inputs for the machine learning model. The novelty of this machine learning model lies in the integration of the water balance equation and the inclusion of the physics-based constraints derived from partial derivatives within the loss function. This approach ensures that each term in the water balance equation adheres to fundamental physical laws. The model was then trained and tested with data from three monitoring stations.

2. Methodology

The methodology developed in this study for simulating drainage quantity consists of two sequential components: a non-machine learning weather refining sub-model and a machine learning drainage quantity model with physical constraints, as illustrated in Figure 1. The weather refining sub-model uses primary weather features, such as daily temperature and precipitation, as inputs. The primary weather features are directly measured by weather monitoring stations in the vicinity of waste rock piles. This sub-model transformed the primary weather features into secondary ones using established mathematical relationships. These secondary weather features were then used as inputs for the machine learning drainage quantity model (hereafter referred to as the “drainage quantity model”). The target (output) of the drainage quantity model is the drainage flow rate. Since drainage quantity is directly influenced by rainfall, snowmelt, and evaporation, transforming primary weather features into secondary features better reflects the underlying relationships between weather conditions and drainage. This transformation improves the physical interpretability of the model and simplifies the integration of physical constraints into the model. The weather monitoring stations and the waste rock piles from which drainage flow rate data were collected for model training are described in a previous article [19].

2.1. Weather Refining Sub-Model

The weather refining sub-model transforms primary weather features into secondary ones, which are then used as inputs for the drainage quantity model. To enhance data reliability, primary weather features from multiple weather monitoring stations near the waste rock piles were combined in the analysis. The missing value segments of varying lengths were addressed using appropriate interpolation methods to ensure a continuous dataset. After preprocessing, the data were used as inputs for the weather refining sub-model, which generated the secondary weather features through the following steps: (1) temperature adjustment; (2) precipitation differentiation; (3) snowmelt simulation; and (4) evaporation estimation.
Temperature adjustment: Although the weather monitoring stations are located near the waste rock piles, the elevation difference may introduce discrepancies between the recorded weather data and the actual conditions on the piles. To address this, the lapse rate, which describes the rate of temperature decrease with the increasing altitude, was used to adjust the recorded temperature data to reflect the actual ambient temperature on the piles [22]. A constant lapse rate was assumed for each waste rock pile. The calculation of the lapse rate was based on the values reported in the literature for regions at similar latitudes, as well as the observed snow cover disappearance dates recorded at the mine site [23].
Precipitation differentiation: The two forms of precipitation, rainfall and snowfall, have distinct impacts on water infiltration into waste rock piles, making it essential to differentiate between them. While weather stations provide precise precipitation data, elevation differences and the resulting temperature variations can influence the actual form of precipitation on the waste rock piles. For this study, it was assumed that the total precipitation amounts on the waste rock piles matched that recorded by the weather stations. However, the form of precipitation was determined based on the surface temperature, measured two meters above ground. Using the adjusted surface air temperature derived in the previous step, the precipitation was classified as snowfall below a threshold surface temperature and as rainfall above this threshold surface temperature. As suggested by the literature, the threshold temperature could vary between 0 and 1.7 °C. In this study, considering the limited snowfall recorded at the mine site, this threshold temperature was fixed at 1.1 °C [24]. The recategorized precipitation data provided a more accurate representation of the rainfall and snowfall distributions on the waste rock piles.
Snowmelt simulation: Rainfall contributes directly to net infiltration into waste rock piles, whereas snowfall undergoes a more complex process involving accumulation and melting. To capture these processes, a snowmelt model was developed to transform past snowfall into daily snowmelt data. The model calculates the theoretical maximum daily snowmelt using Equation (1), under the assumption of sufficient snow accumulation. The actual snowmelt for a given day is then determined as follows: if the snow cover for that day is not fully depleted, the actual snowmelt equals the theoretical maximum; or if the snow cover for that day is depleted, the actual snowmelt equals the remaining snow from the previous day.
The degree-day factor method, adapted from LISFLOOD (April 2020) (a hydrological rainfall-runoff model), was applied to calculate the theoretical maximum daily snowmelt, as shown in Equation (1) [25]. This model accounts for the contribution of rainfall to the snowmelt process.
M = C m ( t ) · ( 1 + 0.01 · R · t ) ( T a i r T m e l t ) · t ,   when   T a i r > T m e l t
In Equation (1), M is the amount of snowmelt in mm; Cm (t) is the effective degree-day factor in mm/(°C‧day), which varies over time; R is the amount of rainfall (mm) during the time period Δt; and Tair and Tmelt are the average air temperature (°C) and the snowmelt temperature over the time period Δt, respectively. Theoretically, Δt can be any time duration, and in this research, it was set to one day. The amount of snowmelt M was assumed to be zero when Tair ≤ Tmelt, meaning no snowmelt occurs if the air temperature is lower than or equal to the snowmelt threshold. Additionally, it is assumed that the degree-day factor Cm (t) follows a sinusoidal function with a period of one year. Its peak occurs at the summer solstice and its trough occurs at the winter solstice, reflecting seasonal variations in the snowmelt process.
Evaporation estimation: The daily evaporation rate in this research was estimated using a simplified version of the standard Penman equation proposed by [26]:
E 0.047 R S T + 9.5 2.4 R S R A 2 + 0.09 ( T + 20 ) ( 1 R H 100 ) ,   for   T + 9.5 > 0
where E is the daily evaporation rate in mm/day; RS is the solar radiation reaching the ground surface; RA is the extraterrestrial solar radiation in MJ/(mm‧day); T is the daily mean temperature in °C; and RH is the relative humidity (%). If T + 9.5 ≤ 0, the daily evaporation rate E is considered zero. The solar radiation reaching the ground surface (RS) was estimated by downscaling the observed historical solar radiation data using the ClimateNA software package [27]. The extraterrestrial solar radiation (RA) was calculated using theoretical formulas based on the Julian date and the latitude of the waste rock pile [26].

2.2. Machine Learning Drainage Quantity Model

2.2.1. Conceptual Model

The machine learning drainage quantity model developed in this research was built using TensorFlow version 2.3.0 in Python version 3.8.19. The model was developed based on the water balance principle for a waste rock pile, where the drainage quantity at any given time is determined by the contributions of rainfall, snowmelt, and evaporation. The schematic design of the model is illustrated in Figure 2. Before being used as inputs for the drainage quantity model, the secondary weather features—rainfall, snowmelt, and evaporation—generated by the weather refining sub-model were preprocessed using the rolling average method. This method calculates average values over varying time windows. Previous studies have shown that the use of this method smooths out high-frequency fluctuations and allows the model to use a broader range of measurements without increasing the number of time steps [18,19,28]. Additionally, waste rock volume was included as a feature due to its influence on water percolation through the waste rock pile.
Through their respective neural networks (NNRain, NNSnow, NNEvap, NNWRV, and NNBias), explained in detail in the following section, the inputs were transformed into the effective contributions of rainfall ( R ^ e f f ), snowmelt ( S ^ e f f ), evaporation ( E ^ e f f ), and a bias term ( B i a s ^ ). Specifically, R ^ e f f , S ^ e f f , and E ^ e f f represent the contributions to the drainage flow rate from rainfall, snowmelt, and evaporation, respectively. Drainage quantity was then calculated as the sum of the effective contributions of rainfall and snowmelt, minus the effective contribution of evaporation, with the addition of the bias term.

2.2.2. Neural Network Architecture Design

As outlined in the previous section, NNRain, NNSnow, NNEvap, NNWRV, and NNBias represent the neural networks applied in the drainage quantity model. They were developed using five Gated Recurrent Units (GRUs), a type of modern recurrent neural networks [29]. GRUs were chosen because they are simpler and have fewer parameters to determine compared to the long short-term memory (LSTM) method. This makes them particularly well suited for handling smaller time-series datasets, such as the waste rock drainage data used in this study. Any of the neutral networks used could theoretically be replaced by other neural networks, such as LSTM cells or fully connected neural networks (FCNNs) with an extra flatten layer.
The inputs for the neutral networks were arranged as a three-dimensional tensor with the shape of (N, D, M), where N is the number of samples, D is the number of time steps, and M is the number of features. NNRain, NNSnow, and NNEvap are designed to use only their respective weather feature sequences as inputs, while NNWRV uses waste rock volume as its input (Equations (3)–(6)). The processes by which these neural networks transform inputs to outputs are represented as the following functions: f N N R a i n , f N N S n o w , f N N E v a p , and f N N W R V . The outputs of these neutral networks are denoted as yrain, ysnow, yevap, and y W R V , respectively. It is important to note that yrain, ysnow, and yevap are scalar values, whereas y W R V is a three-dimensional vector. The components of y W R V serve as scale factors that adjust yrain, ysnow, and yevap to derive the effective contributions of rainfall ( R ^ e f f ), snowmelt ( S ^ e f f ), and evaporation ( E ^ e f f ) to drainage quantity, as shown in Equations (7)–(9). These adjustments were specifically designed to account for the influence of waste rock volume on water percolation through the waste rock pile.
y r a i n = f N N R a i n ( R t , R t 1 , , R t D + 1 )
y s n o w = f N N S n o w ( S t , S t 1 , , S t D + 1 )
y e v a p = f N N E v a p ( E t , E t 1 , , E t D + 1 )
y W R V = ( y W R V , 1 , y W R V , 2 , y W R V , 3 ) T = f N N W R V ( V t , V t 1 , , V t D + 1 )
R e f f ^ = y W R V , 1 · y r a i n
S e f f ^ = y W R V , 2 · y s n o w
E e f f ^ = y W R V , 3 · y e v a p
The NNbias, denoted by the function f N N B i a s , was designed to predict the bias term ( B i a s ^ ), as shown in Equation (10). The inputs for NNBias include all the weather features as well as the waste rock volume.
B i a s ^ = f N N B i a s ( R t , R t 1 , , R t D + 1 , S t , S t 1 , , S t D + 1 , E t , E t 1 , , E t D + 1 , V t , V t 1 , , V t D + 1 )
Eventually, the predicted mine waste rock drainage quantity ( Q ^ ) is calculated by Equation (11):
Q ^ = R ^ e f f + S ^ e f f E ^ e f f + B i a s ^
To ensure meaningful physical interpretations, yrain, ysnow, yevap, and the three components of the vector y W R V should all be non-negative. To achieve this, LeakyReLU was chosen as the activation function for the output layers of NNRain, NNSnow, NNEvap, and NNWRV. Although LeakyReLU may produce negative values, these values are typically very close to zero and can be treated as zero for water balance calculations. In contrast, the activation function for the output layer of NNBias was set to be linear, because the bias term can have both positive and negative values. This design ensures that each output is appropriately constrained in the model.

2.2.3. Loss Function Design

The loss function is a crucial component in machine learning, which quantifies the difference between the predicted outputs of a machine learning algorithm and the actual target values. In this study, apart from the careful choice of activation functions mentioned above, further physical constraints were embedded in the loss function to ensure that the correlations between the input and the output of the neural networks—NNRain, NNSnow, and NNEvap—were non-negative. The model training process involves minimizing the loss function by adjusting the internal parameters of the neutral networks represented by the matrix θ. The optimal θ, denoted as θbest, is the value at which the loss function is minimized, as shown in Equation (12).
θ b e s t = arg min θ L o s s ( X , Q , Q ^ , R ^ e f f , S ^ e f f , E ^ e f f , B i a s ^ )
where Loss represents the loss function, X represents the assembly of all inputs, and Q represents the observed drainage flow rate.
The loss function used in this study was designed to encompass three terms, defined as an empirical loss, a physical loss, and an extra regularization loss, as shown in Equation (13):
L o s s = L e m p i r i c a l + L p h y s i c a l + L r e g u l a r i z a t i o n
The empirical loss was computed using the mean square error (MSE), which is the typical method of measuring model performance in supervised machine learning. Specifically, this term measures the difference between the model predicted and the observed drainage flow rates, as shown in Equation (14).
L e m p i r i c a l = 1 N i = 1 N Q i Q ^ i 2
where N is the batch size, and Q i and Q ^ i are the observed and predicted drainage flow rate, respectively.
To enforce non-negative correlations between the output and the input of the neural networks, a physical constraint was incorporated into the model by introducing a physical loss term into the loss function. This term penalizes negative correlations by increasing its contribution to the loss in proportion to the magnitude of the negative correlation. The design of the physical loss term is shown in Equation (15):
L p h y s i c a l = λ p · 1 N i = 1 N 1 D j = 1 D min 0 , R ^ e f f , i R i j min 0 , S ^ e f f , i S i j min 0 , E ^ e f f , i E i j
where R i j , S i j , and E i j are the rainfall, snowmelt, and evaporation features for sample i and time step j; the scale factor λp is a positive hyperparameter that ensures a physical loss value (Lphysical) comparable in magnitude to the empirical loss value (Lempirical). Like the other hyperparameters, the value of λp needs to be fine-tuned. If λp is set too low, the penalty for negative correlations becomes negligible. Conversely, if λp is set too high, it can dominate the loss function, hindering the reduction of empirical loss during training and ultimately compromising model performance.
Finally, an extra regularization loss term was introduced into the loss function to minimize the reliance of the model output on the bias term. The bias term ( B i a s ^ ) predicted by NNBias serves two purposes: firstly, it captures the interactions among weather features; and secondly, it balances performance and interpretability of the model. Generally, a higher bias term improves performance but reduces interpretability. The model training process aims to minimize the reliance of the model predictions on the bias term, thereby maximizing the reliance on the effective contributions of the three weather futures. The bias term only intervenes when the effective contributions of weather futures fail to satisfactorily predict the drainage quantity. This extra regularization loss term, shown in Equation (16), was introduced to achieve this.
L r e g u l a r i z a t i o n = λ r · 1 N i = 1 N B i a s ^ i 2
The scale factor λr is a positive hyperparameter controlling the contribution of the bias term to the model output. The contribution of the bias term can be manually adjusted or automatically adjusted by the model itself during the training process. A larger λr reduces the magnitude of the bias term, meaning that model performance is sacrificed for a better model interpretability, and vice versa. During training, if the overall model performance is satisfactory, that is, the values of the empirical loss (Lempirical) and the physical loss (Lphysical) are relatively small, the optimizer of the model reduces the regularization loss (Lregularization) to achieve a smaller overall Loss, resulting in a smaller absolute value of the bias term. On the other hand, if the model performs poorly during training, the optimizer increases the Lregularization for a lower overall Loss, resulting in a higher absolute value of the bias term.
Furthermore, all five neutral networks were trained simultaneously, making them learn to collaborate during training. Besides predicting drainage quantity, the neural networks can also discern the contributions of various weather features to drainage quantity.

2.2.4. Model Tuning

For the three drainage monitoring stations studied, the dataset available was divided into a training and test set. The data from the last year of monitoring were chosen as the test set and the remaining data were used as the training set. The test set was completely isolated from the training and validation processes. The training set was randomly and evenly divided into five folds for cross-validation to determine the best hyperparameter combination. Specifically, a Bayesian optimization algorithm was adopted to more efficiently search for the best combinations of hyperparameters [30]. The hyperparameters were searched simultaneously during cross-validation. The best combinations of hyperparameters for each drainage monitoring station are shown in Table 1. The Adam optimizer was chosen as the optimization algorithm for model training [31]. During model training, the batch size was fixed at four and did not participate in the model tuning process. A new model was built with the best hyperparameter combination and trained on all five folds to take full advantage of the monitoring data. Finally, the model was asked to give predictions in the test set for evaluation.

3. Results and Discussion

3.1. Model Training and Testing

The drainage quantity model was applied to three waste rock drainage monitoring stations, using the input data collected from nearby weather monitoring stations. Table 2 provides details on the distances and elevation differences between the three waste rock piles and their respective weather monitoring stations.
Figure 3 compares the predicted and observed (measured) drainage flow rates during both model training and testing. The results indicate that the drainage quantity model generally fits the observed drainage flow rates well. However, the model fails to capture some peak flow events due to a lack of training data for such events. These peak flows, which typically last from a few hours to a day, posed a challenge for obtaining sufficient site measurement data for training the model. The trained model was successfully applied to predict the drainage flow rates using available weather monitoring data. The predicted drainage flow trend closely follows the historical measurements, suggesting that the model outputs are stable and reliable.
The performance of the drainage quantity model was quantitatively evaluated by two metrics: the root mean square error (RMSE) and Nash–Sutcliffe efficiency (NSE), as shown in Table 3. The RMSE measures the average difference between the predicted and observed drainage flow rates, with lower RMSE values indicating better model performance. Compared with our previously published model [19], the RMSE of the present model is reduced by 38% for Station 1, 44% for Station 2, and 9% for Station 3 in their respective test sets. However, the RMSE alone cannot be used to compare model performance across stations, as it shares the same unit as the flow rate and varies with the average flow rate across stations. Therefore, the NSE was also calculated to evaluate model performance across the different stations. An NSE value closer to one indicates better model performance. Based on the NSE values of the test sets, the model performed equally well for Stations 1 and 2, and slightly worse for Station 3.
The bias term ( B i a s ^ ) was automatically adjusted during the training process to compensate for discrepancies between the predicted and the observed drainage flow rates. Equation (17) was used to calculate the contribution of the bias term to the final prediction. The monthly contributions of the bias term to the drainage quantity predictions are shown in Figure 4. On average, over the 12 months, the contribution of the bias term is 9% for Station 1, 31% for Station 2, and 18% for Station 3. The contributions of the bias term to the model output were considered acceptable, indicating that the drainage quantity predictions rely primarily on the effective contributions of the three weather features.
Bias   Contribution = B i a s ^ R e f f ^ + S e f f ^ + E e f f ^ + B i a s ^ × 100 %

3.2. Sensitivity Tests

The trained model is designed to provide physically meaningful predictions, even when subjected to weather conditions that were previously unseen during training. To assess this, two sets of sensitivity tests were conducted on the test sets: one involving increasing the temperature (elevated temperature) and the other involving increasing the total precipitation (elevated precipitation). These elevated primary weather features were used as inputs for the weather refining model to generate new sets of secondary weather features. These secondary features were then used as inputs for the trained drainage quantity model to predict drainage flow rates for the three drainage monitoring stations. The outputs of the model under these two scenarios were compared with the original predictions for each station. The results are shown in Figure 5.
When the temperature is elevated, peak flow events occur earlier, which can be attributed to an earlier onset of snowmelt. As a result of the early snowpack depletion and increased evaporation at higher temperatures, the predicted flow rates in the summer are lower than those in the original predictions. For the elevated precipitation scenario, a greater amount of snow accumulates on top of the waste rock piles compared to the original estimation. As a result, the predicted flow rates are higher from June onward, due to a larger snowpack and a slower depletion of the snowpack than in the original predictions. The sensitivity test results demonstrate that the drainage model produces physically meaningful predictions when weather conditions are altered.

3.3. Verification of the Non-Negative Correlations by Monotonicity Test

After simultaneously training all five neural networks, NNRain, NNSnow, and NNEvap were isolated for monotonicity tests to verify that the physical loss term (Lphysical) described in Equation (15) successfully enforced non-negative correlations between the inputs (rainfall, snowmelt, and evaporation) and the outputs (the effective contributions of rainfall, snowmelt, and evaporation). The monotonicity tests were conducted with two drainage quantity models: one was trained without the physical loss term, and the other was trained with it. The test without the physical loss term was achieved by setting λp to zero in Equation (15). To perform the monotonicity tests, the input for each neutral network was manually increased, referred to as the “elevated input”. The resulting output was then standardized to obtain its z-score, which was compared with the z-score of the output with the original input. The results of the monotonicity tests are presented in Figure 6. To ensure consistency, the mean and standard deviation used for standardization were calculated from the output corresponding to the original input of each neural network.
The neural networks trained without the physical loss term exhibit some negative correlations, as some data points fall below the diagonal line, which is undesirable. In contrast, the neural networks trained with the physical loss term show a satisfactory non-negative monotonicity, with all data points positioned along or above the diagonal line. The results highlight the importance of including the physical loss term in the loss function to maintain non-negative correlations.

3.4. The Impact of Current Weather Conditions on Future Drainage Quantities

The model outputs presented above use weather data up to the present day to predict the drainage quantity for the present day. It is practically valuable to evaluate how the accuracy of the model changes when using past and current weather data to predict future drainage quantities. To investigate this, the concept of ‘lag days’ was introduced to represent the time difference (in days) between the most recent weather input data and the predicted drainage quantity. For example, one lag day means that the model uses weather data up to the present day to predict the drainage flow rate for the following day. By this definition, the model outputs presented above were generated on lag day zero, as the model uses weather data up to the present day to predict the drainage flow rate for the present day.
A new set of models was trained using the same methodology but with varying lag days, and their performance was evaluated against the test set. The results are shown in Figure 7. As expected, the performance of the model, as measured by the NSE values shown in Figure 7, decreases as the number of lag days increases. However, the rate of performance deterioration varies across the three stations. As the number of lag days increases, the performance of the model at Station 1 deteriorates the slowest, while the performance deteriorates the fastest at Station 2. At Station 3, the model’s performance declines gradually for the first three lag days, followed by a more rapid deterioration thereafter.
These tests enhanced our understanding of which aspects of the drainage flow rate are most influenced by recent rainfall and/or snowmelt events. For example, as shown in Figure 8, a peak flow observed at the end of June was accurately predicted by the original model with zero lag days. However, when the lag days were increased to three, the model completely missed this peak. This suggests that a rainfall or snowmelt event occurring within the three days directly contributed to the peak flow, and the model with a three-day lag failed to predict it due to the absence of critical recent data.

4. Conclusions

This study introduces a machine learning model with embedded physical constraints to predict mine waste rock drainage quantities. Compared with our previously published model, the novelty of this model is that it incorporates physical constraints to ensure that the model outputs obey the established physical laws. Weather monitoring data and drainage flow rate measurements from three monitoring stations were used for model training and testing.
The model comprises two main components: a weather refining sub-model and the machine learning drainage quantity model. First, the weather refining sub-model transforms the primary weather features directly measured by monitoring stations—temperature and precipitation—to the secondary ones, including rainfall, snowmelt, and evaporation. These transformations are based on well-established mathematical relationships. The machine learning model uses these secondary weather features and the waste rock volume as inputs. Through their respective neural networks, these inputs were transformed to the effective contributions of rainfall, snowmelt, and evaporation to drainage quantity, with an extra bias term. The machine learning model incorporates physical constraints by embedding a water balance equation and including a physical loss term in the loss function. The water balance equation and the regularization loss term ensure that the drainage quantity is mainly determined by the effective contributions of rainfall, snowmelt, and evaporation. The physical loss term enforces the non-negative correlations between the inputs and outputs of the three neural networks associated with the weather features. Additionally, the inclusion of a bias term achieves a balance between model performance and interpretability.
The model was successfully trained and validated using the provided datasets. The results from the monotonicity test confirmed that the inclusion of the physical loss term in the loss function successfully enforced non-negative correlations between the inputs and outputs of the three neural networks associated with the weather features. The sensitivity tests show that the model generates physically meaningful predictions, even under previously unseen weather conditions. The incorporation of physical constraints into the model enhances its interpretability, reliability, and applicability when compared with our previously published model. The drainage quantity model developed in this study will be a part of the subsequent development of a drainage quality model.

Author Contributions

Conceptualization, C.Z., L.M. and W.L.; methodology, C.Z., L.M. and W.L.; software, C.Z.; validation, L.M. and W.L.; formal analysis, W.L.; investigation, C.Z. and L.M.; resources, W.L.; data curation, C.Z.; writing—original draft preparation, C.Z.; writing—review and editing, L.M. and W.L.; visualization, C.Z.; supervision, L.M. and W.L.; project administration, W.L.; funding acquisition, L.M. and W.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research is financially supported by the National Research Council Canada (NRC) Digital Health and Geospatial Analytics program (DHGA-117-1).

Data Availability Statement

In accordance with the policy, the code script for the model described in this paper cannot be open-sourced. However, we are committed to fostering academic collaboration and are willing to share the project codes for academic purposes. Interested parties are encouraged to contact the corresponding author for further details.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Wolkersdorfer, C.; Nordstrom, D.K.; Beckie, R.D.; Cicerone, D.S.; Elliot, T.; Edraki, M.; Valente, T.; França, S.C.A.; Kumar, P.; Lucero, R.A.O.; et al. Guidance for the integrated use of hydrological, geochemical, and isotopic tools in mining operations. Mine Water Environ. 2020, 39, 204–228. [Google Scholar] [CrossRef]
  2. Tremblay, G.A.; Hogan, C.M. (Eds.) Mine Environment Neutral Drainage (MEND) Manual 5.4.2d: Prevention and Control; Canada Centre for Mineral and Energy Technology: Ottawa, ON, Canada, 2001; Available online: http://mend-nedem.org/wp-content/uploads/5-4-2dVolume4_PreventionControlL.pdf (accessed on 17 August 2023).
  3. Lefebvre, R.; Hockley, D.; Smolensky, J.; Geélinas, P. Multiphase Transfer Processes in Waste Rock Piles Producing Acid Mine Drainage: 1: Conceptual Model and System Characterization. J. Contam. Hydrol. 2001, 52, 137–164. [Google Scholar] [CrossRef]
  4. Nichol, C.F. Transient Flow and Transport in Unsaturated Heterogeneous Media: Field Experiments in Mine Waste Rock; The University of British Columbia: Vancouver, BC, Canada, 2002. [Google Scholar]
  5. Nichol, C.; Smith, L.; Beckie, R. Field-Scale Experiments of Unsaturated Flow and Solute Transport in a Heterogeneous Porous Medium. Water Resour. Res. 2005, 41, W05018. [Google Scholar] [CrossRef]
  6. Brusseau, M.L.; Rao, P.S.C. Modeling Solute Transport in Structured Soils: A Review. Geoderma 1990, 46, 169–192. [Google Scholar] [CrossRef]
  7. Flury, M.; Yates, M.V.; Jury, W.A. Numerical analysis of the effect of the lower boundary condition on solute transport in lysimeters. Soil Sci. Soc. Am. J. 1999, 63, 1493–1499. [Google Scholar] [CrossRef]
  8. Smith, L.; López, D.; Beckie, R. Hydrogeology of Waste Rock Dumps; Victoria, B.C., Ed.; British Columbia Ministry of Energy, Mines and Petroleum Resources: Cranbrook, BC, Canada; CANMET: Ottawa, ON, Canada, 1995. [Google Scholar]
  9. Gélinas, P.; Lefebvre, R.; Choquette, M. Monitoring of Acid Mine Drainage in a Waste Rock Dump. In Proceedings of the Secondary International Conference on Environmental Issue and Management of Waste in Energy and Mineral Production, Calgary, AB, Canada, 1–4 September 1992; Volume 6, pp. 747–757. [Google Scholar]
  10. Ramasamy, M.; Power, C.; Mkandawire, M. Numerical Prediction of the Long-term Evolution of Acid Mine Drainage at a Waste Rock Pile Site Remediated with an HDPE-lined Cover System. J. Contam. Hydrol. 2018, 216, 10–26. [Google Scholar] [CrossRef]
  11. King, M. Groundwater and contaminant transport modelling at the sydney tar ponds. In Proceedings of the 56th Annual Canadian Geotechnical Conference and 4th Joint IAH-CNC/CGS Groundwater Specialty Conference, Winnipeg, MB, Canada, 28 September–1 October 2003; pp. 10–26. [Google Scholar]
  12. Hendrickx, J.M.H.; Flury, M. Uniform and Preferential Flow Mechanisms in the Vadose Zone. In Conceptual Models of Flow and Transport in the Fractured Vadose Zone; The National Academies Press: Washington, DC, USA, 2001; pp. 149–187. [Google Scholar]
  13. Pedretti, D.; Mayer, K.U.; Beckie, R.D. Stochastic Multicomponent Reactive Transport Analysis of Low Quality Drainage Release from Waste Rock Piles: Controls of the Spatial Distribution of Acid Generating and Neutralizing Minerals. J. Contam. Hydrol. 2017, 201, 30–38. [Google Scholar] [CrossRef]
  14. Pedretti, D.; Vriens, B.; Skierszkan, E.K.; Baják, P.; Mayer, K.U.; Beckie, R.D. Evaluating Dual-Domain Models For Upscaling Multicomponent Reactive Transport in Mine Waste Rock. J. Contam. Hydrol. 2022, 244, 103931. [Google Scholar] [CrossRef]
  15. Pedretti, D.; Mayer, K.U.; Beckie, R.D. Controls of Uncertainty in Acid Rock Drainage Predictions from Waste Rock Piles Examined through Monte-Carlo Multicomponent Reactive Transport. Stoch. Environ. Res. Risk Assess. 2020, 34, 219–233. [Google Scholar] [CrossRef]
  16. Smith, L.; Beckie, R. Hydrologic and Geochemical Transport Processes in Mine Waste Rock. In Environmental Aspects of Mine Wastes; Mineralogical Association of Canada: Haywood County, NC, USA, 2003; Volume 31. [Google Scholar]
  17. Jiang, C.; Zhu, S.; Hu, H.; An, S.; Su, W.; Chen, X.; Li, C.; Zheng, L. Deep Learning Model Based on Big Data for Water Source Discrimination in an Underground Multiaquifer Coal Mine. Bull. Eng. Geol. Environ. 2022, 81, 26. [Google Scholar] [CrossRef]
  18. Ma, L.; Huang, C.; Liu, Z.S.; Morin, K.A.; Aziz, M.; Meints, C. Artificial Neural Network for Prediction of Full-scale Seepage Flow Rate at the Equity Silver Mine. Water. Air. Soil Pollut. 2020, 231, 179. [Google Scholar] [CrossRef]
  19. Zhang, C.; Ma, L.; Liu, W. A machine learning approach for prediction of the quantity of mine waste rock drainage in areas with spring freshet. Minerals 2023, 13, 376. [Google Scholar] [CrossRef]
  20. Karniadakis, G.E.; Kevrekidis, I.G.; Lu, L.; Perdikaris, P.; Wang, S.; Yang, L. Physics-Informed Machine Learning. Nat. Rev. Phys. 2021, 3, 422–440. [Google Scholar] [CrossRef]
  21. Tartakovsky, A.M.; Marrero, C.O.; Perdikaris, P.; Tartakovsky, G.D.; Barajas-Solano, D. Physics-informed deep neural networks for learning parameters and constitutive relationships in subsurface flow problems. Water Resour. Res. 2020, 56, e2019WR026731. [Google Scholar] [CrossRef]
  22. Huschke, R.E. Glossary of meteorology. Weatherwise 1960, 13, 69–86. [Google Scholar] [CrossRef]
  23. Kittel, C.; Kroemer, H.; Scott, H.L. Thermal Physics, 2nd ed. Am. J. Phys. 1998, 66, 164–167. [Google Scholar] [CrossRef]
  24. Laramie, R.L.; Schaake, J.C. Simulation of the Continuous Snowmelt Process; Cambridge Ralph, M., Ed.; Parsons Laboratory for Water Resources and Hydrodynamics, Massachusetts Institute of Technology: Cambridge, MA, USA, 1972; Available online: https://hdl.handle.net/1721.1/142971 (accessed on 3 July 2024).
  25. van der Knijff, J.M.; Younis, J.; de Roo, A.P.J. LISFLOOD: A GIS-Based Distributed Model for River Basin Scale Water Balance and Flood Simulation. Int J Geogr Inf Sci. 2010, 24, 189–212. [Google Scholar] [CrossRef]
  26. Allen, R.G.; Pereira, L.S.; Raes, D.; Smith, M. Crop Evapotranspiration—Guidelines for Computing Crop Water Requirements—FAO Irrigation and Drainage Paper 56; FAO: Rome, Italy, 1998; Available online: https://www.fao.org/4/x0490e/x0490e00.htm (accessed on 3 July 2024).
  27. Wang, T.; Hamann, A.; Spittlehouse, D.; Carroll, C. Locally Downscaled and Spatially Customizable Climate Data for Historical and Future Periods for North America. PLoS ONE 2016, 11, e0156720. [Google Scholar] [CrossRef] [PubMed]
  28. Ma, L.; Huang, C.; Liu, Z.S.; Morin, K.A.; Aziz, M.; Meints, C. The Correlation between Drainage Chemistry and Weather for Full-Scale Waste Rock Piles Based on Artificial Neural Network. J. Contam. Hydrol. 2021, 239, 103793. [Google Scholar] [CrossRef] [PubMed]
  29. Cho, K.; van Merriënboer, B.; Bahdanau, D.; Bengio, Y. On the Properties of Neural Machine Translation: Encoder–decoder Approaches. In Proceedings of the SSST 2014—8th Workshop on Syntax, Semantics and Structure in Statistical Translation, Doha, Qatar, 25 October 2014. [Google Scholar] [CrossRef]
  30. Bergstra, J.; Yamins, D.; Cox, D.D. Making a Science of Model Search: Hyperparameter Optimization in Hundreds of Dimensions for Vision Architectures. In Proceedings of the 30th International Conference on Machine Learning, ICML 2013, Atlanta, GA, USA, 16–21 June 2013. [Google Scholar]
  31. Kingma, D.P.; Ba, J.L. Adam: A Method for Stochastic Optimization. In Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015—Conference Track Proceedings, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
Figure 1. A schematic of methodology developed in the present study for simulating waste rock drainage quantity.
Figure 1. A schematic of methodology developed in the present study for simulating waste rock drainage quantity.
Minerals 15 00194 g001
Figure 2. A schematic of the neural network structure design for the drainage quantity model.
Figure 2. A schematic of the neural network structure design for the drainage quantity model.
Minerals 15 00194 g002
Figure 3. Comparison of model outputs and measured drainage flow rates during model training and testing for (a) Station 1; (b) Station 2; and (c) Station 3.
Figure 3. Comparison of model outputs and measured drainage flow rates during model training and testing for (a) Station 1; (b) Station 2; and (c) Station 3.
Minerals 15 00194 g003aMinerals 15 00194 g003b
Figure 4. The monthly contribution of the bias term to the drainage quantity prediction for the three drainage monitoring stations studied.
Figure 4. The monthly contribution of the bias term to the drainage quantity prediction for the three drainage monitoring stations studied.
Minerals 15 00194 g004
Figure 5. Comparison of the sensitivity test results (one involving increasing the temperature and the other involving increasing the total precipitation) with the original predictions of the test sets for (a) Station 1; (b) Station 2; and (c) Station 3.
Figure 5. Comparison of the sensitivity test results (one involving increasing the temperature and the other involving increasing the total precipitation) with the original predictions of the test sets for (a) Station 1; (b) Station 2; and (c) Station 3.
Minerals 15 00194 g005
Figure 6. Non-negative monotonicity means that all data points are positioned along or above the diagonal line. (a) Monotonicity test results for the drainage quantity model with the physical loss term in the loss function; (b) Monotonicity test results for the drainage quantity model without the physical loss term in the loss function.
Figure 6. Non-negative monotonicity means that all data points are positioned along or above the diagonal line. (a) Monotonicity test results for the drainage quantity model with the physical loss term in the loss function; (b) Monotonicity test results for the drainage quantity model without the physical loss term in the loss function.
Minerals 15 00194 g006
Figure 7. The decrease in the NSE scores of the test sets with an increasing number of lag days for the three drainage monitoring stations.
Figure 7. The decrease in the NSE scores of the test sets with an increasing number of lag days for the three drainage monitoring stations.
Minerals 15 00194 g007
Figure 8. Comparison of the drainage flow rates predicted by the original model, predicted by the model with three lag days, and the observed values of the test set of Station 1.
Figure 8. Comparison of the drainage flow rates predicted by the original model, predicted by the model with three lag days, and the observed values of the test set of Station 1.
Minerals 15 00194 g008
Table 1. The best combination of hyperparameters for models trained for three waste rock drainage stations. Units are the dimensionality of the output space from the recurrent GRU layer; λp and λr are two scale factors mentioned in Equations (15) and (16).
Table 1. The best combination of hyperparameters for models trained for three waste rock drainage stations. Units are the dimensionality of the output space from the recurrent GRU layer; λp and λr are two scale factors mentioned in Equations (15) and (16).
UnitsLearning Rateλpλr
Station 1140.00051.51
Station 2320.00051.50.1
Station 380.00051.50.1
Table 2. Distance (in kilometers) and elevation differences (in meters) between three waste rock piles and their respective weather monitoring stations.
Table 2. Distance (in kilometers) and elevation differences (in meters) between three waste rock piles and their respective weather monitoring stations.
Distance (km)Elevation Differences (m)
Station 149.01060
Station 249.21060
Station 35.0660
Table 3. The RMSE and NSE for evaluating the performance of the drainage quantity model during model training and testing.
Table 3. The RMSE and NSE for evaluating the performance of the drainage quantity model during model training and testing.
1RMSE (m3/s)2RMSE (m3/s)2NSE
TrainTestTrainTestTrainTest
Station 10.44490.91750.53300.57010.80520.8904
Station 20.90331.01080.49200.56600.92440.9082
Station 30.25450.44000.43870.39850.84260.8616
1RMSE is for our previously published model and is used as the benchmark. 2RMSE and 2NSE are the two metrics to evaluate the current model.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, C.; Ma, L.; Liu, W. Prediction of Mine Waste Rock Drainage Quantity Using a Machine Learning Model with Physical Constraints. Minerals 2025, 15, 194. https://doi.org/10.3390/min15020194

AMA Style

Zhang C, Ma L, Liu W. Prediction of Mine Waste Rock Drainage Quantity Using a Machine Learning Model with Physical Constraints. Minerals. 2025; 15(2):194. https://doi.org/10.3390/min15020194

Chicago/Turabian Style

Zhang, Can, Liang Ma, and Wenying Liu. 2025. "Prediction of Mine Waste Rock Drainage Quantity Using a Machine Learning Model with Physical Constraints" Minerals 15, no. 2: 194. https://doi.org/10.3390/min15020194

APA Style

Zhang, C., Ma, L., & Liu, W. (2025). Prediction of Mine Waste Rock Drainage Quantity Using a Machine Learning Model with Physical Constraints. Minerals, 15(2), 194. https://doi.org/10.3390/min15020194

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop