深层潜在变量与长记忆:潜在持续性解释Transformer激活中的时间相关性
Deep Latents, Long Memory: Latent persistence explains temporal correlations in transformer activations
研究提出用层激活的自相关函数刻画序列相关性,发现潜在变量沿上下文持续编码会在自相关中形成缓慢衰减的尾部,且该尾部随层数加深而增长。在合成数据中这一增长源于抽象潜在变量的编码,其持续性可预测自相关的定性结构并解释大部分实测结果。在真实文本中,以稀疏自编码器特征作为潜在变量代理,其持续性与自相关强度跨数据集和LLM强相关,且持续性时间随深度增加;消融这些持续性特征后自相关随之下降。
arXiv:2611.18089v1 Announce Type: new Abstract: The hidden layers of Large Language Models (LLMs) are believed to encode representations of the data whose abstraction increases with depth. However, in the absence of an operational notion of abstraction, this statement is hard to test quantitatively. Here, we propose an alternative view, building on the principle that the correlations of a sequence reflect the structure of the process that generated it. We define the autocorrelation function of a layer as the average dot product between its activations at two context positions separated by a lag. Latent variables encoded persistently along the context create slowly decaying tails in the autocorrelation, and we find these tails to grow across layers in both synthetic and natural data. In synthetic data with controlled hierarchical latent structure, this growth stems from the encoding of abstract latent variables, which govern long stretches of the input. Indeed, the persistence of latent codes predicts the qualitative structure of autocorrelations and accounts for most of the empirical measures. In real text, we take sparse-autoencoder features as proxies for latent variables, and find that their persistence correlates strongly with the magnitude of autocorrelations across datasets and LLMs. In particular, the persistence time increases with depth, as do autocorrelations, implying that deeper latent features persist for longer context spans. We complement this analysis by explicitly ablating the persistent sparse-autoencoder features and observing a consequent decrease in the autocorrelations.
来源:arXiv (AI + Vision + Imaging) · arxiv.org