EulerFormer: Sequential User Behavior Modeling with Complex Vector Attention

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Tian, Zhen, Zhao, Wayne Xin, Zhang, Changwang, Zhao, Xin, Ma, Zhongrui, Wen, Ji-Rong
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866909160722923520
author Tian, Zhen
Zhao, Wayne Xin
Zhang, Changwang
Zhao, Xin
Ma, Zhongrui
Wen, Ji-Rong
author_facet Tian, Zhen
Zhao, Wayne Xin
Zhang, Changwang
Zhao, Xin
Ma, Zhongrui
Wen, Ji-Rong
contents To capture user preference, transformer models have been widely applied to model sequential user behavior data. The core of transformer architecture lies in the self-attention mechanism, which computes the pairwise attention scores in a sequence. Due to the permutation-equivariant nature, positional encoding is used to enhance the attention between token representations. In this setting, the pairwise attention scores can be derived by both semantic difference and positional difference. However, prior studies often model the two kinds of difference measurements in different ways, which potentially limits the expressive capacity of sequence modeling. To address this issue, this paper proposes a novel transformer variant with complex vector attention, named EulerFormer, which provides a unified theoretical framework to formulate both semantic difference and positional difference. The EulerFormer involves two key technical improvements. First, it employs a new transformation function for efficiently transforming the sequence tokens into polar-form complex vectors using Euler's formula, enabling the unified modeling of both semantic and positional information in a complex rotation form.Secondly, it develops a differential rotation mechanism, where the semantic rotation angles can be controlled by an adaptation function, enabling the adaptive integration of the semantic and positional information according to the semantic contexts.Furthermore, a phase contrastive learning task is proposed to improve the isotropy of contextual representations in EulerFormer. Our theoretical framework possesses a high degree of completeness and generality. It is more robust to semantic variations and possesses moresuperior theoretical properties in principle. Extensive experiments conducted on four public datasets demonstrate the effectiveness and efficiency of our approach.
format Preprint
id arxiv_https___arxiv_org_abs_2403_17729
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle EulerFormer: Sequential User Behavior Modeling with Complex Vector Attention
Tian, Zhen
Zhao, Wayne Xin
Zhang, Changwang
Zhao, Xin
Ma, Zhongrui
Wen, Ji-Rong
Information Retrieval
Machine Learning
To capture user preference, transformer models have been widely applied to model sequential user behavior data. The core of transformer architecture lies in the self-attention mechanism, which computes the pairwise attention scores in a sequence. Due to the permutation-equivariant nature, positional encoding is used to enhance the attention between token representations. In this setting, the pairwise attention scores can be derived by both semantic difference and positional difference. However, prior studies often model the two kinds of difference measurements in different ways, which potentially limits the expressive capacity of sequence modeling. To address this issue, this paper proposes a novel transformer variant with complex vector attention, named EulerFormer, which provides a unified theoretical framework to formulate both semantic difference and positional difference. The EulerFormer involves two key technical improvements. First, it employs a new transformation function for efficiently transforming the sequence tokens into polar-form complex vectors using Euler's formula, enabling the unified modeling of both semantic and positional information in a complex rotation form.Secondly, it develops a differential rotation mechanism, where the semantic rotation angles can be controlled by an adaptation function, enabling the adaptive integration of the semantic and positional information according to the semantic contexts.Furthermore, a phase contrastive learning task is proposed to improve the isotropy of contextual representations in EulerFormer. Our theoretical framework possesses a high degree of completeness and generality. It is more robust to semantic variations and possesses moresuperior theoretical properties in principle. Extensive experiments conducted on four public datasets demonstrate the effectiveness and efficiency of our approach.
title EulerFormer: Sequential User Behavior Modeling with Complex Vector Attention
topic Information Retrieval
Machine Learning
url https://arxiv.org/abs/2403.17729