Counterfactual VQA: A Cause-Effect Look at Language Bias
概
利用因果分析消除VQA(Visual Question Answering (VQA))中的language bias.
主要内容

如上图所示,
\(Q\): question;
\(V\): image;
\(K\): multi-modal knowledge;
\(A\): answer.
影响最后决策\(A\)有三种:
- \(Q \rightarrow A\), 直接受question影响, 比如模型对于所有的问图中的香蕉是什么颜色的问题均回答"黄色", 显然是不考虑图片的影响(因为可能是绿色), 这种实际上就是language bias;
- \(V \rightarrow A\), 直接受图片影响;
- \(V, Q \rightarrow K \rightarrow A\), 这里有一个mediator K, 即部分影响兼顾了\(Q, V\).
理想的VQA模型应该舍弃1中的影响, 在因果分析里头, 这部分direct effect被称之为natural direct effect (pure direct effect实际上):
\]
余下的是TIE (total indirect effect):
\]
作者的思路是在inference的时候找到一个\(a\), 最大化TIE.
需要说明的是:
=\mathrm{Pr}[A|Q, V]\\
\mathrm{Pr}[A|do(Q, V^*, K^*)]
=\mathrm{Pr}[A|Q, V^*, K^*]\\
\]
这条件成立的原因单纯是因为作者的假设中并没有confounder, 实际上个人认为应当加一个\(V \rightarrow A\)的 arrow, 虽然这个并不影响上面的结论.
然后作者计算TIE也并不是针对\(A\), 而是\(A\)的score, \(Z=Z(Q=q, V=v, K=k)\).
实现

不同以往, 这一次可以显示地设置\(v^*, k^*\)了:
\]
特别的, 在\(q^*, v^*, k^*\)的情况下, 作者采取了如下的策略:
\left \{
\begin{array}{ll}
z_q = \mathcal{F}_Q(q), & \mathrm{if}\: Q= q \\
z_{q^*} = c, & \mathrm{if}\: Q=\empty.
\end{array}
\right .
\]
\left \{
\begin{array}{ll}
z_v = \mathcal{F}_V(v), & \mathrm{if}\: V= v \\
z_{v^*} = c, & \mathrm{if}\: V=\empty.
\end{array}
\right .
\]
\left \{
\begin{array}{ll}
z_k = \mathcal{F}_{VQ}(v,q), & \mathrm{if}\: V=v, Q = q \\
z_{k^*} = c, & \mathrm{if}\: V = \empty \: \mathrm{or}\: Q = \empty.
\end{array}
\right .
\]
这里\(c\)为可学习的变量.
注: 作者在代码中给出, \(c\)为一scalar, 也就是说实际上是:
\]
作者也在文中指出, 这是为了一个Uniform的假设.
注: 看起来, 似乎应该对不同的\(Z_*\)指定不同的\(c\), 但是实际上, 是不影响的. 这一点是因为在下面HM和SUM的处理方式中, 无论是\(c_1\cdot c_2\cdot c_3\)
还是\(c_1 + c_2 + c_3\)都等价于\(c\) (这里要感谢作者的答复).
有了上面的准备, 下面是\(h\)的构造, 因为我们需要把不同的特征融合起来, 作者给出了两种方案:
- Harmonic (HM):
\]
- SUM:
\]
在训练的时候, 用的是如下的损失:
\]
以及, 为了训练\(c\)(且仅用于训练c),
\]
其中\(p(a|q,v,k)=softmax(Z_{q,v, k})\).
虽然感觉可以直接通过最大化TIE来训练c比较合理, 但是正如作者在附录中给出的解释一下, 这种情况明显会导致\(c \rightarrow 0\)并导致\(Z_{q, v^*, k^*}\rightarrow -\infty\).
代码
Counterfactual VQA: A Cause-Effect Look at Language Bias的更多相关文章
- 【论文笔记】用反事实推断方法缓解标题党内容对推荐系统的影响 Click can be Cheating: Counterfactual Recommendation for Mitigating Clickbait Issue
Click can be Cheating: Counterfactual Recommendation for Mitigating Clickbait Issue Authors: 王文杰,冯福利 ...
- 关于《阿里巴巴Java开发规约》插件的安装与使用
一.安装 二.idea插件的安装与使用 https://github.com/alibaba/p3c/tree/master/idea-plugin#run-plugin Idea Plugin Pr ...
- OpenGL book list
From: https://www.codeproject.com/Articles/771225/Learning-Modern-OpenGL A little guide about mo ...
- 机器学习中模型泛化能力和过拟合现象(overfitting)的矛盾、以及其主要缓解方法正则化技术原理初探
1. 偏差与方差 - 机器学习算法泛化性能分析 在一个项目中,我们通过设计和训练得到了一个model,该model的泛化可能很好,也可能不尽如人意,其背后的决定因素是什么呢?或者说我们可以从哪些方面去 ...
- The 11 advantages of Java -Why you choose this language
Java is never just a language.There are lots of programming languages out there, and few of them mak ...
- The Django template language 阅读批注
The Django template language About this document This document explains the language syntax of the D ...
- The Go Programming Language. Notes.
Contents Tutorial Hello, World Command-Line Arguments Finding Duplicate Lines A Web Server Loose End ...
- A Language Modeling Approach to Predicting Reading Difficulty-paer
Volume:Proceedings of the Human Language Technology Conference of the North American Chapter of the ...
- 函数式编程语言(Fuction Program Language)
一.什么是函数式编程语言 函数式编程语言(functional progarm language)一类程序设计语言,是一种非冯·诺伊曼式的程序设计语言.函数式语言主要成分是原始函数.定义函数和函数型. ...
随机推荐
- acre, across
acre The acre is a unit of land area used in the imperial and US customary systems. It is traditiona ...
- Vue框架,computed和watch的区别
computed和watch定义 1.computed是计算属性,类似于过滤器,对绑定到视图的数据进行处理.官网的例子: <div id="example"> < ...
- Undefined symbols for architecture arm64:问题
Undefined symbols for architecture arm64: "_sqlite3_prepare_v2", referenced from: +[HMJSch ...
- JConsole可视化工具
JConsole基本介绍 Jconsole (Java Monitoring and Management Console),一种基于JMX的可视化监视.管理工具.JConsole 基本包括以下基本功 ...
- Dubbo多协议支持
除了Dubbo服务暴露协议Dubbo协议外,Dubbo框架还支持另外8种服务暴露协议:RMI协议.Hessian协议.HTTP协议.WebService协议.Thrift协议.Memcached协议. ...
- 【Python】【Algorithm】排序
冒泡排序 dic = [12, 45, 22, 6551, 74, 155, 6522, 1, 386, 15, 369, 15, 128, 123, ] for j in range(1, len( ...
- 使用beanFactory工厂实例化容器的方式实现单例模式
//配置文件bean.properties(注意书写顺序) accountService=com.itheima.service.impl.AccountServiceImplaccountDao=c ...
- 【C/C++】旋转数组的最小数字/ 剑指offer
#include <bits/stdc++.h> using namespace std; class Solution { public: int minNumberInRotateAr ...
- Python 3 字典(Dictionary)
字典是另一种可变容器模型,且可存储任意类型对象. 字典的每个键值 key=>value 对用冒号 : 分割,每个键值对之间用逗号 , 分割,整个字典包括在花括号 {} 中 ,格式如下所示: d ...
- Hadoop期末复习
Hadoop期末复习 选择题 以下选项中,哪个程序负责HDFS数据存储. B A.NameNode B.DataNode C.Secondary NameNode D.ResourceManager ...