---
title: "MTRec — paper by Bi et al. (2022) — summary and ideas"
description: "MTRec trains BERT on news clicks, categories, and named entities, then adjusts conflicting gradients to improve recommendation on MIND-small."
canonical: "https://research.elamur.ai/free/en/papers/bi-2022-mtrec-multi-task-learning-over/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bi-2022-mtrec-multi-task-learning-over/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / MTRec: Multi-Task Learning over BERT for News Recommendation

# MTRec: Multi-Task Learning over BERT for News Recommendation

Paper · 2022 · Qiwei Bi, Jian Li, Lifeng Shang et al.

**Authors:** Qiwei Bi, [Jian Li](https://md.research.elamur.ai/free/en/authors/jian-li/), [Lifeng Shang](https://md.research.elamur.ai/free/en/authors/lifeng-shang/), [Xin Jiang](https://md.research.elamur.ai/free/en/authors/xin-jiang/), [Qun Liu](https://md.research.elamur.ai/free/en/authors/qun-liu/) and Hanfang Yang · **Year:** 2022 · **Venue:** Findings of the Association for Computational Linguistics: ACL 2022 · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **6** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/bi-2022-mtrec-multi-task-learning-over/cited-by/) · Findings of the Association for Computational Linguistics: ACL 2022 · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2022.findings-acl.209/)
- [PDF](https://aclanthology.org/2022.findings-acl.209.pdf)
- [DOI 10.18653/v1/2022.findings-acl.209](https://doi.org/10.18653/v1/2022.findings-acl.209)

## Summary

A news headline gives a recommendation system something to work with, even for an article that a reader has never seen. A news service may also know the article’s editorial category and which entities it mentions. The MTRec paper asks how to make that information useful when BERT already provides the headline representation. Earlier systems often gave each field its own vector and learned to blend the vectors. The authors suspect that this blend can make limited use of category and entity features when those features come from simpler encoders than the one that reads the headline.

MTRec puts the extra information to work during training. BERT reads a headline and produces a vector for the article. A recommendation task teaches that vector to help rank articles against a reader’s click history. Category prediction teaches the same encoder to recognize evidence for an article’s editorial label, while [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/) teaches it to identify words belonging to entities in the headline. The authors derive the entity tags by matching supplied annotations against the headline text. The recommendation score still comes from comparing a candidate article with a representation of the reader’s history.

These training objectives can pull the shared encoder in different directions. MTRec combines the auxiliary gradients, scales the result, and uses a modified form of gradient surgery when the combined direction conflicts with the recommendation gradient. On MIND-small, the headline-only BERT baseline records an AUC of 68.26 and an MRR of 32.52. MTRec reaches 69.43 AUC and 33.79 MRR. Adding direct field fusion to MTRec yields the best reported result on every ranking metric, including an AUC of 69.51 and an MRR of 34.06. In the ablations, removing either auxiliary task lowers performance, and removing category prediction has the larger effect. The results support using metadata both to teach the headline encoder and to supplement its output in the same recommendation system.

## Deep dive: MTRec: Multi-Task Learning over BERT for News Recommendation

MTRec trains BERT on news clicks, categories, and named entities, then adjusts conflicting gradients to improve recommendation on MIND-small. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What a news recommender has to infer

A personalized news service has to choose which available stories to put in front of a reader. The reader’s previous clicks offer a record of earlier choices. Each new headline offers a short description of an available article. The task in this paper is to connect those sources of evidence well enough to rank the articles in a candidate set. A good representation of a headline has to help with that comparison. A good representation of the reader’s history has to retain the parts of past reading that make the comparison informative.

An article can come with information that its headline leaves implicit. Take the paper’s example about Kate Middleton’s hairstyles. The headline names the person and describes the subject of the coverage. The Lifestyle label makes the editorial framing explicit. A representation tuned to distinguish such framing can group this article with other lifestyle coverage that uses different words. A representation sensitive to the entity can also connect it to coverage of the same person in a different category. These fields describe different aspects of the same article, and their relevance may vary with the reader’s history.

The paper uses *multi-field information* for this combination of title, category, and entities. This is a particular use of multiple fields. A title is a sequence of words. A category is an article-level label from a fixed inventory. Entity annotations identify items associated with the article and can sometimes be located in its title. The difference matters for training. Category information can supervise an overall decision about the article, while a matched entity can tell the system which particular positions in the headline matter for an entity prediction.

The task is also narrower than finding out everything a reader cares about. The paper starts with articles that were shown to a reader, records which of those articles were clicked, and uses earlier clicks as history. The ranking system needs to put recorded clicks ahead of alternatives within that setting. A click is the event the experiment can observe. This makes the problem concrete enough to train and evaluate, while leaving plenty of room for choices about what to learn from the same record.

#### How earlier systems combined evidence

The paper distinguishes traditional recommendation systems that emphasize interactions among features from neural news recommenders that build representations of articles and readers. In the latter approach, the news encoder translates the headline into a vector. A user encoder works over the vectors of previously clicked articles. A click predictor then compares the resulting reader vector with each candidate article. MTRec keeps this division of labor. Its main changes concern how to train the news encoder and how to reconcile the training signals that reach it.

Earlier neural systems differed in how they summarized the history. A sequential approach can process the history as a sequence. An attentive approach learns to give some past articles more weight than others when forming the reader representation. The paper cites LSTUR in its discussion of sequential user representation. MTRec instead uses additive attention over the historical article vectors. Its experiment therefore changes the training of the article representation while retaining a relatively direct way of assembling the reader representation. [LSTUR](https://md.research.elamur.ai/free/en/papers/an-2019-neural-news-recommendation-long-short/)

A title-only news encoder makes the title carry all the information used to represent an article. The paper describes earlier approaches that brought in additional fields through attentive multi-field learning. They construct a vector for each field and learn how much each should count towards the final article vector. This gives metadata a direct route to the recommendation score. If a category or entity is especially informative for an article, the pooling operation can give its vector more influence.

The paper also distinguishes MTRec from prior work that combined titles, abstracts, and article bodies. Those are all forms of article text and can differ mainly in how much detail they contain and how that detail is presented. Categories and entity annotations are a different kind of input. A category has meaning as a label in an editorial inventory, and an entity annotation has meaning as a reference. Each can provide a training target with a natural scope. Category prediction concerns the article as a whole, while entity tagging concerns positions in the title that can be matched to an annotation.

The adoption of BERT changes what the authors expect from field fusion. The headline vector can now come from a deep pretrained encoder, while category and entity vectors still rely on simpler lookups and transformations. Putting the vectors in arrays of the same length is enough to make a weighted sum possible. It leaves open whether corresponding coordinates convey information that can be combined effectively. The paper presents this as a possible explanation for why direct pooling may use the extra fields less effectively than intended.

#### Where to introduce the extra information

MTRec changes the job that metadata does. In a field-fusion system, an article’s category contributes a category vector during scoring. In the auxiliary classification task, the category serves as the answer BERT must learn to predict from the title. The difference is visible in what happens when the article representation is used later. A vector supplied at scoring time carries metadata directly. A label supplied during training can shape the title vector even when the label itself is absent from the scoring computation.

Entities receive analogous treatment at a finer level. An entity vector in a fused article representation summarizes some of the entities associated with the article. Entity tagging asks which words in the headline mark the start or continuation of an annotated mention. The supervision therefore reaches the title encoder at a specific set of positions. The paper’s premise is that this encourages the encoder to preserve distinctions that can also help compare articles with a reader’s history.

These ways of using the data can coexist. The training tasks can shape what BERT extracts from a title. A separate pooling stage can add information supplied with the article. That distinction matters when, for example, the editorial label captures something the headline only suggests, or an associated entity is absent from the title. The paper treats the combination as a separate system to evaluate.

The other question is how to train with the additional targets. A shared encoder can receive useful supervision from different tasks, but each task defines usefulness through its own loss. A step that improves category prediction can push the shared parameters against the direction preferred by click ranking. MTRec puts the ranking task at the center of the design. Category and entity prediction are there to improve the recommender, which motivates an update rule that treats their gradients as a combined, scaled source of supervision.

### The method, step by step

#### From headlines to candidate scores

Start with a single recommendation event. The system has a history of clicked articles and a set of candidates. It reads each history title and each candidate title with BERT. The same type of article vector is needed in both places. A story that appears in the history contributes evidence about the reader, while a candidate story is compared with the reader representation.

BERT’s input is the title after [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/). The paper uses the output at the special `[CLS]` position as the whole-title vector. BERT also returns an output for each title token. MTRec uses this finer-grained output for entity tagging. The two outputs give the training tasks access to different views of the title without requiring separate title encoders.

On the reader side, additive attention turns the history vectors into a weighted average. For each historical article, the system transforms its vector and compares the transformed result with a learned query. The scores become weights after normalization across the history. An article with more weight contributes more of its vector to the reader representation. The query in the paper’s equation is a learned parameter of the history encoder. Personalization enters through the articles in the reader’s history and the vectors that the encoder produces for them.

The click predictor then takes a dot product. A candidate receives a higher score when its vector has more alignment, under this scoring rule, with the aggregated history vector. Candidates are ranked by that score. The same candidate vector is compared against different history vectors for different readers, so a title can be a strong candidate for one reader and a weak candidate for another. There is no need to build a separate category score or entity score at this stage in MTRec without field fusion.

During training, the system knows which candidate in a sampled group was clicked. The ranking loss pushes the clicked article’s score up relative to the scores of sampled alternatives. The auxiliary tasks add labels at article and token level. All of these signals are computed from the same underlying system, and it is their effect on the shared encoder that gives multitask learning its role in the method.

Training and scoring in MTRec The steps in order.

#### How attention summarizes reading history

The reader representation has to put a variable collection of article vectors into a form that can be compared with a candidate. A simple average would give each past click the same contribution. The paper’s attention mechanism can learn different contributions based on the historical article vectors. It scores the vectors with the same trainable transformation and query, then normalizes within the history available for that reader.

```
rᵘ = ∑ᵢ₌₁ᴵ aᵘᵢ rʰᵢ
```

Here rᵘ is the reader vector. I is the number of historical clicked articles under consideration, i indexes those articles, and rʰᵢ is the vector for historical article i. The superscript h marks history, and u marks the reader representation and its weights. The coefficient aᵘᵢ is the attention weight for article i. The summation adds the history vectors after scaling each by its weight.

```
aᵘᵢ = softmaxᵢ(qᵘ · tanh(Wᵘ rʰᵢ))
```

The weight aᵘᵢ belongs to historical article i. Wᵘ is the learned transformation applied to the history vector rʰᵢ, and qᵘ is the learned query vector used to score the transformed article. The tanh function acts on the transformed vector, and the dot denotes the dot product with the query. The softmax runs over the scores for the historical articles and returns the normalized weight for position i. A change in one history score can therefore affect the weights given to the other articles in that history.

The pooled vector represents the reader through the past articles that enter this calculation. Category and entity supervision can affect it through the news vectors, even though the history attention has no category-classification or entity-tagging decision of its own. The auxiliary tasks can likewise affect the candidate vector on the other side of the comparison. A change to the headline encoder can thus change both the evidence gathered from the history and the way a new article is represented.

```
sⱼ = rᶜⱼ · rᵘ
```

The quantity sⱼ is the interest score for candidate j. The vector rᶜⱼ represents that candidate, with c marking the candidate side of the calculation. The vector rᵘ represents the reader. The dot product reduces the comparison to a scalar, which the recommender uses to order the candidates. The equation gives a ranking score. The paper applies normalization to scores within a training group when forming the ranking loss.

#### What the click loss teaches

A training group pairs an observed click with sampled alternatives. The positive article competes with those alternatives through a softmax over their scores. A large score is useful to the objective when it gives the positive article a large share of that group’s total exponentiated score. This ties training to a comparison the recommender actually needs to make. It also means that which negatives are sampled determines which comparisons the system sees.

```
L_Main = −∑ᵢ₌₁^|D| log(exp(sᵢ⁺) / (exp(sᵢ⁺) + ∑ⱼ₌₁ᴸ exp(sⱼᵢ)))
```

L_Main is the recommendation loss. D is the training dataset and |D| is its number of examples. The index i runs over the positive examples with their sampled alternatives. The score sᵢ⁺ is for the clicked article in example i. L is the number of negative articles in that example, j indexes those alternatives, and sⱼᵢ is the score for negative j in example i. The function exp exponentiates a score and log takes the logarithm of the clicked article’s normalized share. The leading minus sign turns maximizing the log share into minimizing a loss. The outer summation accumulates the contributions of the examples.

This is the objective that matches a reader’s history to a clicked candidate. It can reward many properties of article vectors at once, so long as they help discriminate the clicked article from the alternatives. It supplies only indirect evidence about which headline features should matter. The category and entity tasks make some of those properties the subject of explicit predictions, with errors that can be traced back to the shared title encoder.

#### How category labels supervise the whole title

An article’s supplied category becomes a target for [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/). MTRec attaches a classifier to the BERT output at `[CLS]`. The classifier projects the article vector to a score for every category. After softmax normalization, the training loss depends on how much probability the classifier gives the supplied label.

The important connection is that this is the same BERT output that supplies the article vector for recommendation. If headlines with different editorial framings are hard to separate given the current vector, the category loss gives the encoder a signal about that distinction. Category supervision can encourage consistency across articles that use different vocabulary to describe related material. The paper’s claim is about the downstream usefulness of providing this supervision, which it tests by removing the category task and observing the resulting rankings.

```
p̂ᶜᵢ = softmax(Wᶜ rᵢ + bᶜ)
```

Here p̂ᶜᵢ is the vector of predicted category probabilities for article i, and the hat marks a prediction. The superscript c here refers to category. The vector rᵢ is the `[CLS]` representation for that article. Wᶜ is the trainable category classifier matrix, and bᶜ is its trainable bias vector. Their affine transformation yields a score for each category. The softmax converts those scores into probabilities over the category inventory.

```
L_Category = −(1/I) ∑ᵢ₌₁ᴵ ∑ₖ₌₁ᴷᶜ pᶜᵢ,ₖ log(p̂ᶜᵢ,ₖ)
```

L_Category is the category cross-entropy loss. In this equation, I counts the articles whose category terms are averaged, and i indexes those articles. The paper also uses I for history length in the attention equation. Kᶜ is the number of categories and k indexes them. The target entry pᶜᵢ,ₖ indicates the supplied category of article i in the distribution over labels. The prediction p̂ᶜᵢ,ₖ is the classifier’s probability for category k. The log probability is weighted by the target, summed over categories and articles, and averaged over articles with the negative sign shown.

This route differs in substance from looking up a category embedding. A lookup starts with the supplied label and gives the ranking system a vector associated with it. Category prediction starts with a title and tries to recover the label. A title like the hairstyle example may provide cues about lifestyle coverage even though its words differ from the category name. The category loss gives BERT a reason to encode those cues in a vector it is already learning to use for click prediction.

#### How article entities become title tags

The entity annotations available in MIND are associated with articles. To turn them into labels for individual title positions, the authors search for exact matches in the title. A matched mention provides a beginning position and, when applicable, continuation positions. The first word is marked B, interior words are marked I, and words outside matched mentions are marked O. In the hairstyle example, a matched multiword name would provide a beginning word and a continuation word inside a headline that also contains words about the subject of the article.

Matching is the step that makes the article annotations usable for this kind of supervision. The encoder can receive feedback about a token only where the procedure assigns a tag. An annotated entity whose wording cannot be matched in the title supplies no positive span through that search. This is different from the role of an entity in the direct fusion variant, which builds an article-level entity representation from the separate field.

The system predicts a distribution of tags from the BERT output at each title position. The paper describes the B, I, and O roles and separately reports 22 entity classes identified in its setup. The tagging formula uses a symbol for the size of the tag inventory. Its purpose is to describe the cross-entropy over tags, so the reported class count can be kept distinct from the number of tag outcomes indexed in that equation.

```
p̂ⁿᵗᵢ = softmax(Wⁿ rᵗᵢ + bⁿ)
```

Here p̂ⁿᵗᵢ is the vector of predicted entity-tag probabilities for token position i. The superscript n denotes the named-entity task, and t marks the use of a token-level output. The vector rᵗᵢ is the BERT output at that title position. Wⁿ and bⁿ are the learned matrix and bias of the tag classifier. The softmax normalizes the scores over the tag inventory. In this equation, i identifies a token position.

```
L_NER = −(1/I) ∑ᵢ₌₁ᴵ ∑ₗ₌₁ˡⁱ ∑ₖ₌₁ᴷⁿ pⁿₗ,ₖ log(p̂ⁿₗ,ₖ)
```

L_NER is the loss for entity tagging. I counts the articles over which the loss is averaged, and i indexes those articles. The upper limit lᵢ, written as the raised limit of the middle sum, is the length of article i’s title. The index l runs over positions in that title. Kⁿ is the number of possible tags and k indexes them. The entries pⁿₗ,ₖ and p̂ⁿₗ,ₖ are the target and predicted values for tag k at position l of the current title. Their dependence on the article is implicit in the paper’s notation. The equation adds log-probability terms across positions before averaging by the article count.

The two auxiliary heads place demands on BERT at different levels. A headline may be easy to categorize even if a name within it is hard to recognize. A name may be easy to match even if the headline gives an ambiguous clue to editorial category. The heads each make errors visible at the level of their own targets. Their shared value for recommendation depends on whether learning to fix those errors improves the vectors used in scoring.

#### How the training objectives interact

The paper first writes an objective that puts the ranking and auxiliary losses together. In ordinary joint training, each loss contributes a gradient when the shared parameters are updated. For any shared parameter, its gradient contains information about how changing that parameter locally affects the loss. When several losses depend on the same parameter, their gradients can favor different changes.

```
L_MTRec = L_Main + L_Category + L_NER
```

The symbol L_MTRec denotes the joint loss before accounting for the gradient modification. L_Main is the click-ranking loss, L_Category is the article-category loss, and L_NER is the entity-tagging loss. The plus signs express joint training with all of these targets. The paper then specifies how it changes the gradients used in the update for the surgery variant.

The conflict test is geometric. A gradient points in the direction of local increase of a loss, and a descent update moves against it. If gradients from separate tasks form an angle greater than 90°, their dot product is negative. In that case, moving against one gradient has a component in the direction that raises the other loss locally. The paper calls this a gradient conflict. The condition concerns the gradients at a particular update, so the same pair of tasks can align at some steps and conflict at others.

The surgery operation changes a gradient by removing its projection onto the direction with which it conflicts. Consider a gradient with one component along a second gradient and another component perpendicular to it. The operation subtracts the component along the second direction, leaving the perpendicular part. When the original relationship was opposing, the adjusted vector no longer has that opposing component with respect to the direction used for the projection.

```
gᵢ ← gᵢ − ((gⱼ · gᵢ) / ∥gⱼ∥²) gⱼ
```

Here gᵢ is the gradient being adjusted and gⱼ is the conflicting gradient used as the reference. The arrow means that the expression on the right replaces the old value of gᵢ. The dot product gⱼ · gᵢ measures their signed alignment. The notation ∥gⱼ∥ is the length of gⱼ, and its square is the normalization used in the projection coefficient. Multiplying the coefficient by gⱼ produces the component to remove. The rule is applied in the conflict case.

MTRec modifies how the gradients are presented to that rule. Applying the original multitask procedure to the objectives separately would expose the main gradient to separate interactions with the category and entity gradients. The authors instead combine the auxiliary gradients first. They then scale that combined gradient before using it in the conflict-handling step. This design gives the auxiliary tasks a joint direction against which the main gradient is compared and reduces the number of separate opportunities to modify the main direction.

```
g_aux = λ(g_category + g_ner)
```

The vector g_aux is the merged auxiliary gradient. The vectors g_category and g_ner are the gradients from category prediction and entity tagging. The addition combines their parameter-wise contributions. The scalar λ scales the result and is set empirically to 0.3. Gradient surgery is then applied between the main-task gradient and the merged auxiliary direction to form the final update gradient, which the paper denotes by g.

This changes more than the overall magnitude of an ordinary sum of losses. Scaling changes how much the combined auxiliary gradient contributes. The projection acts conditionally and can change the direction of a contribution when it conflicts. The paper’s motivation is to preserve useful auxiliary learning while handling the steps where it pulls against recommendation. The later comparison with the original surgery procedure tests the combined design choice of merging and scaling before handling the conflict.

#### The direct field-fusion variant

The experiments use attentive multi-field learning as both a comparison and an addition to MTRec. It gives the ranker an article vector pooled from title, category, and entity representations. The paper’s setup uses [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/) for the category vectors and TransE for the entity vectors. These forms of [word and entity embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) give the corresponding inputs a numerical representation that can be transformed for pooling. A dense layer in the implementation brings the feature dimensions into alignment with the title encoding. The entity representation comes from the entity field as a whole, so the pooling step operates over fields after each has a vector. [TransE](https://md.research.elamur.ai/free/en/papers/bordes-2013-translating-embeddings-modeling-multi-relational/)

```
r̃ = ∑ᵣᵢ∈ᴿ wᵢ rᵢ
```

Here r̃ is the pooled news vector and R is the collection of field vectors for title, category, and entities. The vector rᵢ is the representation of field i, and wᵢ is its attention weight. The summation takes a weighted contribution from every field vector in R. It produces a single vector that can be used wherever the scoring framework calls for an article representation.

```
wᵢ = softmaxᵢ(qʳ · tanh(Wʳ rᵢ))
```

The weight wᵢ belongs to the field with vector rᵢ. The parameters Wʳ and qʳ are the learned transformation matrix and scoring query for field pooling. The superscript r denotes the parameters associated with the article representation. The tanh acts on the transformed field vector, and the dot product returns its score against the query. The softmax is taken across the article’s fields and returns the weight for field i. This attention operates over the fields of a single article. History attention operates over different articles clicked by a reader.

In MTRec+AMF, the title encoder learns through the auxiliary heads and the scorer uses a representation augmented with separate field vectors. That gives a category label a role as a training target and a role in constructing the article vector. An entity annotation can provide a title tag when matched and can also enter through the entity representation. Keeping these uses distinct makes the comparison with BERT+AMF interpretable. The fused representations in both cases have access to the fields, while their title encoders have received different training signals.

### Experiments and results

#### What MIND-small records

MIND comes from Microsoft News behavior logs. Its basic unit for this task is an impression. An impression associates a reader with the articles displayed at a particular time, records which displayed articles received clicks, and contains a history of earlier clicks. The article records supply titles, editorial categories, and entity annotations. This lets the authors use the same dataset for candidate ranking and for construction of the auxiliary targets.

The appendix describes MIND-large as containing more than 15 million impression logs from 1 million users. MIND-small is drawn by randomly sampling 50,000 users. The experiments use MIND-small for faster runs, and the main results are presented under that dataset name. The results table gives no more specific evaluation split designation. Its scores can therefore be attributed to the reported MIND-small evaluation without assuming an additional split label.

A positive example reflects a click recorded among the articles shown in an impression. An unclicked item in the training comparison comes from the setting in which candidates have already been displayed. This definition is important for interpreting what looks like a mistake. Giving a high score to an unclicked article is an error for the logged comparison, even if the article might have appealed to the reader under different circumstances. MIND gives the experiment a record of choices among displayed options, and the ranking evaluation measures recovery of those choices.

The authors use the reader’s most recent 50 clicked articles as the history setting. Each clicked training article is paired with 4 negative articles. The headline encoder is initialized with `bert-base-uncased`, and its maximum title input length is set to 20. The attention query used for the reader history has dimension 200. Headlines are the text input to BERT. Categories and entities enter through auxiliary targets, or through the separate field encoders when AMF is enabled.

The setup has 19 news categories and identifies 22 entity classes. The category and entity embeddings used for field fusion have dimension 100 and are updated during training. The dense projection lets their representations participate in the same pooling operation as the title representation. The authors use Adam, give the learning rate as `2e −5`, and describe a linear decay schedule with 10% warmup steps. These settings describe how the reported systems were trained. The central comparisons vary the news encoder, the use of metadata, or the gradient treatment.

#### The comparison systems

The comparison starts with NAML, LSTUR, NRMS, and HieRec. In the paper’s account, these systems use shallower text encoders than BERT. They provide a range of existing recommendation approaches against which to place the stronger headline encoding and the subsequent metadata experiments. They also help keep improvements in headline representation separate from improvements specifically associated with auxiliary tasks.

The BERT baseline is the reference for the authors’ own architecture without the additional field treatment. It represents the headline with BERT and scores candidates using the reader and candidate vectors. LSTUR+BERT and NRMS+BERT are reproductions in which BERT replaces the corresponding earlier news encoder. These replacements address a preliminary question. If improving the headline encoder already changes ranking substantially, the effect of multitask learning needs to be judged against a system that also starts with that stronger encoder.

BERT+AMF adds direct field pooling to the BERT baseline. MTRec uses the category and entity targets to train its title encoder. MTRec+AMF uses auxiliary training and direct field pooling together. These comparisons make it possible to ask whether the fields help when supplied as vectors, whether they help when used to supervise the headline encoder, and whether those routes still help when used in the same system.

The system names also matter when reading the scores. MTRec is the multitask recommendation approach with the paper’s gradient treatment. MTRec+AMF is the variant that also gives the ranking representation access to the separate category and entity vectors. The best overall row belongs to that combined variant. The comparison between MTRec and BERT+AMF is the one that contrasts the two individual routes for using metadata in the BERT-based framework.

#### What each ranking metric captures

The paper evaluates with AUC, MRR, nDCG@5, and nDCG@10. AUC summarizes how well the scores separate clicked and unclicked candidates across scoring thresholds. In ranking terms, it reflects how frequently a clicked candidate is ordered above an unclicked one. MRR, or mean reciprocal rank, emphasizes the rank at which a relevant item is recovered. Moving a relevant article toward the front has a larger effect under this measure than the same movement farther down the list.

Normalized discounted cumulative gain, abbreviated nDCG, rewards placing relevant items at high positions and discounts their contribution lower in the list. Normalizing compares the result with an ideal ordering for the same relevance information. The cutoffs in nDCG@5 and nDCG@10 specify how far down the ranking the evaluation looks. The shorter cutoff puts the focus on the earliest positions, while the longer cutoff allows more of the ranked list to affect the score.

The metrics can favor different systems even when evaluated on the same impressions. A system that typically orders clicks ahead of unclicked items overall can still give up some performance near the top. Conversely, changes near the top can improve reciprocal rank while affecting a smaller portion of all positive and negative comparisons. Reading across the metrics therefore gives more information than selecting a single column as the complete description of ranking quality.

#### What changes when BERT reads the titles

Replacing the earlier news encoder improves the reported results for LSTUR and NRMS across the ranking measures. On MIND-small, LSTUR has an AUC of 65.87 and an MRR of 30.78. LSTUR+BERT reports 68.28 AUC and 32.58 MRR. Its nDCG@5 is 35.99 and its nDCG@10 is 42.32, compared with 33.95 and 40.15 for LSTUR on those same metrics.

The same comparison for NRMS goes from 65.63 AUC and 30.96 MRR to 68.60 AUC and 32.97 MRR with BERT. NRMS records an nDCG@5 of 34.13 and an nDCG@10 of 40.52, while NRMS+BERT reports 36.55 and 42.78. These are comparisons in which the stated change is replacement of the headline encoder inside the existing approach. They show why the paper uses a BERT baseline to assess the metadata contribution.

The full set of earlier comparisons also shows the importance of reading each column. NAML records 66.12 AUC, 31.53 MRR, 34.88 nDCG@5, and 41.09 nDCG@10 on MIND-small. HieRec reaches 67.95 AUC, 32.87 MRR, 36.36 nDCG@5, and 42.53 nDCG@10. The BERT baseline has a higher AUC than HieRec at 68.26, while HieRec has the higher MRR and both of the higher nDCG scores in that pair. The isolated encoder replacements and the comparison among complete recommenders answer different questions.

News recommendation systems on MIND-small by AUC Both routes for using metadata improve the BERT baseline, and the combined approach ranks highest.

**The numbers**

| System or setting | AUC |
| --- | --- |
| HieRec | 67.95 |
| BERT baseline | 68.26 |
| LSTUR+BERT | 68.28 |
| NRMS+BERT | 68.60 |
| BERT+AMF | 68.96 |
| MTRec | 69.43 |
| MTRec+AMF (this paper) | 69.51 |

#### What changes when metadata enters the system

On MIND-small, the BERT baseline has an MRR of 32.52, an nDCG@5 of 35.89, and an nDCG@10 of 42.33. Adding attention over the category and entity fields increases the scores in each column. BERT+AMF reports MRR of 33.42, nDCG@5 of 37.10, and nDCG@10 of 43.27. Its AUC of 68.96 also exceeds the baseline. This comparison shows that direct access to the fields was useful in the authors’ BERT-based setup, even with the concern that combining representations from different encoders might limit the benefit.

Using the fields as supervision gives stronger results in this comparison. MTRec reports 69.43 AUC, 33.79 MRR, 37.64 nDCG@5, and 43.74 nDCG@10. Every reported score is higher than the corresponding BERT+AMF result. The field-pooling comparison gives a concrete alternative against which to assess the auxiliary training design. At the same time, MTRec includes the gradient modification, so the difference between these rows reflects the full training approach. The component removals are needed to investigate the contributions inside it.

Ways of using article metadata on MIND-small by nDCG@5 Auxiliary training outperforms direct field pooling alone, and using both gives the highest score.

**The numbers**

| System or setting | nDCG@5 |
| --- | --- |
| BERT baseline | 35.89 |
| BERT+AMF | 37.10 |
| MTRec | 37.64 |
| MTRec+AMF (this paper) | 38.05 |

The combined system reports 69.51 AUC, 34.06 MRR, 38.05 nDCG@5, and 44.03 nDCG@10 on MIND-small. Its scores lead the table across the metrics. The comparison with MTRec shows an additional benefit from supplying direct field representations after auxiliary training has already shaped the title encoder. The comparison with BERT+AMF shows an additional benefit from changing how the encoder learns while retaining field fusion. The ordering is consistent with the idea that the two uses of metadata contribute in complementary ways in this setup.

The authors explain this complementarity by viewing multitask learning as a form of regularization. Category and entity prediction constrain what the shared encoder has to learn while it is being trained for ranking. AMF changes the information available in the vector that the scorer receives. This gives a reason for the combined variant to help even when its ingredients draw on the same metadata. The table measures ranking performance, so the regularization account remains an interpretation of how the auxiliary tasks produce it. [Ruder’s overview of multi-task learning](https://md.research.elamur.ai/free/en/papers/ruder-2017-overview-multi-task-learning-deep/)

### What the ablations show

#### Article categories and entity mentions each contribute

The first ablations remove the category task and the entity task in turn. In the first of those settings, entity tagging is the only auxiliary source of supervision. In the second, category prediction is the only auxiliary task. The paper associates the title-and-category setting with earlier work that used those fields. Both single-task variants fall below the full MTRec system and still rank above the BERT baseline in the authors’ account.

The category-only variant loses less performance than the variant that keeps only entity tagging. Put in terms of the removals, dropping category prediction produces the larger decline. This matters because the full system has two possible sources of additional information. If one removal had left the full result essentially intact, the case for including the removed task would have been weaker. The observed direction of both comparisons supports keeping both kinds of supervision within the tested architecture.

The authors suggest that a category can contribute more because it is assigned at article level and can carry broad information about the story. That explanation has a natural connection to the use of `[CLS]`. Category prediction directly evaluates the whole-title vector that will also be used for recommendation. Entity tagging evaluates the encoder’s token outputs, and its labels come from the subset of annotations the procedure can match in the title. The training signals differ in both what they describe and where they attach.

Those distinctions leave several plausible reasons for the larger category effect. A category may give a useful target for more headlines. Its classifier may provide supervision that is especially well aligned with the article-level vector. The entity task may have less evidence for some headlines because of the exact-match procedure. The ablation changes the presence of an entire task, so it cannot tell these explanations apart. What it establishes is the ordering of the tested variants, with the category task having the stronger contribution in that comparison.

The evidence concerns the way targets are used to train the headline encoder. Removing entity tagging removes a training demand on token outputs. It is a different operation from removing an entity vector from AMF, which would alter the input to the pooling stage. The task-removal figure addresses whether learning to make the extra predictions helps. The main results table addresses how performance changes when the fields can also be supplied directly to the article representation.

#### Handling gradient conflict changes the result

The paper also removes gradient surgery while retaining multitask training. The authors report a substantial performance drop for this variant. The comparison matters because category and entity labels can both be informative in principle, yet their training signals may be unhelpful when applied together without adjustment. The label content and the way its gradient participates in an update are separate parts of the design.

A further variant uses the original gradient surgery procedure associated with Yu and colleagues. The authors report worse performance with that procedure than with their modification. Their explanation is that recommendation has priority in MTRec. Treating category classification and entity recognition as independently competing objectives can expose the main gradient to more modifications. Combining the auxiliary gradients first lets the system address conflict against their joint direction.

The result supports the particular package that the authors evaluated. Merging the two gradients, scaling the result, and applying the conflict rule after that merge change the update together. The comparison does not assign the gain separately to any of these choices. For example, it does not say how much of the effect would remain if the gradients were merged at a different scale. It shows that the authors’ adaptation works better in their setting than the versions they used as comparisons.

The removal result also helps interpret the difference between MTRec and BERT+AMF. The stronger score for MTRec cannot be attributed solely to replacing field pooling with auxiliary prediction. The gradient treatment is part of what the successful MTRec row contains. By comparing versions of MTRec that retain the prediction tasks but change the update rule, the ablation shows that optimization contributes to the final ranking order observed among the systems.

#### What the gradient trace measures

The appendix follows the relationship between the recommendation gradient and the merged auxiliary gradient during training. It measures cosine similarity at each step. Taking the cosine makes the diagnostic about direction, since the normalization removes the lengths of the gradients from the comparison.

```
cosine(g_main, g_aux) = (g_main · g_aux) / (∥g_main∥ ∥g_aux∥)
```

The argument g_main is the gradient from recommendation and g_aux is the combined auxiliary gradient. The numerator is their dot product. In the denominator, ∥g_main∥ and ∥g_aux∥ are their lengths, and juxtaposition means multiplication. Cosine denotes the resulting normalized measure of direction. Negative values identify steps at which the gradients point partly against each other.

The trace shows frequent negative values before gradient modification. The corresponding plot after the modification shows those conflicts removed in the measured comparison. This gives direct evidence that the situation the projection was designed to address occurs during MTRec training. It also illustrates what the operation changes. Negative cosine values disappear for the adjusted directions because the conflicting component is projected away.

The trace and the ranking ablation answer different parts of the question. The trace shows that the gradient interaction arises and that the adjustment changes the measured geometry. The ablation shows that training with the adjustment yields a better recommender in the reported setup. A cosine trace cannot on its own establish better ranking. It says which directions align, while the recorded rankings say what the resulting system accomplishes. Reading the two analyses together gives the paper’s empirical case for addressing these conflicts.

### Limitations

#### The authors’ stated scope and future work

The paper evaluates on MIND-small and says that it uses this version for quick experiments. MIND-large supplies context for how the smaller version was assembled. The reported gains belong to the smaller benchmark. The paper’s conclusion also identifies combining MTRec with more advanced user modeling as future work. The reader representation in the tested MTRec system is an attention-weighted summary of clicked article vectors. The article encoder and its auxiliary training receive the main experimental attention.

Headline text is the input to the encoder. The authors explicitly distinguish their choice of titles, categories, and entities from earlier work on combinations of titles, abstracts, and bodies. Accordingly, the paper’s findings address supervision across fields that play different roles in these records. They leave open the relative value of metadata supervision when an encoder also reads a longer description or the full story.

The authors offer explanations for several patterns without directly measuring the proposed cause. Differences in feature spaces are their explanation for a possible weakness of simple field pooling with BERT. The scope of the category label is their explanation for why removing category prediction is especially costly. The regularization view helps them explain why auxiliary training works alongside field fusion. Their experiments establish the performance patterns for the tested variants, while these accounts describe possible reasons for them.

#### Limits of the logged ranking task

The impression logs come from a particular news platform and contain the candidates that were displayed there. Categories and entity annotations come with those article records. The experiment therefore does not establish how readily the same auxiliary tasks transfer to a publisher with a different category inventory, unavailable entity annotations, or a different style of headline. Transfer would depend partly on how well the field labels support the new ranking objective.

The scores also address the order of observed clicks and unclicked candidates in logged impressions. They cannot show what the same readers would click if a different recommender chose the articles they saw. A logged positive provides an outcome under the original display conditions. A logged negative identifies an article without a recorded click in that impression and leaves the reader’s reasons unknown. The paper tests ranking under this definition of relevance. It does not report a live comparison in which readers received recommendations from the different systems.

The history limit and training comparison are additional parts of that setup. The method learns from the most recent 50 clicked articles available under the history rule and compares each training positive with 4 sampled negatives. There is no reported sweep over longer or shorter histories or different negative sampling settings. The measurements show performance with these choices in place. They leave open whether some of the gains depend on how much history is retained or on which alternatives the learner sees during training.

The reported comparisons are aggregate results. They give no breakdown by the amount of history available for a reader, by the category of the candidate article, or by the frequency with which its entities appear. As a result, the table cannot show whether the improvement is widespread or concentrated in some of the logged impressions. A higher aggregate nDCG score establishes a better result for that evaluation measure without identifying which reader histories or article fields account for the change.

#### Limits of the auxiliary targets and gradient evidence

Exact matching makes the entity supervision depend on the wording of the title. An annotation can refer to an entity that appears in the article but is absent from its headline. A headline can also use a different form of the name that the exact-match procedure does not recover. The method derives its positive title spans from the available matches. The paper does not report a coverage measurement that would show how much annotated entity information reaches BERT through this route.

Recommendation metrics also give limited visibility into the auxiliary predictions themselves. A task can help shape an article representation even if the correctness of its output varies across labels or titles. The paper primarily measures what happens to ranking when the supervision is present. It does not provide an analysis linking the accuracy of category predictions or particular entity tags to the improvements for individual candidates. The larger effect of category prediction is therefore a ranking result for this setup. It cannot settle which field is intrinsically more informative.

The field-fusion comparison likewise leaves the compatibility explanation open. The authors align feature dimensions and then use attention to combine the representations. Stronger MTRec results are consistent with an advantage for auxiliary supervision, but the paper does not directly measure whether the category and entity spaces align poorly with BERT or isolate a particular source of misalignment. BERT+AMF and MTRec+AMF both improve over the corresponding systems without fusion, so the results show that these field vectors can still provide useful ranking evidence.

The main results table gives point scores, and the paper describes the direction of the component comparisons. It does not provide uncertainty estimates for the table or independently isolate the effects of auxiliary-gradient merging, the empirical scale of 0.3, and the point at which projection is applied. The appendix verifies a local property of the adjusted gradients. That property alone cannot predict performance with another auxiliary task, on a different dataset, or under a different optimization schedule. The strongest claim supported by the comparisons is that the authors’ combined treatment helped the tested recommender on MIND-small.

### What came after

[GrAInS](https://md.research.elamur.ai/free/en/papers/nguyen-2026-grains-gradient-based-attribution-inference/) cites MTRec and uses gradient-based attribution for inference-time steering in language and vision-language systems. The timing of the intervention distinguishes the two research questions. MTRec examines gradients during training, when click ranking shares an encoder with category prediction and entity tagging. GrAInS addresses the use of gradient information while a trained system is producing outputs.

The citation connects work on gradient-based intervention across those settings. The available account of GrAInS establishes its focus on attribution and steering at inference time. It leaves open which part of MTRec it cites and whether it adopts the auxiliary-gradient merge or the projection used in the recommendation experiments.

## Cite

Cite as Qiwei Bi, Jian Li, Lifeng Shang, Xin Jiang, Qun Liu and Hanfang Yang. 2022. MTRec: Multi-Task Learning over BERT for News Recommendation. Findings of the Association for Computational Linguistics: ACL 2022.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2022.findings-acl.209](https://doi.org/10.18653/v1/2022.findings-acl.209)

```bibtex
@inproceedings{bi2022mtrec,
  title = {{MTRec: Multi-Task Learning over BERT for News Recommendation}},
  author = {Qiwei Bi, Jian Li, Lifeng Shang, Xin Jiang, Qun Liu and Hanfang Yang},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2022},
  year = {2022},
  doi = {10.18653/v1/2022.findings-acl.209},
  url = {https://doi.org/10.18653/v1/2022.findings-acl.209}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
