TL;DR
Directly fine-tuning Large Language Models (LLMs) on user behavior data for personalized search causes "semantic collapse," where the model discards rich text and image meanings in favor of easy behavioral shortcuts. KARMA (Knowledge-Action Regularized Multimodal Alignment) fixes this by introducing semantic reconstruction as a train-only regularizer, forcing the model to retain its deep semantic knowledge. Deployed at Taobao, KARMA delivered a +0.9% increase in Gross Merchandise Volume (GMV) with zero added inference latency.
What Problem Does This Paper Address?
Modern personalized search and recommendation systems rely heavily on user feedback (like click-through rates) to tailor results. While excellent for popular "head" traffic, these systems struggle with "long-tail" queries or "cold-start" items where behavioral data is sparse.
To improve generalization, engineers have turned to LLMs to inject rich semantic knowledge into search. However, directly fine-tuning an LLM on user actions (e.g., predicting the next clicked item) creates a Knowledge-Action Gap. Because industrial systems must compress complex item data into single embedding tokens to meet strict latency limits, pure behavioral training causes Semantic Collapse. The LLM stops acting like a semantic engine and starts treating embeddings as opaque, ID-like shortcuts. Visually, this manifests as "attention sinks"—where the model's attention maps degenerate into sparse, barcode-like patterns, ignoring the broader semantic context just to optimize for immediate behavioral objectives.
Methods
The authors introduce KARMA, a unified framework that bridges the Knowledge-Action Gap by treating semantic decodability as a train-only regularizer.
During training, KARMA optimizes a next-interest embedding for retrieval and ranking (the Action) while simultaneously forcing the model to be able to reconstruct the target item's original text and images (the Knowledge). It achieves this via two complementary decodability paths:
- History-Conditioned Semantic Generation: Decodes the target item's text tokens directly from the user's behavioral history, anchoring the model to the LLM's native next-token distribution.
- Embedding-Conditioned Semantic Reconstruction: Decodes the same text tokens conditioned explicitly on the model-produced next-interest embedding, ensuring the embedding remains a rich semantic bottleneck rather than an opaque shortcut identifier.
For multimodal settings, KARMA adds a lightweight diffusion/flow-matching head to reconstruct frozen visual features of the target item.
The "Train-Heavy, Infer-Light" Advantage: Crucially, all decoding and reconstruction heads are completely detached during online serving. At inference time, KARMA functions exactly like a standard, highly efficient embedding-based retrieval model, incurring zero additional online latency.
Datasets
The framework was evaluated using anonymized production search logs from Taobao, one of the world's largest e-commerce platforms. The dataset consists of chronological splits containing:
- User interaction histories.
- The ground-truth next clicked item.
- Exposed-but-unclicked items serving as hard negatives.
Key Insights and Ideas
- Attention Sinks as a Diagnostic Tool: The authors discovered that action-only training forces the item encoder to over-focus on a few highly predictive cues, creating sharp "attention sinks." KARMA effectively mitigates this, restoring a healthy, distributed attention map that remains grounded in recoverable item semantics.
- The Mode-Seeking vs. Mean-Seeking Dilemma: A fascinating finding emerged when testing whether generative diffusion models could replace discriminative objectives to create retrieval embeddings directly. They failed. The authors explain that diffusion is inherently mode-seeking (aiming to sample a single, high-fidelity instance), whereas retrieval embeddings must be mean-seeking (acting as a stable centroid that aggregates multiple potential future user intents). Thus, diffusion is highly effective as a semantic regularizer during training, but suboptimal as an embedding generator.
Key Results
KARMA demonstrated substantial improvements across the entire search funnel in both offline and online environments:
Offline Ablations & Metrics
- Semantic Decodability: Combining history- and embedding-conditioned decodability yielded a massive improvement of up to +22.5 HR@200 (Hit Rate) in retrieval over the action-only baseline.
- Multimodal Extension: Adding visual semantic reconstruction provided an incremental boost of +1.38 gAUC and +10.83 HR@200 over the text-only version.
Production Deployment at Taobao
When deployed online across Taobao's three search stages, KARMA achieved:
- Ranking: +0.25 CTR AUC
- Pre-ranking: +1.86 HR@500
- Recalling (Retrieval): +2.51 HR@5000
- Business Impact: A +0.9% increase in Gross Merchandise Volume (GMV) over a 14-day A/B test.
Limitations and Future Work
The authors do not include a standalone limitations section, but the text highlights the ongoing challenge of balancing generative modeling with retrieval representation learning (the mode-mean dilemma). Future work could explore more deeply how to optimize continuous token interfaces without losing the discrete token advantages native to LLMs, as well as scaling cross-modal regularizers to even larger foundation models.
Summary updated