Explainable AI (XAI): NLP Edition

可解释AI(XAI):NLP版

2021-11-04 20:00 TAUS

本文共1235个字,阅读需13分钟

阅读模式 切换至中文

As AI is becoming more prominent in high-stakes industries like healthcare, education, construction, environment, autonomous machines, and law enforcement, we are finding an increased need to trust the decision-making process. These predictions often need to be extremely accurate, e.g. critical life or death situations in healthcare. Due to the critical and direct impact AI is having on our day-to-day lives, decision-makers need more insight and visibility into the mechanics of AI systems and the prediction process. Presently, often only technical experts such as data scientists or engineers understand the backend processes and algorithms being used, like the highly complex deep neural networks. The lack of interpretability has shown to be a means of disconnect between technical and non-technical practitioners. In an effort to make these AI systems more transparent, the field of Explainable AI (XAI) came into existence. Explainable AI (XAI) is an emerging subset in AI that focuses on the readability of machine learning (ML) models. These tools help you understand and interpret your predictions, reducing the complexity and allowing for non-technically trained practitioners and stakeholders to be more aware of the modeling process. At its core, XAI aims to deconstruct black box decision-making processes in AI. XAI can answer questions like “Why was this prediction made?” or “How much confidence do I have in this prediction?” or “Why did this system fail?” NLP and XAI Natural Language Processing (NLP) is a subset of AI (artificial intelligence) and ML (machine learning) which aims to make sense of human language. NLP performs tasks such as topic classification, translation, sentiment analysis, and predictive spelling using text data. NLP has historically been based on interpretable models, referred to as white-box techniques. These techniques include easily interpretable models like decision trees, rule-based modeling, Markov models, logistic regression, and more. As of recent years, however, the level of interpretability has been reduced to black-box techniques, such as deep learning approaches and the use of language embedding features. With reduced interpretability comes reduced trust, especially with human-computer interactions (HCI) such as chatboxes, for example. What exactly does model explainability mean, however? According to an IBM research survey, explainability can be defined as to “understand how a model arrives at its result, also referred to as the outcome explanation problem.” If end-users are able to understand the reasoning behind an NLP-based prediction, then it is assumed more trust will grow. Furthermore, this allows for a positive feedback loop from user to development interactions. Some characterizations of explainability include explanations for individual predictions or the model’s prediction process as a whole. A Survey by IBM - XAI for NLP A group of researchers at IBM conducted a survey called A Survey of the State of Explainable AI for Natural Language Processing. As one of the few works on the intersection of NLP and XAI, the survey aims to provide an understanding of the current state of XAI and NLP, explain currently available techniques, and bring the research community’s attention to the presently existing gaps. The categories of explanations used consist of whether the explanation is for a single prediction (local) or the model’s prediction process as a whole (global). The main difference between these two categories is that the first explanation is outputted during the prediction process (self-explaining) whereas the second requires post-processing following the model’s prediction process (post-hoc). The authors further introduce additional explainability aspects, including techniques for serving the explanation and presentation type to the end-user. The researchers in this study presented five major explainability techniques in NLP that characterize raw technical components to present a final explanation to the end-user. These are listed below: Feature importance: uses the score of the importance of a given feature, which is ultimately used to output the final prediction. Text-based features are more intuitive for humans to interpret, enabling feature importance-based explanations. Surrogate model: a second model, or proxy model, used to explain model predictions. These proxy models can achieve both local or global explanations. One drawback of this method is that the learned surrogate models and the original model could use different methodologies when making predictions. Example-driven: uses examples, usually from labeled data, that are semantically similar to the input example to explain the given prediction. An example of an example-driven explanation is using the nearest-neighbor approach, which has been used in areas such as text classification and question answering. Provenance-based: utilizes illustrations of some or all of the prediction derivation process. This is often an effective explainability technique when the prediction is the outcome of a series of decision rules or reasoning steps. Declarative induction: involves human-readable transformations, such as rules and programs to deliver explainability. XAI may be presented to users in different ways, depending on the model complexity and explainability technique used. The visualization ultimately used highly impacts the success of an XAI approach in NLP. Let’s look at the commonly used attention mechanism in NLP, which learns weights (importance scores) of a given set of features. Attention mechanisms are often visualized as raw scores or as a saliency heatmap. An example of a saliency heatmap visualization of an attention score can be seen in Figure 1. Figure 1 - Weights assigned at each step of translation Salience-based visualizations focus on making more important attributes or factors more visible to the end-user. Saliency is often used in XAI to depict the importance scores for different elements in an AI system. Examples of saliency-based visualizations include highlighting important words in a text and heatmaps. Other visualization techniques of XAI for NLP include raw declarative representations and natural language explanations. Raw declarative representations assume that end-users are more advanced and can understand learned declarative representations, such as logic rules, trees, and programs. Natural language explanation is any human-comprehensible natural language, generated from sophisticated deep learning models. For example, these can be generated using a simple template-based approach or a more complex deep generative model. At its core, it turns rules and programs into human-readable language. Conclusion The survey presented displays the connection between XAI and NLP, specifically how XAI can be applied to an NLP-based system. The field of XAI is meant to add explainability as a much-desired feature to ML models, adding to the model’s overall prediction quality and interpretability. Explainability can be categorized into different sectors of the NLP model, as well as being depicted by different visualization techniques seen above. Because of the large-scale presence of NLP around us, including chat boxes, predictive typing, auto-correct, and machine translation, it is important for any end-user, especially in NLP-based organizations, to understand the behind-the-scenes grunt work of the model. XAI allows for the end-user to gain trust in the NLP application being used and therefore allowing for a positive feedback loop, to ultimately make the algorithm even better. As XAI is still a growing field, there is plenty of room for innovation on improving the explainability of NLP systems. TAUS provides professional language data services to some of the world’s largest technology companies. Our data collection, annotation, processing and NLP capabilities and global data contributors at scale remain a source of competitive advantage for leaders in artificial intelligence (AI) and machine learning (ML) space.
随着人工智能在医疗、教育、建筑、环境、自主机器和执法等高风险行业变得越来越突出,我们发现越来越需要信任决策过程。这些预测通常需要非常准确,例如,在医疗保健中的关键生死情况。由于人工智能对我们的日常生活产生了重要而直接的影响,决策者需要对人工智能系统和预测过程的机制有更多的洞察力和可见度。目前,通常只有数据科学家或工程师等技术专家了解后端流程和算法,如高度复杂的深度神经网络。缺乏可解释性已表明是技术和非技术从业人员之间脱节的一种手段。为了使这些AI系统更加透明,可解释AI (XAI)领域应运而生。 可解释人工智能(XAI)是人工智能领域的一个新兴子集,专注于机器学习(ML)模型的可读性。这些工具帮助您理解和解释您的预测,降低复杂性,并允许未经技术培训的实践者和涉众更多地了解建模过程。XAI的核心目标是解构人工智能的黑盒子决策过程。XAI可以回答这样的问题:“为什么做出这样的预测?”或者“我对这个预测有多大信心?”或者“为什么这个系统会失败?” NLP和XAI 自然语言处理(NLP)是人工智能(AI)和机器学习(ML)的一个子集,旨在理解人类语言。NLP使用文本数据执行主题分类、翻译、情感分析和预测拼写等任务。历史上,NLP一直基于可解释的模型,即所谓的白盒技术。这些技术包括容易解释的模型,如决策树、基于规则的建模、马尔可夫模型、逻辑回归等。然而,近年来,可解释性的水平已经降低到黑盒技术,如深度学习方法和语言嵌入特征的使用。随着可解释性的降低,信任也会降低,特别是在人机交互(HCI)方面,例如聊天框。 然而,模型可解释性到底意味着什么呢?根据IBM的一项研究调查,可解释性可以定义为“理解模型如何得到其结果,也称为结果解释问题”。如果最终用户能够理解基于nlp的预测背后的原因,那么就可以假设更多的信任将会增长。此外,这允许从用户到开发交互的积极反馈循环。一些可解释性的描述包括对单个预测的解释或对整个模型预测过程的解释。 IBM-XAI对NLP的研究 IBM的一组研究人员进行了一项名为“用于自然语言处理的可解释人工智能现状调查”的调查。作为少数研究NLP和NLP交叉的著作之一,该调查旨在提供对XAI和NLP的当前状态的理解,解释当前可用的技术,并引起研究社区对当前存在的差距的关注。使用的解释类别包括解释是针对单个预测(局部)还是作为一个整体(全局)的模型预测过程。这两种类型之间的主要区别是,第一种解释是在预测过程中输出的(自解释),而第二种解释需要在模型的预测过程之后进行后处理(post-hoc)。作者进一步介绍了其他可解释性方面,包括向最终用户提供解释和表示类型的技术。 研究人员在本研究中提出了五种主要的NLP可解释性技术,它们表征了原始技术组件,以向最终用户提供最终的解释。以下列出了这些问题: Feature importance:使用给定特征的重要性得分,最终用于输出最终的预测结果。基于文本的功能对人类来说更直观,可以基于功能的重要性进行解释。 代理模型:用于解释模型预测的第二种模型或代理模型。这些代理模型既可以实现局部解释,也可以实现全局解释。这种方法的一个缺点是,在进行预测时,学习到的代理模型和原始模型可能使用不同的方法。 示例驱动:使用与输入示例语义相似的、通常来自标记数据的示例来解释给定的预测。示例驱动解释的一个例子是使用最近邻方法,这种方法已经在文本分类和问题回答等领域使用过。 基于起源的:利用部分或全部预测推导过程的例证。当预测是一系列决策规则或推理步骤的结果时,这通常是一种有效的可解释技术。 声明式归纳:涉及人类可读的转换,例如提供可解释性的规则和程序。 XAI可以以不同的方式呈现给用户,这取决于所使用的模型复杂性和可解释性技术。可视化最终的使用对NLP中XAI方法的成功与否有很大的影响。让我们来看看NLP中常用的注意力机制,它学习给定特征集的权重(重要性分数)。注意力机制通常以原始分数或显著热图的形式呈现出来。图1显示了注意力得分的显著性热图可视化示例。 图1 -每个翻译步骤的权重分配 基于salib的可视化专注于使更重要的属性或因素对最终用户更可见。在XAI中,显著性通常用来描述AI系统中不同元素的重要性分数。基于显著性的可视化示例包括突出显示文本中的重要单词和热图。 XAI用于NLP的其他可视化技术包括原始声明表示和自然语言解释。原始声明表示假设最终用户更高级,可以理解经过学习的声明表示,如逻辑规则、树和程序。自然语言解释是任何人类可以理解的自然语言,由复杂的深度学习模型生成。例如,这些可以使用简单的基于模板的方法或更复杂的深层生成模型生成。其核心是将规则和程序转换成人类可读的语言。 结论 该调查展示了XAI和NLP之间的联系,特别是XAI如何应用于基于NLP的系统。XAI领域的目的是将可解释性作为迫切需要的特性添加到ML模型中,增加模型的总体预测质量和可解释性。可解释性可以分为NLP模型的不同部分,也可以通过上面看到的不同可视化技术来描述。由于NLP在我们周围的大规模存在,包括聊天框、预测输入、自动更正和机器翻译,对于任何终端用户,尤其是基于NLP的组织,了解模型的幕后繁重工作都是重要的。XAI允许终端用户对正在使用的NLP应用程序获得信任,从而允许一个正反馈循环,从而最终使算法变得更好。由于XAI仍然是一个不断发展的领域,在提高NLP系统的可解释性方面还有很大的创新空间。 TAUS为一些全球最大的科技公司提供专业的语言数据服务。我们的数据收集、注释、处理和NLP能力以及全球规模的数据贡献者仍然是人工智能(AI)和机器学习(ML)领域领导者的竞争优势来源。

以上中文文本为机器翻译,存在不同程度偏差和错误,请理解并参考英文原文阅读。

阅读原文