Query as Anchor: Scenario-Adaptive User Representation via Large Language Model
This paper introduces "Query-as-Anchor," a framework that leverages a large-scale pre-training dataset (UserU) and a dual-tower LLM architecture with cluster-based soft prompt tuning to generate dynamic, query-aware user representations, achieving state-of-the-art performance and efficient deployment across multiple industrial scenarios in Alipay.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Problem: The "One-Size-Fits-All" Suit
Imagine you work at a massive department store (like Alipay) that serves millions of customers. You want to understand every customer so well that you can:
- Sell them the right shoes (Marketing).
- Decide if they are a good credit risk (Risk Management).
- Know when they are likely to visit the store (Engagement).
Currently, most companies use a "Static User Profile." Think of this as taking a single, giant photo of a customer and putting it in a file.
- The Flaw: If you show that same photo to the shoe salesman, the credit officer, and the security guard, they all see the same thing. The shoe salesman needs to know about their fashion sense; the credit officer needs to know about their debt history. A single photo can't highlight different details for different people.
- The Result: Companies end up building separate, expensive "file rooms" for every single department. It's messy, slow, and expensive to maintain.
The Solution: "Query as Anchor"
The authors propose a new way to think about user data. Instead of a static photo, imagine a smart, shape-shifting hologram of the customer.
This hologram is built from all the customer's past actions (buying bills, using mini-programs, searching for things). But here is the magic trick: The hologram changes its shape depending on who is looking at it.
- The "Anchor": The customer's history is the heavy anchor at the bottom. It stays the same.
- The "Query": The specific question asked (e.g., "Is this person likely to buy takeout?" or "Is this person a fraud risk?") acts as a magnet that pulls the relevant parts of the hologram to the surface.
If a Marketing Manager asks, "What does this person like to eat?", the hologram highlights their food orders and ignores their bank balances.
If a Risk Officer asks, "Is this person safe?", the hologram highlights their transaction patterns and ignores their food orders.
The Analogy: Think of the user's data as a giant, messy library.
- Old Way: You have to read every single book in the library to answer any question.
- New Way (Query as Anchor): You have a super-smart librarian (the AI). You just ask, "Show me all books about Italian Cooking," and the librarian instantly pulls out only those books, ignoring the rest. You don't need a different librarian for every topic; you just change the question.
How They Built It (The Secret Sauce)
To make this work, the team did three main things:
1. They Built a "Training Gym" (UserU Dataset)
Large Language Models (LLMs) are usually trained on books and articles. But user data (like "User clicked button X at 3 PM") is very different from text. It's sparse and messy.
- The Fix: They created a massive dataset called UserU. They didn't just feed the AI raw data; they taught it to play "Future Prediction" and "Interview."
- The Analogy: Instead of just memorizing a dictionary, they made the AI practice by looking at a person's past and guessing what they will do next, or answering questions like, "Based on their spending, are they saving for a house?" This taught the AI to understand the story behind the numbers.
2. The "Hierarchical Encoder" (The Smart Organizer)
User data comes in many forms: text, numbers, clicks, and locations.
- The Fix: They built a system that organizes this data like a Russian Nesting Doll.
- Layer 1 (Events): Individual actions (e.g., "Bought coffee").
- Layer 2 (Modes): Groups of actions (e.g., "All food purchases").
- Layer 3 (The Whole Person): The big picture.
- The Analogy: Imagine a detective organizing clues. They don't just dump all evidence on the table. They group them by type (fingerprints, phone records, witness statements) so the AI can easily find the right clue when asked a specific question.
3. The "Soft Prompt" (The Magic Remote Control)
This is the most clever part. Usually, to make an AI good at a new task, you have to retrain the whole brain (which is slow and expensive).
- The Fix: They use Soft Prompt Tuning. Instead of retraining the whole brain, they add a tiny, adjustable "remote control" (a few extra tokens) to the query.
- The Analogy: Imagine you have a high-end TV. To watch a sports game, you don't rebuild the TV; you just press the "Sports Mode" button. The picture changes instantly. Similarly, the AI keeps its core knowledge but uses a tiny "button" to shift its focus to the specific business scenario (Risk vs. Marketing) without needing a massive overhaul.
Why It's a Game Changer
- Speed & Cost: Because the "user profile" (the heavy part) is calculated once and saved, the system can answer 100 different questions about that user in a split second. It's like having a library card that works for every section of the library instantly.
- Better Accuracy: In real-world tests on Alipay (a massive Chinese payment app), this method beat all previous models. It was better at spotting fraud, predicting who would buy things, and identifying risky users.
- One Model to Rule Them All: Instead of having 10 different AI models for 10 different departments, they now have one model that adapts to all of them.
The Bottom Line
"Query as Anchor" is like giving a company a single, super-intelligent assistant who knows everything about every customer. Instead of forcing the assistant to memorize 10 different rulebooks, you simply ask it the right question, and it instantly reorganizes its knowledge to give you the perfect answer for that specific situation. It's faster, cheaper, and smarter than anything they had before.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.