PYTORCH EXPLAIN DOCUMENTATION

PyTorch, Explain! is an extension library for PyTorch to develop explainable deep learning models called Logic Explained Networks (LENs).

It consists of various methods for explainability from a variety of published papers, including the APIs required to get first-order logic explanations from deep neural networks.

Quick start

You can install torch_explain along with all its dependencies from PyPI:

pip install -r requirements.txt torch-explain

Theory

Theoretical foundations can be found in the following papers.

Learning of constraints:

@inproceedings{ciravegna2020constraint,
  title={A Constraint-Based Approach to Learning and Explanation.},
  author={Ciravegna, Gabriele and Giannini, Francesco and Melacci, Stefano and Maggini, Marco and Gori, Marco},
  booktitle={AAAI},
  pages={3658--3665},
  year={2020}
}

Learning with constraints:

@inproceedings{marra2019lyrics,
  title={LYRICS: A General Interface Layer to Integrate Logic Inference and Deep Learning},
  author={Marra, Giuseppe and Giannini, Francesco and Diligenti, Michelangelo and Gori, Marco},
  booktitle={Joint European Conference on Machine Learning and Knowledge Discovery in Databases},
  pages={283--298},
  year={2019},
  organization={Springer}
}

Constraints theory in machine learning:

@book{gori2017machine,
  title={Machine Learning: A constraint-based approach},
  author={Gori, Marco},
  year={2017},
  publisher={Morgan Kaufmann}
}

Authors

  • Pietro Barbiero, University of Cambridge, UK.

  • Francesco Giannini, University of Florence, IT.

  • Gabriele Ciravegna, University of Florence, IT.

  • Dobrik Georgiev, University of Cambridge, UK.

Licence

Copyright 2020 Pietro Barbiero, Francesco Giannini, Gabriele Ciravegna, and Dobrik Georgiev.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.