勉強の記録

機械学習、情報処理について勉強した事柄など

attentionは何を見ているのか?

今週のWeekly machine learningで素晴らしい記事が紹介されていた。

https://www.getrevue.co/profile/icoxfog417/issues/weekly-machine-learning-103-150407?utm_campaign=Issue&utm_content=view_in_browser&utm_medium=email&utm_source=piqcy   

Deconstructing BERT: Distilling 6 Patterns from 100 Million Parameters https://towardsdatascience.com/deconstructing-bert-distilling-6-patterns-from-100-million-parameters-b49113672f77

BERT pretrain modelにおけるAttentionを可視化して6分類して紹介。自分で実験した際、文頭tokenや文末tokenにattentionが集中するlayerはなんなんだと思っていたが、"This may be a way for the model to propagate sentence-level state to the individual tokens."とのこと。この6分類の目で結果を見直してみたい。