When a language model trained on Wikipedia-style text is moved to tweets, legal statutes or clinical notes, its tokenizer (the component that splits text into subword pieces) chops domain words into many short fragments. The standard fix is to add whole domain words to the vocabulary and give each new word a starting vector equal to the average of its fragments' vectors. This proposal argues that the average is miscalibrated in two specific ways that follow from the known geometry of these models. On the input side, averaging keeps the shared offset that every embedding carries but shrinks the word-specific part, so new words start out as faint, generic vectors. On the output side, the average inherits a prior that makes the new word too likely to be predicted, so it pulls probability away from the fragment sequences the model already uses in general text. We propose a training-free initialization that corrects both: it keeps the shared offset, restores the word-specific part to the norm that real vocabulary words of similar frequency have, and solves one scalar per new token so that its predicted probability on general text matches the probability the base model gave its fragment sequence.
This matters most when the target domain has little text. Changing the tokenizer can require about 50 billion tokens of further training before performance recovers (Getting the Most Out of Your Tokenizer). Adding domain vocabulary can also wreck general reasoning: GSM8K accuracy falls from 22.10% to roughly 6–9% under naive expansion (Gold Panning in Vocabulary). Regional dialects and small legal or hate-speech communities never have 50 billion tokens. If the starting point of the new vectors is the bottleneck, fixing it cheaply is worth more than any amount of additional training that such domains cannot supply.
Core Claim
The obvious idea at this intersection is to strip the anisotropic bias before averaging. Anisotropy here means that embeddings crowd into a narrow cone around a shared mean direction, dominated by a few huge "rogue" coordinates. The stripping would use mean-direction removal from Correcting Mean Bias in Text Embeddings or standardization from All Bark and No Bite. We think this is the wrong fix for input embeddings.
Averaging does not amplify the shared mean vector $\mu$. The mean of vectors that each contain $\mu$ still contains exactly $\mu$. What averaging does is shrink the word-specific residual, roughly by $1/\sqrt{k}$ for a word split into $k$ weakly correlated pieces. Removing $\mu$ would push new tokens into a region the network has never seen. BERT Busters shows the downstream layers depend heavily on those outlier coordinates: disabling them costs 44 STS-B points and raises RoBERTa's LM loss from 1.99 to 7.85. That is direct evidence against de-biasing the inputs. It is why we frame the right intervention as "keep the bias, restore the residual."
The second part of the claim is a testable mechanism for the reasoning collapse reported in Gold Panning in Vocabulary. We hypothesize the collapse is mostly an output-side prior error: new tokens get emitted in general-domain generation where the base model would have emitted fragments. If so, calibrating only the output rows should recover most of the lost GSM8K accuracy, and fixing only the input rows should recover little.
Research Program
The method has two parts.
Input rows. For each base vocabulary vector we compute its residual $r_s = e_s - \mu$ against the vocabulary mean. For a new word $w$ with fragments $S(w)$, we average the residuals and rescale the result to the median residual norm of base tokens in the same frequency bucket as $w$'s estimated domain frequency. We then add $\mu$ back, and we set the rogue coordinates to their vocabulary-typical values rather than to the piecewise average.
Output rows. For decoder models, the output vector starts as the fragment average $\bar{u}_w$ and is shifted along $\hat{m}$, the unit mean direction of the output-embedding matrix:
$$u_w = \bar{u}_w + \alpha_w \hat{m}, \qquad \mathbb{E}_{h \sim H_{\text{gen}}}\big[\log p(w \mid h; u_w)\big] = \mathbb{E}_{h \sim H_{\text{gen}}}\big[\log p(s_1,\dots,s_k \mid h)\big].$$
Here $H_{\text{gen}}$ is a sample of hidden states from general-domain text, $p(w \mid h; u_w)$ is the expanded model's probability of the new token, and the right-hand side is the base model's probability of the full fragment sequence $s_1,\dots,s_k$ in the same contexts. The equation says the new token should be exactly as likely, on average, as the fragment sequence it replaces. Solving it is a one-dimensional root-find per token, so it needs no training. It borrows the spirit of the mean-shift alignment in Preserving Item Semantics for Free. That work matches new recommendation-ID tokens to the vocabulary's mean distribution and uses no frequency-aware norms or per-token probability calibration.
Diagnostics. Alongside the method we build a set of geometric measurements for new and old tokens:
- the ratio of residual norm to total norm;
- the cosine of each vector with $\hat{\mu}$;
- the magnitude of the rogue coordinates;
- for generation tasks, the fraction of probability mass on new tokens in general-domain outputs, and how often they are emitted.
These measurements let us check each geometric prediction directly rather than infer it from task scores.
Baselines
Base tokenizer plus continued pretraining (the do-nothing reference). This keeps the base tokenizer and runs domain-adaptive pretraining, meaning continued masked or causal language modeling on the domain corpus. It is the fBERT recipe, which raised HatEval Macro F1 from 0.483 to 0.596 with no vocabulary change (fBERT). Any expansion method must beat it at matched training tokens.
Plain subword averaging. This is the IndoBERTweet recipe (IndoBERTweet). It is the strongest existing low-budget encoder method: it reported an 86.5% average over seven Indonesian Twitter tasks after 200k steps, against 83.4% for IndoBERT and 86.1% for pretraining from scratch. We reproduce it with identical added vocabulary, corpus, step counts and fine-tuning hyperparameter grids. Beating it means a higher seven-task average at 200k steps, and a clearly larger margin at small budgets.
Decoder-side reference. Token selection is held fixed to VEGAD's gradient-chosen subset, which reported 28.58 BLEU on Article QA and 15.20% GSM8K retention against a 22.10% base (Gold Panning in Vocabulary). Only initialization changes. Beating it means retaining more GSM8K accuracy without losing Article QA BLEU.
Fast Vocabulary Transfer. This nearest-token initialization from Getting the Most Out of Your Tokenizer is run in the same settings. No reported result was found on Lacuna for it on these benchmarks, so we produce the number ourselves.
Stronger baselines and ablations. We run the "obvious" R2-debiased averaging, which predicts our method's advantage over it, and Loveland-style mean-shift alignment, which is the strongest geometric competitor. Three ablations isolate each ingredient: input rescaling only, output calibration only, and rogue-coordinate reset only. Every arm gets the same data, step count and tuning budget, with three seeds each.
Why not just…?
Why not just train longer and let the initialization wash out? This is the most serious threat. The budget sweep below is built to settle it. If the gap to plain averaging vanishes by about 10k steps, we will report the contribution as confined to the low-resource regime, which is still the regime where domain mismatch is hardest.
Why not just use Loveland's mean-shift alignment? It corrects the mean of the new tokens but not the shrunken residual norms, and it has no mechanism for a per-token output prior. Its evidence comes from recommendation IDs, not subword vocabularies (Preserving Item Semantics for Free). It is run as a head-to-head baseline. If it matches us, the frequency-aware parts add nothing and we will say so.
Why not just skip vocabulary expansion? fBERT shows continued pretraining alone helps. However, Twitter text left 46% of its vocabulary unseen by IndoBERT (IndoBERTweet), and fragmentation costs context length (Getting the Most Out of Your Tokenizer). The do-nothing arm measures whether expansion pays off at each budget.
Why not just apply R2 or whitening to the outputs afterwards? Those corrections operate on sentence embeddings after the fact and cannot repair token-level priors. Full whitening also hurt every one of 38 models tested, by up to 5.18 points on e5-large-instruct (Correcting Mean Bias in Text Embeddings). We test R2 stacked on each initialization to show the two are complementary rather than substitutes.
Proposed Experiments
Setting one: Indonesian Twitter. We use IndoBERT, the IndoBERTweet added vocabulary, and the seven-task suite. Continued pretraining budgets run from 0 to 1k, 10k, 50k and 200k steps. We also run a reduced-corpus variant at 1% of the 409M tokens to simulate a genuinely low-resource dialect.
Setting two: English hate speech. BERT-base is expanded with SOLID-derived vocabulary and evaluated on HatEval, OLID and HS&O against fBERT's reported 0.596, 0.813 and 0.878.
Setting three: Chinese legal decoder. This reproduces VEGAD's legal setup: Article QA BLEU plus GSM8K retention.
Decisive checks. Each check below pairs a geometric prediction with the evidence that would confirm or refute it.
- Residual shrinkage. Before any training, the residual-to-total norm ratio of averaged new tokens should sit well below that of base tokens with similar frequency. Our rescaling should close that gap without changing their cosine with $\hat{\mu}$. If the ratio is not lower, the premise fails.
- Harm from de-biasing inputs. The R2-debiased arm should underperform plain averaging at zero and small budgets, consistent with BERT Busters.
- Output-side cause of the GSM8K collapse. The output-calibration-only ablation should recover most of the gap between the expanded model and the base model. The fraction of probability mass on new tokens in GSM8K outputs should drop sharply. If input-only rescaling recovers as much, the output-prior hypothesis is wrong.
- Budget dependence. Gains over plain averaging should be largest at 0–10k steps and in the 1% corpus condition, and they should shrink with training. That pattern tells practitioners exactly when the method is worth using.
References
- Getting the most out of your tokenizer for pre-training and domain adaptation
- Gold Panning in Vocabulary: An Adaptive Method for Vocabulary Expansion of Domain-Specific LLMs
- Correcting Mean Bias in Text Embeddings: A Refined Renormalization with Training-Free Improvements on MMTEB
- All Bark and No Bite: Rogue Dimensions in Transformer Language Models Obscure Representational Quality
- BERT Busters: Outlier Dimensions that Disrupt Transformers
- Preserving Item Semantics for Free: Rethinking Token Initialization in LLM-Based Generative Recommendation
- fBERT: A Neural Transformer for Identifying Offensive Content
- IndoBERTweet: A Pretrained Language Model for Indonesian Twitter with Effective Domain-Specific Vocabulary Initialization