最前沿:百家爭鳴的Meta Learning/Learning to learn

2020-12-13 雷鋒網

雷鋒網按 :本文作者Flood Sung,本文原載於其知乎專欄——智能單元。雷鋒網已獲得原作者授權。

1 前言

Meta Learning(元學習)或者叫做 Learning to Learn(學會學習)已經成為繼Reinforcement Learning(增強學習)之後又一個重要的研究分支(以後僅稱為Meta Learning)。對於人工智慧的理論研究,呈現出了

Artificial Intelligence --> Machine Learning --> Deep Learning --> Deep Reinforcement Learning --> Deep Meta Learning

這樣的趨勢。

之所以會這樣發展完全取決於當前人工智慧的發展。在Machine Learning時代,複雜一點的分類問題效果就不好了,Deep Learning深度學習的出現基本上解決了一對一映射的問題,比如說圖像分類,一個輸入對一個輸出,因此出現了AlexNet這樣的裡程碑式的成果。但如果輸出對下一個輸入還有影響呢?也就是sequential decision making的問題,單一的深度學習就解決不了了,這個時候Reinforcement Learning增強學習就出來了,Deep Learning + Reinforcement Learning = Deep Reinforcement Learning深度增強學習。有了深度增強學習,序列決策初步取得成效,因此,出現了AlphaGo這樣的裡程碑式的成果。但是,新的問題又出來了,深度增強學習太依賴於巨量的訓練,並且需要精確的Reward,對於現實世界的很多問題,比如機器人學習,沒有好的reward,也沒辦法無限量訓練,怎麼辦?這就需要能夠快速學習。而人類之所以能夠快速學習的關鍵是人類具備學會學習的能力,能夠充分的利用以往的知識經驗來指導新任務的學習,因此Meta Learning成為新的攻克的方向。

與此同時,星際2 DeepMind使用現有深度增強學習算法失效說明了目前的深度增強學習算法很難應對過於複雜的動作空間的情況,特別是需要真正意義的戰略戰術思考的問題。這引到了通用人工智慧中極其核心的一個問題,就是要讓人工智慧自己學會思考,學會推理。AlphaGo在我看來在棋盤特徵輸入到神經網絡的過程中完成了思考,但是圍棋的動作空間畢竟非常有限,也就是幾百個選擇,這和星際2幾乎無窮的選擇對比就差太多了(按屏幕解析度*滑鼠加鍵盤的按鍵 = 1920*1080*10 約等於20,000,000種選擇)。然而在如此巨量選擇的情況下,人類依然沒問題,關鍵是人類通過確定的戰略戰術大幅度降低了選擇範圍(比如當前目標就是造人,挖礦)因此如何使人工智慧能夠學會思考,構造戰術非常關鍵。這個問題甚至比快速學習還要困難,但是Meta Learning因為具備學會學習的能力,或許也可以學會思考。因此,Meta Learning依然是學會思考這種高難度問題的潛在解決方法之一。

經過以上的分析,不過是為了得出下面的結論:

Meta Learning是實現通用人工智慧的關鍵!

在本文之前,專欄已經發布了兩篇和Meta Learning相關的文章:

之前採用Learning to Learn這個名稱是希望讓更多的知友明白這個概念,從本篇開始,我們會直接使用Meta Learning這個名稱(其實只是因為這個名稱看起來更專業更酷)

關於Meta Learning的概念本文就不介紹了,在上面列出的兩篇Blog已有講解。本文將和大家分享一下Meta Learning的一些最前沿的研究進展,可以說是百家爭鳴的階段。

2 Meta Learning百花齊放的研究思路

為什麼說Meta Learning的研究是百家爭鳴呢?因為每一家的研究思路都完全不同,真的是各種方法各種試,呈現出一種智慧大爆發的階段。

關於Meta Learning的papers,我收集了一下:

songrotek/Meta-Learning-Papers

這裡主要分析一下最近一兩年來的發展情況,先作個分類,然後做一下簡要的分析。

2.1 基於記憶Memory的方法

基本思路:既然要通過以往的經驗來學習,那麼是不是可以通過在神經網絡上添加Memory來實現呢?

代表文章:

[1] Santoro, Adam, Bartunov, Sergey, Botvinick, Matthew, Wierstra, Daan, and Lillicrap, Timothy. Meta-learning with memory-augmented neural networks. In Proceedings of The 33rd International Conference on Machine Learning, pp. 1842–1850, 2016.

[2] Munkhdalai T, Yu H. Meta Networks. arXiv preprint arXiv:1703.00837, 2017.

以Meta-Learning with memory-augmented neural networks這篇文章為例,我們看一下他的網絡結構:

<img data-rawheight="558" src="https://static.leiphone.com/uploads/new/article/pic/201708/b2ced0daa3c3d7f9e536ff58151cd9f2.png" data-rawwidth="2024" class="origin_image zh-lightbox-thumb" width="2024" data-original="https://pic4.zhimg.com/v2-7525e8a0e4cd5286ace041a0dcfa5ee7_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/b2ced0daa3c3d7f9e536ff58151cd9f2.png"/>

我們可以看到,網絡的輸入把上一次的y label也作為輸入,並且添加了external memory存儲上一次的x輸入,這使得下一次輸入後進行反向傳播時,可以讓y label和x建立聯繫,使得之後的x能夠通過外部記憶獲取相關圖像進行比對來實現更好的預測。

2.2 基於預測梯度的方法

基本思路:既然Meta Learning的目的是實現快速學習,而快速學習的關鍵一點是神經網絡的梯度下降要準,要快,那麼是不是可以讓神經網絡利用以往的任務學習如何預測梯度,這樣面對新的任務,只要梯度預測得準,那麼學習得就會更快了?

[1] Andrychowicz, Marcin, Denil, Misha, Gomez, Sergio, Hoffman, Matthew W, Pfau, David, Schaul, Tom, and de Freitas, Nando. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems, pp. 3981–3989, 2016

<img data-rawheight="688" src="https://static.leiphone.com/uploads/new/article/pic/201708/4c02b5c24b94f5bcfe4eca28d718148f.png" data-rawwidth="1628" class="origin_image zh-lightbox-thumb" width="1628" data-original="https://pic3.zhimg.com/v2-40fc16572e360b4a2304ed3752c4bfee_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/4c02b5c24b94f5bcfe4eca28d718148f.png"/>

這篇文章的思路很清奇,訓練一個通用的神經網絡來預測梯度,用一次二次方程的回歸問題來訓練,然後這種方法得到的神經網絡優化器比Adam,RMSProp還要好,這樣顯然就加快了訓練。

2.3 利用Attention注意力機制的方法

基本思路:人的注意力是可以利用以往的經驗來實現提升的,比如我們看一個性感圖片,我們會很自然的把注意力集中在關鍵位置。那麼,能不能利用以往的任務來訓練一個Attention模型,從而面對新的任務,能夠直接關注最重要的部分。

[1] Vinyals, Oriol, Blundell, Charles, Lillicrap, Tim, Wierstra, Daan, et al. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, pp. 3630–3638, 2016.

<img data-rawheight="926" src="https://static.leiphone.com/uploads/new/article/pic/201708/cc7a5a03c9aa3a0099a8e7e0ef9d9234.png" data-rawwidth="1482" class="origin_image zh-lightbox-thumb" width="1482" data-original="https://pic2.zhimg.com/v2-1f79503d56a4b6d7116e07bfba289ffd_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/cc7a5a03c9aa3a0099a8e7e0ef9d9234.png"/>

這篇文章構造一個attention機制,也就是最後的label判斷是通過attention的疊加得到的:

attention a則通過g和f得到。基本目的就是利用已有任務訓練出一個好的attention model。

2.4 借鑑LSTM的方法

基本思路:LSTM內部的更新非常類似於梯度下降的更新,那麼,能否利用LSTM的結構訓練出一個神經網絡的更新機制,輸入當前網絡參數,直接輸出新的更新參數?這個想法非常巧妙。

[1] Ravi, Sachin and Larochelle, Hugo. Optimization as a model for few-shot learning. In International Conference on Learning Representations (ICLR), 2017.

<img data-rawheight="574" src="https://static.leiphone.com/uploads/new/article/pic/201708/709147db54c44d8de09b3081bfbeb9c8.png" data-rawwidth="1608" class="origin_image zh-lightbox-thumb" width="1608" data-original="https://pic3.zhimg.com/v2-bed4bb6160971631243342dee1af5c0e_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/709147db54c44d8de09b3081bfbeb9c8.png"/>

這篇文章的核心思想是下面這一段:

<img data-rawheight="504" src="https://static.leiphone.com/uploads/new/article/pic/201708/17ad39fceeb727698b969035c963c833.png" data-rawwidth="1680" class="origin_image zh-lightbox-thumb" width="1680" data-original="https://pic4.zhimg.com/v2-1bb24f764fd47ad3903db7504a170243_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/17ad39fceeb727698b969035c963c833.png"/>

怎麼把LSTM的更新和梯度下降聯繫起來才是更值得思考的問題吧。

2.5 面向RL的Meta Learning方法

基本思路:既然Meta Learning可以用在監督學習,那麼增強學習上又可以怎麼做呢?能否通過增加一些外部信息的輸入比如reward,之前的action來實現?

[1] Wang J X, Kurth-Nelson Z, Tirumala D, et al. Learning to reinforcement learn. arXiv preprint arXiv:1611.05763, 2016.

[2] Y. Duan, J. Schulman, X. Chen, P. Bartlett, I. Sutskever, and P. Abbeel. Rl2: Fast reinforcement learning via slow reinforcement learning. Technical report, UC Berkeley and OpenAI, 2016.

兩篇文章思路一致,就是額外增加reward和之前action的輸入,從而強制讓神經網絡學習一些任務級別的信息:

2.6 通過訓練一個好的base model的方法,並且同時應用到監督學習和增強學習

基本思路:之前的方法都只能局限在或者監督學習或者增強學習上,能不能搞個更通用的呢?是不是相比finetune學習一個更好的base model就能work?

[1] Finn, C., Abbeel, P., & Levine, S. (2017). Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks. arXiv preprint arXiv:1703.03400.

<img data-rawheight="478" src="https://static.leiphone.com/uploads/new/article/pic/201708/a8879fa29c4961f86ebe12f3d86821e8.png" data-rawwidth="1070" class="origin_image zh-lightbox-thumb" width="1070" data-original="https://pic4.zhimg.com/v2-c190d5bca7574803860f45229a5cc20f_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/a8879fa29c4961f86ebe12f3d86821e8.png"/>

這篇文章的基本思路是同時啟動多個任務,然後獲取不同任務學習的合成梯度方向來更新,從而學習一個共同的最佳base。

2.7 利用WaveNet的方法

基本思路:WaveNet的網絡每次都利用了之前的數據,那麼是否可以照搬WaveNet的方式來實現Meta Learning呢?就是充分利用以往的數據呀?

[1] Mishra N, Rohaninejad M, Chen X, et al. Meta-Learning with Temporal Convolutions. arXiv preprint arXiv:1707.03141, 2017.

<img data-rawheight="536" src="https://static.leiphone.com/uploads/new/article/pic/201708/beadea472f4a5726e633072ffd1fe928.png" data-rawwidth="1256" class="origin_image zh-lightbox-thumb" width="1256" data-original="https://pic3.zhimg.com/v2-79a1bc644048da6332d2217d14a2acf6_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/beadea472f4a5726e633072ffd1fe928.png"/>

直接利用之前的歷史數據,思路極其簡單,效果極其之好,是目前omniglot,mini imagenet圖像識別的state-of-the-art。

2.8 預測Loss的方法

基本思路:要讓學習的速度更快,除了更好的梯度,如果有更好的loss,那麼學習的速度也會更快,因此,是不是可以構造一個模型利用以往的任務來學習如何預測Loss呢?

[1] Flood Sung, Zhang L, Xiang T, Hospedales T, et al. Learning to Learn: Meta-Critic Networks for Sample Efficient Learning. arXiv preprint arXiv:1706.09529, 2017.

<img data-rawheight="498" src="https://static.leiphone.com/uploads/new/article/pic/201708/546971a2101a464216ba828786f6d87e.png" data-rawwidth="1262" class="origin_image zh-lightbox-thumb" width="1262" data-original="https://pic3.zhimg.com/v2-0ccac1a10a06f57b4ac1c33a16e9d616_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/546971a2101a464216ba828786f6d87e.png"/>

本文構造了一個Meta-Critic Network(包含Meta Value Network和Task-Actor Encoder)來學習預測Actor Network的Loss。對於Reinforcement Learning而言,這個Loss就是Q Value。

本文詳細分析詳見:學會學習Learning to Learn:讓AI擁有核心價值觀從而實現快速學習

本文 紐約大學的Kyunghyun Cho 做了評價:

<img data-rawheight="322" src="https://static.leiphone.com/uploads/new/article/pic/201708/fe102ee6a5dcc58ba650d429f74529ac.png" data-rawwidth="1298" class="origin_image zh-lightbox-thumb" width="1298" data-original="https://pic1.zhimg.com/v2-1dfc2d63f819d4818d616495523b383c_r.png" _src="https://static.leiphone.com/uploads/new/article/pic/201708/fe102ee6a5dcc58ba650d429f74529ac.png"/>

也算是一種全新的思路。

3 小結

從上面的分析可以看出,Meta Learning方興未艾,各種神奇的idea層出不窮,但是真正的殺手級算法還未出現,非常期待未來的發展!也希望更多的朋友們可以投入到Meta Learning這個研究方向上來。

相關焦點

  • ICLR 2017 | Highlight 1: Meta- and Few-shot Learning
    今天想先和大家分享是 ICLR 2017 上和 meta-learning 還有 few-shot learning 直接相關的工作,下次再與大家分享拓展工作——invariant representation learning。
  • 一文入門元學習(Meta-Learning)(附代碼)
    元學習Meta Learning,含義為學會學習,即learn to learn,就是帶著這種對人類這種「學習能力」的期望誕生的。我們將meta learning與model pretraining的loss函數寫出來。
  • 新書推薦 | Deep Reinforcement Learning
    董豪,北京大學前沿計算研究中心助理教授。於2019年秋獲得英國帝國理工學院博士學位。研究方向主要涉及深度/機器學習和計算機視覺,及機器人和醫療健康中的應用,目的是降低學習智能系統所需要的數據。他致力於推廣人工智慧技術,是深度學習開源框架TensorLayer的創始人,並獲得ACM MM 2017年度最佳開源軟體獎。
  • 從Few-shot Learning再次認識機器學習
    基於meta learning的方式更新參數關於meta-learning,和我們比較熟悉的machine learning相比,通常machine learning是根據訓練數據,讓機器學習到一個功能函數
  • Google's Learning Software Learns to Write Learning Software
    In a project called AutoML, Google’s researchers have taught machine-learning software to build machine-learning software.
  • 元學習(Meta Learning)與遷移學習(Transfer Learning)的區別聯繫是什麼?
    這裡我推薦最新出爐的Stanford助理教授Chelsea Finn開設的CS330 multitask and meta learning課程。你看,我們講遷移時,多半要講multitask。人家卻把multitask和meta講一起了,是不是越看越覺得,這三個本來就是一家嘛。
  • Auto Machine Learning 自動化機器學習筆記
    在機器學習中的分類模型中:常規 ML framework 如下圖灰色部分:導入數據-數據清洗-特徵工程-分類器-輸出預測值auto部分如下圖綠色方框:在ML framework 左邊新增 meta-learning,在右邊新增 build-ensemble,對於調超參數,用的是貝葉斯優化
  • 【聽力】How to Learn Way Faster Using Learning Loops
    How to Learn Way Faster Using Learning LoopsToday, we’re going to discuss how to learn faster using learning loops.
  • 6月29日發售 | Deep Reinforcement Learning
    目前主要從事有限樣本機器學習理論與算法研究,包括low-shot learning、domain adaptation、meta learning等。獲得美國2018 Rising Stars in EECS,及Adobe Collaboration Fund, Qualcomm Innovation Fellowship Finallist Award等獎勵。
  • 遷移學習 Transfer Learning
    /for_transfer_learning/model/transfer_learn'): saver = tf.train.Saver() saver.save(self.sess, path, write_meta_graph=False)因為有了訓練好了的 VGG16, 你就能將 VGG16 的 Conv 層想像成是一個
  • 【Assbender】課程推薦:如何學習Learning How to Learn!
    (如何學習:學習困難科目的實用思維方法)由美國加州大學聖地牙哥分校提供課程為4周:7.13-8.174小時視頻,3小時作業,3小時附加資料現在報名的話,可以提前選修第一周的內容。課程概述This course gives you easy access to the invaluable learning techniques used by experts in art, music, literature, math, science, sports, and many other
  • 小樣本學習(Few-shot Learning)綜述
    Meta Learning,又稱為 learning to learn,在 meta training 階段將數據集分解為不同的 meta task,去學習類別變化的情況下模型的泛化能力,在 meta testing 階段,面對全新的類別,不需要變動已有的模型,就可以完成分類。
  • 前沿資訊007|Machine Learning、Cloud Computing、Mobile Payment
    前沿資訊 /數聯惠法平臺最新推出欄目,以世界各行業先進報刊、精英雜誌作為原文引用來源,在法律、財經、金融與科技的交叉領域進行檢索,篩選收集行業的前沿資訊,最終翻譯整合進行專題推送,共同了解大數據時代、科技時代、人工智慧時代的行業發展新動向。
  • 做中學1 learning by doing
    我們還能看書或者邊做邊學,這些學習方法都有優點,但對我而言,最有效的方法是從做中學。 Learning by doing.And there are many ways in which we can learn. We can learn from our parents. From our teachers in school. And from our friends.
  • 元學習(Meta Learning)最全論文、視頻、書籍資源整理
    An embarrassingly simple approach to zero-shot learning, (2015), B Romera-Paredes, Philip H. S. Torr.
  • 【NLP筆記】Few-shot learning 少樣本學習
    ,這裡shot 有計量的意思,指少樣本學習,機器學習模型在學習了一定類別的大量數據後,對於新的類別,只需要少量的樣本就能快速學習,對應的有one-shot learning, 一樣本學習,也算樣本少到為一的情況下的一種few-shot learning, 這裡的少樣本學習的研究領域與遷移學習有一大部分交集部分,即在源域有足夠多樣本,而在目標域樣本不足。
  • 預告 | 高等教育創新講堂——Preparing for Future Learning
    講座摘要:        New technologies, work patterns, and practices are disrupting how we learn, where we learn, and what we need to learn.
  • Chinese language Learning Common Mistakes
    Learning a foreign language is no easy feat, but by deciding you want to learn Chinese you have already taken a big leap forward.
  • Pragmatics in second language learning: Current developments
    In the same period, metatheoretical debates from across the social sciences made their way into SLA, where they introduced new ontological and epistemological perspectives to the discipline (Zuengler &
  • Learning from TED 1
    目前讓我感觸最深的當然還是思想的開闊,比如Day18 Sal Khan: Let's teach for mastery -- not test scores,本以為是一個非常老套沒有什麼實質意義的論題,但演講者卻探討了人人成為成功的學習者的可能性(怎麼可能?!)。