LIME: Link-based User-item Interaction Modeling with Decoupled XOR Attention for Efficient Test Time Scaling
Organizations: Meta
Abstract
Scaling large recommendation systems requires advancing three major frontiers: processing longer user histories, expanding candidate sets, and increasing model capacity. While promising, transformers' computational cost scales quadratically with the user sequence length and linearly with the number of candidates. This trade-off makes it prohibitively expensive to expand candidate sets or increase sequence length at inference, despite the significant performance improvements. We introduce \textbf{LIME}, a novel architecture that resolves this trade-off. Through two key innovations, LIME fundamentally reduces computational complexity. First, low-rank ``link embeddings" enable pre-computation of attention weights by decoupling user and candidate interactions, making the inference cost nearly independent of candidate set size. Second, a linear attention mechanism, \textbf{LIME-XOR}, reduces the complexity with respect to user sequence length from quadratic () to linear (). Experiments on public and industrial datasets show LIME achieves near-parity with state-of-the-art transformers but with a 10 inference speedup on large candidate sets or long sequence lengths. When tested on a major recommendation platform, LIME improved user engagement while maintaining minimal inference costs with respect to candidate set size and user history length, establishing a new paradigm for efficient and expressive recommendation systems.
Figures & tables
| Model | gAUC | AUC | Log loss |
| VISTA (32 seeds) | |||
| TTSN | |||
| DIN | |||
| HSTU | |||
| LIME-XOR (32 links) |
| Candidate-side basis | gAUC | AUC | Log loss | QK cacheable |
| Learned global links | Yes | |||
| Frozen random links | Yes | |||
| Fixed item centroids | Yes | |||
| Personalized-link keys | No |
| Links | Jensen–Shannon divergence | Cosine similarity |
| 1 | 0.122 | 0.837 |
| 4 | 0.072 | 0.902 |
| 32 | 0.055 | 0.915 |
| 128 | 0.050 | 0.923 |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Description |
| User | |
| Number of items in user ’s interaction history | |
| Number of candidate items for user | |
| Embedding representation of item | |
| Sequence of user history embeddings, | |
| User context features (e.g., location, device type) |
| Axis | Transformers (HSTU) | SIM/TWIN | Two-Tower | LIME (Ours) |
| User-Item Interaction | Deep | Medium | Limited late interaction | Deep |
| Latency | High | Medium | Low | Low |
| Complexity | ||||
| Pre-computation | Minimal | Minimal | Item Emb | QK Attention Weights |
| Parameter | KuaiRand | TaoBao Ad | Industrial |
| Num. of Interactions | |||
| Learning Rate | |||
| Batch Size | 1024 | 8192 | 1024 |
| Number of Heads | 4 | 4 | 4 |
| Epochs | 2 | 10 | 1 |
| Embedding Dimension | 32 | 32 | 256 |
| Candidates | Uncached global | BF16 lookup | Weighted sum | BF16 total | Int8 lookup+dequant | Int8 total | Personalized keys |
| 100 | 0.198 | 0.037 | 0.119 | 0.157 | 0.068 | 0.194 | 0.193 |
| 1,000 | 0.202 | 0.037 | 0.124 | 0.146 | 0.068 | 0.192 | 0.205 |
| 10,000 | 0.191 | 0.038 | 0.117 | 0.162 | 0.070 | 0.186 | 0.196 |
| 100,000 | 0.313 | 0.092 | 0.222 | 0.301 | 0.207 | 0.414 | 0.321 |
| Links | User encoding (ms) | Uncached global (ms) | BF16 cached total (ms) | Int8 cached total (ms) | Int8 cache (GB) |
| 8 | 0.330 | 0.187 | 0.143 | 0.186 | 3.2 |
| 16 | 0.347 | 0.193 | 0.154 | 0.182 | 6.4 |
| 32 | 0.340 | 0.191 | 0.162 | 0.186 | 12.8 |
| 64 | 0.349 | 0.195 | 0.151 | 0.186 | 25.6 |
| 128 | 0.476 | 0.212 | 0.157 | 0.197 | 51.2 |
| Number of Layers | VC NE % Improvement | WT AUC % Improvement |
| 3 | 0% | 0% |
| 6 | -0.25% | +0.12% |
| 9 | -0.34% | +0.18% |
| 12 | -0.38% | +0.19% |
| Variant | 256/128 | 64/128 | 256/32 | 64/32 | Complexity |
| HSTU Skyline | |||||
| Linear Trans. | |||||
| Longformer | |||||
| Linformer (LREA) | |||||
| LIME-XOR | |||||
| LIME-XOR+Win. |
| Cold-Start User Threshold | LIME-XOR | HSTU |
| 0.7022 | 0.7016 | |
| 0.7179 | 0.7173 | |
| 0.7284 | 0.7273 | |
| 0.7369 | 0.7356 |