YH Hsu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    3
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # [Self-supervised] Self-supervised Learning 與 Vision Transformer重點筆記與近期發展 ###### tags: `Literature Reading` `Self-supervised` `Transformer` ### [AI / ML領域相關學習筆記入口頁面](https://hackmd.io/@YungHuiHsu/BySsb5dfp) --- ## 一、 Self-supervised Learning(SSL) ### 概念 - 蛋糕類比 > “If intelligence is a cake, the bulk of the cake is self-supervised learning, the icing on the cake is supervised learning, and the cherry on the cake is reinforcement learning (RL).” -Yann LeCun, ICIP 2019 - [Yann LeCun @EPFL - "Self-supervised learning: could machines learn like humans?"](https://www.youtube.com/watch?v=7I0Qt7GALVk&t=2639s) ![](https://i.imgur.com/LU5zaoP.png =600x) - [Self-supervised learning: The dark matter of intelligence](https://ai.facebook.com/blog/self-supervised-learning-the-dark-matter-of-intelligence?__cft__[0]=AZVTDT42d0egw9JDQlqjyKS5Gpi8u6eLUDPln_dZjdGp3aa2XcpYIeP44K5kI89hhOKKEjzkg1d3npc18rAwlAQrTjHlbSv-QxpMLPsJHx53dD9TXoXFFbnIEf-UH3xyPYHG2xMeATQYF98GabTT6FsorOzG-fVAjqeagzOTZdSB1aaKZXrC_lpu-CDxYU9ZP5Q&__tn__=R]-R) - 圖靈獎得主 Yann LeCun關於自監督學習的見解,也是更著重在用更少的標籤,或著讓模型自己去挖掘、學習分辨資料的特性,取代人為主觀、分類的標籤(監督式方法) > 一個工作假設是,關於世界的概括性知識,或常識,構成了人類和動物的生物智慧的大部分。 這種常識能力在人類和動物中被認為是理所當然的,但從一開始就一直是人工智慧研究中的一個公開挑戰。 在某種程度上,常識是人工智慧的暗物質。 > >常識幫助人們學習新技能,而不需要為每一項任務進行大量的教學。 例如,如果我們只給小孩子看幾張牛的畫,他們最終就能認出他們看到的任何牛。 相比之下,用監督學習訓練的人工智慧系統需要許多奶牛圖像的例子,並且可能仍然無法對不尋常情況下的奶牛進行分類,例如躺在海灘上。 為什麼人類可以在很少的監督下,在大約20個小時的練習中學會駕駛汽車,而我們最好的人工智慧系統在用人類司機數千小時的數據訓練后仍然無法實現完全自主駕駛? 簡短的答案是,人類依靠他們以前獲得的關於世界如何運作的背景知識。 > > 我們相信,自監督學習(self-supervised learning,SSL)是建立這種背景知識,並在 AI 系統中建立一種近似常識形式的最有前途的方法之一。自監督學習讓 AI 系統能夠從很少的數據中學習知識,這樣才能識別和理解世界上更微妙、更不常見的表示形式 - 實作方法上的解讀(見圖1): - 替數據加上標籤非常的昂貴(人力、時間、財力上),而無標籤的數據集成本相對低廉且易於取得 - 因此,自監督學習(SSL)的訓練分為兩階段: - 1. in a task-agnostic way - 使用大量的無標籤數據將模型訓練至初步成形,希望模型能夠學習到一種通用的特徵表達(Representation)用於下游任務 (Downstream Tasks)。 - 2. in a task-specific way - 使用帶標籤的相對小量數據,根據對應的下游任務(以是語音、文本或是圖像等各種模態),進一步將模型精煉到位(fine-tune)。 - 此階段理論上可以用相對小的數據量進行訓練,因為模型在第一階段已經學習到資料的特徵(模型的參數已經大致成形) ![圖1 自監督學習(SSL)的訓練兩階段] ![](https://i.imgur.com/IS4KSqi.png =500x) 圖1: [自監督學習(SSL)的訓練階段] (https://zhuanlan.zhihu.com/p/381354026) - Self-Supervised Learning 不僅是在NLP領域,在CV, 語音領域也有很多經典的工作,如下圖2所示。它可以分成3類:Data Centric, Prediction (也叫 Generative) 和 Constractive。 ![](https://i.imgur.com/4d8O7GS.png =600x) 图2:[各領域Self-Supervised Learning](https://zhuanlan.zhihu.com/p/381354026) #### SSL近期研究進展 - 待補 - 推薦學習資源 - [Self-Supervised Learning 超详细解读 (目录)](https://zhuanlan.zhihu.com/p/381354026) --- ## 二、 注意力機制 ### Attention Mechanism概念與脈絡 - Attention is a core ingredient of ‘conscious’ AI (ICLR 2020 Yoshua Bengio) - [ICLR 2020 Yoshua Bengio:注意力是「有意識」AI的核心要素](https://medium.com/@andy6804tw/yoshua-bengio-%E6%B3%A8%E6%84%8F%E5%8A%9B%E6%98%AF-%E6%9C%89%E6%84%8F%E8%AD%98-ai%E7%9A%84%E6%A0%B8%E5%BF%83%E8%A6%81%E7%B4%A0-f091a643d0fc) > 注意力機制(Attention),即人(或算法)一次專注於單個元素或多個元素的機制,是機器學習中的一種數據處理方法,廣泛應用在自然語言處理、圖像識別及語音識別等各種不同類型的機器學習任務中。 > > Bengio在其著作《Thinking, Fast and Slow》中描述了以美國心理學和經濟學家丹尼爾•卡尼曼(Daniel Kahneman)提出的認知系統。 > - 第一種是無意識的——它是直覺的和快速的,非語言和習慣性的,它只處理隱性的知識。 > - 第二種是有意識的——它是語言和算法的,它結合了推理和計劃,以及明確的知識形式。 - 人類的視覺注意力焦點 - 你可以在下面發現幾張臉? - ![](https://i.imgur.com/0Kf9Ha6.png =300x) - 注意力模型家族 ![](https://i.imgur.com/jr8Bo8l.png =500x) - from [An Attentive Survey of Attention Models](https://arxiv.org/pdf/1904.02874.pdf) - [[論文導讀] 注意力機制模型的分類](https://medium.com/ai-academy-taiwan/%E8%AB%96%E6%96%87%E5%B0%8E%E8%AE%80-%E6%B3%A8%E6%84%8F%E5%8A%9B%E6%A9%9F%E5%88%B6%E6%A8%A1%E5%9E%8B%E7%9A%84%E5%88%86%E9%A1%9E-bb827cf5865c) --- ## 三、 Self-Attention與Transformer - 詳見[Self-Attention與Transformer](https://hackmd.io/@YungHuiHsu/Sk94txrBq) #### Transformer模型的整體結構 - 模型架構 ![Transformer](https://i.imgur.com/ZMxXphs.png =300x) #### 第四大類深度學型模型 - Stanford大學在2021年底將transformer列為繼MLP, CNN, RNN之後的第四大類深度學型模型,把以transformer為基礎的一系列模型定義為foundation models。 - [2108.07258 On the Opportunities and Risks of Foundation Models](https://arxiv.org/abs/2108.07258) - [Foundation Models](https://blog.inten.to/foundation-models-b89e7610057) #### 與CNN、RNN對比 ![](https://i.imgur.com/vTDh4uv.png =500x) --- ## 四、Transformer在視覺領域的突破 ### Vision Transformer(ViT) - 首度完全捨棄CNN,將transformer結構應用於CV領域的,後續ViT相關改進大抵基於這篇論文 #### 原始論文:[An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) #### 模型主架構 ![](https://i.imgur.com/1PNfjqR.png =600x) - 圖1:模型概述。我們將圖像分割成固定大小的圖像塊(image patch/token),對每個圖像塊進行線性嵌入並添加位置資訊,並將得到的向量序列送入一個標準的Transformer編碼器。 - *為了進行分類,論文中使用標準的方法,在序列中加入一個額外的可學習的"分類標記 "到序列中。Transormer Encoder的圖示靈感來自於Vaswani等人(2017)。 - 相對於NLP領域的每個輸入單位使用的是Word Embedding,本篇論文提出了Patch Embedding作法,將影像切分為圖塊向量 - 詳見[Vision Transformer(ViT)重點筆記](https://hackmd.io/@YungHuiHsu/ByDHdxBS5) --- ## 五、 Self-Supervised x ViT - [自监督训练ViT最新进展梳理,NLP和CV统一的趋势来了?Kaiming新作MAE详解](https://www.bilibili.com/video/BV1TU4y1u7pe?spm_id_from=333.999.0.0) ![](https://hackmd.io/_uploads/rk-imVWxc.png) ### Masked Autoencoders: 結合Self-Supervised與ViT #### 原始論文: [:2111.06377 Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377) - 筆記見 [Masked Autoencoders(MAE)論文筆記](https://hackmd.io/lTqNcOmQQLiwzkAwVySh8Q) ## Deep Learning相關筆記 ### Self-supervised Learning - [[Self-supervised] Self-supervised Learning 與 Vision Transformer重點筆記與近期發展](https://hackmd.io/7t35ALztT56STzItxo3UiA) - [[Time Series] - TS2Vec(Towards Universal Representation of Time Series) 論文筆記](https://hackmd.io/OE9u1T9ETbSdiSzM1eMkqA) ### Object Detection - [[Object Detection_YOLO] YOLOv7 論文筆記](https://hackmd.io/xhLeIsoSToW0jL61QRWDcQ) ### ViT與Transformer相關 - [[Transformer_CV] Vision Transformer(ViT)重點筆記](https://hackmd.io/tMw0oZM6T860zHJ2jkmLAA) - [[Transformer] Self-Attention與Transformer](https://hackmd.io/fmJx3K4ySAO-zA0GEr0Clw) - [[Explainable AI] Transformer Interpretability Beyond Attention Visualization。Transformer可解釋性與視覺化](https://hackmd.io/SdKCrj2RTySHxLevJkIrZQ) - [[Transformer_CV] Masked Autoencoders(MAE)論文筆記](https://hackmd.io/lTqNcOmQQLiwzkAwVySh8Q) ### Autoencoder相關 - [[Autoencoder] Variational Sparse Coding (VSC)論文筆記](https://hackmd.io/MXxa8zesRhym4ahu7OJEfQ) - [[Transformer_CV] Masked Autoencoders(MAE)論文筆記](https://hackmd.io/lTqNcOmQQLiwzkAwVySh8Q)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully