From Social Pairs to a Multilingual Model

TwHIN-BERT's training lifecycle answers a practical question: how can one model learn broad multilingual Tweet language without losing the more specialized signal supplied by engagement? This chapter follows the states that a Tweet corpus and its representations pass through, from MLM-only learning to engagement-aware refinement and downstream transfer. The goal is to distinguish what is learned at each stage, what crosses the boundary into an application, and which parts of a real production lifecycle the paper does not specify.

Two stages, two sources of supervision

The process starts with a large Tweet corpus collected from January 2020 through June 2022. The authors report 7 billion Tweets in more than 100 languages. They also report 100 billion user–Tweet engagement records covering 1 billion of those Tweets. Those figures describe two overlapping but unequal resources: the broad corpus supplies language coverage, while the engagement-rich subset supplies the social relationships needed for the second objective.

That distinction is not a minor data-cleaning detail. A text model can learn from a Tweet as long as its text is available. The social objective needs more: a relationship between the Tweet and users, and then a pair of Tweets selected from that relationship. TwHIN-BERT's design does not assume that every item in the language corpus has equally rich engagement evidence. Instead, it uses the broad corpus for language learning and the smaller engagement-covered portion when it has social supervision to add.

The authors also resample languages using language frequency raised to the power of 0.7. The stated purpose is to reduce the under-representation of lower-resource languages. This changes the training distribution: the model is not simply exposed to Tweets in the exact proportions in which the platform produced them. That choice is part of the model's multilingual operating context. It aims to give less frequent languages more presence, while the paper does not claim that this makes quality equal across languages.

The first state is MLM-only pre-training. TwHIN-BERT is trained from scratch on 6 billion Tweets without user engagement, for 500,000 steps. The broad first stage gives the Transformer a chance to form a general representation of Tweet language before the more specialized social signal is applied. This is a curriculum in the functional sense: the model first learns to represent the text domain, then receives an additional constraint tied to how that text behaves on the platform.

The transition to the second state is triggered when the training process moves to the 1 billion Tweets with engagement records. The model is trained for another 500,000 steps with the joint MLM and social loss. The previously learned encoder state persists; what changes is the evidence acting on it. Masked-token prediction remains active, while socially similar Tweet pairs add a comparative pressure. The second stage therefore refines the language representation rather than discarding the first stage and starting from graph vectors alone.

The pair relationship crosses into this stage in a compact form. The graph and retrieval pipeline has already learned Tweet embeddings and selected socially similar pairs. TwHIN-BERT's language-model training receives the Tweets and the pair relation used by the contrastive objective; it does not need to run the full user–Tweet graph for every masked-token prediction.