nn2poly: An R Package for Converting Neural Networks into Interpretable Polynomials

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Morala, Pablo, Cifuentes, Jenny Alexandra, Lillo, Rosa E., Ucar, Iñaki
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929371319631872
author Morala, Pablo
Cifuentes, Jenny Alexandra
Lillo, Rosa E.
Ucar, Iñaki
author_facet Morala, Pablo
Cifuentes, Jenny Alexandra
Lillo, Rosa E.
Ucar, Iñaki
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_01588
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle nn2poly: An R Package for Converting Neural Networks into Interpretable Polynomials
Morala, Pablo
Cifuentes, Jenny Alexandra
Lillo, Rosa E.
Ucar, Iñaki
Machine Learning
Artificial Intelligence
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.
title nn2poly: An R Package for Converting Neural Networks into Interpretable Polynomials
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2406.01588