[Notes] (SIGIR2021) Empowering News Recommendation with Pre-trained Language Models

Haren Lin
6 min readJun 16, 2022

--

Paper Link

https://arxiv.org/pdf/2104.07413.pdf

Introduction

News Modeling (News Encoding) 是 News Rec 中重要的步驟,因為它是了解 Candidate News 內容的核心技術,也是從 News clicks 中推斷 User interests 的先決條件。現有的新聞推薦方法通常基於傳統的 NLP 模型對新聞文本進行建模。E.g. DKN 提出使用 knowledge-aware CNN 從新聞標題中的 words and entities 的 Embedding 中學習 News representation。NRMS 提出使用 Multi-Head Self-Attention 從新聞標題中學習 News representation。但是這些 Shallow models 很難理解新聞文本中的 deep semantic information。此外,他們的模型僅從新聞推薦任務中的監督中學習,這對於捕獲 semantic information 可能不是最佳的。

預訓練語言模型 Pre-trained Language Model PLM 藉其強大的文本建模能力在 NLP 中取得了巨大成功。他與一般在特定任務中直接使用標記數據進行訓練的傳統模型不同,PLM 通常首先通過 Self-supervise 在 Large unlabeled corpus 上進行 Pre-train,所以可以為下游任務的 Fine-tune 提供更好的 Initialization point。此外,PLM 通常更深,有更大量參數,因此 PLM 可能在對新聞文本中復雜的 Contextual information 進行建模具有更大的能力,可能可以使新聞推薦的 News modeling 有所進步。

In short

  1. Existing news recommendation methods mainly model news texts based on traditional text modeling methods, which is not optimal for mining the deep semantic information in news texts.
  2. Pre-trained language models (PLMs) are powerful for natural language understanding, which has the potential for better news modeling. However, there is no public report that show PLMs have been applied to news recommendation.

P.S. 作者利用 PLM 來增強新聞推薦的效能,同時部署到 Microsoft 新聞平台,並在英語和全球市場的點擊量和瀏覽量方面取得了顯著提升。

Source Code

Model Architecture

首先先簡單介紹現在 News Rec 最常見且 General 的 Framework,如下圖。Framework 可以分為三個部分:(1) News encoder (2) User Encoder (3) Clik Predictor。

A common framework of news recommendation

(1) News encoder:假設用戶有 T 筆歷史點擊新聞 [D1, D2, …, DT],以及現在手上的 Candidate news Dc,News encoder 會把它轉成 News Embedding 分別表示為 [h1, h2, …, hT] 和 hc。News encoder 可通過各種 NLP 模型來實現 e.g. CNN / Self-attention。

(2) User encoder:接收 Clicked news embedding sequence 作為輸入,並輸出一個總結 User interests 的 User embedding u。它也可以通過各種模型來實現,E.g. GRU / Attention / MHA。

(3) Click predictor:將用戶嵌入 u 和 hc 作為輸入,並通過評估它們的 Relevance 來計算點擊分數 Click Score。它可以透過 Dot product / NN / FM等各種方法來實現。

The framework of PLM empowered news recommendation.

接下來,我們將 PLM 套用在 News encoder 的部分,如上圖。使用 Pre-trained LM 來捕獲新聞文本中的 Deep contexts,並使用 Attention Pooling 來得到 Representation。具體作法為:將輸入新聞文本 [w1, w2, …, wM] 透過 PLM 轉換為 Token embedding,然後通過 Transformer layers 學習 Token Hidden representation [r1, r2, …, rM]。接著使用 Attention network 將 Hidden representation 總結為一篇新聞的 News Embedding。

P.S. 訓練一樣會使用 Negative sampling 並搭配 Cross entropy loss。

Datasets

Detailed statistics of the two datasets

實驗的資料及包含兩個:第一個是 MIND,它是一個用於 Monolingual 新聞推薦的英文資料集。包含 6 週內的 100 萬個用戶在 Microsoft News 上的 Click Logs。第二個是我們從 2020.12.01 到 2021.1.14 在 MSN News 平台上,來自 7 個國家使用不同語言的用戶,收集的 Multilingual 新聞推薦資料集,命名為 Multilingual (Market language codes: EN-US / DE-DE / FR-FR / IT-IT / JA-JP / ES-ES / KO-KR) 。 作者在每個 Market 隨機抽取 200,000 條 Impression,最後一週的 logs 用於 testing,其餘用於 training & validation (9:1)。

P.S. Training Details from the paper: In our experiments, we used the “Base” version of different pre-trained language models if not specially mentioned. We fine-tuned the last two Transformer layers because we find there is only a very small performance difference between fine-tuning all layers and the last two layers. We used the titles of news for news modeling. We used Adam as the optimization algorithm and the learning rate was 1e-5. The batch size was 128. These hyperparameters are developed on the validation sets. We used average AUC, MRR, nDCG@5 and nDCG@10 over all impressions as the performance metrics. We repeated each experiment 5 times independently and reported the average performance.

Experiments

實驗的部分主要被切割成兩個區塊,第一個是 Monolingual 的 MIND。第二個則是在 Multilingual 上比較。

Part1. MIND

作者想驗證基於 PLM 的模型在 Monolingual News Rec 中的有效性。比較了幾種最近的新聞推薦方法,包括 EBNR, NAML, NPA, LSTUR, NRMS 及其由不同 PLM 作為 News encoder 的變形,包括 BERT, RoBERTa, UniLM,結果如下表。

Performance of different methods on MIND

從表格可以發現結合 PLM 可以 Consistantly 提高模型的效能,因為 PLM 比從零開始學習的 Shallow LM 具有更強的文本建模能力。而且,基於 RoBERTa 的模型優於基於 BERT 的,可能是因為 RoBERTa 的 Hyper-parameter 設定比 BERT 更好,且在更大的 Corpus 上進行了更長時間的 Pre-train。此外,使用 UniLM 的模型有最好的表現,因為 UniLM 可以在 Text understanding & Generation tasks 中利用 Self-supervision information,這有助於學習更高質量的 PLM。

P.S. 上述實驗提及的論文如下:

  1. EBNR — Embedding-based News Recommendation for Millions of Users

2. NAML — Neural News Recommendation with Attentive Multi-View Learning

3. NPA — Neural News Recommendation with Personalized Attention

4. LSTUR — Neural News Recommendation with Long- and Short-term User Representations

5. NRMS — Neural News Recommendation with Multi-Head Self-Attention

6. BERT — Pre-training of Deep Bidirectional Transformers for Language Understanding

7. RoBERTa — A Robustly Optimized BERT Pretraining Approach

8. UniLM — Unified Language Model Pre-training for Natural Language Understanding and Generation

Part2. Multilingual

作者想驗證基於 PLM 的模型在 Multilingual News Rec 中的有效性。比較了 EBNR, NAML, NPA, LSTUR, NRMS 與不同 Multilingual LM 的效果。Multilingual LM 包含 MUSE, Unicoder, InfoXLM,並同時比較基於 MUSE 的 Monolingual LM 對於每個 Market 獨立訓練的效果 (denoted as Single)。

Performance of different methods on Multilingual

首先,從表格可以知道 Multilingual 通常優於獨立學習的 Monolingual (Single),可能是因為不同的語言通常有一些 inferent relatedness,且不同國家的用戶也可能有一些相似的興趣。因此,使用 Multilingual data 做 Jointly training 可以幫助學習更準確的推薦模型。

此外,基於 Multilingual PLM 會比使用 MUSE Embedding 的方法來的更好,因為 PLM 在捕獲 Complicated multilingual semantic information 更強大。此外,InfoXLM 表現比 Unicoder 更好,可能是因為 InfoXLM 使用比 Unicoder 更好的 Contrastive Pre-training Strategies。

P.S. 上述實驗提及的論文如下:

  1. MUSE — Multilingual Unsupervised and Supervised Embeddings

2. Unicoder — A Universal Language Encoder by Pre-training with Multiple Cross-lingual Tasks

3. InfoXLM — An Information-Theoretic Framework for Cross-Lingual Language Model Pre-Training

Other Comparison

Part1. Influence of Model Size

Influence of the size of PLMs

作者也探討 PLM 大小對推薦效果的影響,比較 NAML 和 NRMS 與不同版本 BERT 的性能,包括 BERT-Base (12 layers) / BERT-Medium (8 layers) / BERT-Small (4 layers) / BERT-Tiny (2 layers)。發現使用具有更多參數的更大 PLM 通常會產生更好的推薦效能,畢竟較大的 PLM 通常在捕獲新聞的 deep semantic information 具有更強的能力。但由於大型 PLM 對於 Online inference / Online application 來說過於繁瑣,因此實務上比較偏好 PLM with base version。

Part2. Influence of Different Pooling Methods

Influence of the pooling methods

不僅比較模型大小,作者還探討使用不同的 Pooling Method 來得到 News representation 在效能上的差異。 (1) 使用 [CLS] 的 Representation 作為 News embedding (2) Average Pooling,把所有 Tokens’ Hidden Representation 進行平均得到 News Representation (3) Attention Pooling,讓每個 Token 得到各自的 Attention weight,在用 Weighted Sum 得到 New Representation。上圖的結果跟我們預想的效能排序一樣:[CLS] < Avg < Attn。

Part3. Visualization of News Embedding

Visualization of news embeddings learned by NRMS and NRMS-UniLM.

作者也透過 t-SNE 視覺化 NRMS 和 NRMS-UniLM 來探討透過 Shallow model & PLM 學習的 News Embedding 差異。有個有趣的現像:NRMS-UniLM 學習的 News Embedding 比起 NRMS 更 Discriminative,且有更清楚獨立的 Clusters。因為 PLM 可以 disentangle 不同類型的新聞,以實現更好的 User interest modeling & News matching。這些結果代表的意義是:Deep PLM 比Shallow LM 在學習 Discriminative text representations 上有更大的能力,有利於準確的新聞推薦。

This article will be updated at any time! Thanks for your reading. If you like the content, please clip the “clap” button. You can also press the follow button to track new articles. Feel free to connect with me via LinkedIn or email.

--

--

Haren Lin
Haren Lin

Written by Haren Lin

MSWE @ UC Irvine | MSCS @ NTU GINM | B.S. @ NCCU CS x B.A. @ NCCU ECON | ex-SWE intern @ TrendMicro

No responses yet