Ecological Modelling 175 (2004) 189–194
Short communication
The use of artificial neural networks (ANNs) to simulate N2 O emissions from a temperate grassland ecosystem Matthew Ryan a , Christoph Müller b,∗ , Hong J. Di a , Keith C. Cameron a b
a Soil, Plant and Ecological Sciences Division, Lincoln University, Canterbury, New Zealand Department of Plant Ecology, Justus-Liebig University Giessen, Heinrich-Buff-Ring 26-32, 35392 Giessen, Germany
Received 21 May 2003; received in revised form 21 October 2003; accepted 31 October 2003
Abstract An artificial neural network (ANN) was used to simulate nitrous oxide (N2 O) emissions from an intensive grassland ecosystem in New Zealand. Daily N2 O emitted was simulated as a function of six input variables of daily rainfall, soil moisture content and temperature, soil nitrate (NO3 − ), ammonium (NH4 + ) and total inorganic nitrogen content. Results showed that the ANN was able to calibrate itself to within ±0.77% of measured N2 O values in the training data set, and within ±2.0% of values used in the validation data set. This was well within the range of the calculated uncertainties (CV = 10–43%) of the measured N2 O emissions in the field, and demonstrated that ANNs are a viable tool for simulating complex and highly variable biological systems. © 2003 Elsevier B.V. All rights reserved. Keywords: Soil; Nitrous oxide; Artificial neural networks (ANNs)
1. Introduction Various attempts have been made to simulate N2 O emissions from soils, with varying degrees of success (Focht, 1974; Li et al., 1992; Elliot and de Jong, 1993; Grant et al., 1993; Grant, 1995; Potter et al., 1996; Müller et al., 1997; Froling et al., 1998). Most have used a mechanistic modeling approach based on describing the fundamental mechanisms that are believed to control the system to a level of detail and accuracy that is sufficient to satisfy the objectives of the model. Empirical models are often used instead of mechanistic models in situations where the system is not well understood, too complex, difficult to quantify ∗ Corresponding author. Tel.: +49-641-9935315; fax: +49-641-9935309. E-mail address:
[email protected] (C. Müller).
logically, and has a high degree of variability. Empirical models describe the behaviour of the system on the basis of curve fitting or regression analysis procedures on experimental data. The limitation of this approach is that the subsequent model is restricted within the boundaries for which the equations were derived. An increasingly new simulation approach is the application of neurocomputing or artificial neural networks (ANNs). Artificial neural networks are sophisticated pattern recognition systems that operate by mathematically mimicking the biological human learning process (i.e. learning by experience) where they can extract and learn the hidden relationships between system inputs and resulting outputs (Jain and Mao, 1996). Neural networks learn the relationships in data by iterative optimization techniques, whereby they attempt to minimize the error between measured system response variables and the response computed by the network. Once a network has been trained to
0304-3800/$ – see front matter © 2003 Elsevier B.V. All rights reserved. doi:10.1016/j.ecolmodel.2003.10.010
190
M. Ryan et al. / Ecological Modelling 175 (2004) 189–194
recognize patterns, it can then be used to classify new patterns of data according to its knowledge of existing relationships. Artificial neural networks are composed of basic processing elements called neurons (nodes) that are designed to mimic the general behaviour of biological neurons (nerve cells). Each artificial neuron contains input channels, an activation function, and an output that is intended to replicate the synapse, dendrite, soma, and axon of the biological neuron. The grouping of the individual neurons, their configuration, the interconnections between the neurons, the weightings along these connections, and the learning algorithms employed is what makes up a functioning neural network (Jain and Mao, 1996). The use of ANNs in the natural sciences so far has been mainly restricted to the physical sciences, such as in hydrological studies (Hsu et al., 1995; Koekkoek and Booltink, 1999; Anmala et al., 2002; Xing, 2000). The objective of this paper is to evaluate the potential use of ANNs as a simulation tool for complex biological systems. In this study, we used an ANN to simulate nitrous oxide (N2 O) emissions from temperate grassland in New Zealand. This is a good example of a complex biological system as it fits the criteria of being affected by a number of interacting variables and is also subject to a high degree of natural variation. Nitrous oxide is mainly produced by microbial processes (nitrification and denitrification) in terrestrial ecosystems (Conrad, 1996). The production of N2 O is controlled by various interacting variables, such as soil moisture content, soil temperature, and soil nitrate (NO3 − ) and ammonium (NH4 + ) concentrations (Haynes and Sherlock, 1986; Granli and Bøckman, 1994), and is therefore ideally suited for simulation with an ANN.
2. Data set Data used in this simulation exercise consisted of combining the collective data sets from two separate studies (Ryan, 2002; Müller, 1996) conducted under similar environments in New Zealand. This represented a total of just under 2400 values of measured and interpolated daily soil N2 O emission data from two different soil types, varying soil chemical treatments, and seasons of the year. In addition to the daily
soil N2 O emission data, six input variables that were measured in situ or interpolated between and from the measured values were used as input variables for the model. These were: daily rainfall, soil volumetric moisture content, soil temperature, soil NH4 + concentration, soil NO3 − concentration, and total soil mineral nitrogen content.
3. Development of the artificial neural network Development of the ANN was done using the software package NeuroShell 2TM (Ward Systems Group, Inc., Frederick, MD, USA). The network architecture selected for this study consisted of the general regression neural network (GRNN), which is one of the in-built network architectures within NeuroShell 2TM . The GRNN is a three-layered network consisting of an input layer, a hidden layer, and an output layer. In this study, the input layer of the network consisted of six neurons representing each of the six input variables (i.e. mean daily rainfall, mean daily soil temperature, daily soil moisture content, daily soil NH4 + content, daily soil NO3 − content, and daily total soil mineral nitrogen content), a hidden layer consisting of one neuron for each (1662 training patterns were used in this study) training pattern, and an output layer of just one neuron for the output variable of the daily amount of N2 O emitted from the soil. One input training pattern encompassed the data for the N2 O flux, rainfall, soil temperature, soil moisture content, soil NH4 + concentration, soil NO3 − concentration, and total soil mineral nitrogen concentration for a given day. Preparation of the data set (pattern file) consisted of first dividing it into three sections: (i) a training data set (70% of total data set), (ii) a test data set (15% of total data set), and (iii) a validation data set (15% of total data set). This was done by NeuroShell 2TM where patterns of data were randomly extracted from the complete pattern file and incorporated into each of the three sections. Before being presented to the network, all of the data were first normalized by natural log (ln) transformation and then scaled to a numeric range of −1 to 1 using a Tanh scaling function. This was done to convert all variables loaded into the network into a common numeric range that the neural network could deal with effectively, and also to reduce the effect of ‘outliers’ in the data.
M. Ryan et al. / Ecological Modelling 175 (2004) 189–194
Training of the network was done by presenting the network with the extracted training and test data sets from which the network could learn from and calibrate itself. Once the optimal net architecture had been found, the network was applied to the whole data set to get an indication of the general fit of the model to the data. The network was then applied to the validation data set (data it had not seen before) to evaluate
191
its accuracy in predicting daily N2 O emissions from just the six input variables provided.
4. Results The neural network’s ability to fit to the observed training data set was generally very good (Fig. 1).
Fig. 1. Top panel: Measured daily soil N2 O flux from field experiments vs. the values calculated from the artificial neural network. Bottom panel: Linear regression of ANN simulated values vs. observed daily soil N2 O fluxes from the field.
192
M. Ryan et al. / Ecological Modelling 175 (2004) 189–194
A linear regression of the model output against the observed values produced a coefficient of determination (R2 ) of 92%, with the results being statistically the same (P < 0.01) (Fig. 1). In addition, the total sum of squares (Rssq ) for the comparison between the modeled and observed values, which provides a measure of the lack of fit of the model, was calculated at 469 g N2 O-N ha−1 or ±0.77% of the measured data. This was well within the range of the calculated uncertainties (CV = 10–43%) of the measured N2 O emissions in the field. Nevertheless, the neural network still tended to underestimate N2 O emissions, particularly for fluxes in the higher range. This resulted in the network only being able to simulate 86% (52 kg N2 O-N ha−1 ) of the total amount (61 kg N2 O-N ha−1 ) of N2 O actually emitted. To gauge a trained network’s ability to predict soil N2 O emissions from just the six input variables presented to it, the validation data sets (data the network was not trained on and not previously exposed to) were used. For consistency five ANNs were developed and tested using different training, test, and validation data sets. In all cases the networks performed quite well in predicting the N2 O emissions from just the six input variables presented to them (Fig. 2). The coefficients of determination from linear regressions of observed against network predicted values ranged from 67 to 85% (R2mean = 76%). Paired t-tests showed that on average observed fluxes of N2 O and that predicted by the network were statistically (P > 0.05) the same, with the calculated Rssq showing that the N2 O values predicted by the networks being on average within ±2% of the observed values.
5. Discussion To our knowledge this is the first time that ANNs have been used to predict N2 O emissions from soils. The results show that ANN modeling is a potentially useful approach to simulating complex biological systems in soils without the need of complex parameter determination as used in more traditional methods, such as with mechanistic models. However, the use of ANNs should not diminish the role of mechanistic models, since ANNs are generally only superior in
Fig. 2. Measured and predicted soil N2 O emissions from five neural networks of the same architectures trained and validated on different and randomly extracted training, test, and validation data sets (R2mean = 76%).
situations where the underlying system fundamentals are poorly understood. In order to make a general comparison of the ANN approach to a mechanistic method the data
M. Ryan et al. / Ecological Modelling 175 (2004) 189–194
were run through an N2 O emission model specific to grazed pastures to New Zealand (Müller et al., 1997). Furthermore, the data (also included in the ANN data set) which were used for the development of the mechanistic model were also simulated with the DayCent model (Parton et al., 1998) Stehfest and Müller, 2004. The mechanistic model by Müller et al. (1997) and the DayCent model simulated for 12 and 418% of the measured data, respectively (Ryan, 2002; Stehfest and Müller, 2004). Therefore, the approach used in this study showed the usefulness of ANN models in extracting underlying relationships between system inputs and outputs that are often very difficult to model with a mechanistic approach. If the mechanisms of a system are well characterized, the mechanistic modeling approach is preferred. This is because a well-designed mechanistic model is more likely to make more accurate predictions over a wider range of changing conditions, and not limited by the conditions the model was originally developed under (Müller, 2000). Alternately, for an ANN to be this flexible across environments it would require large training data sets that would encompass all the possible different environmental scenarios. However, often these data are not available or impractical to obtain. If, however, the data are available, ANNs have the advantage that they can be rapidly developed to accommodate the many different data patterns or scenarios that can occur in natural systems. For instance, the ANN trained in this study accommodated N2 O fluxes from eight different treatments with respect to soil type, nitrogen application rate, season of nitrogen application, and other soil amendments applied, and it could easily be retrained to accommodate many more. Thus, the greater the variation in the data the network is exposed to, the more robust the ANN model becomes (Park and Vlek, 2002). In conclusion, this study has shown that the ANN modeling approach can be an attractive complement or alternative to other modeling methodologies due to its scope and flexibility of use. The main advantage is that large data sets can be quickly processed and relationships extracted from highly variable time series. Therefore, ANNs can be a very useful tool in utilizing large databases, which previously were regarded as difficult to analyze in a qualitative
193
manner due to the inherent randomness of natural systems. References Anmala, J., Zhang, B., Govindaraju, R.S., 2002. Comparison of ANNs and empirical approaches for predicting watershed runoff. J. Water Resour. Plann. Manage. 128, 381–381. Conrad, R., 1996. Soil microorganisms as controllers of atmospheric trace gases (H2 , CO, CH4 , N2 O, and NO). Microb. Rev. 60, 609–640. Elliot, J.A., de Jong, E., 1993. Prediction of field denitrification rates: a boundary line approach. Soil Sci. Soc. Am. J. 157, 82–87. Focht, D.D., 1974. The effect of temperature, pH and aeration on the production of nitrous oxide and gaseous nitrogen—a zero-order kinetics model. Soil Sci. 118, 173–179. Froling, S.E., Mosier, A.R., Ojima, D.S., Li, C., Parton, W.J., Potter, C.S., Priesack, E., Stenger, R., Haberbosch, C., Dörsch, P., Flessa, H., Smith, K.A., 1998. Comparison of N2 O emissions from soils at three temperate agricultural sites: simulations of year-round measurements by four models. Nutr. Cycl. Agroecosyst. 52, 77–105. Granli, T., Bøckman, O.C., 1994. Nitrous oxide from agriculture. Norwegian J. Agric. Sci. (Suppl. 12), 1–128. Grant, R.F., 1995. Mathematical modelling of nitrous oxide evolution during nitrification. Soil Biol. Biochem. 27, 1117– 1125. Grant, R.F., Nyborg, M., Laidlaw, J.W., 1993. Evolution of nitrous oxide from soil: I. Model development. Soil Sci. 156, 259– 264. Haynes, R.J., Sherlock, R.R., 1986. Gaseous losses of nitrogen. In: Haynes, R.J. (Ed.), Mineral Nitrogen in the Plant-Soil System. Academic Press, Orlando, FL, pp. 242–285. Hsu, K., Gupta, H.V., Sorooshian, S., 1995. Artificial neural network modelling of the rainfall-runoff process. Water Resour. Res. 31, 2517–2530. Jain, A.K., Mao, J., 1996. Artificial neural networks: a tutorial. In: Computer. pp. 31–44. Koekkoek, E.J.W., Booltink, H., 1999. Neural network models to predict soil water retention. Eur. J. Soil Sci. 50, 489–495. Li, C., Frolking, S., Frolking, T.A., 1992. A model of nitrous oxide evolution from soil driven by rainfall events. J. Geophys. Res. 97, 9759–9776. Müller, C., 1996. Nitrous Oxide Emission From Intensive Grassland in Canterbury, New Zealand. Tectum Verlag, Marburg. Müller, C., 2000. Modelling Soil-Biosphere Interactions. CAB International, Wallingford. Müller, C., Sherlock, R.R., Williams, P.H., 1997. Mechanistic model for nitrous oxide emission via nitrification and denitrification. Biol. Fertil. Soils 24, 231–238. Park, S.J., Vlek, P.L.G., 2002. Environmental correlation of three-dimensional soil spatial variability: a comparison of three adaptive techniques. Geoderma 109, 117–140. Parton, W.J., Hartman, M.D., Ojima, D.S., Schimel, D.S., 1998. DAYCENT and its land surface submodel: description and testing. Global Plann. Change 19, 35–48.
194
M. Ryan et al. / Ecological Modelling 175 (2004) 189–194
Potter, C.S., Matson, P.A., Vitousek, P.M., Davidson, E.A., 1996. Process modeling of controls on nitrogen trace gas emissions from soils worldwide. J. Geophys. Res. Atmos. 101, 1361– 1377. Ryan, M., 2002. Manipulating Nitrogen Dynamics in Grazed Dairy Pasture Soils to Mitigate Nitrous Oxide Emissions. Lincoln University, New Zealand.
Stehfest, E., Müller, C., 2004. Simulation of N2 O emissions from an urine-affected pasture in New Zealand with the ecosystem model DayCent. J. Geophys. Res. 109, 2003 JD 004261, in press. Xing, Z.A., 2000. Mapping soil landscape as spatial continua: the neural network approach. Water Resour. Res. 36, 663– 677.