REX (Rejector-of-low-quality-Explanations) is a GitHub repository containing the REX algorithm.
It refers to the paper titled Knowing What You Cannot Explain: Learning to Reject Low-Quality Explanations published at ECML 2026.
Learning to Reject (LtR) frameworks allow ML models to abstain from uncertain predictions and promote user trust. However, while current LtR strategies focus solely on predictive performance, they completely neglect explanation quality. Low-quality explanations -- whether they inaccurately reflect the model's reasoning or fail to satisfy users -- can severely compromise trust assessments and induce over-reliance on incorrect predictions. We argue that models should abstain from making a prediction when they cannot offer a satisfactory explanation for it and introduce a framework for learning to reject low-quality explanations (LtX) in which predictors are equipped with a rejector that evaluates the quality of explanations. Focusing on popular attribution techniques, we propose REX (Rejector of low-quality EXplanations), which learns a rejector from explanation quality labels combining machine-side judgments with explicit human annotations to assess explanation quality. Our empirical evaluation demonstrates that REX outperforms popular LtR strategies and baselines relying on isolated explanation metrics. Finally, to support future research, we publicly release a novel, larger-scale dataset of 1050 human-annotated machine explanations.
The folder contains:
- REX.py, the file containing the REX algorithm;
- Appendix.pdf, a pdf with the appendix of the paper.
To use REX, import the github repository or simply download the files.
The REX class requires the following python packages to be used:
Contact the author of the paper: luca.stradiotti@kuleuven.be.