Technical Note: An R package for Fitting Sparse Neural Networks with Application in Animal Breeding

Y. Wang, X. Mi, G. J. M. Rosa (Lead / Corresponding author), Z. Chen, P. Lin, S. Wang, Z. Bao (Lead / Corresponding author)

Research output: Contribution to journalArticlepeer-review

11 Citations (Scopus)
201 Downloads (Pure)


Neural networks (NNs) have emerged as a new tool for genomic selection (GS) in animal breeding. However, the properties of NN used in GS for the prediction of phenotypic outcomes are not well characterized due to the problem of over-parameterization of NN and difficulties in using whole-genome marker sets as high-dimensional NN input. In this note, we have developed an R package called snnR that finds an optimal sparse structure of a NN by minimizing the square error subject to a penalty on the L 1-norm of the parameters (weights and biases), therefore solving the problem of over-parameterization in NN. We have also tested some models fitted in the snnR package to demonstrate their feasibility and effectiveness to be used in several cases as examples. In comparison of snnR to the R package brnn (the Bayesian regularized single layer NNs), with both using the entries of a genotype matrix or a genomic relationship matrix as inputs, snnR has greatly improved the computational efficiency and the prediction ability for the GS in animal breeding because snnR implements a sparse NN with many hidden layers.

Original languageEnglish
Pages (from-to)2016–2026
Number of pages11
JournalJournal of Animal Science
Issue number5
Early online date24 Feb 2018
Publication statusPublished - 4 May 2018


  • Animal breeding
  • Dominance and additive effects
  • Genetic markers
  • Genomic selection
  • Sparse neural networks

ASJC Scopus subject areas

  • Food Science
  • Animal Science and Zoology
  • Genetics


Dive into the research topics of 'Technical Note: An R package for Fitting Sparse Neural Networks with Application in Animal Breeding'. Together they form a unique fingerprint.

Cite this