arXiv:2509.16629cs.LGq-bio.QM2025-09NeurIPS被引 4

为非序列特征设计因果感知的位置编码,提升Transformer表征能力

Causality-Induced Positional Encoding for Transformer-Based Representation Learning of Non-Sequential Features

  • 基于广义结构方程建模构建特征因果图,嵌入双曲空间保留结构
  • 生成旋转式位置编码,在真实与合成数据上显著提升模型性能
  • 适合处理无序但有因果关系的数据,如医疗、金融等复杂系统

位置编码对补充Transformer的标记顺序信息至关重要。现有方法依赖预定义的标记/特征顺序,不适用于具有非序列但因果关联特征的真实数据。为此,我们提出CAPE,一种新方法:利用广义结构方程建模识别非序列特征间的潜在因果结构,形成加权有向无环图(DAG),并采用双曲面模型将其嵌入双曲空间,有效保留因果强度与因果特异性两个关键属性。由此生成的因果感知位置编码被转换为旋转形式,融入Transformer自注意力机制。理论分析表明,CAPE生成的旋转位置编码具备三个有益特性:因果距离诱导衰减、因果泛化性诱导衰减,以及对位置扰动的鲁棒性。我们在合成与真实数据集上评估CAPE,实证验证其理论性质及在非序列特征上的有效性。代码已开源:https://github.com/Catchxu/CAPE。

原文摘要 · Abstract (English)

Positional encoding is essential for supplementing transformer with positional information of tokens. Existing positional encoding methods demand predefined token/feature order, rendering them unsuitable for real-world data with non-sequential yet causally-related features. To address this limitation, we propose CAPE, a novel method that identifies underlying causal structure over non-sequential features as a weighted directed acyclic graph (DAG) using generalized structural equation modeling. The DAG is then embedded in hyperbolic space where its geometric structure is well-preserved using a hyperboloid model-based approach that effectively captures two important causal graph properties (causal strength & causal specificity). This step yields causality-aware positional encodings for the features, which are converted into their rotary form for integrating with transformer's self-attention mechanism. Theoretical analysis reveals that CAPE-generated rotary positional encodings possess three valuable properties for enhanced self-attention, including causal distance-induced attenuation, causal generality-induced attenuation, and robustness to positional disturbances. We evaluate CAPE over both synthetic and real-word datasets, empirically demonstrating its theoretical properties and effectiveness in enhancing transformer for data with non-sequential features. Our code is available at https://github.com/Catchxu/CAPE.

Transformer因果学习位置编码图神经网络

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。