Auto-Encoding Scene Graphs for Image Captioning 论文阅读笔记

Auto-Encoding Scene Graphs for Image Captioning 论文阅读笔记

原文地址

时间:2018年

Introduction

end-to-end encoder-decoder模型存在一个问题:当将一张包括未见过的场景输入到网络中时,返回的结果仅仅就是一些显著的object,比如“there is a dog on the floor”,这样的结果与object detection几乎没有区别

认知上的证据表明,基于视觉的语言并非是end-to-end的,而是与高层抽象的符号相关,如果我们将scene抽象成符号,生成过程就会十分清晰,比如对于这幅图片
在这里插入图片描述
scene abstraction是“helmet-on-human”和"road dirty",我们则可以生成"a man with a helmet in contryside"通过使用一个常识:country road is dirty,这种推断就是inductive bias

本文将inductive bias融合到encoder-decoder中来进行image captioning,利用符号推理和端到端多模型特征映射互补,通过scene graph( G \mathcal{G} G)来bridge它们,一个scene graph( G \mathcal{G} G)是一个统一的表示,它连接了以下几个部分

  • objects(or entities)
  • their attributes
  • their relationships in an image( I \mathcal{I} I) or a sentence( S \mathcal{S} S),通过有向边表示

key insight:the vector representations are expected to transfer the inductive bias from the pure language domain to the vision-language domain

作者提出了Scene Graph Auto-Encoder(SGAE),作为一个句子重建网络,其过程是 S → G → D → S \mathcal{S}\rightarrow\mathcal{G}\rightarrow\mathcal{D}\rightarrow\mathcal{S} SGDS
其中 D \mathcal{D} D是一个 可训练的字典,用来记录结点特征, S → G \mathcal{S}\rightarrow\mathcal{G} SG使用现成的scene graph language parser[1], D → S \mathcal{D}\rightarrow\mathcal{S} DS是一个可训练的RNN decoder,注意 D \mathcal{D} D是"juice"——即language inductive bias,在训练SGAE中得到,通过将 D \mathcal{D} D共享给encoder-decoder的pipline: I → G → D → S \mathcal{I}\rightarrow\mathcal{G}\rightarrow\mathcal{D}\rightarrow\mathcal{S} IGDS,即可利用语言先验来指导端到端模型,具体的 I → G \mathcal{I}\rightarrow\mathcal{G} IG是一个visual scene graph detector[52],引入multi-modal GCN来进行 G → D \mathcal{G}\rightarrow\mathcal{D} GD的过程,来补足detection的不足之处,有趣的是, D \mathcal{D} D可以被视作为一个working memory,用来从 I → S \mathcal{I}\rightarrow\mathcal{S} IS re-key encoded nodes,以更小的domain gap来得到一个更一般的表达,

Contrubution

  • 一个先进的SGAE模型,可以学习language inductive bias的特征表达
  • 一个multi-model 图卷积网络,用来调节scene graph到视觉表达
  • 一个基于SGAE的 encoder-decoder image captioner with a shared dictionary guiding the language decoding

Encoder-Decoder

给一张图片 I \mathcal{I} I,我们需要生成一句话 S = { w 1 , w 2 , . . . , w T } \mathcal{S}=\{w_1,w_2,...,w_T\} S={w1,w2,...,wT},state-of-the-art的image captioner是如下形式
在这里插入图片描述
通常,encoder是一个卷积神经网络,map是一个attention mechanism,将feature编码到一个更加informative的空间中,decoder是一个RNN-based 语言decoder,来预测 S \mathcal{S} S,给定label S ∗ \mathcal{S^*} S I I I通过最小化交叉熵函数
在这里插入图片描述
或者通过强化学习最大化
在这里插入图片描述
这是目前几乎所有state-of-the-art的image captioning模型的基本架构,但它有 dataset bias,为了解决这个问题,我们使用language inductive bias,可以表示为
在这里插入图片描述
随后我们将使用SGAE来学习 D \mathcal{D} D,通过sentence self-reconstruction with the help of scene graphs,然后我们将encoder-decoder equip上SGAE作为全局的image captioner,特别的是我们使用 D \mathcal{D} D和Multi-model 图卷积网络来re-encode 图像的 features

Auto-Encoding Scene Graphs

本节介绍如何通过self-reconstructing学习 D \mathcal{D} D,如图所示
在这里插入图片描述
SGAE的过程如下
在这里插入图片描述

Scene Graphs

S → G \mathcal{S}\rightarrow\mathcal{G} SG,从sentence到scene graph,scene graph是一个元组 G = ( N , ε ) \mathcal{G}=(\mathcal{N},\mathcal{\varepsilon}) G=(N,ε),其中 N \mathcal{N} N ε \mathcal{\varepsilon} ε是边节点和边的集合,有三种 N \mathcal{N} N:目标结点 o o o,属性结点 a a a,以及关系结点 r r r,记 o i o_i oi是第i个目标, a i , l a_{i,l} ai,l o i o_i oi的第 l l l个属性,每个结点以d-维向量表示,作者的实验中d=1000,结点的特征是可训练的label embedding

ε \mathcal{\varepsilon} ε的有以下几种

  • 如果一个目标 o i o_i oi有属性 a i , l a_{i,l} ai,l,则 o i o_i oi a i , l a_{i,l} ai,l有一条有向边
  • 如果存在三元组关系 < o i − r i j − o j > <o_i-r_{ij}-o_j> <oirijoj>,则 o i o_i oi r i j r_{ij} rij r i j 到 o j r_{ij}到o_j rijoj均有两条边

下图给了一个例子,其中包括七个结点六条边
在这里插入图片描述
使用[1]中的scene graph parser来得到 G \mathcal{G} G

graph convolution network

G → X \mathcal{G}\rightarrow\mathcal{X} GX,将node embedding e o , e a , e r e_o,e_a,e_r eo,ea,er转化成context-aware embedding X \mathcal{X} X X \mathcal{X} X包括三种d维 embedding:关系embedding x r i , j x_{r_{i,j}} xri,j for 关系结点 r i , j r_{i,j} ri,j,目标embedding for 目标结点 o i o_i oi,以及属性结点 x a i x_{a_i} xaifor目标结点 o i o_i oi,作者使用d=1000,使用四个空间图卷积(spatial graph convolutions): g r , g a , g s , g o g_r,g_a,g_s,g_o gr,ga,gs,go来生成上述的embedding,这四个网络有一样的结构,相互独立的参数
在这里插入图片描述
Relationship Embedding x r i , j x_{r_{i,j}} xri,j
对每个三元组 < o i − r i j − o j > <o_i-r_{ij}-o_j> <oirijoj> x r i , j x_{r_{i,j}} xri,j综合上下文信息
在这里插入图片描述
Attribute Embedding x a i x_{a_i} xai
对一个object结点 o i o_i oi x a i x_{a_i} xai综合它和它的所有属性
在这里插入图片描述
其中 N a i N_{a_i} Nai o i o_i oi的属性个数

Object Embedding x o i x_{o_i} xoi
x o i x_{o_i} xoi需要综合 o i o_i oi在整个graph中的主客体关系
在这里插入图片描述
o j ∈ s b j ( o i ) o_j\in sbj(o_i) ojsbj(oi)表示 o i o_i oi是subject, o j o_j oj是object, N r i = ∣ s b j ( i ) ∣ + ∣ o b j ( i ) ∣ N_{r_i}=|sbj(i)|+|obj(i)| Nri=sbj(i)+obj(i)

Dictionary

这一步学习 D \mathcal{D} D并用它re-encode R ( X ; D ) → X ^ R(\mathcal{X};\mathcal{D})\rightarrow\hat{\mathcal{X}} R(X;D)X^的方法,核心观点是保留working memory来执行dynamic knowledge base for run-time inference。 D \mathcal{D} D的目标是embed language inductive bias到语言合成中。

这个过程就是学习一个字典 D = d 1 , d 2 , . . . , d K ∈ R d × K D={d_1,d_2,...,d_K}\in R^{d\times K} D=d1,d2,...,dKRd×K,文章设K=10,000,re-encode:
在这里插入图片描述
其中
在这里插入图片描述
是memory network中的核心操作
使用[2]中的attention structure来reconstruction S \mathcal{S} S

Overall Model: SGAE-based Encoder Decoder

在这里插入图片描述
在这里插入图片描述

Multi-modal Graph Convolution Network

通过multi-modal图卷积网络将visual feature V \mathcal{V} V转化成graph-modulated features V ′ \mathcal{V'} V,此处的scene graph G \mathcal{G} G是由image scene graph parser得到的,它包括一个object proposal detector(Faster-RCNN),一个attribute classifier(一个小的fc-ReLU-fc-Softmax network) 和一个relationship classifier(MOTIFS)。

将检测到的label embedding e o i e_{o_i} eoi和visual feature v o i v_{o_i} voi融合在一起成为新的结点特征 u o i u_{o_i} uoi
在这里插入图片描述
其余的embedding u r i j u_{r_ij} urij u a i u_{a_i} uai按照类似的方法生成,image G \mathcal{G} G 和 sentence G \mathcal{G} G的不同在于前者simpler,nosier,如图所示
在这里插入图片描述
生成 G \mathcal{G} G之后,计算embedding和re-encode的过程与处理sentence G \mathcal{G} G类似

结论

本文将 language inductive bias 融合到了image caption中,实现了more human-like的 language generation,主要方法是使用基于scene graph G \mathcal{G} G的feature,学习并共享一个字典 D \mathcal{D} D来re-encode这个feature。

问题

  • pure language domain 和 vision-language domain 有啥区别
  • 有了边表示关系那关系结点是干啥的
    表示不同的关系,比如wear hold等等
  • 8
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值