[Paper Review] Query as Anchor: Scenario-Adaptive User Representation via Large Language Model
The paper introduces Query-as-Anchor (Q-Anchor), a dynamic, query-aware user representation framework that uses a hierarchical multi-modal encoder and dual-tower LLMs to adapt user embeddings to specific scenarios with soft prompt tuning and KV-cache accelerated inference. It shows state-of-the-art results on Alipay benchmarks and validates deployment via online A/B tests.
Industrial-scale user representation learning requires balancing robust universality with acute task-sensitivity. However, existing paradigms primarily yield static, task-agnostic embeddings that struggle to reconcile the divergent requirements of downstream scenarios within unified vector spaces. Furthermore, heterogeneous multi-source data introduces inherent noise and modality conflicts, degrading representation. We propose Query-as-Anchor, a framework shifting user modeling from static encoding to dynamic, query-aware synthesis. To empower Large Language Models (LLMs) with deep user understanding, we first construct UserU, an industrial-scale pre-training dataset that aligns multi-modal behavioral sequences with user understanding semantics, and our Q-Anchor Embedding architecture integrates hierarchical coarse-to-fine encoders into dual-tower LLMs via joint contrastive-autoregressive optimization for query-aware user representation. To bridge the gap between general pre-training and specialized business logic, we further introduce Cluster-based Soft Prompt Tuning to enforce discriminative latent structures, effectively aligning model attention with scenario-specific modalities. For deployment, anchoring queries at sequence termini enables KV-cache-accelerated inference with negligible incremental latency. Evaluations on 10 Alipay industrial benchmarks show consistent SOTA performance, strong scalability, and efficient deployment. Large-scale online A/B testing in Alipay's production system across two real-world scenarios further validates its practical effectiveness. Our code is prepared for public release and will be available at: https://github.com/JhCircle/Q-Anchor.
Motivation & Objective
- Address the mismatch between static, task-agnostic user embeddings and diverse downstream scenarios in industry.
- Develop a scalable pretraining dataset (UserU) that links multi-modal behaviors with user understanding semantics.
- Create a query-conditioned embedding mechanism that re-anchors behavior profiles under different downstream tasks.
- Enable efficient multi-scenario inference via KV-cache accelerated deployment.
- Bridge general pretraining with business-specific logic through soft prompt tuning and discriminative structuring.
Proposed method
- Construct UserU pretraining data combining future-behavior prediction and UserQA supervision.
- Design Hierarchical Coarse-to-Fine encoders to produce multi-granularity user representations from multi-modal signals.
- Implement Query-as-Anchor with dual towers: an anchor tower producing query-aware embeddings and a semantic tower modeling target answers.
- Optimize with joint contrastive–generative objective including InfoNCE-based alignment and Next-Token Prediction loss.
- Apply cluster-based Soft Prompt Tuning with prototypes to enforce discriminative latent structure for scenario adaptation.
- Enable KV-cache accelerated inference by precomputing and caching the hierarchical user prefix for efficient re-anchoring to multiple queries.

Experimental results
Research questions
- RQ1Can a single model produce scenario-adaptive user embeddings conditioned by natural language queries?
- RQ2Does a query-anchored, hierarchical encoding improve cross-domain generalization for industrial user representations?
- RQ3Can soft prompt tuning align general pretraining with downstream business logic without full fine-tuning?
- RQ4Is KV-cache enabled inference feasible for real-time multi-scenario embedding generation in production?
- RQ5What gains do offline and online evaluations reveal across engagement, risk, and marketing tasks?
Key findings
- Q-Anchor with prompt tuning achieves superior average AUC and KS across 10 Alipay scenarios compared to baselines, with 0.8225 AUC and 0.5267 KS on average.
- Prompt-tuned Q-Anchor consistently outperforms base versions and general embeddings, notably improving Brand in Marketing and Money in Risk.
- Data scale favors pretraining data over model size for embedding quality, with optimal results at 0.5B backbone and 50k pretraining steps.
- Soft prompts yield scenario-specific attention shifts, enabling interpretable re-anchoring of modalities (e.g., Bill attention up in Takeout Interest, SPM attention up in Ant Forest).
- KV-cache accelerated inference enables re-anchoring to multiple downstream queries with negligible incremental latency in industrial deployment.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.