attentionは何を見ているのか?
今週のWeekly machine learningで素晴らしい記事が紹介されていた。
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分類の目で結果を見直してみたい。