Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A Machine Learning Framework for Programming by Example

6,839 views

Published on

  • My personal experience with research paper writing services was highly positive. I sent a request to ⇒ www.WritePaper.info ⇐ and found a writer within a few minutes. Because I had to move house and I literally didn’t have any time to sit on a computer for many hours every evening. Thankfully, the writer I chose followed my instructions to the letter. I know we can all write essays ourselves. For those in the same situation I was in, I recommend ⇒ www.WritePaper.info ⇐.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

A Machine Learning Framework for Programming by Example

  1. 1. A  Machine  Learning  Framework  for  Programming  by  Example   Aditya  Menon,  Omer  Tamuz,  Sumit  Gulwani,  Butler  Lampson,  Adam  Kalai  ICML  2013  すずかけ論文読み会  #3  (2013/06/01)  紹介者  :  matsuda 1
  2. 2. Programming  by  Example  (PBE) •  「例」からのプログラミング  – UI  /  プログラム生成の分野で研究されてきた問題  – 「変換前」,「変換後」のペアから変換プログラムを生成  •  たとえば・・・)  Excel2013のFlash  Fill  – セル情報に基づくテキストの書き換え  – 百聞は一見にしかず (YouTube)  – すでに実用化されている  – ただし,  line  by  lineの書き換え 2
  3. 3. この論文で扱いたい事例 変換前 変換後 学習 ※  line  by  line  ではない,countなども扱いたい   ふつうはPerlとかAWKでプログラムを書くような処理も含めたい 3
  4. 4. 何が難しいか •  一般に,トレーニングデータは非常に少ない  –  もしかしたら,  1  事例しか与えられないかもしれない  •  f(x)  =  y  を満たすような  f(プログラム)  は一般に無限に存在  –  ものすごく長い  f  ,汎用性のない  f  ,,,,  –  brute-­‐forceにやっても恐らくは見つかるが,たいへん時間がかかる  •  複数の事例から同時に学習を行う  –  書き換えプログラムの「一般的な性質」を学習!  •  ランキング問題として定式化し,もっともらしい  f  を「探索」する問題に落とす  –  探索の高速化!  4
  5. 5. システムのおおまかな構造 書き換え元の学習データ  :  x   書き換え元の学習データ  :  y   書き換え元の学習データ  :  x   書き換え元の学習データ  :  y   書き換え元の学習データ  :  x   書き換え元の学習データ  :  y   書き換え元の学習データ  :  x   書き換え後の学習データ  :  y   ルールの集合  R てがかり(clue)の集合  C PCFGパラメータ  :  θ 書き換えの導出 抽出 書き換えを行いたいデータ  :  x 書き換え後の  データ  :  y 5 xからyが復元できるように学習 適用
  6. 6. 問題の定式化 •  学習対象  :  f  ∈  {  S  -­‐>  S  }  –  文字列から文字列への書き換えプログラム  •  データ  :  x(書き換え前)  ,  y(書き換え後),  x(書き換えを適用したいデータ)  •  F(・)  :  (x  -­‐>  y)  の変換を実現する全てのプログラム(膨大)  –  この上で 「もっともらしさ」 に基づいてランキングを行う関数を学習する  –  「もっともらしさ」をどのように表現するか,どのように学習するか 6
  7. 7. プログラムを確率モデルとして表す •  プログラムの上の確率モデル(PCFG)  – Pr[  f  |  z  ;  θ  ]  •  z  :  (x,  x,y)の組, θ:確率モデルのパラメータ  r  :  書き換えルール ex.  (  LIST  -­‐>  dedup(LIST)  )    (あらかじめいっぱい用意してある)   •  データ(z)とルールをどのように関連付けるか?  •  Pr  [  r  |  z  ;  θ  ]  をどのようにモデル化するか?  7
  8. 8. プログラムのPCFG(例) P join(LIST,  DELIM) concatList(“(“,  CAT,  “)”) LIST “  ” split(x,  DELIM) “n” 導出の一例) 8
  9. 9. 書き換えとルールの関連付け:clues •  clues  (手がかり)  –  c  :  S3  -­‐>  2R  •  データの組を受け取って,ルールの集合を返す  –  こういう特徴の場合こういうルールが適応できる,という知識  •  Givenであると仮定?  –  CRFで言うところの素性関数テンプレートのようなもの   書き換え元の学習データ  :  x   書き換え後の学習データ  :  y   てがかり(clue)の集合  C ルールの集合  R 抽出 9
  10. 10.    clueの例 prior_cue,  unique_inp_cue,  dedup_cue,  case_cue  trim_cue,  strip_space_cue,  simple_append_prepend  extract_numbers_cue,  numeric_cue,  sequence_cue  generalized_sequence_cue,  count_occ_cue,  line_num_cue  comma_and_cue,  num_to_word_cue,  matricize_cue,  sort_cue  map_each_line_cue,  remove_char_cue 他にもたとえば) ※完全なリストは hip://cseweb.ucsd.edu/~akmenon/pbe/ にあります 10
  11. 11. Pr[  r  |  z;  θ  ]のモデル •  ごくふつうのlog  linear  モデル θ    :  ルールひとつひとつの重み(実数)  ci(z)  :  テキストを受け取ってルールの集合を返す関数(前述のclue)  Z  :  正規化   ルールの左辺(  LHS(r)  )から導出されるすべての右辺を足しあわせ 0  or  1 11
  12. 12. トレーニング •  勾配降下法(対数尤度の最大化) k  :  f のルール数 正則化(L2) 対数尤度 ひとつ  z  を受け取って,尤度を上げるように  θ  を更新 12
  13. 13. 正解データは? •  正解データを用意するのは難しい  •  bootstrapによって学習(x,  yペアのみから学習)  –  θ(0)  =  0  と初期化(すべてのルールが同じ重み)  –  f(x)  =  y  を満たす(正しく変換する)尤もらしいプログラムを推論  •  最初は「短い」  f  が優先される?  •  見つからなければその事例は無視  –  それを正解データとして,θを更新  –  収束するまで繰り返し  13
  14. 14. 未知のデータに対するプログラム生成 •  入力  – データ z  :  (x,  x,  y  )        (学習には使っていないもの)  – 手がかり  :  c1,  c2,  …  cn    – モデルパラメータ  :  θ  ∈  Rn  ,  タイムアウト τ  1.  データから手がかりを探し出し,ルール集合Rを生成  2.  ルール集合の元に対してパラメータを用いて確率値を付与  (PCFGの各導出に対する確率値の付与)  3.  PCFGの導出( プログラム:f )を確率値の降順に探索,  x,  y  を正しく変換している導出を返す  4.  タイムアウトまでに正しく変換する導出が見つからなければ失敗(タイムアウトを設定しないと永遠に導出し続ける)  14
  15. 15. 実験 •  データ  –  (x,  y)  280ペア  •  一部は人手で作成(Gulwani,  2011)  •  残りはExcelのヘルプフォーラムから人手で収集  –  base  funcqon(ルールの元)  :  100個くらい  –  clues(テキスト組とルール集合の対応づけ)  :  100個くらい  –  データは hip://cseweb.ucsd.edu/~akmenon/pbe/  にあるよ  •  ベースライン  –  θ  =  0  のもの  (すべてのルールが同じ重み)  •  実験設定  –  80(train)  −20(test)  splitを10組  –  タイムアウト  τ  を変化させる  –  bootstrapは3回 15
  16. 16. 実験結果(Timeout  Error) PCFGのパラメータを学習することにより,高速化を実現 16
  17. 17. 実験結果(Ranking  Error) 定義がいまいち不明.正解のプログラムが用意されている? 17
  18. 18. 実験結果(Speed  Up) 最大40倍近い速度! 18
  19. 19. まとめ /  感想 •  「例からのプログラミング」に対する機械学習からのアプローチ  •  プログラムをPCFGからの導出で表現し,そのパラメータをbootstrapに学習  •  学習しない場合と比較して最大40倍の高速化,正解率も向上  •  感想  –  clueとルールの対応付けは人手?何か出来そう  –  似た枠組みをNLPに応用できないかな?  •  略語の推定,要約etc… 19

×