TL;DR
This paper introduces Fints, a novel inference-time personalization framework for Large Language Models (LLMs). Fints adapts LLMs to individual user preferences by dynamically injecting "steering vectors" into the model's activations, offering high flexibility and data efficiency without requiring model retraining. This approach excels in challenging scenarios like sparse user data and rapidly changing preferences, outperforming existing methods.
What Problem Does This Paper Address?
Large Language Models (LLMs) are becoming increasingly powerful, but their generic nature limits their usefulness in personalized applications. Adapting LLMs to individual user preferences is crucial for applications like personal assistants, conversational agents, and adaptive learning systems. Existing personalization methods fall into a few categories:
- Prompt-based methods: These leverage LLMs' in-context learning by including user information in the prompt. However, they are limited by the finite context window of transformers, restricting the amount of personal data that can be used.
- Parametric adaptation methods: These involve fine-tuning a subset of LLM parameters (e.g., using LoRA) on user data. While effective, they suffer from data inefficiency (requiring substantial data), structural interference (new user styles overwriting old ones), and slow adaptation due to offline training cycles. They also struggle with the "elasticity" of LLMs, which can resist alignment changes after pre-training.
- Personalized reward models: These train models to evaluate LLM outputs based on user preferences. They can be computationally expensive due to generating multiple candidates and can be biased by non-stationary reward surfaces.
These methods face significant challenges in real-world production environments characterized by extreme data sparsity (new users with very little interaction history) and fast-changing user patterns (preferences that shift rapidly).
Methods
Fints proposes a new paradigm: inference-time activation steering. Instead of modifying model weights or prompts, Fints injects small, dynamically generated "steering vectors" into the LLM's intermediate activations during the forward pass. This approach is designed to be training-free, instance-selected, and adaptable.
The Fints framework operates in two stages:
- Offline Steering Vectors Preparation:
- Contrastive Prompts Construction: For each historical user interaction, the system creates a pair of prompts: a positive prompt (
X+) with relevant user context and a negative prompt (X-) with irrelevant context from other users.
- Contrastive Prompts Construction: For each historical user interaction, the system creates a pair of prompts: a positive prompt (
- Fine-Grained Hooking: The LLM processes these prompt pairs. Crucially, Fints hooks activations from both attention and MLP layers separately. The difference between the activations for the positive and negative prompts at these layers yields two steering vectors:
A_attnandA_mlp. These vectors capture subtle stylistic signals. - These steering vectors are stored in a user-specific dictionary, indexed by the corresponding prompt pair.
- Online Inference with Input-Aware Steering:
- Input-Aware Aggregation: When a new query arrives, Fints computes the semantic similarity between the query and the keys (prompt pairs) in the user's steering vector dictionary. It then selects the top-K most relevant steering vectors. These selected vectors are aggregated, either through simple mean aggregation or a more sophisticated attentive aggregation that weights vectors based on their semantic similarity to the current query.
- Inference-Time Application (Pulse and Re-Pulse): The aggregated steering vectors are injected into the LLM's forward pass at a predefined layer (
L). The "Pulse" operation applies the attention steering vector after the attention module, and "Re-Pulse" applies the MLP steering vector after the MLP module. Scaling factors (αandβ) control the intensity of steering. This process is designed to be computationally trivial and requires no gradient updates.
Datasets
The paper evaluates Fints on three datasets:
- News-Headline Generation: Focuses on capturing authorial style for headline generation.
- Abstract Writing: Evaluates the ability to distill complex ideas and generate coherent abstracts in a user's style.
- PersonalWAB: A benchmark for personalized web function calling, requiring LLMs to infer user needs and formulate function calls.
The datasets were split into training and testing sets using a time-based approach, ensuring that earlier interactions formed the training data and later interactions formed the test data.
Key Insights and Ideas
- Activation Steering as a Paradigm Shift: Moving personalization from modifying model weights (parametric) or input (prompting) to directly influencing internal activations during inference is a key innovation. This allows for real-time adaptation without costly retraining.
- Fine-Grained Hooking is Crucial: Capturing signals from both attention and MLP layers, rather than just one or a whole layer, significantly improves personalization quality. This suggests that different layers capture distinct aspects of user preference.
- Input-Aware Aggregation Enables Instance-Level Adaptation: Dynamically selecting and weighting steering vectors based on the current query's semantic similarity allows Fints to adapt to specific instances, not just general user profiles. This is critical for rapidly changing preferences.
- Orthogonality and Plug-in Capability: Fints is designed to be compatible with existing personalization methods, acting as a plug-in to enhance their performance, especially in challenging scenarios.
- Robustness to Data Sparsity and Distribution Shifts: The core strength of Fints lies in its ability to perform well even with very few user examples and when user preferences change drastically, areas where traditional methods falter.
Key Results
- Superior Performance: Fints consistently outperforms prompt-based methods and parametric adaptation methods (like Rella, OPPU, PER-PCS) across all evaluated tasks (headline generation, abstract writing, web function calling). For example, in Table 1, Fints achieves the highest Rouge-1 scores for headline generation and abstract writing, and the highest ACC for PersonalWAB.
- Fine-Grained Hooking Advantage: The "attn + mlp" variant of Fints (using both attention and MLP hooks) shows a performance gain of over 0.5% in Rouge-1 scores for content generation tasks compared to using only attention or MLP hooks, or "whole" module hooking.
- Data Efficiency: Fints demonstrates remarkable data efficiency. Even with as little as 5% of the personalized data, Fints maintains strong performance, outperforming LoRA-based methods by up to 3% absolute Rouge score under extreme data sparsity (Figure 5, Table 4).
- Low Overhead: Fints incurs only a light latency overhead during inference (Table 5), making it practical for real-time applications. This is a significant advantage over methods requiring extensive computation or storage for user-specific models.
- Robustness to Heterogeneous Distributions: In experiments with heterogeneous user distributions (Table 3), Fints consistently outperforms personalized LoRA methods across different sub-populations, highlighting its ability to adapt to diverse and shifting user preferences.
Limitations and Future Work
- Limitations:
- The paper acknowledges that while Fints is training-free for inference, the initial preparation of steering vectors still requires historical user data.
- The performance of Fints might depend on the quality and relevance of the historical data used for generating steering vectors.
- While latency is low, it's not zero, and the exact overhead can vary with user dictionary size and query length.
- Future Work:
- The authors suggest exploring more sophisticated aggregation strategies for steering vectors.
- Investigating how to further optimize the steering vector preparation process for even greater efficiency.
- Extending Fints to other LLM applications beyond text generation and function calling.
- Further research into the theoretical underpinnings of activation steering for personalization.
Summary updated