3

通用多模态预训练方法OFA

 1 year ago
source link: https://nicehuster.github.io/2022/09/09/OFA/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

OFA是阿里达摩院发表在ICML2022上有关多模态预训练的工作,论文链接:OFA: Unifying Architectures, Tasks, and Modalities Through a Simple Sequence-to-Sequence Learning Framework。OFA是通用多模态预训练模型,使用简单的seq2seq的学习框架统一模态(跨模态、视觉、语言等模态)和任务(如图片生成、视觉定位、图片描述、图片分类、文本生成等),OFA通过任务指令即可执行pretrain/finetune,无需引入额外设计任务layer或head,OFA在一系列多模态任务上达到了sota结果。

image-20220914162624793

Once For All(OFA)

image-20220914163046310

I/O & Architecture

多模态输入大致分为:图片、文本、位置(坐标)。OFA针对这些不同的输入形式同一成序列形式。对应处理方法如下:

  • 图片输入:使用类似SimVLM和CoAtNet的方式,直接使用ResNet模块将图片卷积成多个patch特征;
  • 文本输入:使用byte-pair encoding (BPE)进行subword级别分词,然后进行embed;
  • 位置(坐标):针对目标框类型的输入,把位置编码成token,每个检测框用四个token表示,参考pix2seq做法;,y1,x2,y2>
  • 统一的词表:语言和视觉token被统一起来,包括subword、图像token和位置token。

Tasks & Modalities

OFA将单模态/多模态的理解/生成任务统一成seq2seq任务,每个任务通过任务指令进行区分:

  • visual grounding (VG):“Which region does the text xtxt describe?” xtxt 目标区域的文本描述;
  • grounded captioning(GC):VG的反向任务,“What does the region describe? region: $$ ”.,y_1,x_2,y_2>
  • image-text matching (ITM):“Does the image describe xtxt ?” xtxt 是图片的描述;
  • image captioning (IC):“What does the image describe?”
  • visual question answering (VQA):使用image和question作为输入,学习正确的答案;
  • Detection:“What are the objects in the image?”
  • image infilling:“What is the image in the middle part?”

在附录中,列举了针对不同任务数据集下的指令,如下表所示:

image-20220914171851379

Experiments

OFA在image caption、VQA、visual entailment 和 referring expression comprehension 4个跨模态任务中都取得了SOTA。

image-20220914173932416

在image-to-text generation任务中,OFA 也超过了DALLE, CogView和微软的NÜWA模型。

image-20220914174359855

Conclusion

OFA在整体工作上并没有提出新的框架,也没有给人一种眼前一亮的感觉,但是就是抵不住效果好,而且将多种模态\任务都统一成seq2seq任务,做的实验非常solid,而且还开源了代码,很赞。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK