IFA: Interaction Fidelity Attention for Entire Lifelong Behaviour Sequence Modeling

Wenhui Yu, Chao Feng, Yanze Zhang, Lantao Hu, Peng Jiang, Han LiarXiv 2024 · DOI

Abstract

In industrial recommendation systems, modeling long-term user behavior is crucial for capturing evolving interests. However, computational constraints often necessitate lossy sampling or heuristic-based retrieval of sub-sequences, which discards valuable contextual information. We introduce Interaction Fidelity Attention (IFA), a framework designed to process the entire lifelong behavior sequence without sampling. By utilizing Linear Transformers and a novel candidate-set processing strategy, IFA reduces the complexity of cross-attention to $O(m+n)$, where $m$ is the candidate set size and $n$ is the sequence length. Evaluated on Kuaishou’s large-scale streaming data, IFA achieves state-of-the-art performance, delivering significant gains in user engagement and content diversity in live production environments.

Introduction: The Information Loss Problem

Modern recommenders rely on user history to predict future interactions. While longer sequences generally improve accuracy, processing "lifelong" histories (e.g., 10,000+ items) for every candidate item is computationally expensive. Current industry standards, such as the Search-based Interest Model (SIM), mitigate this by searching for a small sub-sequence of items similar to the target.

However, this "search-then-attend" paradigm suffers from three types of information loss:

  1. Simple Search Rules: Relevant items might be missed if they don't share exact categories or high embedding similarity.
  2. User Profiling: Even "irrelevant" items (e.g., skincare purchases) provide critical demographic and aesthetic context for predicting unrelated interests (e.g., anime).
  3. Length Constraints: Hard limits on sub-sequences force the model to discard potentially useful historical data.
Comparison between traditional sub-sequence modeling and IFA's full sequence modeling. Traditional methods only consider items highly similar to the target, whereas IFA captures the complete user persona by modeling the full sequence.

Methods: Interaction Fidelity Attention

The core innovation of IFA is the shift from point-wise item scoring to batch-wise candidate set processing.

1. Linear Transformer for $O(m+n)$ Complexity

Standard softmax attention scales quadratically ($O(n^2)$). IFA employs a Linear Transformer that uses a kernel function to approximate the softmax operation. By leveraging the associative property of matrix multiplication, the cross-attention between a candidate set of $m$ items and a behavior sequence of $n$ items is reduced from $O(m \times n)$ to $O(m + n)$. This allows the model to attend to every item in a 10,000-item sequence without exceeding latency limits.

2. Normalization and Stability

To address the training instability often found in Linear Transformers, IFA introduces a normalization mechanism inspired by Graph Convolutional Networks (GCNs). By using a degree matrix to scale attention scores, the model prevents gradient explosions and ensures effective convergence.

3. Relationship Aware Modeling (RAM)

Unlike traditional models that score items independently, IFA includes a RAM module. This module uses self-attention within the candidate set to model inter-item relationships, allowing the system to optimize for the best overall set of recommendations rather than just a list of high-scoring individuals.

Experimental Evaluation

IFA was tested using Kuaishou's online streaming data, involving over 144 million users and sequences of 10,000 items.

  • Offline Performance: IFA significantly outperformed existing state-of-the-art models like TWIN. In click-through rate prediction, IFA achieved an AUC of 0.9815, a substantial improvement over TWIN’s 0.9632. Ablation studies confirmed that Full Sequence Modeling (FSM) was the primary contributor to these gains.
  • Online Impact: In a production A/B test at Kuaishou, IFA demonstrated broad improvements across key metrics, including watch time (+0.803%), follows (+1.781%), and comments (+1.329%).
  • Diversity: The model achieved a +0.821% gain in diversity, suggesting that by modeling the full user persona, IFA is better at identifying a wider range of user interests compared to sampling-based methods.

Conclusion

IFA represents a significant step forward in lifelong behavior modeling. By eliminating the need for lossy sub-sequence sampling, it preserves the "interaction fidelity" of user history. The use of Linear Transformers makes this approach viable for large-scale industrial applications, proving that holistic user modeling is both effective and efficient.

Summary updated

BibTeX
@misc{yu2024ifa,
  author = {Wenhui Yu and Chao Feng and Yanze Zhang and Lantao Hu and Peng Jiang and Han Li},
  title = {{IFA: Interaction Fidelity Attention for Entire Lifelong Behaviour Sequence Modeling}},
  year = {2024},
  eprint = {2406.09742},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.09742},
}
Figure