ArticlePDF Available

Abstract and Figures

Meteorological conditions are the main driving variables for mycotoxin-producing fungi and the resulting contamination in maize grain, but the cropping system used can mitigate this weather impact considerably. Several researchers have investigated cropping operations’ role in mycotoxin contamination, but these findings were inconclusive, precluding their use in predictive modeling. In this study a machine learning (ML) approach was considered, which included weather-based mechanistic model predictions for AFLA-maize and FER-maize [predicting aflatoxin B 1 (AFB 1 ) and fumonisins (FBs), respectively], and cropping system factors as the input variables. The occurrence of AFB 1 and FBs in maize fields was recorded, and their corresponding cropping system data collected, over the years 2005–2018 in northern Italy. Two deep neural network (DNN) models were trained to predict, at harvest, which maize fields were contaminated beyond the legal limit with AFB 1 and FBs. Both models reached an accuracy >75% demonstrating the ML approach added value with respect to classical statistical approaches (i.e., simple or multiple linear regression models). The improved predictive performance compared with that obtained for AFLA-maize and FER-maize was clearly demonstrated. This coupled to the large data set used, comprising a 13-year time series, and the good results for the statistical scores applied, together confirmed the robustness of the models developed here.
Content may be subject to copyright.
fmicb-12-661132 April 3, 2021 Time: 10:58 # 1
published: 09 April 2021
doi: 10.3389/fmicb.2021.661132
Edited by:
Alicia Rodríguez,
University of Extremadura, Spain
Reviewed by:
Alejandro Hernández,
University of Extremadura, Spain
Naresh Magan,
Cranfield University, United Kingdom
Paola Battilani
Specialty section:
This article was submitted to
Food Microbiology,
a section of the journal
Frontiers in Microbiology
Received: 30 January 2021
Accepted: 16 March 2021
Published: 09 April 2021
Camardo Leggieri M, Mazzoni M
and Battilani P (2021) Machine
Learning for Predicting Mycotoxin
Occurrence in Maize.
Front. Microbiol. 12:661132.
doi: 10.3389/fmicb.2021.661132
Machine Learning for Predicting
Mycotoxin Occurrence in Maize
Marco Camardo Leggieri, Marco Mazzoni and Paola Battilani*
Department of Sustainable Crop Production, Università Cattolica del Sacro Cuore, Piacenza, Italy
Meteorological conditions are the main driving variables for mycotoxin-producing
fungi and the resulting contamination in maize grain, but the cropping system used
can mitigate this weather impact considerably. Several researchers have investigated
cropping operations’ role in mycotoxin contamination, but these findings were
inconclusive, precluding their use in predictive modeling. In this study a machine
learning (ML) approach was considered, which included weather-based mechanistic
model predictions for AFLA-maize and FER-maize [predicting aflatoxin B1(AFB1) and
fumonisins (FBs), respectively], and cropping system factors as the input variables. The
occurrence of AFB1and FBs in maize fields was recorded, and their corresponding
cropping system data collected, over the years 2005–2018 in northern Italy. Two deep
neural network (DNN) models were trained to predict, at harvest, which maize fields
were contaminated beyond the legal limit with AFB1and FBs. Both models reached an
accuracy >75% demonstrating the ML approach added value with respect to classical
statistical approaches (i.e., simple or multiple linear regression models). The improved
predictive performance compared with that obtained for AFLA-maize and FER-maize
was clearly demonstrated. This coupled to the large data set used, comprising a 13-year
time series, and the good results for the statistical scores applied, together confirmed
the robustness of the models developed here.
Keywords: aflatoxins, Aspergillus flavus, cropping system, deep learning, Fusarium verticillioides, fumonisins,
predictive models
Mycotoxin contamination of maize is a major concern worldwide (Eskola et al., 2020). The
colonization of maize ears by Aspergillus section Flavi and Fusarium spp. can lead to ear rots whose
impact on the amount of grain yield is minor or negligible yet their mycotoxin contamination levels
are high; therefore, the mains impact of mycotoxin producing fungi in maize regards grain safety
and its compliance with the legal limits. Concerning those mycotoxins produced by Aspergillus
section Flavi, among the aflatoxins (AFs), aflatoxin B1(AFB1) is classified by IARC (International
Agency for Research on Cancer) as a class-1A, human carcinogen. Such AFs were first detected in
Italy in the early 2000s (Piva et al., 2006;Battilani et al., 2008a), but since 2012 they have spread
all over southeastern Europe, presumably aided by warmer and drier conditions during summer
attributed to ongoing climate change (Dobolyi et al., 2013;Levic et al., 2013;Battilani et al., 2016),
and their incidence and severity can vary markedly among years. Fusarium spp. can produce a
wide range of mycotoxins, of which the fumonisins B1, B2, and B3(FBs)—predominantly produced
by F. verticillioides—are the key ones reported in maize grain worldwide, thus posing a serious
risk of possible human carcinogenicity (IARC, 1993). Other mycotoxins produced by Fusarium
genus are the trichothecenes (TCTs) and zearalenone (ZEN), these being prevalent in temperate
Frontiers in Microbiology | 1April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 2
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
and wet areas especially in rainy years, optimal conditions for
their main producer, F. graminearum (Pietri et al., 2004).
These main mycotoxins threaten the maize supply chain
worldwide, in all producing areas; nevertheless, the prevailing
mycotoxin and level of contamination depends both on the
growing area and year, intended as the meteorlogical conditions
occurring during the crop growing season (Logrieco et al.,
2021). Support for farmers coming from predictive modeling,
using meteorological data as input variables (Battilani, 2016),
has been pursued in Europe in the form of two mechanistic
models for AFB1and FBs predictions: respectively, AFLA-maize
(Battilani et al., 2013) and FER-maize (Battilani et al., 2003).
They both aim to predict the risk of contamination above current
legal limits in force in Europe (European Commission, 2006b,
2007), and they strongly support stakeholders in the maize chain
management (Battilani and Camardo Leggieri, 2015;Battilani,
2016;Palumbo et al., 2020). However, mounting uncertainty
of climate conditions and extreme events, often emphasized as
issues in climate change, has recently increased the importance of
deriving reliable predictions at the farm level (Camardo Leggieri
et al., 2020a). Addressing the variability in mycotoxin occurrence
among years and geographic areas, even those quite close to
each other, in addition to the emerging issue of co-occurring
mycotoxins (Camardo Leggieri et al., 2019;Giorni et al., 2019),
will require making reliable predictions to support the maize
chain management.
Weather variables are the leading factors contributing to
mycotoxin occurrence, but the cropping system used is a
powerful tool of farmers to mitigate grain contamination.
Accordingly, several authors have studied the role of the cropping
system and the rationale behind its impact on mycotoxin
contamination (Munkvold, 2003;Battilani et al., 2008a;Blandino
et al., 2009;Kos et al., 2013;Palumbo et al., 2020). A rationale
crop rotation, leaving the land fallow (unsown with maize),
is recommended to reduce mycotoxin contamination in maize
fields, even if the impact on it cannot be readily demonstrated,
especially in intensive maize-growing areas (Guo et al., 2005;
Marocco et al., 2008;Munkvold, 2014). A significant impact of
the season length of maize hybrids, frequently reported as FAO
class (Food and Agriculture Organization classification), upon
FBs and AFB1contamination was reported (Pietri and Bertuzzi,
2012). Scientist do not all agree on this statement (Battilani et al.,
2008a;Mazzoni et al., 2011), but the number of days elapsed
from sowing to harvest was positively related to mycotoxin
contamination (Battilani et al., 2008a;Torelli et al., 2012). The
sowing date has been confirmed to influence the likelihood and
extent of mycotoxin contamination (Jones, 1981;Alma et al.,
2005), with late sowing generally associated with a higher content
of mycotoxins at harvest (Alma et al., 2005;Blandino et al.,
2009;Mazzoni et al., 2011). Nonethless, irrigation has a strong
impact as well, particularly upon AFs occurrence (Palumbo et al.,
2020). Both the severity of European corn borer (ECB) (Jones,
1981) and the use of insecticide treatments may also significantly
affect contamination, especially from FBs (Alma et al., 2005;
Saladini et al., 2008;Mazzoni et al., 2011). Harvest time, or rather
the kernel moisture at harvest, can also be crucial, notably for
AFs contamination of maize (Munkvold, 2003;Battilani et al.,
2008a); in fact, AFs production increases significantly from maize
physiological maturity, when kernel moisture is lower than 28–
30% (Payne et al., 1988;Giorni et al., 2016). Therefore, delays
in maize harvest after that stage means giving the fungus time
to efficiently increase the contamination. Then, keep kernel
moisture below 14% is mandatory in the postharvest stages, from
drying to the whole storage period (Danso et al., 2018).
The above research findings have contributed to developing
guidelines for mitigating mycotoxin contamination, but
a quantitative evaluation of cropping system’s impact on
mycotoxins remains an unresolved issue. The little work done
so far to predict the effect of cropping system on mycotoxin
contamination (Battilani et al., 2008b;Camardo Leggieri et al.,
2015) is neither complete nor satisfactory; however, it does clarify
that cropping factors cannot be considered in isolation and that
applying conventional statistical methods is not suitable for the
task (Battilani, 2016;Palumbo et al., 2020). Hence, alternative
approaches should be explored and possibly used.
Machine learning’s emergence, alongside big data technologies
and high-performance computing, introduces new opportunities
for data-intensive science in precion farming and sustainable
agriculture (Liakos et al., 2018). ML is the scientific field in
which machines are trained to learn without being strictly
programmed (Samuel, 2000), which has three main categories:
(1) supervised learning (SL), (2) unsupervised learning (UL),
and (3) reinforcement learning (RL). The SL algorithms use a
training data set of labeled data to infer a function that is used
to map new data. The UL algorithms directly look at the data
and learn patterns from them, without human supervision. Last
is RL, the ML branch in which entities called “software agents”
take action, in a specific context, to optimize a given function.
These ML approaches are increasingly applied in different subject
areas to solve complex problems, often those with many factors
involved, to which agriculture is no exception. In fact, ML is
used in a variety of contexts and all the three main categories
are now applicable (Liakos et al., 2018;Elavarasan and Vincent,
2020). Recently, Liakos et al. (2018) reviewed the ML approach
in agriculture, highlighting that ML models had been applied
in the multi-disciplinary agri-technologies domain for crop
management (61%), yield prediction (20%), and disease detection
(22%), but never accounting specifically for mycotoxins’ co-
occurrence. In crop yield prediction, which depends on many
different factors operating simultaneously, deep neural networks
(DNN), a type of artificial neural network (ANN) for SL models,
are the most used (Khaki and Wang, 2019;Khaki et al., 2019;
Nevavuori et al., 2019;Niedbała, 2019). DNNs are also very useful
for plant disease identification, which is done via convolutional
neural networks (CNN), which is a specific DNN-architecture
used for image recognition (Boulent et al., 2019). Mycotoxins are
mainly detected via high-performance liquid chromatography
(HPLC) and mass spectrometry; however, DNNs coupled with
rapid analytical tools, such as the electronic nose or infrared
attenuated total reflection spectroscopy, have been recently
applied and found to improve the assessment reliability (Evans
et al., 2000;Jia et al., 2019;Öner et al., 2019;Camardo Leggieri
et al., 2020b).
Torelli et al. (2012), in the first example of ML applied to
mycotoxins, performed a 2-year study (2007–2008) that included
seven cropping system variables—FAO class, sowing and harvest
Frontiers in Microbiology | 2April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 3
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
dates, crop duration, kernel moisture, ECB treatment, and
irrigation—as input for an ANN to classify maize samples based
on their contamination with FBs. A fair correlation between
the predicted and observed contaminated samples was reported
(R2= 0.67 and R2= 0.57, respectively, for the training and
validation data sets), so the approach seems promising.
Therefore, this study aimed to develop ML models by
combining the AFLA-maize and FER-maize predictions, together
with cropping system information, as input to improve the
mycotoxin risk predictions for AFB1and FBs. For this, A 13-year
data set was considered and two ML models, one for each type of
mycotoxin, were trained and validated (5-fold cross-validation)
and their respective performance discussed.
Data Collection
The data used in this study came from several surveys managed
in the Emilia Romagna region (northern Italy) during 2004–2018,
partially published (Battilani et al., 2013;Camardo Leggieri et al.,
2015, 2020b). The protocol for data collection was the same both
for the published and unpublished data.
Briefly, meteorological data were downloaded from the
Emilia Romagna meteorological service, available on request for
research applications. They were based on a grid of squares, each
5 km wide, that encompassed the Emilia Romagna territory; all
sources (both meteorological stations and radar) are interpolated
for each square, to deliver reliable data (Bottarelli and Zinoni,
2002). Hourly data on air temperature (T, C), relative humidity
(RH, %), and rain (R, mm), during the period of January through
September, were downloaded. These squares were filtered, to
locare those corresponding to the maize field site sampled.
Maize fields sampling was performed at harvest, managed
between mid August and September, during the combine
machine discharge, according to European Commission
Regulation (EU) 401/2006 (European Commission, 2006a).
Relevant cropping system data were collected in each
georeferenced field, based on a questionnaire filled by farmers,
supported by extension services. Empirical information
of different site variables were collected: the type of soil
(percentages of sand, clay, and silt), maize hybrid FAO class,
preceding crop, type of tillage, sowing date, plants per m2, silk
emission date, harvest date, damage caused by hail or wind
and ECB, fertilization type and dose, the number of irrigation
intervention with relative volumes of water used, pest and disease
control practices, and kernel moisture at harvest. Mycotoxin
analysis was performed for all the sampled fields according to
Bertuzzi et al. (2012) for the AFs [limit od detection (LOD): 0.05
µg/kg and limit of quantification (LOQ): 0.15 µg/kg], and by
following Pietri and Bertuzzi (2012) for the FBs (LOD: 10 µg/kg
and LOQ: 30 µg/kg).
Data Processing
AFB1and FBs content allowed in maize grain, according to
legal limits, were used as a threshold to separate the field
samples in two classes: (1) contaminated, consisting of those
samples equal or exceeding the respective legal limit; (0) non-
contaminated comprising all samples below the legal limit.
Thresholds were therefore set to 5 µg/Kg for AFB1and 4,000
µg/Kg for FBs (FB1+FB2), the legal limits currently set by
the European Commission for unprocessed maize destined for
human consumption (European Commission, 2006b, 2007).
Meteorological data were used as input for the two predictive
models, AFLA-maize and FER-maize, and cumulative risk
indexes were obtained as the output, AFI for AFB1and FK for
FBs, for each station and year. DNN models were implemented
within the frame of Scikit-Learn (v0.21.3) in the Python module
library (Pedregosa et al., 2011).
Input Features
After the exclusion of those variables with many missing data
points, eight different variables were considered as input for the
ML approach; sowing date and harvest date were grouped on
a per week basis. Of these eight, five variables were categorical
(maize hybrid FAO class, preceding crop, sowing week, harvest
week, ECB damage; Table 1) and three were continuous variables
(growing days, days from crop sowing to harvest, calculated
variable, kernel moisture at harvest, and mycotoxin cumulative
indices AFI and FK, the output of predictive models).
For each continuous variable, its average (µ) and standard
deviation (σ) were computed for the data standardization, using
Eq. (1).
TABLE 1 | Summary of categorical data used for the two pathosystems analyzed:
A. flavus-maize and F. verticilloides-maize.
Variable N. of categories Categorical value Integer
Maize hybrid FAO class 4 200–300 1
400 2
500 3
600–700 4
Preceding crop 3 arable crops 1
small grain 2
maize 3
Sowing week* 4 10–12 1
13–14 2
15–16 3
Harvest week* 4 32–35 1
36–37 2
38–39 3
Severity of ECB attack 3 No/Minor-damage 1
Medium damage 2
Severe damage 3
Variables (hybrid FAO classes, preceding crop, and sowing and harvest weeks of
the year (Julian date) and European corn borer [ECB] damage) and numbers of
utilized categories are reported.
*nth week of the year.
Frontiers in Microbiology | 3April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 4
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
Even if this procedure is entirely facultative in neural network
training, it is nonetheless useful for reducing the variance,
speeding up the computational process, and improving the
model’s accuracy (Jin et al., 2015).
To deal with categorical data, the integer encoding procedure
was applied. This assigns to a specific category an integer value
that ranges from 1 to N, where N is the last category.
Deep Neural Network (DNN)
A typical ANN consists of a network of connected computational
units called neurons; these units are organized in layers, with
input data passing through the network, and an activation
function used to produce an output. DNNs are a particular
class of ANNs in which, between the input and the output
layer, there is an arbitrary number of hidden layers. The fully
connected architecture has been adopted, meaning that each
neuron in each layer is connected to each neuron in the
next adjacent layer.
The development of a DNN model is a two-step process:
(i) training and (ii) validation. The final aim of the training is
to minimize a given error function by using an optimization
algorithm. The training phase ends when the error converges
to a pre-determined value, or when it does not decrease for
a specific number of cycles, both decided a priori by the
user (Camardo Leggieri et al., 2020b). A “batch training”
mode was applied in this work. Briefly, during the training
phase, training data (i.e., the mycotoxin contamination data
in this study), were split into subgroups called batches. Neural
network weights are updated when every sample inside a
batch passes through the network. The iteration ends when all
batches have passed through the network. After each iteration,
a penalization term, called the weight decay (L2 regularization
term), is introduced into the model to avoid overfitting the
model to the data.
The final output is the result of a linear or non-linear
activation function. In our study, a non-linear activation function
between the input layer and the hidden layers, called Rectified
Linear Unit (ReLU, Eq. 2), was applied:
where, xrepresents the weighted sum in a given input to a neuron
(Dahl et al., 2013;Zeiler et al., 2013;LeCun et al., 2015).
The activation function used between the last hidden layer and
the output layer (classification function) took the logistic form
(Eq. 3):
where, jis relative to the jth output neuron, and irepresents the ith
input neuron. The numerical result is between 0 and 1, for which
0.5 served as a threshold to discriminate between the positive and
negative classes.
Different DL models were tested following a grid search
procedure, done as described in Camardo Leggieri et al. (2020b).
Briefly, each hyperparameter was tested with a combination of
every other hyperparameter. The hyperparameters tested were
weight decay, number of hidden layers, number of neurons per
hidden layer, and the optimization algorithm. In this work, two
algorithms where tested; the first approximates the Broyden–
Fletcher–Goldfarb–Shanno algorithm and is called LBFGS (Byrd
et al., 1995;Kingma and Ba, 2014), while the second is an
optimization of the classical stochastic gradient descent, called
Adam (Kingma and Ba, 2014). Matthew’s correlation coefficient
(MCC) and accuracy were used as metrics to select the best
combination of hyperparameters, for both NN models relevant
to the pathosystem A. flavus-maize (DNN-A. flavus-maize) and
F. verticillioides-maize (DNN-F. verticilloides-maize).
DNN Validation
As in Camardo Leggieri et al. (2020b), both AFB1and FBs
original datasets were splitted into two “sub-dataset.” These four
“sub-datasets” (two for AFB1and two for FBs) were generated by
random sampling, but keeping the proportion of contaminated
vs. non-contaminated samples constant. The first “sub-data set”
accounted for 75% of the original data set and was used to
perform a 5-fold cross-validation (CV). The other, called the
“blind set” in this work, accounted for the rest of the original
data set (25% of the original data set), and was used for a
further validation of the models. The goodness-of-fit of each
DNN-A. flavus-maize and DNN-F. verticilloides-maize model
was assessed by computing several statistical scores, which were
also applied to the blind set:
True positive and true negative rates (TPR, TNR; Kohavi
and Provost, 1998);
TN +FP (4)
where, TP and TN denote the number of true positives and
true negatives, respectively, and likewise FP and FN denote the
number of false positives and false negatives.
Positive predictive value (PPV): the PPV (Eq. 5) index
represents the proportion of positives samples identified as
true positives. It ranges from 0 to 1 (Kohavi and Provost,
TP +FP (5)
Receiver operator characteristic (ROC) curve and area under
the curve (AUC): the ROC curve and its AUC measure the
quality of a binary classifier: the higher the area under the
curve, the better the model performs. The AUC value ranges
from 0 to 1(Bradley, 1997).
The MCC (Eq. 6) is used to assess the quality of binary
classification (Matthews, 1975). This index takes into
consideration TPR, TPN, and both false discoveries (false
positives and negatives). The MCC ranges between –1
(complete disagreement between predicted and observed
values) and +1 (perfect agreement). The MCC is
considered a balanced measure, and it can be used
Frontiers in Microbiology | 4April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 5
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
TABLE 2 | Descriptive statistics of aflatoxin B1 (AFB1) and fumonisins (FBs,
intended as the sum of FB1+FB2) levels of contamination (µg/kg) in maize grain
samples collected in Emilia Romagna, Italy, over the years 2005–2018 (with some
exceptions both for AFB1and for FBs).
Data set Year N.* %positives§Mean StDev Minimum Maximum
2005 70 41.4 13.8 29.65 <0.05 154.9
2006 25 24.0 18.8 52.78 <0.05 258.3
2007 29 27.6 8.34 18.50 <0.05 68.43
2008 40 40.0 9.11 16.99 <0.05 93.79
2009 31 29.0 23.3 88.51 <0.15 494.3
2010 35 28.0 14.4 36.60 <0.05 173.3
2011 31 12.9 14.9 61.03 <0.05 334.8
2014 26 23.1 10.2 23.17 <0.15 93.77
2015 15 20.0 11.2 32.34 <0.05 129.3
2016 20 45.0 30.4 62.33 0.42 208.3
2017 28 50.0 22.3 29.15 <0.05 116.2
2018 28 25.0 5.76 13.09 <0.05 65.00
Total 378 35.54 14.66 42.59 <0.05 494.3
2009 31 16.1 2,721.93 2,423.335 139.3 8,829.7
2010 36 40.0 3,975.79 3,221.642 142.7 12,637.0
2011 30 6.67 2,344.87 3,689.235 74.0 21,007.0
2014 45 84.4 17,586.88 18,300.650 1718.4 106,053.5
2016 21 19.0 3,035.33 3,251.853 204.3 14,020.8
2017 29 13.8 2,643.91 3,107.761 <10.0 14,767.4
2018 33 21.2 3,846.22 6,298.140 51.8 29,632.7
Total 225 38.22 6,029.34 10,566.241 <10.0 106,053.5
The percentage of positive samples above the legal limits (5 and 4,000 µg/kg for
AFB1and FBs, respectively; European Commission, 2006a,2007) is reported.
*N. = number of samples collected in the year; §% of positive = % of fields with
contamination above the legal limits.
even if the two classes differ in size (Boughorbel et al.,
(TP +FP)(TP +FN)(TN +FP)(TN +FN)(6)
All the scores were computed using a home-built Python (v3.6.9)
script that implemented the equations reported above. The ROC
curves and AUCs, the grid search procedure, the MCCs, and the
DNN architecture were implemented in the framework of scikit-
learn (v0.23.2; Pedregosa et al., 2011).
The output indexes of the two mechanistic models (AFI and
FK) were used to classify the blind data set, as described in
Battilani et al. (2003) for the FBs and in Battilani et al. (2013) for
AFB1. Finally, the results were compared using the classification
obtained by the two DNNs.
A total of 378 and 225 samples were included in the A. flavus-
maize and F. verticilloides-maize data sets, respectively (Table 2).
No data were retrieved for FBs before 2009 or during 2012 and
2013. Concerning the AFB1, data for it were not retrieved for
the years 2012 and 2013. The sample sizes per year were slightly
different for the two data sets because of this missing data.
Fields with AFB1contamination above 5.0 µg/kg were found,
whose incidence and mean values differed across the considered
years. The highest amount of AFB1was found in 2009, at 494.3
µg/kg. In all years AFB1was greater than LOQ, but lower than
LOD, except in 2009, 2014, and 2016. Regarding the incidence of
fields found positive for AFB1, this was highest at 50% in 2017
and the lowest (12.9%) in 2011 (Table 2). In the whole maize data
set, for AFB1, the mean incidence of positive samples was 32.9%.
Fields with FBs’ contamination above 4,000 µg/kg were found
in all the years considered, but this incidence differed across
all years. The only year when the FBs was below the LOD was
in 2017. The highest amount of FBs (106,053.5 µg/Kg) and
the highest incidence of positive samples (89.8%) were both
detected in 2014. The lowest incidence of FBs was 6.7%, scored
in 2011 (Table 2). Considering the FER-maize data set as a whole,
the overall mean incidence of positive samples, above the legal
limit, was 32.2%.
Means and standard deviations computed for AFI and FK, the
kernel moisture, and the growing days, are reported in Table 3.
Categorical data were grouped into three or four categories
(Table 1). The FAO class was represented by four categories:
200–300, 400, 500, and 600–700. The preceding crop was
represented by three categories: arable crops, small grain, and
maize. The sowing and harvest weeks both accounted for
four categories. Considering the sowing week, category #1 was
assigned to weeks 10–12 of the year, #2 to weeks 13–14,
#3 to weeks 15–16 and #4 to week 17. For the harvest
week, those weeks of the year from 32 to 35 were designated
category #1, and likewise 36–37 to # 2, 38–39 to #3, with all
weeks >40 assigned to #4. The damage caused by ECB was
divided into three categories: no damage and small damage
were grouped into category #1, medium damage was assigned
to category #2, and severe damage was assigned to category #3
(Camardo Leggieri et al., 2015).
Standardized continuous data were joined to categorical data,
to form the neural network’s input vector; thus, the final input
array was formed by five encoded and three continuous variables
(Tables 1 and 3), respectively.
The generation of the “sub-datasets” included a total 283
(75%) and 95 (25%) samples in the CV and blind set respectively
TABLE 3 | Basic statistics of the continuous data included as the input into the
model for the two pathosystems, A. flavus-maize and F. verticillioides-maize.
Model Variable Mean StDev Maximum Minimum
A. flavus-maize AFI index 2,906.17 2,226.792 8,944.5 11.6
Kernel moisture
20.66 3.541 31.5 11.9
Growing days 158.0 16.68 234 66
F. verticilloides-
FK index 246,407.4 626,994.91 537,8545.3 2,102.3
Kernel moisture
19.99 3.712 31.5 11.8
Growing days 156.6 16.30 207 115
Frontiers in Microbiology | 5April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 6
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
for AFB1, and 169 and 56 samples in the CV and blind set
respectively for FBs.
Deep Neural Network (DNN) Training
The two DNNs were trained to be able to predict the content of
AFB1and FBs, respectively. The NN-A. flavus-maize model was
implemented with one hidden layer consisting of 80 neurons,
a ReLU activation function, and an L2 regularization term of
0.0001. The parameters of that model were updated using the
Adam algorithm (Kingma and Ba, 2014). By contrast, the NN-
F. verticilloides-maize model’s sole hidden layer had 50 neurons, a
ReLU activation function, and an L2 regularization term of 0.1. Its
parameters were updated using the LBFGS algorithm (Byrd et al.,
1995;Table 4). The two developed NN models were validated
using both the 5-fold cross-validation and a blind data set.
DNN Validation
Cross-validation ROC curves and their relative AUCs were
computed for the two NN models, to assess the quality of
the two classifiers (Figures 1A,B). The 5-fold-cross-validation
for NN-A. flavus-maize achieved an accuracy of 66.56 ±3.381
(mean ±SE), and even higher at 78.94 for the blind data set.
An MCC of 0.10 ±0.157 and 0.49 were achieved by the cross-
validation and blind data set, respectively. The AUC and the TPR
averaged 0.58 ±0.063 and 0.08 ±0.073 during the model’s cross-
validation. The model scored an AUC of 0.64 and a TPR of 0.42
when tested against the blind data set (Table 5).
The NN-F. verticilloides-maize model’s 5-fold cross-validation
attained an accuracy of 69.63 ±10.892; the accuracy was 79.31%
using the independent data set. A TPR of 0.53 ±0.118 and
0.65 were, respectively, achieved by cross-validation and blind
data set, respectively. Moreover, the model had an AUC of
TABLE 4 | Hyperparameter values used to implement the neural networks
A. flavus-maize (NN-A. flavus-maize) and F. verticilloides-maize
(NN-F. verticilloides-maize) models.
Hyperparameter NN-A. flavus-maize NN-F. verticilloides-maize
Number of input
7 7
Number of hidden
1 1
Number of neurons
per hidden layer
80 50
Activation function
ReLU (Eq. 1) ReLU (Eq. 1)
Activation function
Logistic (Eq. 2) Logistic (Eq. 2)
L2 regularization
0.0001 1.024
Parameters update
The number of input neurons is defined as the sum of the categorical and
continuous data. The hyperparameter values were selected by following a grid
searching procedure.
0.72 ±0.103 and an MCC of 0.35 ±0.229 during the cross-
validation phase, with corresponding values of 0.75 and 0.56
when tested against the unseen data set (Table 4).
Finally, to check whether the new approach represented a
major step forward in the prediction of mycotoxin contamination
in maize, our two DNN-models were compared with two
counterpart mechanistic models, both run with the whole
available data set. The resulting confusion matrix (Table 6)
shows the performances of the NN-A. flavus-maize and NN-
F. verticilloides-maize models and those of the two mechanistic
models vis-à-vis the blind data set. The NN-A. flavus-
maize model correctly estimated about 78% of samples (14%
true positives, 64% true negatives). The wrong classification
accounted for 19% of them being underestimated and 3%
overestimated. The NN-FER-maize model correctly classified
approximately 75% of the data set (25% true positives, 50%
true negatives), with underestimations and overestimations
amounting to 15 and 11%, respectively. In stark contrast,
the AFLA-maize model correctly predicted just 53% of
samples (11% true positives, 42% true negatives). Further,
a wrong classification accounted for more underestimations
(22%) and overestimations (25%). Similarly, the FER-maize
model correctly classified only 52% of samples (31% true
positives, 20% true negatives), but its wrong classifications
included fewer (7%) underestimated cases being more prone to
overestimations (41%).
Maize is exposed to mycotoxins, which threaten human and
animal health, and represent the major non-tariff trade barrier for
agricultural products, negatively affecting the income of small-
holder farmers and disrupting regional and international trade
(Palumbo et al., 2020;Logrieco et al., 2021). Timely identification
of contaminated lots is not a trivial challenge since mycotoxin
contamination relies on several factors, including meteorology
and how farmers manage the crop during the season and in
the postharvest stages of storage and distribution (Munkvold,
2014;Logrieco et al., 2021). Different methodologies for the rapid
detection of mycotoxin contamination are currently available
(Öner et al., 2019;Camardo Leggieri et al., 2020b), but since
they are applied at harvest or postharvest stages, they offer no
support for taking preventive action and for optimizing lot use
and management. On the contrary, farmers can benefit from
model predictions of the risk of mycotoxin occurrence above the
legal limit, when delivered before or during the cropping season,
in the form of risk maps or risk indexes. Therefore, predictive
modeling has garnered mounting interest over the last two
decades (Battilani, 2016). Predictions refer to maize at harvest
and it is assumed that the postharvest management guarantee a
rapid grain drying to humidity 14%, kept stable during storage,
to avoid fungal activity and further mycotoxin production.
Meteorological factors jointly determine whether fungi can
grow and produce toxins, while the site’s cropping system
modulates the amount of contamination that ensues (Battilani
and Camardo Leggieri, 2015). The former are the driving
Frontiers in Microbiology | 6April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 7
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
FIGURE 1 | Receiver operating characteristics (ROC) curves for the independent data set for the (A) aflatoxin B1 and (B) FBs models. The solid blue lines represent
the ROCs for the two models. The goodness-of-fit of the models is conveyed as the area under the curve (AUC): the higher it is, the better the model performed. The
dotted red line represents the random prediction.
TABLE 5 | Classification results summary for the prediction of aflatoxin B1(AFB1)
and fumonisins (intended as the sum of FB1+FB2, FBs) in the maize samples.
CV Blind data set
Blind data set
ACC 66.56 ±3.381 78.94 52.63
TPR 0.08 ±0.073 0.42 0.32
TNR 0.94 ±0.053 0.96 0.63
PPV 0.59 ±0.424 0.90 0.29
MCC 0.10 ±0.157 0.49 –0.051
ACC 69.63 ±10.892 79.31 52.63
TPR 0.53 ±0.118 0.65 0.81
TNR 0.80 ±0.122 0.88 0.34
PPV 0.63 ±0.175 0.78 0.44
AUC 0.72 ±0.103 0.75 n.c.
MCC 0.35 ±0.229 0.56 0.17
The deep neural networks (DNNs) considered were evaluated using a 5-fold cross-
validation and a blind data set. Cross-validation (CV) results were reported as an
average value and related standard deviation (Avg ±Stdev).
ACC, accuracy; MCC, Matthew’s correlation coefficient; AUC, area under the
curve; TPR, true positive rate; TNR, true negative rate; PPV, positive predictive
value; n.c., not computed.
variables for predictive modeling, whereas the latter are rarely
included, especially in mechanistic models. This omission is
starting to gravely limit the reliability of predictions; in fact,
during the last two decades, the typical cropping system
has changed significantly due to the knowledge transfer
from scientists to farmers; farmers are now following the
guidelines to optimize crop management and mitigate mycotoxin
contamination, with good results so far in term of a reduced
mycotoxin occurrence. Both the meteorological data and
the cropping system data have been used before as model
inputs, to predict the content of mycotoxin in maize at the
time of its harvest (Battilani et al., 2003, 2008a;Bertuzzi
et al., 2014;Camardo Leggieri et al., 2015), yet they were
used independently and only supported by basic statistical
approaches. The aim of this study was to evaluate how
combining cropping system information with mechanistic
predictive models could support the sought-after improvement
in prediction performance.
Here an ML approach was developed using the AFLA-maize
and FER-maize outputs (mycotoxin risk indexes) combined with
cropping system information—this being known to significantly
influence mycotoxin contamination in maize according to
other studies (Palumbo et al., 2020;Logrieco et al., 2021)—as
input variables. Other crop-related variables should have been
included, like fertilization, irrigation, and pest control (Mazzoni
et al., 2011;Munkvold, 2014); however, we excluded them
because this data was largely unavailable to us. Moreover, the
geolocation of maize fields was excluded as an input variable in
our modeling; actually, even when the field location is known to
be relevant (Torelli et al., 2012;Camardo Leggieri et al., 2015), the
idea of this work was to obtain models applicable at a global level,
without geographical constraints. When combining weather data
and cropping system no information is lost, even when the maize
fields’ geolocation is excluded.
The predictions of NN-A. flavus-maize and NN-
F. verticilloides-maize, the two neural network models developed
in this study, were capable of an accuracy approaching 78%
for AFB1and 79% for FBs, with a good correlation between
TABLE 6 | Confusion matrix computed from the blind data set results for the
predicted and observed values of aflatoxin B1 (AFB1) and fumonisins (intended as
the sum of FB1+FB2, FBs). The predicted vs. observed results are
reported as percentages.
DNNs Predicted
Observed Negative Positive
AFB1Negative 65 2
Positive 19 14
FBs Negative 53 7
Positive 14 26
Mechanistic models
AFLA-maize Negative 42 25
Positive 22 11
FER-maize Negative 21 41
Positive 7 31
Frontiers in Microbiology | 7April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 8
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
predicted and observed data. This result is supported by the MCC
results, which reached values of 0.49 and 0.56 when computed
for the NN-A. flavus-maize and NN-F. verticilloides-maize, and
by their corresponding AUC of 0.64 and 0.75 for NN-A. flavus-
maize and NN-F. verticilloides-maize. Both AFLA-maize and
FER-maize, the mechanistic models which served as the starting
point of our investigation, achieved accuracies one-third lower,
of about 50%, and their respective MCC was very close to 0; this
indicates that their predictions were comparable to random one,
when based on the same data set (i.e., the blind data set) used for
NN model evaluation. It is, therefore, evident the proposed ML
approach significantly improved the prediction of mycotoxins’
content across the studied maize fields, making the successful
use of this tool to detect maize grain not compliant with the
current legal limit in Europe now more realistic and feasible to
implement. Nevertheless, the NN-F. verticillodes-maize model
performed better than NN-A. flavus-maize; apparently, it is
easier to predict levels of FBs than AFB1as contaminants. The
reason for this is not entirely clear, but the very low limit fixed
by the legislation for AFB1could surely play a role. Further,
irrigation is known to be very relevant for AFB1contamination,
and grain humidity at harvest too, but they were excluded as
input variables because of many missing data and this has surely
a considerable impact on the predictive capacity of the model.
The NN-models were developed based on a large data
set, one that included data collected from over 12 different
years, with 378 samples in the AFB1data set and 225
samples in the FBs data set. The large data sets used,
and the range of years considered, including the period of
significant changes in the cropping system, strongly support
the robustness of NN-A. flavus-maize and NN-F. verticilloides-
maize models and their promising utility as a tool to support
farmers in their decision-making. Future applications in other
pathosystems is also foreseeable, as previously done for
AFLA-maize (Kaminiaris et al., 2020).
To conclude, despite omitting some relevant cropping system
variables, a substantial improvement at correctly predicting
maize fields contaminated with mycotoxins above their legal
limits was gained. Further improvements should be obtained
by optimizing the data collection. Solving the missing data
problem might be an easy task in the future, once scientists
succeed in convincing farmers of the crucial role they can play
in such data collection and also of the added value of predictive
models in mycotoxin management. This will be a matter of
building with the maize chain stakeholders a knowledge exchange
approach and make them more involved compared to what
actually happened in the past. Another aspect of improvement
could be gleaned through our modeling approach, that of
emerging issues related to mycotoxins. The main example of
this concerns the recent report of co-occurring A. flavus and
F. verticilloides in maize ears due to climate change effects,
resulting in their complex interaction, with their dominance
alternating during the growing season (Camardo Leggieri et al.,
2019, 2020a;Giorni et al., 2019). Looking ahead, we anticipate
that elucidating the impact of these interactions between co-
existing fungi upon mycotoxin production in maize will become
crucial. Data collection to develop a joint model for the prediction
of AFB1and FBs, including the impact of fungi co-occurrence,
is ongoing and in the next future it is expected to contribute
to a step up in mycotoxin prediction, possibly joining also NN-
A. flavus-maize and NN-F. verticilloides-maize in a NN-mycotox-
maize predictive model.
The current work represents a notable step forward in
modeling and predicting mycotoxins in crops. We retrieved
evidence that ML can effectively combine cropping system data
and meteorological data, thereby improving the accuracy and
robustness of predictions. Big data is a relatively new concept
for agriculture and plant disease research and management,
but massive volumes of data with several components that
interact within the pathosystem can also be captured in this
context, and their elaboration can enhance the decision-making
process (Wolfert et al., 2017). Applying machine learning to farm
management systems is quickly evolving into a real artificial
intelligence (AI) system, providing richer recommendations and
insight for subsequent decisions and timely actions (Liakos
et al., 2018). Further research that aims to integrate automated
data recording, mycotoxin analysis, ML implementation, and
decision support systems will provide practical tools in line with
so-called “knowledge-based agriculture.” This should move us
closer toward sustainable agriculture and smart farming that also
improves food safety and quality.
The raw data supporting the conclusions of this article will be
made available by the authors, without undue reservation, to any
qualified researcher.
PB, MC, and MM contributed to the conception and design of
the study and wrote sections of the manuscript. MC organized
the database. MM performed the statistical analysis. MC and
MM wrote the first draft of the manuscript. All authors
contributed to manuscript revision, read it, and approved the
final submitted version.
This study was partially supported by the regional
government, Emilia Romagna region, “SERVICE – SistEmi
infoRmatiVi rIschio miCotossinE” (IT systems for mycotoxin
risk) No. 5149128.
We are grateful to the Emilia Romagna meteorological web
service for providing meteorological data, to CRPV for the
project coordination and to all the farmers and technicians who
contributed to maize samples collection.
Frontiers in Microbiology | 8April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 9
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
Alma, A., Lessio, F., Reyneri, A., and Blandino, M. (2005). Relationships between
Ostrinia nubilalis (Lepidoptera: crambidae) feeding activity, crop technique
and mycotoxin contamination of corn kernel in northwestern Italy. Int. J. Pest
Manag. 51, 165–173. doi: 10.1080/09670870500179698
Battilani, P. (2016). Recent advances in modeling the risk of mycotoxin
contamination in crops. Curr. Opin. Food Sci. 11, 10–15. doi: 10.1016/j.cofs.
Battilani, P., Barbano, C., and Piva, G. (2008a). Aflatoxin B1 contamination in
maize related to the aridity index in North Italy. World Mycotoxin J. 1, 449–456.
doi: 10.3920/WMJ2008.x043
Battilani, P., and Camardo Leggieri, M. (2015). Predictive modelling of aflatoxin
contamination to support maize chain management. World Mycotoxin J.
(Special Issue Aflatoxins Maize Other Crops) 8, 161–170. doi: 10.3920/Wmj2014.
Battilani, P., Camardo Leggieri, M., Rossi, V., and Giorni, P. (2013). AFLA-
maize, a mechanistic model for Aspergillus flavus infection and aflatoxin B1
contamination in maize. Comput. Electron. Agric. 94, 38–46. doi: 10.1016/j.
Battilani, P., Pietri, A., Barbano, C., Scandolara, A., Bertuzzi, T., and Marocco, A.
(2008b). Logistic regression modeling of cropping systems to predict fumonisin
contamination in maize. J. Agric. Food Chem. 56, 10433–10438. doi: 10.1021/
Battilani, P., Rossi, V., and Pietri, A. (2003). Modelling Fusarium verticillioides
infection and fumonisin synthesis in maize ears. Aspects Appl. Biol. 68, 91–100.
Battilani, P., Toscano, P., Van der Fels-Klerx, H. J., Moretti, A., Camardo Leggieri,
M., Brera, C., et al. (2016). Aflatoxin B1contamination in maize in Europe
increases due to climate change. Sci. Rep. 6:24328. doi: 10.1038/srep24328
Bertuzzi, T., Camardo Leggieri, M., Battilani, P., and Pietri, A. (2014). Co-
occurrence of type A and B trichothecenes and zearalenone in wheat grown
in northern Italy over the years 2009-2011. Food Addit. Contam. Part B Surveill.
7, 273–281. doi: 10.1080/19393210.2014.926397
Bertuzzi, T., Rastelli, S., Mulazzi, A., and Pietri, A. (2012). Evaluation and
improvement of extraction methods for the analysis of aflatoxins B1, B2, G1
and G2 from naturally contaminated maize. Food Anal. Methods 5, 512–519.
doi: 10.1007/s12161-011- 9274-5
Blandino, M., Reyneri, A., Vanara, F., Pascale, M., Haidukowski, M., and
Campagna, C. (2009). Management of fumonisin contamination in maize
kernels through the timing of insecticide application against the European corn
borer Ostrinia nubilalis Hübner. Food Addit. Contam. Part A Chem. Anal.
Control Exposure Risk Assess. 26, 1501–1514. doi: 10.1080/02652030903207243
Bottarelli, L., and Zinoni, F. (2002). La rete meteorologica regionale. Il Divulgatore
5, 13–17.
Boughorbel, S., Jarray, F., and El-Anbari, M. (2017). Optimal classifier for
imbalanced data using Matthews Correlation Coefficient metric. PLoS One
12:e0177678. doi: 10.1371/journal.pone.0177678
Boulent, J., Foucher, S., Théau, J., and St-Charles, P. (2019). Convolutional neural
networks for the automatic identification of plant diseases. Front. Plant Sci.
10:941–941. doi: 10.3389/fpls.2019.00941
Bradley, A. P. (1997). The use of the area under the ROC curve in the evaluation
of machine learning algorithms. Pattern Recogn. 30, 1145–1159. doi: 10.1016/
Byrd, H. R., Lu, P., and Nocedal, J. (1995). A limited memory algorithm for
bound constrained optimization. SIAM J. Sci. Stat. Comput. 16, 1190–1208.
doi: 10.1137/0916069
Camardo Leggieri, M., Bertuzzi, T., Pietri, A., and Battilani, P. (2015). Mycotoxin
occurrence in maize produced in Northern Italy over the years 2009-2011: focus
on the role of crop related factors. Phytopathol. Mediterr. 54, 212–221.
Camardo Leggieri, M., Giorni, P., Pietri, A., and Battilani, P. (2019). Aspergillus
flavus and Fusarium verticillioides interaction: modeling the impact on
mycotoxin production. Front. Microbiol. 10:2653. doi: 10.3389/fmicb.2019.
Camardo Leggieri, M., Lanubile, A., Dall’Asta, C., Pietri, A., and Battilani, P.
(2020a). The impact of seasonal weather variation on mycotoxins: maize crop
in 2014 in northern Italy as a case study. World Mycotoxin J. 13, 25–36. doi:
Camardo Leggieri, M., Mazzoni, M., Fodil, S., Moschini, M., Bertuzzi, T., Prandini,
A., et al. (2020b). An electronic nose supported by an artificial neural network
for the rapid detection of aflatoxin B1 and fumonisins in maize. Food Control
123:107722. doi: 10.1016/j.foodcont.2020.107722
Dahl, G., Sainath, T., and Hinton, G. E. (2013). “Improving deep neural networks
for LVCSR using rectified linear units and dropout,” in Proceedings of the
2013 IEEE International Conference on Acoustics, Speech and Signal Processing,
Vancouver, BC.
Danso, J. K., Osekre, E. A., Opit, G. P., Manu, N., Armstrong, P., Arthur, F. H.,
et al. (2018). Post-harvest insect infestation and mycotoxin levels in maize
markets in the Middle Belt of Ghana. J. Stored Products Res. 77, 9–15. doi:
Dobolyi, C., SeböK, F., Varga, J., Kocsubé, S., Baranyi, N., Szécsi, Á, et al.
(2013). Occurrence of aflatoxin producing Aspergillus flavus isolates in maize
kernel in Hungary. Acta Aliment. 42, 451–459. doi: 10.1556/AAlim.42.2013.
Elavarasan, D., and Vincent, P. M. D. (2020). Crop yield prediction using deep
reinforcement learning model for sustainable agrarian applications. IEEE Access
8, 86886–86901. doi: 10.1109/ACCESS.2020.2992480
Eskola, M., Kos, G., Elliott, C. T., Hajšlová, J., Mayar, S., and Krska, R. (2020).
Worldwide contamination of food-crops with mycotoxins: validity of the widely
cited ‘FAO estimate’ of 25%. Crit. Rev. Food Sci. Nutr. 60, 2773–2789. doi:
European Commission (2006a). Commission regulation (EC) No 401/2006 laying
down the methods of sampling and analysis for the official control of the levels
of mycotoxins in foodstuffs. Official J. Eur. Union 70:12.
European Commission (2006b). Commission regulation (EC) No 1881/2006
setting maximum levels for certain contaminants in foodstuffs. Official J. Eur.
Union 364:5.
European Commission (2007). Commission regulation (EC) No 1126/2007
amending regulation (EC) No1881/2006 setting maximum levels for certain
contaminants in foodstuffs as reguards Fusarium toxins in maize and maize
products. Official J. Eur. Union 255:14.
Evans, P., Persaud, K., McNeish, A., Sneath, R. W., Hobson, N., and Magan,
N. (2000). Evaluation of a radial base function neural network for the
determination of wheat quality from electronic nose data. Sens. Actuators B
Chem. 69, 348–358. doi: 10.1016/S0925-4005(00)00485- 8
Giorni, P., Bertuzzi, T., and Battilani, P. (2016). Aflatoxin in maize, a multifaceted
answer of aspergillus flavus governed by weather, host-plant and competitor
fungi. J. Cereal Sci. 70, 256–262. doi: 10.1016/j.jcs.2016.07.004
Giorni, P., Bertuzzi, T., and Battilani, P. (2019). Impact of fungi co-occurrence
on mycotoxin contamination in maize during the growing season. Front.
Microbiol. 10:1265. doi: 10.3389/fmicb.2019.01265
Guo, X. W., Fernando, D., and Entz, M. (2005). Effects of crop rotation and tillage
on blackleg disease of canola. Can. J. Plant Pathol. Revue Can. Phytopathol. 27,
53–57. doi: 10.1080/07060660509507193
IARC (1993). “IARC monographs on the evaluation of carcinogenic risks to
humans,” in Some Naturally Occurring Substances: Food Items and Constituents,
Heterocyclic Aromatic Amines and Mycotoxins, ed. World Health Organization
(Lyon: IARC Press), 445–466.
Jia, W., Liang, G., Tian, H., Sun, J., and Wan, C. (2019). Electronic nose-based
technique for rapid detection and recognition of moldy pples. Sensors 19:1526.
doi: 10.3390/s19071526
Jin, J., Li, M., and Jin, L. (2015). Data normalization to acelerate training for
linear neural net to predict tropical cyclone tracks. Math. Probl. Eng. 2015, 1–8.
doi: 10.1155/2015/931629
Jones, R. (1981). Effect of nitrogen fertilizer, planting date, and harvest date
on aflatoxin production in corn inoculated with Aspergillus flavus.Plant Dis.
65:741. doi: 10.1094/PD-65- 741
Kaminiaris, M. D., Camardo Leggieri, M., Tsitsigiannis, D. I., and Battilani,
P. (2020). Afla-pistachio: development of a mechanistic model to predict
the aflatoxin contamination of pistachio nuts. Toxins 12:445. doi: 10.3390/
Khaki, S., and Wang, L. (2019). Crop yield prediction using deep neural networks.
Front. Plant Sci. 10:621. doi: 10.3389/fpls.2019.00621
Khaki, S., Wang, L., and Archontoulis, S. (2019). A CNN-RNN framework for crop
yield prediction. arXiv [preprint] arXiv:1911.09045
Frontiers in Microbiology | 9April 2021 | Volume 12 | Article 661132
fmicb-12-661132 April 3, 2021 Time: 10:58 # 10
Camardo Leggieri et al. Maize Mycotoxins and Machine Learning
Kingma, D., and Ba, J. (2014). "Adam: a method for stochastic optimization," in
Proceedings of the 3rd International Conference on Learning Representations, San
Diego, CA
Kohavi, R., and Provost, F. (1998). Glossary of terms. Mach. Learn. 30, 271–274.
doi: 10.1023/A:1017181826899
Kos, J., Mastilovi´
c, J., Jani´
c Hajnal, E., and Šari´
c, B. (2013). Natural occurrence
of aflatoxins in maize harvested in Serbia during 2009–2012. Food Control 34,
31–34. doi: 10.1016/j.foodcont.2013.04.004
LeCun, Y., Bengio, Y., and Hinton, G. E. (2015). Deep learning. Nature 521,
436–444. doi: 10.1038/nature14539
Levic, J., Gosic-Dondo, S., Ivanovic, D., Stankovi´
c, S., Krnjaja, V., Boˇ
A., et al. (2013). An outbreak of Aspergillus species in response to environmental
conditions in Serbia. Pestic. Fitomed. 28, 167–179. doi: 10.2298/PIF1303
Liakos, K. G., Busato, P., Moshou, D., Pearson, S., and Bochtis, D. (2018). Machine
learning in agriculture: a review. Sensors 18:2674.
Logrieco, A. F., Battilani, P., Camardo Leggieri, M., Haesaert, G., Jing, X., Lanubile,
A., et al. (2021). Perspectives on global mycotoxin issues and management from
MycoKey Maize working group. Plant Dis. doi: 10.1094/PDIS-06-20-1322- FE
[Epub ahead of print].
Marocco, A., Gavazzi, C., Pietri, A., and Tabaglio, V. (2008). On fumonisin
incidence in monoculture maize under notill, conventional tillage and two
nitrogen fertilisation levels. J. Sci. Food Agric. 88, 1217–1221. doi: 10.1002/jsfa.
Matthews, B. W. (1975). Comparison of the predicted and observed secondary
structure of T4 phage lysozyme. Biochim. Biophys. Acta (BBA) Protein Struct.
405, 442–451. doi: 10.1016/0005-2795(75)90109-9
Mazzoni, E., Scandolara, A., Giorni, P., Pietri, A., and Battilani, P. (2011).
Field control of Fusarium ear rot, Ostrinia nubilalis (Hubner), and
fumonisins in maize kernels. Pest Manag. Sci. 67, 458–465. doi: 10.1002/ps.
Munkvold, G. (2003). Epidemiology of Fusarium diseases and their mycotoxins
in maize ears. Eur. J. Plant Pathol. 109, 705–713. doi: 10.1023/A:102607832
Munkvold, G. (2014). “Crop management practices to minimize the risk of
mycotoxins contamination in temperatezone maize,” in Mycotoxin Reduction
in Grain Chains, eds J. F. Leslie and A. F. Logrieco (New Delhi: WileyBlackwell),
59–77. doi: 10.1002/9781118832790.ch5
Nevavuori, P., Narra, N., and Lipping, T. (2019). Crop yield prediction with deep
convolutional neural networks. Comput. Electron. Agric. 163:104859. doi: 10.
Niedbała, G. (2019). Application of artificial neural networks for multi-criteria
yield prediction of winter rapeseed. Sustainability 11:533. doi: 10.3390/
Öner, T., Thiam, P., Kos, G., Krska, R., Schwenker, F., and Mizaikoff, B. (2019).
Machine learning algorithms for the automated classification of contaminated
maize at regulatory limits via infrared attenuated total reflection spectroscopy.
World Mycotoxin J. 12, 1–10. doi: 10.3920/WMJ2018.2333
Palumbo, R., GonÇAlves, A., Gkrillas, A., Logrieco, A., Dorne, J., Dall’Asta, C.,
et al. (2020). Mycotoxins in maize: mitigation actions, with a chain management
approach. Phytopathol. Mediterr. 59, 5–28. doi: 10.14601/Phyto-11142
Payne, G. A., Hagler, W. M., and Adkins, C. R. (1988). Aflatoxin accumulation in
inoculated ears of field-grown maize. Plant Dis. 72, 422–424. doi: 10.1094/PD-
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O.,
et al. (2011). Scikit-learn: machine learning in python. J. Mach. Learn. Res. 12,
Pietri, A., and Bertuzzi, T. (2012). Simple phosphate buffer extraction for the
determination of fumonisins in masa, maize, and derived products. Food Anal.
Methods 5, 1088–1096. doi: 10.1007/s12161-011-9351-9
Pietri, A., Bertuzzi, T., Pallaroni, L., and Piva, G. (2004). Occurrence of mycotoxins
and ergosterol in maize harvested over 5 years in Northern Italy. Food Addit.
Contam. 21, 479–487. doi: 10.1080/02652030410001662020
Piva, G., Battilani, P., and Pietri, A. (2006). “Emerging issues in Southern Europe:
aflatoxins in Italy,” in The Mycotoxin Factbook, eds D. Barug and D. Bhatnagar
(Wageningen: Wageningen Academic Publishers), 139–153.
Saladini, M., Blandino, M., Reyneri, A., and Alma, A. (2008). Impact of insecticide
treatments on Ostrinia nubilalis (Hübner) (Lepidoptera: Crambidae) and their
influence on the mycotoxin contamination of maize kernels. Pest Manag. Sci.
64, 1170–1178. doi: 10.1002/ps.1613
Samuel, A. L. (2000). Some studies in machine learning using the game of checkers.
IBM J. Res. Dev. 44, 206–226. doi: 10.1147/rd.441.0206
Torelli, E., Firrao, G., Bianchi, G., Saccardo, F., and Locci, R. (2012). The influence
of local factors on the prediction of fumonisin contamination in maize. J. Sci.
Food Agric. 92, 1808–1814. doi: 10.1002/jsfa.5551
Wolfert, S., Ge, L., Verdouw, C., and Bogaardt, M. J. (2017). Big data in smart
farming – a review. Agric. Syst. 153, 69–80. doi: 10.1016/j.agsy.2017.01.023
Zeiler, M. D., Ranzato, M., Monga, R., Mao, M., Yang, K., Le, Q. V., et al. (2013).
"On rectified linear units for speech processing," in Proceedings of the 2013 IEEE
International Conference on Acoustics, Speech and Signal Processing, Vancouver,
BC, 3517-3521
Conflict of Interest: The authors declare that the research was conducted in the
absence of any commercial or financial relationships that could be construed as a
potential conflict of interest.
Copyright © 2021 Camardo Leggieri, Mazzoni and Battilani. This is an open-access
article distributed under the terms of the Creative Commons Attribution License
(CC BY). The use, distribution or reproduction in other forums is permitted, provided
the original author(s) and the copyright owner(s) are credited and that the original
publication in this journal is cited, in accordance with accepted academicpractice. No
use, distribution or reproduction is permitted which does not comply with theseterms.
Frontiers in Microbiology | 10 April 2021 | Volume 12 | Article 661132
... Predicting mycotoxin contamination through models has benefited corn production in other countries, but US corn growers, which produce the most corn in the world, have yet to realize such benefits. Published models assess mycotoxin contamination of milk in Eastern Europe (Van der Fels-Klerx et al., 2019) and mycotoxin risk in small grains, corn, and other cereal crops in Italy (Leggieri et al., 2021), Serbia (Liu et al., 2021), Europe (Wang et al., 2022), and Korea (Lee et al., 2018). Machine learning (ML) technologies such as artificial neural networks have been developed in Europe to identify mycotoxin contamination in corn kernels post-harvest using electronic nose technology in northern Italy (Leggieri et al., 2021). ...
... Published models assess mycotoxin contamination of milk in Eastern Europe (Van der Fels-Klerx et al., 2019) and mycotoxin risk in small grains, corn, and other cereal crops in Italy (Leggieri et al., 2021), Serbia (Liu et al., 2021), Europe (Wang et al., 2022), and Korea (Lee et al., 2018). Machine learning (ML) technologies such as artificial neural networks have been developed in Europe to identify mycotoxin contamination in corn kernels post-harvest using electronic nose technology in northern Italy (Leggieri et al., 2021). Mycotoxin contamination prediction modeling involves other factors, such as fungal development and dispersal. ...
... We also added geospatial soil mineralogical chemical/physical properties and land usage parameters to the models for AFL and FUM. Similarly, predictive mycotoxin models have been developed for northern Italy, linking cropping system factors, and weather variables with deep neural network (DNN) models (Leggieri et al., 2021). Our NN models are unique because we included geospatial dynamic soil and land features linked to the GPS center coordinates of the IL counties. ...
Full-text available
Mycotoxin contamination of corn is a pervasive problem that negatively impacts human and animal health and causes economic losses to the agricultural industry worldwide. Historical aflatoxin (AFL) and fumonisin (FUM) mycotoxin contamination data of corn, daily weather data, satellite data, dynamic geospatial soil properties, and land usage parameters were modeled to identify factors significantly contributing to the outbreaks of mycotoxin contamination of corn grown in Illinois (IL), AFL >20 ppb, and FUM >5 ppm. Two methods were used: a gradient boosting machine (GBM) and a neural network (NN). Both the GBM and NN models were dynamic at a state-county geospatial level because they used GPS coordinates of the counties linked to soil properties. GBM identified temperature and precipitation prior to sowing as significant influential factors contributing to high AFL and FUM contamination. AFL-GBM showed that a higher aflatoxin risk index (ARI) in January, March, July, and November led to higher AFL contamination in the southern regions of IL. Higher values of corn-specific normalized difference vegetation index (NDVI) in July led to lower AFL contamination in Central and Southern IL, while higher wheat-specific NDVI values in February led to higher AFL. FUM-GBM showed that temperature in July and October, precipitation in February, and NDVI values in March are positively correlated with high contamination throughout IL. Furthermore, the dynamic geospatial models showed that soil characteristics were correlated with AFL and FUM contamination. Greater calcium carbonate content in soil was negatively correlated with AFL contamination, which was noticeable in Southern IL. Greater soil moisture and available water-holding capacity throughout Southern IL were positively correlated with high FUM contamination. The higher clay percentage in the northeastern areas of IL negatively correlated with FUM contamination. NN models showed high class-specific performance for 1-year predictive validation for AFL (73%) and FUM (85%), highlighting their accuracy for annual mycotoxin prediction. Our models revealed that soil, NDVI, year-specific weekly average precipitation, and temperature were the most important factors that correlated with mycotoxin contamination. These findings serve as reliable guidelines for future modeling efforts to identify novel data inputs for the prediction of AFL and FUM outbreaks and potential farm-level management practices.
... To date, only a few studies have investigated machine learning (ML) methods for risk-based monitoring. ML has been widely used in other fields such as food science and medical science [21][22][23][24][25][26] suggesting ML modeling might also be helpful for addressing the task of AFB1 prediction 27 . What's more, most of these studies apply ML accuracy-based criteria (such as accuracy, recall, and area under the receiver operating characteristic curve (AUC)) to evaluate the ML model, while few studies use non-accuracy-based criteria (such as monitoring cost). ...
... ML modeling approaches can learn these patterns from historical food safety monitoring data to identify food safety risks. Our finding is also consistent with an earlier study that applied an ML approach (deep neural network), using weather and cropping system factors as input variables, to predict whether maize is contaminated with AFB1 and fumonisin 27 . In each of these three studies, one ML algorithm was applied, and only accuracy-based criteria were used to evaluate model performance. ...
... The ML module was designed based on factors that can influence the presence of AFB1 and compliance to legal limits. Other factors such as weather conditions and agronomy might also influence the presence of AFB1 in feed materials (Camardo Leggieri et al. 27 ; Kos et al. 30 ; Leggieri et al. 31 ; Munkvold 32 ; Palumbo et al. 33 ; Van der Fels-Klerx et al. 18 ). For example, the probability of AFB1 contamination of a particular feed material from one exporting country might be affected by weather conditions (e.g., drought and/or flood) in that country, that vary over the years. ...
Full-text available
Agricultural commodities used for feed and food production are frequently contaminated with mycotoxins, such as Aflatoxin B1 (AFB1). In Europe, both the government and companies have monitoring programs in place for the presence of AFB1. With limited resources and following risk-based monitoring as prescribed in EU Regulation 2017/625, these monitoring programs focus on batches with the highest probability of being contaminated. This study explored the use of machine learning algorithms (ML) to design risk-based monitoring programs for AFB1 in feed products, considering both monitoring cost and model performance. Historical monitoring data for the presence of AFB1 in feed products (2005–2018; 5605 records in total) were used. Four different ML algorithms, including Decision tree, Logistic regression, Support vector machine and Extreme gradient boosting (XGB), were applied and compared to predict the high-risk feed batches to be considered for further AFB1 sampling and analysis. The monitoring cost included the cost of: sampling and analysis, disease burden, storage, and of recalling and destroying contaminated feed batches. The ML algorithms were able to predict the high-risk batches, with an AUC, recall, and accuracy higher than 0.8, 0.6, and 0.9, respectively. The XGB algorithm outperformed the other three investigated ML. Its incorporation would result into up to 96% reduction in monitoring cost in 2016–2018, as compared to the official monitoring program. The proposed approach for designing risk based monitoring programs can support authorities and industries to reduce the monitoring cost for other food safety hazards as well.
... Cheng et al. (2019) suggest enriching the sample set with higher AFL contamination observations or adjusting the algorithm to penalize high false negative rates for improving the overall balanced accuracy of predictive models (Krawczyk, 2016). These results differ significantly from European models that show >75% general accuracy for corn in multiple regions (Battilani et al., 2013;Leggieri et al., 2021). If the risk value were reduced, as shown above, the model would have a higher specificity because the model would have the ability to learn from more balanced data (Cooper, 1990;Friedman, 2001;Natekin and Knoll, 2013). ...
... A new addition to the Iowa-centric model was soil property predictors, which were indicated as a potentially influential factor for predicting AFL preharvest in the Illinois-centric model (Castano-Duque et al., 2022;Supplementary Table S1) and have been used in Europe-centric models (Leggieri et al., 2021). The top two influences for the 20-ppb threshold for soil properties were bulk density (db) (g/ cm 3 ) and saturated hydraulic conductivity (Ksat), 5 cm depth (μm/ s −1 ). ...
Full-text available
Introduction: Aflatoxin (AFL), a secondary metabolite produced from filamentous fungi, contaminates corn, posing significant health and safety hazards for humans and livestock through toxigenic and carcinogenic effects. Corn is widely used as an essential commodity for food, feed, fuel, and export markets; therefore, AFL mitigation is necessary to ensure food and feed safety within the United States (US) and elsewhere in the world. In this case study, an Iowa-centric model was developed to predict AFL contamination using historical corn contamination, meteorological, satellite, and soil property data in the largest corn-producing state in the US. Methods: We evaluated the performance of AFL prediction with gradient boosting machine (GBM) learning and feature engineering in Iowa corn for two AFL risk thresholds for high contamination events: 20-ppb and 5-ppb. A 90%–10% training-to-testing ratio was utilized in 2010, 2011, 2012, and 2021 (n = 630), with independent validation using the year 2020 (n = 376). Results: The GBM model had an overall accuracy of 96.77% for AFL with a balanced accuracy of 50.00% for a 20-ppb risk threshold, whereas GBM had an overall accuracy of 90.32% with a balanced accuracy of 64.88% for a 5-ppb threshold. The GBM model had a low power to detect high AFL contamination events, resulting in a low sensitivity rate. Analyses for AFL showed satellite-acquired vegetative index during August significantly improved the prediction of corn contamination at the end of the growing season for both risk thresholds. Prediction of high AFL contamination levels was linked to aflatoxin risk indices (ARI) in May. However, ARI in July was an influential factor for the 5-ppb threshold but not for the 20-ppb threshold. Similarly, latitude was an influential factor for the 20-ppb threshold but not the 5-ppb threshold. Furthermore, soil-saturated hydraulic conductivity (Ksat) influenced both risk thresholds. Discussion: Developing these AFL prediction models is practical and implementable in commodity grain handling environments to achieve the goal of preventative rather than reactive mitigations. Finding predictors that influence AFL risk annually is an important cost-effective risk tool and, therefore, is a high priority to ensure hazard management and optimal grain utilization to maximize the utility of the nation’s corn crop.
... obtained by fitting for experiment purposes. Recently, researchers combined machine learning with a mechanistic model to account for the role of the cropping system in the mycotoxin occurrence in maize, obtaining substantial improvements in the model accuracy [27]. The application of machine learning (ML) to farm management systems is quickly evolving and cannot be neglected, as it provides richer recommendations and insights for subsequent decisions and timely actions [28]. ...
... Therefore, the prediction capacity of the DEFHAZ model is adequate; however, it could be improved by including other variables. The combination of the DEFHAZ model with a machine learning approach, when additional knowledge is available, including the roles of the hazelnut variety and cropping system in the defect occurrence, will be crucial to the development of a decision support system that is in line with so-called "knowledge-based agriculture" [27]. ...
Full-text available
The browning of the internal tissues of hazelnut kernels, which are visible when the nuts are cut in half, as well as the discolouration and brown spots on the kernel surface, are important defects that are mainly attributed to Diaporthe eres. The knowledge regarding the Diaporthe eres infection cycle and its interaction with hazelnut crops is incomplete. Nevertheless, we developed a mechanistic model called DEFHAZ. We considered georeferenced data on the occurrence of hazelnut defects from 2013 to 2020 from orchards in the Caucasus region and Turkey, supported by meteorological data, to run and validate the model. The predictive model inputs are the hourly meteorological data (air temperature, relative humidity, and rainfall), and the model output is the cumulative index (Dh-I), which we computed daily during the growing season till ripening/harvest time. We established the probability function, with a threshold of 1% of defective hazelnuts, to define the defect occurrence risk. We compared the predictions at early and full ripening with the observed data at the corresponding crop growth stages. In addition, we compared the predictions at early ripening with the defects observed at full ripening. Overall, the correct predictions were >80%, with <16% false negatives, which confirmed the model accuracy in predicting hazelnut defects, even in advance of the harvest. The DEFHAZ model could become a valuable support for hazelnut stakeholders.
... Most quantitative and modelling approaches to assessing the risks of aflatoxin have focused on modelling within field pre-harvest dynamics [12][13][14][15][16][17][18] . It is widely recognised, however, that A. flavus growth and AFB 1 contamination continue throughout prolonged periods of grain storage after harvest 19 . ...
Full-text available
Aflatoxin contamination caused by colonization of maize by Aspergillus flavus continues to pose a major human and livestock health hazard in the food chain. Increasing attention has been focused on the development of models to predict risk and to identify effective intervention strategies. Most risk prediction models have focused on elucidating weather and site variables on the pre-harvest dynamics of A. flavus growth and aflatoxin production. However fungal growth and toxin accumulation continue to occur after harvest, especially in countries where storage conditions are limited by logistical and cost constraints. In this paper, building on previous work, we introduce and test an integrated meteorology-driven epidemiological model that covers the entire supply chain from planting to delivery. We parameterise the model using approximate Bayesian computation with monthly time-series data over six years for contamination levels of aflatoxin in daily shipments received from up to three sourcing regions at a high-volume maize processing plant in South Central India. The time series for aflatoxin levels from the parameterised model successfully replicated the overall profile, scale and variance of the historical aflatoxin datasets used for fitting and validation. We use the model to illustrate the dynamics of A. flavus growth and aflatoxin production during the pre- and post-harvest phases in different sourcing regions, in short-term predictions to inform decision making about sourcing supplies and to compare intervention strategies to reduce the risks of aflatoxin contamination.
... Se utilizó un umbral para separar las muestras de campo en dos clases: (1) grano integral de muestras iguales o superiores al promedio; (0) granos contaminados que comprende todas las muestras por debajo del límite (Camardo et al., 2021). Dentro de la diferenciación las características básicas, mejoran la clasificación en tanto las características abstractas contribuyen a la segmentación y optimizan la transformación (Li et al., 2021). ...
Full-text available
The article explores the use of convolutional neural networks, specifically ResNet-50, to detect weevils in corn kernels. Weevils are a major pest of stored maize and can cause significant yield and quality losses. The study found that the ResNet-50 model was able to distinguish with high precision between weevil-infested corn kernels and healthy kernels, achieving values of 0.9464 for precision, 0.9310 for sensitivity, 0.9630 for specificity, 0.9469 for quality index, 0.9470 for the area under the curve (AUC) and 0.9474 for the F-score. The model was able to recognize nine out of ten weevil-free corn kernels using a minimal number of training samples. These results demonstrate the efficiency of the model in the accurate detection of weevil infestation in maize grains. The model's ability to accurately identify weevil-affected grains is critical to taking rapid action to control the spread of the pest, which can prevent significant economic losses and preserve the quality of stored corn. Research suggests that the use of ResNet-50 offers an efficient and low-cost solution for the early detection of weevil infestation in corn kernels. These models can quickly process large amounts of imaging data and perform accurate analysis, making it easy to identify affected grains.
... Ref [17] used machine learning (ML) models, which included weather-based mechanistic model predictions for aflatoxin occurrence in maize. Work done by Yoo et al. [18] used CART models to study the potential hazards of urban airborne bacteria during Asian dust events. ...
Full-text available
Studies have established high prevalence of aflatoxin contamination in grains and cereals produced in Ghana. Mitigation strategies have focused mainly on capacity building for farmers, agricultural extension officers, bulk distributors and processors to the detriment of the market women who act as the final link between consumers and producers. This study used supervised machine learning algorithms by means of Classification and Regression Trees (CART) to investigate aflatoxin knowledge and awareness of market women in Greater Accra Region of Ghana. A cross-sectional survey and probability sampling methods were employed for data collection. Ninety-two (92%) of participants had never heard about aflatoxins and yet, 62% reported that they usually observe mould growth in their cereals/grains. Unsurprisingly, 97% of participants indicated that they had no knowledge of the aflatoxin bill passed by the government of Ghana parliament. Despite participants not being aware of aflatoxin menace, the percent correctness of their aflatoxin safety measure score was 40%. A regression tree algorithm showed that, participant's ethnic group was the most significant parameter to consider regarding their aflatoxin safety knowledge. Their educational background and age were 95.5% and 72.5% as significant as their ethnic group. A classification tree algorithm showed that, educational level was the most significant parameter to consider when it comes to sorting of grains/cereals. Their ethnic group and marital status were 92.4% and 89.3% as important as educational level. It is therefore imperative for the Ghana government to extend sensitization and awareness programs to these market women, targeting the uneducated and specific age and ethnic groups. Keywords: Aflatoxin awareness; Grains; Cereals; Market sellers; Machine learning; CART
... Fungi growing conditions are dependent on many factors, such as the presence of fungal inoculum on susceptible crops, fertilization balance, insect damage, inadequate storage conditions, temperature, humidity, water activity (a w ), pH and nutritional composition of the food product, and so their relevance is different around the world [21,22]. Weather variables are the leading factors contributing to mycotoxin occurrence, but the cropping system used is a powerful tool for farmers to mitigate grain contamination [23]. ...
Full-text available
The prevalence of mycotoxins in the environment is associated with potential crop contamination, which results in an unavoidable increase in human exposure. Rice, being the second most consumed cereal worldwide, constitutes an important source of potential contamination by mycotoxins. Due to the increasing number of notifications reported, and the occurrence of mycotoxins at levels above the legislated limits, this work intends to compile the most relevant studies and review the main methods used in the detection and quantification of these compounds in rice. The aflatoxins and ochratoxin A are the predominant mycotoxins detected in rice grain and these data reveal the importance of adopting safety storage practices that prevent the growth of producing fungi from the Aspergillus genus along all the rice chain. Immunoaffinity columns (IAC) and QuECHERS are the preferred methods for extraction and purification and HPLC-MS/MS is preferred for quantification purposes. Further investigation is still required to establish the real exposition of these contaminants, as well as the consequences and possible synergistic effects due to the co-occurrence of mycotoxins and also for emergent and masked mycotoxins.
Maize is the main staple food and feed inSub-Saharan African countries and is highly susceptible to mycotoxin contamination under opportune environmental conditions. The presence of mycotoxins in maize affects the health of consumers and impacts global trade. According to the literature, the lack of mycotoxin awareness and the existence of strategies that are labor- and cost-prohibitive have led to the ongoing mycotoxin contamination in maize. Therefore, this study developed a cost-effective deep learning-based mobile application for segmentation of mycotoxin contamination in maize; using the RESNET152 model with performance rates of accuracy, test accuracy, epochs, time used, loss and image size results at 99.5%, 99.9%, 40, 07:30 min, and 0.051; and 460 respectively and performance evaluation metrics of F1-Score and sensitivity 0.62 and 0.997 respectively. During, the development processes, a total of 4800 images were collected and augmented. Then, the resulting 9600 data points were randomly shuffled and then split into the ratio of 70%:20:10% for training, validation, and testing datasets in order to avoid overfitting and biases in the resulting model. Lastly, the average result of model validation was 89% which was conducted among the farmers in the Maize area, Maize entrepreneurs, ICT experts, decision-makers from the Government, and policymakers. Therefore, the study recommends the collection of quality data which can be in the form of images, satellite, and biochemical properties of mycotoxin in order to enable researchers to analyze the contamination of mycotoxin and its linkages with environmental factors such as weather, soil characteristics, geographical position, and other unexpected events.
Full-text available
Mycotoxin contamination of corn results in significant agroeconomic losses and poses serious health issues worldwide. This paper presents the first report utilizing machine learning and historical aflatoxin and fumonisin contamination levels in-order-to develop models that can confidently predict mycotoxin contamination of corn in Illinois, a major corn producing state in the USA. Historical monthly meteorological data from a 14-year period combined with corresponding aflatoxin and fumonisin contamination data from the State of Illinois were used to engineer input features that link weather, fungal growth, and aflatoxin production in combination with gradient boosting (GBM) and bayesian network (BN) modeling. The GBM and BN models developed can predict mycotoxin contamination with overall 94% accuracy. Analyses for aflatoxin and fumonisin with GBM showed that meteorological and satellite-acquired vegetative index data during March significantly influenced grain contamination at the end of the corn growing season. Prediction of high aflatoxin contamination levels was linked to high aflatoxin risk index in March/June/July, high vegetative index in March and low vegetative index in July. Correspondingly, high levels of fumonisin contamination were linked to high precipitation levels in February/March/September and high vegetative index in March. During corn flowering time in June, higher temperatures range increased prediction of high levels of fumonisin contamination, while high aflatoxin contamination levels were linked to high aflatoxin risk index. Meteorological events prior to corn planting in the field have high influence on predicting aflatoxin and fumonisin contamination levels at the end of the year. These early-year events detected by the models can directly assist farmers and stakeholders to make informed decisions to prevent mycotoxin contamination of Illinois grown corn.
Full-text available
During the last decade, there have been many advances in research and technology that have greatly contributed to expanded capabilities and knowledge in detection and measurement, characterization, biosynthesis, and management of mycotoxins in maize. MycoKey, an EU-funded Horizon 2020 project, was established to advance knowledge and technology transfer around the globe to address mycotoxins impacts in key food and feed chains. MycoKey included several working groups comprised of international experts in different fields of mycotoxicology. The MycoKey Maize Working Group recently convened to gather information and strategize for the development and implementation of solutions to the maize mycotoxin problem in light of current and emerging technologies. This feature summarizes the Maize WG discussion and recommendations for addressing mycotoxin problems in maize. Discussions focused on aflatoxins, deoxynivalenol, fumonisins, and zearalenone, which are the most widespread and persistently important mycotoxins in maize. Although regional differences were recognized, there was consensus about many of the priorities for research and effective management strategies. For pre-harvest management, genetic resistance and selecting adapted maize genotypes, along with insect management, were among the most fruitful strategies identified across the mycotoxin groups. For post-harvest management, the most important practices included timely harvest, rapid grain drying, grain cleaning, and carefully managed storage conditions. Remediation practices such as optical sorting, density separation, milling, and chemical detoxification were also suggested. Future research and communication priorities included advanced breeding technologies, development of risk assessment tools, and the development and dissemination of regionally relevant management guidelines.
Full-text available
In recent years, very many incidences of contamination with aflatoxin B1 (AFB1) in pistachio nuts have been reported as a major global problem for the crop. In Europe, legislation is in force and 12 μg/kg of AFB1 is the maximum limit set for pistachios to be subjected to physical treatment before human consumption. The goal of the current study was to develop a mechanistic, weather-driven model to predict Aspergillus flavus growth and the AFB1 contamination of pistachios on a daily basis from nut setting until harvest. The planned steps were to: (i) build a phenology model to predict the pistachio growth stages, (ii) develop a prototype model named AFLA-pistachio (model transfer from AFLA-maize), (iii) collect the meteorological and AFB1 contamination data from pistachio orchards, (iv) run the model and elaborate a probability function to estimate the likelihood of overcoming the legal limit, and (v) manage a preliminary validation. The internal validation of AFLA-pistachio indicated that 75% of the predictions were correct. In the external validation with an independent three-year dataset, 95.6% of the samples were correctly predicted. According to the results, AFLA-pistachio seems to be a reliable tool to follow the dynamic of AFB1 contamination risk throughout the pistachio growing season.
Full-text available
Predicting crop yield based on the environmental, soil, water and crop parameters has been a potential research topic. Deep-learning-based models are broadly used to extract significant crop features for prediction. Though these methods could resolve the yield prediction problem there exist the following inadequacies: Unable to create a direct non-linear or linear mapping between the raw data and crop yield values; and the performance of those models highly relies on the quality of the extracted features. Deep reinforcement learning provides direction and motivation for the aforementioned shortcomings. Combining the intelligence of reinforcement learning and deep learning, deep reinforcement learning builds a complete crop yield prediction framework that can map the raw data to the crop prediction values. The proposed work constructs a Deep Recurrent Q-Network model which is a Recurrent Neural Network deep learning algorithm over the Q-Learning reinforcement learning algorithm to forecast the crop yield. The sequentially stacked layers of Recurrent Neural network is fed by the data parameters. The Q- learning network constructs a crop yield prediction environment based on the input parameters. A linear layer maps the Recurrent Neural Network output values to the Q-values. The reinforcement learning agent incorporates a combination of parametric features with the threshold that assist in predicting crop yield. Finally, the agent receives an aggregate score for the actions performed by minimizing the error and maximizing the forecast accuracy. The proposed model efficiently predicts the crop yield outperforming existing models by preserving the original data distribution with an accuracy of 93.7%.
Full-text available
Crop yield prediction is extremely challenging due to its dependence on multiple factors such as crop genotype, environmental factors, management practices, and their interactions. This paper presents a deep learning framework using convolutional neural networks (CNNs) and recurrent neural networks (RNNs) for crop yield prediction based on environmental data and management practices. The proposed CNN-RNN model, along with other popular methods such as random forest (RF), deep fully connected neural networks (DFNN), and LASSO, was used to forecast corn and soybean yield across the entire Corn Belt (including 13 states) in the United States for years 2016, 2017, and 2018 using historical data. The new model achieved a root-mean-square-error (RMSE) 9% and 8% of their respective average yields, substantially outperforming all other methods that were tested. The CNN-RNN has three salient features that make it a potentially useful method for other crop yield prediction studies. (1) The CNN-RNN model was designed to capture the time dependencies of environmental factors and the genetic improvement of seeds over time without having their genotype information. (2) The model demonstrated the capability to generalize the yield prediction to untested environments without significant drop in the prediction accuracy. (3) Coupled with the backpropagation method, the model could reveal the extent to which weather conditions, accuracy of weather predictions, soil conditions, and management practices were able to explain the variation in the crop yields.
Full-text available
The occurrence of mycotoxins differs greatly from year to year and this variation has been attributed to climate variability. The aim of this study was to consider the variability of fungal infection and mycotoxin contamination on a small geographic scale as a possible result of local weather conditions. The presence of Fusarium spp. and Aspergillus spp. and their related mycotoxins was investigated in 51 maize fields grown in 2014 in the Emilia Romagna region, in northern Italy; information regarding the cropping system was collected for all the fields. Samples collected at harvest were analysed for fumonisins, aflatoxins and trichothecenes. Hourly meteorological data were collected from nine stations and fields were clustered with the stations based on the shortest distance principle. Fusarium spp. and Aspergillus spp. incidence varied between 17.6-46.0% and 0.6-6.3%, respectively. Fumonisins ranged between 1,718 and 106,054 μg/kg and aflatoxin B 1 between <limit of quantification and 93.8 μg/kg, with a wide variability also with short distanced fields. Deoxynivalenol was detected with a considerable incidence (59%), but only three samples exceeded 1,750 μg/kg. Therefore, climate variability and related uncertainties, commonly stressed on a large scale, are not only a matter for policymakers, but also for farmers facing every day the impact on fungi and mycotoxin occurrence.
Full-text available
The influence of climate change on agricultural systems has been generally accepted as having a considerable impact on food security and safety. It is believed that the occurrence of mycotoxins will be greatly affected by future climate scenarios and this has been confirmed by recent data. Temperature (T) and CO2 increases, variation in rain intensity and distribution, as well as extreme weather events, affect the dominant fungal species in different ways, depending on their ecological needs. Therefore, the aim of this work was to study Aspergillus flavus (Af) and Fusarium verticillioides (Fv) co-occurrence in vitro in order to collect quantitative data on the effect of fungal interaction on growth and mycotoxin production and develop functions for their description. Experimental trials were organized with the cited fungi grown alone or together. They were incubated at different T regimes (10–40°C, step 5°C) for 21 days. Fungal growth was measured weekly, while AFs and FBs were quantified at the end of the incubation period. Temperature and incubation time significantly affected fungal growth both for Af and Fv (p ≤ 0.01), and a significant interaction between T and the presence of one versus both fungi influenced the amount of AFs and FBs produced. Each fungus was affected by the presence of the other fungus; in particular, Af and Fv showed a decrease in colony diameter of 10 and 44%, respectively, when they were grown together, compared to alone. The same influence was not found for mycotoxin production. In fact, the dynamics of toxin production in different temperature regimes followed a comparable trend with fungi grown alone or together, but a significant impact of inoculum × temperature interaction was highlighted. Fungal growth and toxin production in different T regimes were well described, both for AFs and FBs, by a Bete function. These results are the first attempt to model mycotoxigenic fungal co-occurrence under several T regimes; this is essential in order to improve effective prediction of growth and mycotoxin production by such fungi.
Full-text available
Prior to 1985 the Food and Agriculture Organization (FAO) estimated global food crop contamination with mycotoxins to be 25%. The origin of this statement is largely unknown. To assess the rationale for it, the relevant literature was reviewed and data of around 500,000 analyses from the European Food Safety Authority and large global survey for aflatoxins, fumonisins, deoxynivalenol, T-2 and HT-2 toxins, zearalenone and ochratoxin A in cereals and nuts were examined. Using different thresholds, i.e. limit of detection, the lower and upper regulatory limits of European Union (EU) legislation and Codex Alimentarius standards, the mycotoxin occurrence was estimated. Impact of different aspects on uncertainty of the occurrence estimates presented in literature and related to our results are critically discussed. Current mycotoxin occurrence above the EU and Codex limits appears to confirm the FAO 25% estimate, while this figure greatly underestimates the occurrence above the detectable levels (up to 60-80%). The high occurrence is likely explained by a combination of the improved sensitivity of analytical methods and impact of climate change. It is of immense importance that the detectable levels are not overlooked as through diets, humans are exposed to mycotoxin mixtures which can induce combined adverse health effects.
Full-text available
Deep learning techniques, and in particular Convolutional Neural Networks (CNNs), have led to significant progress in image processing. Since 2016, many applications for the automatic identification of crop diseases have been developed. These applications could serve as a basis for the development of expertise assistance or automatic screening tools. Such tools could contribute to more sustainable agricultural practices and greater food production security. To assess the potential of these networks for such applications, we survey 19 studies that relied on CNNs to automatically identify crop diseases. We describe their profiles, their main implementation aspects and their performance. Our survey allows us to identify the major issues and shortcomings of works in this research area. We also provide guidelines to improve the use of CNNs in operational contexts as well as some directions for future research.
Mycotoxins pose a significant threat to the safety of food and its products. A rapid, reliable, and cheap method of testing for the most important regulated mycotoxins would be useful and time saving. This study aimed to evaluate the potential use of an electronic nose (e-nose) for rapid identification of mycotoxin contamination above legal limits in maize samples. A total of 316 maize samples were collect from a commercial field in Northern Italy from 2014 to 2018 and analyzed for contamination with aflatoxin B1 (AFB1) and fumonisins (FBs), both using a conventional method (HPLC-MS) and a portable e-nose “AIR PEN 3” (Airsense Analytics GmbH, Schwerin, Germany) equipped with a 10-metal oxide sensor array. Artificial neural network (ANN), logistic regression (LR), and discriminant analysis (DA) were used to investigate whether the e-nose was capable of separating samples contaminated at levels above or below the legal limits, either for AFB1 or FBs. All the methodologies used showed high accuracy (≥70%) in distinguishing maize grain contamination above or below the legal limit. Notably, ANN performed better than the other methods, with 78% and 77% accuracy for AFB1 and FBs, respectively. This was the first time that five years of data and three different statistical approaches have been adopted to check e-nose performance. Results suggest that the e-nose supported by ANN could be a rapid and reliable tool for the detection of AFB1 and FBs in maize.
Using remote sensing and UAVs in smart farming is gaining momentum worldwide. The main objectives are crop and weed detection, biomass evaluation and yield prediction. Evaluating machine learning methods for remote sensing based yield prediction requires availability of yield mapping devices, which are still not very common among farmers. In this study Convolutional Neural Networks (CNNs) – a deep learning methodology showing outstanding performance in image classification tasks – are applied to build a model for crop yield prediction based on NDVI and RGB data acquired from UAVs. The effect of various aspects of the CNN such as selection of the training algorithm, depth of the network, regularization strategy, and tuning of the hyperparameters on the prediction efficiency are tested. Using the Adadelta training algorithm, L2 regularization with early stopping and a CNN with 6 convolutional layers, mean absolute error (MAE) in yield prediction of 484.3 kg/ha and mean absolute percentage error (MAPE) of 8.8% was achieved for data acquired during the early period of the growth season (i.e., in June of 2017, growth phase <25%) with RGB data. When using data acquired later in July and August of 2017 (growth phase >25%), MAE of 624.3 kg/ha (MAPE: 12.6%) was obtained. Significantly, the CNN architecture performed better with RGB data than the NDVI data.