nn2poly: An R Package for Converting Neural Networks into Interpretable Polynomials
<|reference_start|>nn2poly: An R Package for Converting Neural Networks into Interpretable Polynomials: The nn2poly package provides the implementation in R of the NN2Poly method to explain and interpret feed-forward neural networks by means of polynomial representations that predict in an equivalent manner as the original network.Through the obtained polynomial coefficients, the effect and importance of each variable and their interactions on the output can be represented. This capabiltiy of capturing interactions is a key aspect usually missing from most Explainable Artificial Intelligence (XAI) methods, specially if they rely on expensive computations that can be amplified when used on large neural networks. The package provides integration with the main deep learning framework packages in R (tensorflow and torch), allowing an user-friendly application of the NN2Poly algorithm. Furthermore, nn2poly provides implementation of the required weight constraints to be used during the network training in those same frameworks. Other neural networks packages can also be used by including their weights in list format. Polynomials obtained with nn2poly can also be used to predict with new data or be visualized through its own plot method. Simulations are provided exemplifying the usage of the package alongside with a comparison with other approaches available in R to interpret neural networks.<|reference_end|>
@article{morala2024nn2poly:,
    title={nn2poly: An R Package for Converting Neural Networks into Interpretable
  Polynomials},
    author={Pablo Morala (1 and 2), Jenny Alexandra Cifuentes (3), Rosa E. Lillo
  (1 and 2), I~naki Ucar (1 and 2) ((1) uc3m-Santander Big Data Institute,
  Universidad Carlos III de Madrid. Spain., (2) Department of Statistics,
  Universidad Carlos III de Madrid. Spain., (3) ICADE, Department of
  Quantitative Methods, Faculty of Economics and Business Administration and
  the Institute for Research in Technology (IIT), ICAI School of Engineering,
  Universidad Pontificia Comillas. Spain.)},
    journal={arXiv preprint arXiv:2406.01588},
    year={2024},
    archivePrefix={arXiv},
    eprint={2406.01588},
    primaryClass={cs.LG cs.AI stat.ML}
}