LinkedIn's Percentile Bucketing: Your LLM Embeddings Are Ignoring Every Number You Feed Them
The Discovery That Changes Your Feature Engineering
LinkedIn disclosed the most detailed public account of replacing a multi-pipeline recommendation architecture with a unified LLM-based system at genuine scale: 1.3 billion users, sub-50ms latency. Five separate retrieval systems — chronological, trending, collaborative filtering, industry-specific, and embedding-based — are gone, replaced by a single dual-encoder LLM. But the headline isn't the architecture migration. It's what they found about how LLMs process numbers.
When LinkedIn passed raw engagement counts (e.g., "views:12345") into their LLM encoder prompts, the correlation between item popularity and embedding similarity was -0.004 — statistically indistinguishable from random. LLMs tokenize "12345" as a sequence of digit characters with zero magnitude awareness. The fix was trivially simple: convert raw counts to percentile buckets wrapped in special tokens: <view_percentile>71</view_percentile>.
Result: 30x correlation improvement and 15% Recall@10 lift — from a preprocessing step that takes hours to implement.
The Training Data Insight Nobody Expected
Counter-intuitively, removing non-engaged posts from training sequences improved both quality and efficiency. Scrolled-past items added noise and inflated sequence length (quadratic attention cost). Positive-only sequences delivered:
- 37% memory reduction per sequence
- 40% more sequences per batch
- 2.6x faster training iterations
For negative examples, LinkedIn used a two-tier strategy: easy negatives (random unshown posts) plus hard negatives (shown but not engaged). Adding just 2 hard negatives per member yielded 3.6% recall improvement.
What Transfers to Your Stack
Percentile bucketing is the single highest-ROI takeaway. If you use any transformer encoder to process structured numerical features — for recommendations, search ranking, or tabular prediction — your embeddings are likely blind to the numbers you're feeding them. The implementation is trivial: compute percentile ranks offline, wrap in special tokens, fine-tune. The -0.004 correlation proves raw numbers are invisible to LLM encoders, and this likely affects every team using transformers for structured data without realizing it.
Positive-only training sequences challenge a deep assumption. Most recommendation teams include implicit negatives (impressions without clicks). LinkedIn found these hurt quality and ballooned cost. The 2.6x training speedup alone justifies running this ablation even if quality is neutral.
The cold-start advantage is also worth noting: the LLM encoder generates meaningful embeddings from just a profile headline — no engagement history needed — leveraging the model's world knowledge. If cold-start is a pain point in your recommender, an LLM user encoder is the most promising architectural direction.
What's Missing
No online A/B test results were shared. The 15% Recall@10 and 3.6% from hard negatives are offline numbers without confidence intervals or sample sizes. This is a first-party engineering blog — treat the numbers as directionally correct but assume selection bias in what was reported.
What to do
Implement percentile bucketing for all numerical features fed into LLM-based encoders this sprint — wrap discretized values in special tokens and measure correlation vs. raw numeric inputs
Run an ablation comparing full-impression training sequences vs. positive-engagement-only sequences on your recommendation models by end of quarter
Prototype hard negative mining with 2 hard negatives per positive example for any contrastive learning retrieval model