Consistent attributions for transformer-based reversible comparison classifiers
摘要
Comparison tasks play a crucial role in various domains, such as product evaluation, opinion comparison and decision support. These tasks involve determining whether one object is better or worse than another based on textual inputs. Despite the strong performance of Transformer-based models in such tasks, their interpretability remains limited. Existing explanation methods often suffer from a lack of reversibility and contextual consistency, meaning that when the order of inputs is reversed, the explanations can differ significantly even though the semantic meaning of the comparison remains unchanged. This inconsistency leads to biased, unstable and unreliable interpretations, thereby reducing transparency and trustworthiness. To address this issue, we propose the Unified Context Reversibility Attribution (URAttr), a novel explanation framework that provides consistent and faithful token-level attributions for Transformer-based comparison models. URAttr explicitly leverages both input configurations (original and flipped) to ensure consistent and robust token-level explanations of transformer in comparison tasks. Extensive experiments on five comparison datasets demonstrate that URAttr consistently outperforms attention-based, gradient-based, and relevance-based baselines. Specifically, URAttr achieves up to 0.060 higher Bi-AOPC and 0.497 lower Bi-LOdds than the second-best method, indicating both stronger attribution consistency and more faithful token selection. Qualitative visualizations further show that URAttr highlights semantically meaningful words and maintains identical token rankings across original and flipped inputs.