针对小样本纵向数据,提出简化版Transformer模型,捕捉关键时间点的动态依赖关系。
A statistical perspective on transformers for small longitudinal cohort data
- 基于统计视角改造Transformer,用核函数加衰减机制实现注意力计算
- 在少样本场景下仍能准确识别压力与心理健康间的时序关联模式
- 适合心理学、医学等小数据纵向研究,可解释性强且支持统计检验
纵向队列数据分析常面临多变量间复杂的时间依赖关系。尽管Transformer在语言与视觉领域表现优异,其在小样本纵向数据中应用受限,因通常需大规模数据支撑。为此,本文提出一种简化版Transformer架构,在保留核心注意力机制的同时显著减少参数量,更适用于样本量小、时间点少的数据。从自回归模型出发,将注意力设计为基于核函数与时间衰减的运算,并通过多头注意力聚合不同权重方案,实现对个体潜在特征的证据累积。该方法支持基于排列的统计检验,用于识别上下文模式。模拟研究显示,即使样本量和时间点较少,也能有效恢复上下文依赖。在一项韧性研究数据中的应用揭示了压力与心理健康的动态变化模式。结果表明,合理适配的Transformer不仅具备竞争力的预测性能,还能在小数据环境下发现复杂上下文依赖关系。
原文摘要 · Abstract (English)
Modeling of longitudinal cohort data typically involves complex temporal dependencies between multiple variables. There, the transformer architecture, which has been highly successful in language and vision applications, allows us to account for the fact that the most recently observed time points in an individual's history may not always be the most important for the immediate future. This is achieved by assigning attention weights to observations of an individual based on a transformation of their values. One reason why these ideas have not yet been fully leveraged for longitudinal cohort data is that typically, large datasets are required. Therefore, we present a simplified transformer architecture that retains the core attention mechanism while reducing the number of parameters to be estimated, to be more suitable for small datasets with few time points. Guided by a statistical perspective on transformers, we use an autoregressive model as a starting point and incorporate attention as a kernel-based operation with temporal decay, where aggregation of multiple transformer heads, i.e. different candidate weighting schemes, is expressed as accumulating evidence on different types of underlying characteristics of individuals. This also enables a permutation-based statistical testing procedure for identifying contextual patterns. In a simulation study, the approach is shown to recover contextual dependencies even with a small number of individuals and time points. In an application to data from a resilience study, we identify temporal patterns in the dynamics of stress and mental health. This indicates that properly adapted transformers can not only achieve competitive predictive performance, but also uncover complex context dependencies in small data settings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。