AkihikoWatanabe / paper_notes

たまに追加される論文メモ
https://AkihikoWatanabe.github.io/paper_notes
17 stars 0 forks source link

Long Document Summarization with Top-down and Bottom-up Inference, Pang+, Salesforce Research, arXiv'22 #482

Open AkihikoWatanabe opened 2 years ago

AkihikoWatanabe commented 2 years ago

https://arxiv.org/abs/2203.07586#:~:text=Long%20Document%20Summarization%20with%20Top%2Ddown%20and%20Bottom%2Dup%20Inference,-Bo%20Pang%2C%20Erik&text=Text%20summarization%20aims%20to%20condense,tokens%20in%20the%20source%20documents.

AkihikoWatanabe commented 2 years ago

日本語解説: https://zenn.dev/ty_nlp/articles/9f5e5dd3084dbd

以下、上記日本語解説記事を読んで理解した内容をまとめます。ありがとうございます。

概要

基本的にTransformerベースのモデル(e.g. BERTSum, BART, PEGASUS, GPT-2, T5)ではself-attentionの計算量が入力トークン数Nに対してO(N^2)でかかり、入力の二乗のオーダーで計算量が増えてしまう。 これを解消するためにself-attentionを計算する範囲をウィンドウサイズで制限するLongformerや、BigBardなどが提案されてきたが、どちらのモデルも離れたトークン間のattentionの情報が欠落するため、長距離のトークン間の関係性を捉えにくくなってしまう問題があった。

image

そこで、top-down transformerではセグメント(セグメントはテキストでいうところの文)という概念を提唱し、tokenからsegmentのrepresentationを生成しその後self-attentionでsegment間の関係性を考慮してsegmentのrepresentationを生成するbottom-up inference、各tokenとsegmentの関係性を考慮しし各tokenのrepresentationを学習するtop-down inferenceの2つの構造を利用した。bottom-up inferenceにおいてsegmentのrepresentationを計算する際にpoolingを実施するが、adapoolingと呼ばれる重要なトークンに重み付けをし、その重みを加味した加重平均によりプーリングを実施する。これにより、得られた各トークンの表現は、各セグメントとの関連度の情報を含み(セグメントの表現は各セグメント間のattentnionに基づいて計算されているため; bottom-up inference)、かつ各トークンと各セグメント間との関連度も考慮して計算されているため(top-down inference)、結果的に離れたトークン間の関連度を考慮したrepresentationが学習される(下図)。

image (図は上記記事からお借りいたしました)

各attentionの計算量は表のようになり、M, wはNよりも遥かに小さいため、O(N^2)よりも遥かに小さい計算量で計算できる。 image (こちらも上記記事からお借りいたしました)

実験(日本語解説より)

データセット

image

結果

PubMedとarXiv

image

CNN-DailyMail

image

TVMegasSiteとForeverDreaming

image

BookSum-Chapter-Level

image

BookSum-Book-Level

image

所感

CNN-DailyMailのようなinput wordsが900程度のデータではcomparableな結果となっているが、input wordsが長い場合は先行研究をoutperformしている。BookSum-Chapter Levelにおいて、Longformer, BigBirdの性能が悪く、BART, T5, Pegasusの性能が良いのが謎い。 てかinput wordsが3000~7000程度のデータに対して、どうやってBARTやらT5やらを実装できるんだろう。大抵512 tokenくらいが限界だと思っていたのだが、どうやったんだ・・・。

AkihikoWatanabe commented 2 years ago

The maximum document lengths for PubMed, arXiv, CNN-DM, TVMegaSite, ForeverDreaming, BookSum are 8192, 16384, 1024, 12288, 12288, 12288, respectively

これは、たとえばBookSumの場合は仮にinputの長さが11万とかあったとしても、12288でtruncateしたということだろうか。まあなんにせよ、頑張ればこのくらいの系列長のモデルを学習できるということか(メモリに乗るのか・・・?どんな化け物マシンを使っているのか)。

AkihikoWatanabe commented 2 years ago

We first train a top-down transformer on the chapter-level data and then fine-tune it on the book-level data. The inputs to the book-level model are (1) the concatenated chapter reference summaries in training or (2) the concatenated chapter summaries generated by the chapter-level model in testing. The chapter-to-book curriculum training is to mitigate the scarcity of book-level data. The recursive summarization of chapters and then books can be considered abstractive content selection applied to book data, and is used to address the extremely long length of books.

BookLevel Summarizationでは、データ数が300件程度しかなく、かつinput wordsがでかすぎる。これに対処するために、まずtop-down transformerをchapter-level_ dataで訓練して、その後book-level dataでfine-tuning。book-level dataでfine-tuningする際には、chapterごとのreference summaryをconcatしたものを正解とし、chapter-level modelが生成したchapterごとのsummaryをconcatしたものをモデルが生成した要約として扱った、という感じだろうか。まずchapter levelで学習しその後book levelで学習するcurriculum learningっぽいやり方がbook-level dataの不足を緩和してくれる。bookの要約を得るためにchapterを再帰的に要約するようなアプローチは、book dataに対するcontent selectionとしてみなすことができ、おそろしいほど長い入力の対処にもなっている、という感じだろうか。