本スライドは、弊社の梅本により弊社内の技術勉強会で使用されたものです。
近年注目を集めるアーキテクチャーである「Transformer」の解説スライドとなっております。
"Arithmer Seminar" is weekly held, where professionals from within and outside our company give lectures on their respective expertise.
The slides are made by the lecturer from outside our company, and shared here with his/her permission.
Arithmer株式会社は東京大学大学院数理科学研究科発の数学の会社です。私達は現代数学を応用して、様々な分野のソリューションに、新しい高度AIシステムを導入しています。AIをいかに上手に使って仕事を効率化するか、そして人々の役に立つ結果を生み出すのか、それを考えるのが私たちの仕事です。
Arithmer began at the University of Tokyo Graduate School of Mathematical Sciences. Today, our research of modern mathematics and AI systems has the capability of providing solutions when dealing with tough complex issues. At Arithmer we believe it is our job to realize the functions of AI through improving work efficiency and producing more useful results for society.
本スライドは、弊社の梅本により弊社内の技術勉強会で使用されたものです。
近年注目を集めるアーキテクチャーである「Transformer」の解説スライドとなっております。
"Arithmer Seminar" is weekly held, where professionals from within and outside our company give lectures on their respective expertise.
The slides are made by the lecturer from outside our company, and shared here with his/her permission.
Arithmer株式会社は東京大学大学院数理科学研究科発の数学の会社です。私達は現代数学を応用して、様々な分野のソリューションに、新しい高度AIシステムを導入しています。AIをいかに上手に使って仕事を効率化するか、そして人々の役に立つ結果を生み出すのか、それを考えるのが私たちの仕事です。
Arithmer began at the University of Tokyo Graduate School of Mathematical Sciences. Today, our research of modern mathematics and AI systems has the capability of providing solutions when dealing with tough complex issues. At Arithmer we believe it is our job to realize the functions of AI through improving work efficiency and producing more useful results for society.
12. Copyright (C) Present Square Co., Ltd. All Rights Reserved.
3. 手法
12
• 各画像とテキストの類似度を取得。
• バッチ内のN個の実ペアの画像とテキストのエンベディングのコサ
イン類似度を最大化する一方で、不正確なペアのエンベディン
グのコサイン類似度を最小化する。
CLIPのモデル:(1)対照事前学習
13. Copyright (C) Present Square Co., Ltd. All Rights Reserved.
3. 手法
13
CLIPのモデル
(2)ラベルテキストからデータセット
分類器を作成
(3)ゼロショット予測
• プロンプト“ a photo of a {object}”の付与
など。
16. Copyright (C) Present Square Co., Ltd. All Rights Reserved.
3. 手法
プロンプトエンジニアリング
16
必要となる背景
⑴多義語問題 • 多義語の意味が定まらないという問題。
例)cranes(動物の鶴と重機のクレーン)、boxer (動物の犬種とスポーツ選手)
⑵単語問題 • 与えるカテゴリーリストが単語だけでは高い精度での予測ができないという問題。
対応
• プロンプトを“ a photo of a {label}”とする。(ImageNetの場合、1.3%の
性能の改善)
• ” a photo of a {label}, a type of pet” など、ベンチマークデータセットのタイ
プがわかっている場合は情報を追加。
• OCRデータセットでは、認識したいテキストや数字の周りに引用符を付けることや、
衛星画像の照合データセットでは画像がどの形式のものであるかを特定できる ” a
satellite photo of a {label}. “といった工夫が行われている。
• 加えて、プロンプトのアンサンブル学習(80の異なるプロンプトを利用)することで
3.5%の精度上昇が確認された。(両対応で約5%の上昇。)
17. Copyright (C) Present Square Co., Ltd. All Rights Reserved.
4. 実験
出力例
17
• 画素が低いものに弱い傾向
• プロンプトエンジニアリングを含む
25. Copyright (C) Present Square Co., Ltd. All Rights Reserved.
Appendix
参考文献
• Desai, K. and Johnson, J. Virtex: Learning visual representations from textual annotations. arXiv preprint
arXiv:2006.06666, 2020.
• Zhang, Y., Jiang, H., Miura, Y., Manning, C. D., and Langlotz, C. P. Contrastive learning of medical visual representations
from paired images and text. arXiv preprintarXiv:2010.00747, 2020.
• Griewank, A. and Walther, A. Algorithm 799: revolve: an implementation of checkpointing for the reverse or adjoint
mode of computational differentiation. ACM Transactions on Mathematical Software (TOMS), 26(1):19–45, 2000.
• Micikevicius, P., Narang, S., Alben, J., Diamos, G., Elsen, E., Garcia, D., Ginsburg, B., Houston, M., Kuchaiev, O.,
Venkatesh, G., et al. Mixed precision training. arXiv preprint arXiv:1710.03740, 2017.
• Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. Attention is all
you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
• Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold,
G., Gelly, S., et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint
arXiv:2010.11929, 2020.
• Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell,
A., et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
25