Human cognition is punctuated by abrupt, spontaneous shifts between topics-driven by emotional, contextual, or associative cues-a phenomenon known as spontaneous thought in neuroscience. In contrast, self-attention based models depend on structured patterns over their inputs to predict each next token, lacking spontaneity. Motivated by this distinction, we characterize spontaneous topic changes in self-attention architectures, revealing both their similarities and their divergences from spontaneous human thought. First, we establish theoretical results under a simplified, single-layer self-attention model with suitable conditions by defining the topic as a set of Token Priority Graphs (TPGs). Specifically, we demonstrate that (1) the model maintains the priority order of tokens related to the input topic, (2) a spontaneous topic change can occur only if lower-priority tokens outnumber all higher-priority tokens of the input topic, and (3) unlike human cognition, the longer context length or the more ambiguous input topic reduces the likelihood of spontaneous change. Second, we empirically validate that these dynamics persist in modern, state-of-the-art LLMs, underscoring a fundamental disparity between human cognition and AI behaviour in the context of spontaneous topic changes. To the best of our knowledge, no prior work has explored these questions with a focus as closely aligned to human thought.
翻译:人类认知过程中常出现由情感、情境或联想线索驱动的突发性、自发性的主题转换——这一现象在神经科学中被称为自发思维。相比之下,基于自注意力的模型依赖输入的结构化模式来预测每个下一词,缺乏自发性。受此差异启发,我们刻画了自注意力架构中的自发主题转换,揭示了其与人类自发思维的相似性与差异性。首先,我们在简化的单层自注意力模型下,通过将主题定义为一系列词元优先级图(TPGs),并在适当条件下建立了理论结果。具体而言,我们证明:(1)模型能维持与输入主题相关的词元优先级顺序;(2)仅当较低优先级词元数量超过输入主题所有较高优先级词元时,才可能发生自发主题转换;(3)与人类认知不同,更长的上下文长度或更模糊的输入主题会降低自发转换的可能性。其次,我们通过实验验证了这些动态特性在现代先进大语言模型(LLMs)中依然存在,凸显了在自发主题转换背景下人类认知与AI行为之间的根本差异。据我们所知,此前尚无研究以如此贴近人类思维的视角探讨这些问题。