Skip to main content
QUICK REVIEW

[Paper Review] Latent Universal Task-Specific BERT

Alon Rozental, Zohar Kelrich|arXiv (Cornell University)|May 16, 2019
Topic ModelingComputer Science8 references3 citations
TL;DR

This paper proposes a Latent Universal Task-Specific BERT model that enhances BERT with dynamic iterative computation (inspired by Universal Transformers) and learns latent persona/topic representations via bias vectors in the final layer. The model achieves significantly higher masked language modeling accuracy (p < 0.001) than baseline BERT and related variants, especially on social text, while reducing parameter count and improving inference efficiency when latent variables are used.

ABSTRACT

This paper describes a language representation model which combines the Bidirectional Encoder Representations from Transformers (BERT) learning mechanism described in Devlin et al. (2018) with a generalization of the Universal Transformer model described in Dehghani et al. (2018). We further improve this model by adding a latent variable that represents the persona and topics of interests of the writer for each training example. We also describe a simple method to improve the usefulness of our language representation for solving problems in a specific domain at the expense of its ability to generalize to other fields. Finally, we release a pre-trained language representation model for social texts that was trained on 100 million tweets.

Motivation & Objective

  • To improve masked language modeling accuracy on short, social text like tweets by extending BERT with dynamic computation and latent topic modeling.
  • To reduce model complexity and parameter count while maintaining or improving performance on downstream NLP tasks.
  • To enhance representation learning by modeling author persona and topic interests as latent variables in the bias vectors of the final layer.
  • To develop a lightweight, specialized pre-training method that improves performance on specific domains at the expense of generalization.
  • To release a pre-trained model on 100 million tweets for public use in social text NLP applications.

Proposed method

  • Introduces a dynamic number of self-attention iterations per sequence using a recurrence mechanism similar to the Universal Transformer, allowing adaptive computation depth.
  • Models latent author personas and topics as a learned bias matrix of size V×L (V=vocabulary size, L=8 latent dimensions), where each latent vector represents a distribution over vocabulary words.
  • Computes per-example latent category probabilities using a softmax over bias terms of unmasked tokens, with a 0.99/0.01 weighted combination to stabilize training.
  • Modifies the masked language modeling loss by incorporating the latent bias vector as a weighted sum over latent topic vectors, enhancing prediction accuracy for contextually relevant words.
  • Improves next-sentence prediction by adding Euclidean distance and KL divergence between latent topic distributions of sentence pairs as auxiliary features to the classification token.
  • Applies instance-specific loss weighting during pre-training: increasing loss weights for task-relevant tokens (e.g., emojis with weight 2) and decreasing them for noisy or irrelevant tokens (e.g., URLs and mentions with weight 0.02).

Experimental results

Research questions

  • RQ1Can dynamic computation in BERT improve masked language modeling accuracy on short social text?
  • RQ2Can modeling latent author personas and topics via bias vectors enhance word prediction performance?
  • RQ3Does combining dynamic computation with latent bias modeling reduce model complexity without sacrificing performance?
  • RQ4Can loss weighting based on token relevance improve pre-training efficiency and reduce noise in social text?
  • RQ5To what extent does the model’s performance degrade on generalization tasks when specialized for a specific domain?

Key findings

  • The Latent Model achieved the highest masked language modeling accuracy among all variants, significantly outperforming the base BERT and other models (p < 0.001).
  • The Universal Model achieved performance comparable to the base BERT while using less than half the number of trainable parameters.
  • The Latent Universal Model was as fast as the Latent Model alone, showing that latent bias components reduce the inferential load on the self-attention mechanism and mitigate the slowdown seen in recurrent models over time.
  • The recurrent models (Universal and Latent Universal) became slower over training due to increased recurrence, but this effect was significantly reduced when latent bias variables were added.
  • The loss over time showed that the Universal and Latent Universal models included a small ACT regularization term, which influenced training dynamics and contributed to adaptive computation.
  • The method of loss weighting—assigning higher weights to relevant tokens (e.g., emojis) and lower weights to noisy tokens (e.g., URLs, mentions)—reduced model noise and improved focus on salient features.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.