Upgrade to Pro — share decks privately, control downloads, hide ads and more …

kagglerのためのAllenNLPチュートリアル

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

 kagglerのためのAllenNLPチュートリアル

Avatar for RyujiTamaki

RyujiTamaki

July 13, 2019
Tweet

More Decks by RyujiTamaki

Other Decks in Programming

Transcript

  1. ここ最近のkaggleのNLPコンペ一覧 • Quora Questions Pairs • Toxic Comment Classification Challenge

    • Quora Insincere Question Classification • Gendered Pronoun Resolution • Jigsaw Unintended Bias in Toxicity Classification comment_text: ボーダーコリーは賢い NLP Pipeline toxic: 0 テキストが与えられて、そのテキストが有害かどうかを判定するタスク
  2. 次に試すモデル Seq2VecEncoderクラスを継承してSWEMEncoderを実装する SWEM (Simple Word-Embedding-based Methods) ACL2018 “Baseline Needs More

    Love: On Simple Word-Embedding-Based Models and Associated Pooling Mechanisms” TokenEmbedder: Embedding(glove + fastText) Seq2SeqEncoder: なし Seq2VecEncoder: SWEMEncoder(concat) best validation loss: 0.1658 -> 0.1373
  3. 最後に試すモデル BERT. ここ最近のベースライン(重くて辛い) BERT (Bidirectional Encoder Representations from Transformers) NAACL

    2019”BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding” TokenEmbedder: PretrainedBertEmbedder Seq2SeqEncoder: なし Seq2VecEncoder: BertPooler ...にしたかったが動かなかったのでほぼ同じモデルで代用 参考: https://github.com/allenai/allennlp/blob/master/allennlp/models/bert_for_classification.py
  4. 最後に試すモデル BERT. ここ最近のベースライン(重くて辛い) BERT (Bidirectional Encoder Representations from Transformers) NAACL

    2019”BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding” best validation loss: 0.0489 -> 0.0392 Private Score(AUC): 0.9839 Public Score(AUC): 0.9845 公開されているkernelのシングルモデルの中では一番AUCが高いが、 Discussionに出てくる上位のシングルモデルに負けるぐらいのモデル
  5. 参考にしたサイト "Writing code for NLP Research" Tutorial at EMNLP 2018

    https://docs.google.com/presentation/d/17NoJY2SnC2UMbVegaRCWA7Oca7UCZ3vHnMqBV4SUayc/ “An In-Depth Tutorial to AllenNLP (From Basics to ELMo and BERT)” http://mlexplained.com/2019/01/30/an-in-depth-tutorial-to-allennlp-from-basics-to-elmo-and-bert/