Sharing a single vocabulary matrix across a language model’s input lookup and output softmax projection cuts neural machine translation model parameters by 52% while improving perplexity on word-level language models. In a systematic study across word2vec, LSTM language models, Recurrent Highway Networks, and sequence-to-sequence translation, Ofir Press and Lior Wolf proved that the output projection matrix learns higher-quality word representations than the input embedding, and that tying both matrices forces every vocabulary row to receive dense gradient updates at every step.

  • 52% smaller translation models: three-way weight tying (TWWT) shrinks WMT’14 EN-to-FR from 168M to 80M parameters (test BLEU 33.13 to 33.46) and WMT’15 EN-to-DE from 165M to 79M (test BLEU 16.79 to 17.15).
  • Lower perplexity with 23% fewer parameters: tying embeddings on a Large PTB LSTM cuts parameters from 66M to 51M and drops test perplexity from 78.4 to 74.3 (and 68.5 to 66.0 on Recurrent Highway Networks, 32M to 24M).
  • Output embeddings beat input embeddings: on Penn Treebank (PTB), the untied output matrix beats the input matrix across all five word-similarity benchmarks (e.g., 0.37 vs. 0.12 on Verb-143 and 0.21 vs. 0.11 on MEN).
  • Why word2vec breaks when tied: tying embeddings in skip-gram word2vec collapses word-similarity correlation (0.66 to 0.50 on MEN; 0.41 to 0.12 on Verb-143) because no deep hidden layers sit between input and output.
Penn Treebank Test Perplexity (lower is better) and Parameter Savings
Small LSTM without dropout (200 hidden units, PTB)
Untied Small (4.65M)
114.5 ppl
Small + WT (2.65M)
112.4 ppl
Small + WT + PR (2.69M)
100.9 ppl
Regularized models with dropout (1,500-unit LSTM and RHN, PTB)
Large LSTM (66M)
78.4 ppl
Large + WT (51M)
74.3 ppl
RHN + BD (32M)
68.5 ppl
RHN + BD + WT (24M)
66.0 ppl

Source: Press and Wolf (2017), Tables 5 and 6. WT = weight tying; PR = projection regularization; BD = Bayesian dropout.

Why Tied Embeddings Follow Output Updates

A standard neural language model maintains two matrices of identical shape C x H (for vocabulary size C and hidden dimension H): an input matrix U that embeds token i_t at the bottom of the network, and an output matrix V that dots the topmost hidden vector h_2 against every vocabulary row to produce next-token logits h_3 = V h_2.

In an untied model trained with cross-entropy loss, gradient updates to U and V are sharply asymmetric. At timestep t, only a single row U_{i_t} of the input matrix receives a nonzero gradient, leaving rare tokens sparsely updated. By contrast, the softmax denominator touches every row of V on every step: target row V_{o_t} moves toward h_2 by (p_t(o_t) - 1) h_2, and every other row k != o_t receives p_t(k) h_2.

When Press and Wolf enforce U = V = S, every row of S receives the dense output-side update at every step except the rare case k = i_t. Measuring Spearman rank correlations of pairwise word cosine distances confirms that the tied matrix behaves like the output matrix: rho(Out, Tied) reaches 0.65 in the small model and 0.77 in the large model, versus 0.31 and 0.45 for rho(In, Tied).

That same gradient math explains why weight tying fails in shallow skip-gram word2vec. Without intermediate recurrent or Transformer layers to decouple input and output representations, h_2 reduces to the identity map on the input vector. Because words rarely follow themselves immediately (p_t(i_t | i_{1:t}) ~ 0), tying U = V pushes input vector norms toward zero. Multi-layer sequence models avoid that collapse because hidden layers mediate between U and V.

Gradient Density and Three-Way Weight Tying
Untied Input U
Updates only 1 row per token (k = i_t). Rare words starve; PTB Verb-143 similarity stays at 0.12.
Tied U = V = S
Updates all C rows every step via softmax gradients; hidden layers prevent word2vec norm collapse.
NMT Three-Way W = U = V
Shared BPE overlaps 90% (EN-FR) and 85% (EN-DE), cutting total parameters by 52%.

Source: Press and Wolf (2017), Sections 3 and 4.1.

Key Findings

Weight tying works primarily as a parameter-saving regularizer. On the Large PTB LSTM with dropout, tying embeddings raises training perplexity (37.8 to 48.5) while cutting validation (82.2 to 77.7) and test perplexity (78.4 to 74.3), confirming less overfitting. The same pattern holds when paired with Bayesian dropout (75.2 to 73.2) or Recurrent Highway Networks (68.5 to 66.0).

For small models trained without dropout, Press and Wolf introduce projection regularization (PR): inserting a square matrix P before the output lookup (h_3 = V P h_2) with an L2 penalty lambda ||P||^2 (lambda = 0.15). Combining WT + PR lowers small-model test perplexity from 114.5 to 100.9 on PTB, 95.6 to 91.5 on text8, 195.3 to 183.2 on IMDB, and 110.8 to 98.9 on BBC, though PR offers no gain when dropout is already active.

In attention-based neural machine translation segmented with shared BPE (89,500 merges), up to 90% of English-French subwords and 85% of English-German subwords appear in both vocabularies. Tying the encoder input W, decoder input U, and decoder output V into a single duo-lingual table (TWWT) halves total model size without losing translation quality.

Caveats and Builder Takeaway

Press and Wolf tested 2016-era RNNs with hidden dimensions up to 1,500 and shared BPE vocabularies around 90K tokens; modern frontier LLMs operate with larger hidden widths and vocabularies exceeding 100K tokens for multilingual coverage. Tying also forces input embedding width to equal pre-softmax hidden width unless an extra projection P reconciles them, adding matrix-multiply cost.

In practice, weight tying remains a default win for compact and mid-sized models (under roughly 3B parameters) where embedding tables dominate parameter memory and act as useful regularization. At massive scale, where compute budgets outgrow overfitting concerns and decoupling input features from output logits buys extra capacity, keeping U and V untied is often worth the memory.