Reverse Engineering AI Algorithms with XAI

本文探讨了如何通过可解释的人工智能(XAI)方法,特别是SHAP,来逆向工程AI算法。SHAP是一种源于游戏理论的模型无关的解释方法。文章介绍了SHAP的关键原则,如对称性、零玩家和加法性,并通过电影评论分析展示了SHAP的工作原理。此外,还提供了Python代码片段来创建线性模型解释器和绘制结果。
摘要由CSDN通过智能技术生成

Is it possible to reverse-engineer AI algorithms to understand their process? Can we use a model agnostic method that will explain AI without looking into the code at all? The answer to both questions is yes, we can. One method is SHAP.

Explainable Artificial Intelligence will become one of the key services AI will provide. As we know it today, social media forms a representation of society, not a full-blown social model. Our opinions, consumer habits, browsing data, and location history constitute a formidable data source for AI models. The sum of all of the information about our daily activities is challenging to analyze

We publish reviews everywhere. We write reviews about books, movies, equipment, smartphones, cars, and sports—everything in our daily lives. In this chapter, we will analyze IMDb reviews of films. IMDb offers datasets of review information for commercial and non -commercial use.

We will thus focus on SHapley Additive exPlanations (SHAP), part of the Microsoft Azure Machine Learning model interpretability solution. We can use "interpret" or "explain" for explainable AI. Both terms mean that we are providing an explanation or an interpretation of a model. We are also reverse-engineering the process of an algorithm.

SHAP was derived from game theory. Lloyd Stowell Shapley gave his name to this game theory model in the 1950s. In game theory, each player decides to contribute to a coalition of players to produce a total value that will be superior to the sum of their individual values. The Shapley value is the marginal contribution of a given player. The goal is to find and explain the marginal contribution of each participant in a coalition of players.

This article goes through:

  1. - the key principles of SHAP
  2. - the mathematical representation of SHAP
  3. - a snippet in Python to illustrate the method

Key SHAP principles

 In this section, we will learn about Shapley values ​​​​through the principles of symmetry, null players, and additivity

Symmetry

If all of the players in a game have the same contribution, their contributions will be symmetrical. Suppose that, for a flight, the plane cannot take off without a pilot and a copilot. They both have the same contribution.

Null player

A null player does not affect the outcome of a model. Suppose we now consider a player in a basketball team. During this game, the player was supposed to play offense. However, when playing offense, this player's leading partner is suddenly absent. The player is both surprised and lost. For some reason, this player will contribute nothing to the result of that specific game.

Additivity

Our null basketball player was lost in the previous null player game in the previous section. The team manager realizes the talent of another player and adds this player to the team. The new player will add value to the team.

Mathematical representation

In a coalition game (N,v) , we need to find the payoff division . The payoff division is a unique fair distribution of the marginal contribution of each player to that player .

As such, the Shapley value will satisfy the null player, additivity, and symmetry/asymmetry properties we described in the previous sections.

We use words as players. Words are features in movie reviews, for example. Words [AS1]  [DR2]  are also players in game theory.

Words are sequence sensitive, which makes them an interesting way to illustrate Shapley values.

Consider the following three words in a set, a coalition N :

​​​​​​​N = {excellent, not, bad}.  

​​​​​​​They

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值