{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/entropy-based-logic-explanations-of-neural","title":"Entropy-based Logic Explanations of Neural Networks","arxiv_id":"2106.06804","date":"2021-06-12","proceeding":null,"authors":["Pietro Barbiero","Gabriele Ciravegna","Francesco Giannini","Pietro Lió","Marco Gori","Stefano Melacci"],"abstract":"Explainable artificial intelligence has rapidly emerged since lawmakers have started requiring interpretable models for safety-critical domains. Concept-based neural networks have arisen as explainable-by-design methods as they leverage human-understandable symbols (i.e. concepts) to predict class memberships. However, most of these approaches focus on the identification of the most relevant concepts but do not provide concise, formal explanations of how such concepts are leveraged by the classifier to make predictions. In this paper, we propose a novel end-to-end differentiable approach enabling the extraction of logic explanations from neural networks using the formalism of First-Order Logic. The method relies on an entropy-based criterion which automatically identifies the most relevant concepts. We consider four different case studies to demonstrate that: (i) this entropy-based criterion enables the distillation of concise logic explanations in safety-critical domains from clinical data to computer vision; (ii) the proposed approach outperforms state-of-the-art white-box models in terms of classification accuracy and matches black box performances.","url_abs":"https://arxiv.org/abs/2106.06804v4","url_pdf":"https://arxiv.org/pdf/2106.06804v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"entropy-based-logic-explanations-of-neural","repo_url":"https://github.com/pietrobarbiero/entropy-lens","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"entropy-based-logic-explanations-of-neural","repo_url":"https://github.com/pietrobarbiero/logic_explainer_networks","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"entropy-based-logic-explanations-of-neural","repo_url":"https://github.com/pietrobarbiero/pytorch_explain","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"explainable-artificial-intelligence","task_name":"Explainable artificial intelligence"},{"task_slug":"image-classification","task_name":"Image Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-classification-on-cub","task":"Image Classification","dataset":"CUB","model":"Entropy-based Logic Explained Network","rank_in_archive_order":1,"of":4,"metrics":{"Classification Accuracy":"0.9295","Explanation Accuracy":"95.24","Explanation complexity":"3.74","Explanation extraction time":"171.87"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-cub","task":"Image Classification","dataset":"CUB","model":"$\\psi$ network","rank_in_archive_order":2,"of":4,"metrics":{"Classification Accuracy":"0.9192","Explanation Accuracy":"76.1","Explanation complexity":"15.96","Explanation extraction time":"3707.29"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-cub","task":"Image Classification","dataset":"CUB","model":"Bayesian Rule List","rank_in_archive_order":3,"of":4,"metrics":{"Classification Accuracy":"0.9079","Explanation Accuracy":"96.02","Explanation complexity":"8.87","Explanation extraction time":"264678.29"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-cub","task":"Image Classification","dataset":"CUB","model":"Decision Tree","rank_in_archive_order":4,"of":4,"metrics":{"Classification Accuracy":"0.8162","Explanation Accuracy":"89.36","Explanation complexity":"45.92","Explanation extraction time":"8.1"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2106.06804","atlas_url":"https://app.syntology.ai/?focus=2106.06804","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.06804"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pietrobarbiero/pytorch_explain","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pietrobarbiero/logic_explainer_networks","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pietrobarbiero/entropy-lens","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_honours":1,"unverified":5},"by_repo_kind":{"official":{"samples":6,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"9910e2fc297f8665","entry":"identity","repo":"pietrobarbiero/entropy-lens","repo_kind":"official","path":"entropy_lens/nn/concepts.py","file_url":"https://github.com/pietrobarbiero/entropy-lens/blob/HEAD/entropy_lens/nn/concepts.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9910e2fc297f8665"}},{"code_sha256_prefix":"173b52c029b4bfa3","entry":"complexity","repo":"pietrobarbiero/entropy-lens","repo_kind":"official","path":"entropy_lens/logic/metrics.py","file_url":"https://github.com/pietrobarbiero/entropy-lens/blob/HEAD/entropy_lens/logic/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"173b52c029b4bfa3"}},{"code_sha256_prefix":"bfa94e0b42068dc4","entry":"concept_consistency","repo":"pietrobarbiero/entropy-lens","repo_kind":"official","path":"entropy_lens/logic/metrics.py","file_url":"https://github.com/pietrobarbiero/entropy-lens/blob/HEAD/entropy_lens/logic/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bfa94e0b42068dc4"}},{"code_sha256_prefix":"04b94fcc7fddaf61","entry":"l1_loss","repo":"pietrobarbiero/entropy-lens","repo_kind":"official","path":"entropy_lens/nn/functional/loss.py","file_url":"https://github.com/pietrobarbiero/entropy-lens/blob/HEAD/entropy_lens/nn/functional/loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"04b94fcc7fddaf61"}},{"code_sha256_prefix":"a79d9cdaadea1b31","entry":"replace_names","repo":"pietrobarbiero/entropy-lens","repo_kind":"official","path":"entropy_lens/logic/utils.py","file_url":"https://github.com/pietrobarbiero/entropy-lens/blob/HEAD/entropy_lens/logic/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a79d9cdaadea1b31"}},{"code_sha256_prefix":"98b3659820dd43c7","entry":"test_explanation","repo":"pietrobarbiero/entropy-lens","repo_kind":"official","path":"entropy_lens/logic/metrics.py","file_url":"https://github.com/pietrobarbiero/entropy-lens/blob/HEAD/entropy_lens/logic/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"98b3659820dd43c7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}