NNbenchmark was created during the Google Summer of Code program of 2019 and 2020 as a part of open-source organization - The R Project for Statistical Computing. To goal was to verify the convergence of the training algorithms provided in all Neural Network R packages available on CRAN to date. Neural networks must be trained with second order algorithms and not with first order algorithms as many packages seem to do.

The purpose of this project is to verify the quality of the training algorithms in R packages that provide neural network of perceptron type (one input layer, one normalized layer, one hidden layer with non-linear activation function usually tanh(), one normalized layer, one output output layer) for regression purpose i.e. \(NN(X1, ..., Xn) = E[Y]\).



Packages Tested


This project has conducted a comprehensive survey of all packages that have the “neural network” keyword in the package title or in the package description.

AMORE ANN2 appnn automl brnn CaDENCE
DALEX2 DamiaNN deepnet elmNNrcpp ELMR EnsembleBase
h2o keras MachineShop minpack.lm monmlp neuralnet
nlsr nnet qrnn radiant.model rminer RSNNS
snnR TraineR validann



Evaluation Criteria

We test the neural-network packages on 13 datasets based on the following criteria.

  1. Accuracy: the ability to find the global minima, measured by the Root Mean Square Error (RMSE) in a fixed number of iterations.
  2. Speed of the training algorithms.
  3. Availability of helpful utilities.s
  4. Quality of the documentation.

Following are the datasets

Dataset Rows Input Neurons Parameters
Multivariate
mDette 500 3 5 26
mFriedman 500 5 5 36
mIshigami 500 3 10 51
mRef153 153 5 3 22
Univariate
uDmod1 51 1 6 19
uDmod2 51 1 5 16
uDreyfus1 51 1 3 10
uDreyfus2 51 1 3 10
uGauss1 250 1 5 16
uGauss2 250 1 4 13
uGauss3 250 1 4 13
uNeuroOne 51 1 2 7



Results

Individual Rating
Global Score
Package Util Doc Call Algorithm Time RMSE
nlsr * **** **
  1. NashLM
18 1
rminer ** *** **
  1. nnet_optim(BFGS)
12 2
nnet * *** **
  1. optim (BFGS)
3 3
validann * **** **
  1. optim(BFGS)
35 4
* **** **
  1. optim(CG)
60 8
* **** **
  1. optim(L-BFGS-B)
36 15
* **** **
  1. optim(Nelder-Mead)
55 45
* **** **
  1. optim(SANN)
20 55
MachineShop * *** *
  1. nnet_optim(BFGS)
6 5
traineR * ** **
  1. nnet_optim(BFGS)
4 6
radiant.model ** ** **
  1. nnet_optim(BFGS)
10 7
monmlp ** *** **
  1. optimx(BFGS)
26 9
** *** **
  1. optimx(Nelder-Mead)
32 47
CaDENCE ** *** **
  1. optim(BFGS)
46 10
** *** **
  1. Rprop
56 51
** *** **
  1. pso_psoptim
54 54
h2o ** **
  1. first-order
51 11
EnsembleBase * * **
  1. nnet_optim(BFGS)
5 12
caret ** *** **
  1. avNNet_nnet_optim(BFGS)
17 13
brnn ** **** **
  1. Gauss-Newton
8 14
qrnn ** *** **
  1. nlm()
28 16
RSNNS ** *** **
  1. Rprop
24 17
** *** **
  1. SCG
30 18
** *** **
  1. Std_Backpropagation
22 27
** *** **
  1. BackpropChunk
26 29
** *** **
  1. BackpropMomentum
25 30
** *** **
  1. BackpropWeightDecay
29 31
** *** **
  1. BackpropBatch
43 49
** *** **
  1. Quickprop
45 57
automl * *** **
  1. trainwgrad_adam
50 18
* *** **
  1. trainwgrad_RMSprop
47 26
* *** **
  1. trainwpso
57 43
deepnet * *** **
  1. BP
23 18
neuralnet * *** **
  1. rprop+
19 21
* *** **
  1. rprop-
21 22
* *** **
  1. slr
31 31
* *** **
  1. sag
41 38
* *** **
  1. backprop
37 50
keras ** *
  1. adamax
48 23
** *
  1. adam
42 34
** *
  1. nadam
44 36
** *
  1. adagrad
58 37
** *
  1. adadelta
59 40
** *
  1. sgd
48 44
** *
  1. rmsprop
37 52
AMORE * *** *
  1. ADAPTgdwm
16 24
* *** *
  1. ADAPTgd
9 35
* *** *
  1. BATCHgdwm
40 39
* *** *
  1. BATCHgd
39 41
minpack.lm * *** **
  1. Levenberg-Marquardt
15 24
ANN2 ** *** *
  1. rmsprop
14 28
** *** *
  1. adam
13 33
** *** *
  1. sgd
11 42
deepdive ** *** **
  1. adam
32 46
** *** **
  1. rmsProp
34 53
** *** **
  1. momentum
53 56
** *** **
  1. gradientDescent
52 58
snnR ** ** **
  1. SemiSmoothNewton
7 48
elmNNRcpp ** *** **
  1. ELM
1 59
ELMR ** *** **
  1. ELM
2 60