arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

当解释无法被阅读:测量并纠正面向从右到左语言的SHAP和LIME渲染

When Explanations Cannot Be Read: Measuring and Correcting SHAP and LIME Rendering for Right-to-Left Languages

Rameesha Zia, Muhammad Shahid Iqbal Malik

arXiv 2609.28565首次发表:更新:

发表机构

Pak-Austria Fachhochschule, Institute of Applied Sciences and Technology(巴基斯坦-奥地利应用科学与技术高等专业学院)

机构由 AI 辅助整理,请以论文原文为准。

AI 中文总结

针对SHAP和LIME在从右到左语言中可视化失败的问题,提出SHAP-RTL渲染层,纠正阅读方向和文字塑形,保留归因值,在多种语言数据集上显著降低字符错误率。

AI 中文摘要

事后解释方法如SHAP和LIME被广泛用于解释文本分类器,但其可视化主要针对从左到右的语言设计。当应用于从右到左(RTL)语言(如乌尔都语、阿拉伯语、波斯语和希伯来语)时,归因值在数学上仍然有效,但视觉呈现失败。标记出现顺序错乱,连写的字母形式断裂,绘图布局不遵循自然的阅读方向。本研究将此差距视为可视化问题,而非解释方法本身的局限性。我们提出SHAP-RTL,一个渲染层,用于纠正SHAP和LIME可视化中的阅读方向和文字塑形,并针对每种语言选择字体,同时保留原始归因值、特征顺序和模型输出。该方法在乌尔都语、阿拉伯语、希伯来语和波斯语的仇恨与攻击性语言数据集上,使用TF-IDF和逻辑回归分类器进行评估。渲染正确性通过OCR往返测量,每种语言200个特征词。默认渲染产生的字符错误率为0.820至0.979,意味着标签不再承载其标记;常见的重塑和重排变通方法在乌尔都语上失败,错误率为0.998,比不纠正更差;Matplotlib 3.11.0文本重写反转了该变通方法,而SHAP-RTL在两个版本下均保持正确。该框架还将相同的归因以读者语言的简短上下文解释形式口头表达,限于已识别的特征。本文的评估涉及渲染正确性;对生成解释的评估留待未来工作。研究强调了语言感知可视化在使事后可解释性在不同书写系统中更易访问方面的重要性。

英文摘要

Post hoc explanation methods such as SHAP and LIME are widely used to interpret text classifiers, but their visualizations are mainly designed for left-to-right languages. When applied to right-to-left (RTL) languages such as Urdu, Arabic, Persian, and Hebrew, the attribution values remain mathematically valid, while their visual presentation fails. Tokens appear out of sequence, connected letterforms break apart, and plot layouts do not follow the natural reading direction. This study addresses this gap as a visualization problem rather than a limitation of the explanation methods themselves. We present SHAP-RTL, a rendering layer that corrects reading direction and script shaping in SHAP and LIME visualizations, with per-language font selection, while preserving the original attribution values, feature ordering, and model outputs. The approach is evaluated on Urdu, Arabic, Hebrew, and Persian hate and offensive-language datasets using TF-IDF and logistic regression classifiers. Rendering correctness is measured by an OCR round trip over 200 feature words per language. Default rendering yields character error rates of 0.820 to 0.979, meaning the label no longer carries its token; the common reshape-and-reorder workaround fails for Urdu at 0.998, worse than no correction; and the Matplotlib 3.11.0 text rewrite inverts that workaround, while SHAP-RTL remains correct under both versions. The framework also verbalizes the same attributions as short contextual explanations in the reader's language, constrained to the identified features. Evaluation in this paper concerns rendering correctness; assessment of the generated explanations is left to future work. The study highlights the importance of language-aware visualization in making post hoc explainability more accessible across different writing systems.

Comments28 pages, 18 figures, 5 Tables

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑