Artificial Neural Networks (ANN) refers to a large group of computational models inspired by biological neural networks, particularly the brain, that uses extensive interconnected networks of neurons to process information. Similarly, Artificial Neural Networks can be used as a modelling technique to predict biodiversity distribution, using the relationship and connections of a set of layers (Figure 1). Typically, it comprises three main types of layers:
1) an input layer of independent predictor variables that are fed into the model,
2) several hidden layers, consisting of a linear combination of the input layer; and
3) output layers, comprising response variables, which represent the results of the model.
We focus here on single hidden layer feed-forward Artificial Neural Networks that are trained by back-propagation, which are the most used ANNs in ecology.
The input layer consists of the environmental data put in the model, with each input node representing one environmental variable. The variables can either be continuous or categorical. The information from each node in the input layer is fed into the hidden layer (Figure 2). The connections between the nodes in the input and hidden layer can all be given a specific weight based on their importance. These weights are usually randomly assigned at the start of the model, but the model can learn and optimize the weights in subsequent runs in the back-propagation process. The higher the weight of a connection, the more influence that input node has.
The nodes in the hidden layer comprise different combinations of environmental variables on a linear combination, where the input is multiplied by the weight of the connection and summed. This calculation is done for each node in the hidden layer. The weighted sums in each hidden layer node are passed into an ‘activation function’, which transforms the weighted input signal into an understandable output signal. There are different forms of activation functions, the most used is the logistic function, which produces a sigmoid curve with an outcome between 0 and 1. The result is then passed to the output layer (Figure 2). Like the input and hidden layers, the connections between the hidden layers and the output layer are weighted. Thus, the output results from the weighted sum of the hidden nodes. In a species distribution model, the output layer predicts whether a species will be present or absent in each location.
As part of the model training, the output is compared to the desired output (Figure 2). In a species distribution model, the desired output is the known occurrence locations and the environmental conditions of those locations. The difference between the predicted outcome of the model and the desired outcome is the model's error, which can improve the model in the back-propagation process. Here, the weight of each connection is multiplied by the difference between the model and the desired output (Figure 2). Based on these new weighted connections, the nodes in the hidden layer can adjust the weights of the connections to the input layer. After adjusting the weights, the mode recalculates the output in a feed-forward way, from the input layer through the hidden layer to the output. This process is repeated several times until the model reaches a pre-defined accuracy or a maximum set number of runs.
- High predictive power
- Able to handle large datasets
- Able to model non-linear associations between the response and the predictors
- Sensitive to missing data and outliers
- Less efficient in handling data of ‘mixed types’
No formal distributional assumptions (non-parametric).
Requires absence data
BCCVL uses the ‘nnet’ package, implemented in biomod2. The user can set the following configuration options:
ratio of absence to presence points
strategy to generate pseudo-absence points: random; SRE (in sites with contrasting conditions to presences); disk (within a minimum and maximum distance from presences
pseudo-absence SRE quantile
quantile used for 'SRE' pseudo-absence generation strategy; default is 0.025
pseudo-absence disk maximum distance (m
maximum distance (m) to presences for 'disk' pseudo-absence generation strategy
weighted response weights (prevalence)
allows to give to ; default = NULL: each observation (presence or absence) has the same weight; if value <; 0.5: absences are given more weight; if value >; 0.5: presences are given more weight
number of cross-validations ()
number of cross-validations to find the best size and decay parameters
number of units in the hidden layer; default = NULL: size will be optimised by cross-validation based on model AUC
parameter for weight decay; default = NULL: decay will be optimised by cross-validation based on model AUC
initial random weights (rang)
initial random weights
maximum number of iterations ()
maximum number of iterations
random seed used
pseudo-absence disk minimum distance (m)
minimum distance (m) to presences for 'disk' pseudo-absence generation strategy
ANN in R
BIOMOD_ModelingOptions(GLM = NULL,
GBM = NULL,
GAM = NULL,
CTA = NULL,
ANN = NULL,
SRE = NULL,
FDA = NULL,
MARS = NULL,
RF = NULL,
MAXENT.Phillips = NULL)
// Specify ANN parameters
- Franklin J (2010) Mapping species distributions: spatial inference and prediction. Cambridge University Press.
- Lek S, Guégan JF (1999) Artificial neural networks as a tool in ecological modelling, an introduction. Ecological modelling, 120(2): 65-73.
- Olden JD, Jackson DA (2002) Illuminating the “black box”: a randomization approach for understanding variable contributions in artificial neural networks. Ecological modelling, 154(1): 135-150.
- Olden JD, Lawler JJ, Poff NL (2008) Machine learning methods without tears: a primer for ecologists. The Quarterly review of biology, 83(2): 171-193.
- Wilfried Thuiller, Damien Georges, Maya Gueguen, Robin Engler and Frank Breiner (2021). biomod2: Ensemble Platform for Species Distribution Modeling. R package version 3.5.1. https://CRAN.R-project.org/package=biomod2
Deneu, B., Servajean, M., Bonnet, P., Botella, C., Munoz, F., & Joly, A. (2021). Convolutional neural networks improve species distribution modelling by capturing the spatial structure of the environment. PLoS computational biology, 17(4), e1008856.
Zhang, C., Chen, Y., Xu, B. et al. Improving prediction of rare species’ distribution from community data. Sci Rep 10, 12230 (2020). https://doi.org/10.1038/s41598-020-69157-x