## 文章連結
- [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/pdf/2103.00020.pdf)
### 摘要
- State-of-the-art computer vision systems are trained to predict a fixed set of predetermined object categories.
- 最先進的計算機視覺系統被訓練以預測一組固定的預先確定的物體類別。
- This restricted form of supervision limits their generality and usability since additional labeled data is needed to specify any other visual concept.
- 這種受限的監督形式限制了它們的通用性和可用性,因為需要額外的標記數據來指定任何其他視覺概念。
- Learning directly from raw text about images is a promising alternative which leverages a much broader source of supervision.
- promising 有前途的,有希望的
- leverages 利用 發揮
- broader source of supervision 廣泛的監督來源
- We demonstrate that the simple pre-training task of predicting which caption(標題) goes with which image is an efficient and scalable way to learn SOTA image representations from scratch on a dataset of 400 million (image, text) pairs collected from the internet.
- After pre-training, natural language is used to reference learned visual concepts (or describe new ones) enabling zero-shot transfer of the model to downstream tasks
- We study the performance of this approach by benchmarking on over 30 different existing computer vision datasets, spanning tasks such as OCR, action recognition in videos, geo-localization, and many types of fine-grained object classification
- The model transfers non-trivially(棘手的,不易解決的) to most tasks and is often competitive with a fully supervised baseline without the need for any dataset specific training.
### 結論
- We have investigated whether it is possible to transfer the success of task-agnostic web-scale pre-training in NLP to another domain.
- 我們已經調查了在自然語言處理(NLP)中的任務不可知的大規模預訓練是否能夠轉移到另一個領域。
- We find that adopting(採用) this formula results in similar behaviors emerging(出現) in the field of computer vision and discuss the social implications of this line of research(研究方向)
- 我們發現採用這個公式會導致在計算機視覺領域出現類似的行為,並討論這一研究方向的社會影響。
- This task learning can then be leveraged(利用) via natural language prompting to enable zero-shot transfer to many existing datasets.
- 透過自然語言提示語句,這種任務學習可以實現對許多現有數據集的零-shot轉移。
- In order to optimize their training objective, CLIP models learn to perform a wide variety of tasks during pretraining.
- 為了優化其訓練目標,CLIP 模型在預訓練期間學會執行各種各樣的任務
- At sufficient scale, the performance of this approach can be competitive with task-specific supervised models although there is still room for much improvement.
- 在足夠的規模下,這種方法的性能可以與特定任務的監督模型競爭,儘管仍有很大的改進空間。
# Chapter3
## 3.1.4
- 該章節很多的 dataset 的議題,許多 dataset 是建立是基於該領域的特定問題
- 除此之外在資料上還有許多問題
- 包括 會有部分的資料集的 context 重複,同個字詞卻帶有不同的意思
- 也有部分資料集的 label 是 encoding 不是文字,由於該篇文章最主要的目標是在於透過大量的圖片與文字的資料交由自然語言模型學習,希望該模型具有 zero-shot learning,for image classification,所以對於這種只有 encoding 的 label 但卻沒有相對應的 context label 的資料就會有訓練上的困難
### 提高性能
#### 提示工程
- 由於一個單字沒有上下文,這邊的解法是使用這樣的一個 prompt template 'A photo of a {label}' 來去做他的文本內容,使用該 prompt template有助於提高在 ImageNet 上的準確性,
- 通過定制每個任務的提示文本,可以顯著提高零-shot性能
- 對於OCR數據集,發現在要識別的文本或數字周圍加上引號可以提高性能
- 我們還嘗試使用多個零樣本分類器進行合成,這是另一種提高性能的方法
- ensembling over multiple zeroshot classifiers as another way of improving performance
## 3.1.5
### 實驗結果
- CLIP實現了99.3%的整體性能,這似乎是一種新的技術水平,盡管沒有使用任何訓練示例。零樣本CLIP在兩個測量視頻中的動作識別的數據集上明顯優於ResNet-50。在
- Kinetics700上,CLIP的性能優於ResNet-50 14.5%
- UCF101上優於ResNet-50的性能7.7%
- 我們推測這可能是由於自然語言為涉及動詞的視覺概念提供了更廣泛的監督,相較於ImageNet中以名詞為中心的對象監督。
- 零樣本CLIP在一些專業、複雜或抽象的任務上表現相當弱,例如衛星影像分類(EuroSAT和RESISC45)、淋巴結腫瘤檢測(PatchCamelyon)、合成場景中的物體計數(CLEVRCounts)以及與自動駕駛相關的任務
- 突顯了零樣本CLIP在更複雜任務上的能力不足。相比之下,非專業的人類能夠堅實地完成其中的一些任務,例如計數、衛星影像分類和交通標誌識別,這表明還有很大的改進空間
- CLIP的零樣本分類器是通過自然語言生成的,這允許直接指定視覺概念,對於這篇論文來說,label 是一個間接的資料
- 正常”的監督學習必須間接從訓練示例中推斷概念。無上下文的基於示例的學習的缺點是許多不同的假設都可以與數據一致,尤其是在單樣本的情況下。一張圖片通常包含許多不同的視覺概念。儘管一個能幹的學習者能夠利用視覺線索和啟發法,例如假設正在演示的概念是圖片中的主要對象,但這並不保證。
- 文中有嘗試使用 CLIP 作為 pre-trained model, 加入正則化過後他仍是一個 zero-shot 分類器,但我們發現超參數優化通常會選擇這個正則化器的一個很大的值,導致生成的少樣本分類器“僅僅”是零樣本分類器
- 更好地結合零樣本轉移的強度與少樣本學習的靈活性的研究是未來工作的一個有希望的方向。
- 零樣本分類器的性能仍然比完全監督分類器低 10% 到 25%,這表明 CLIP 的任務學習和零樣本轉移能力仍有很大的提升空間。
### 補充資源
- [CLIP: Connecting Text and Images](https://blog.infuseai.io/openai-%E7%9A%84-multimodal-%E7%A5%9E%E7%B6%93%E7%B6%B2%E8%B7%AF-%E4%B8%8B-clip-connecting-text-and-images-2e9962905504)
- [CLIP 原文]