arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.22471cs.LG
收藏

迷失在标记化中:图标记化在Transformer中的基本权衡

Lost in Tokenization: Fundamental Trade-offs in Graph Tokenization for Transformers

Courant Institute of Mathematical Sciences, New York University(纽约大学数学科学学院);John A. Paulson School of Engineering and Applied Sciences, Harvard University(哈佛大学工程与应用科学学院);Google Research(谷歌研究);Tel-Aviv University(特拉维夫大学)

Maya Bechler-Speicher, Gilad Yehudai, Gil Harari, Clayton Sanford, Amir Globerson, Joan Bruna

AI总结:

本文研究了图标记化在Transformer中的基本权衡,探讨了不同标记化方法对模型表达能力的影响,并通过实验验证了不同任务对不同结构视图的偏好。

摘要:

Transformers已经成为图学习的核心架构,但其应用于图学习需要首先选择一种标记化方法:一种图到标记的映射,决定了输入中暴露的结构信息。在本工作中,我们证明这种选择是Transformer表达能力的基本组成部分。我们考察了三种作为许多现有图标记化基础的标记化方法:谱标记化、随机游走标记化和邻接标记化。我们证明不同的标记化方法会诱导不同的深度范围:同一图计算可能在一种标记化下通过浅层Transformer实现,而在另一种标记化下则需要显著更大的深度。例如,我们证明随机游走标记化在任何游走长度下都是有损的,使其一般无法从该标记化中恢复图;而谱标记化虽然无损,但对局部任务来说是病态的。我们进一步证明,尽管随机游走和谱标记化都源自邻接信息,但有限深度的Transformer一般无法在标记化家族之间转换。特别是,我们建立了下界和不可能性结果,表明不利的标记化可能阻碍更合适的结构表示的高效恢复。最后,我们通过合成和现实任务的受控实验补充了我们的理论,验证了预测的分离,并展示了不同任务对不同结构视图的偏好,以及结合互补的标记化使Transformer能够利用每种表示的distinct信号。

英文摘要:

Transformers have become a central architecture for graph learning, but their application to graphs requires first choosing a tokenization: a graph-to-token map that determines which structural information is exposed at the input. In this work, we show that this choice is a fundamental component of transformer expressivity. We examine three tokenizations that serve as building blocks for many existing graph tokenizations: spectral, random-walk, and adjacency tokenizations. We prove that different tokenizations induce distinct depth regimes: the same graph computation may be realizable by a shallow transformer under one tokenization, while requiring substantially larger depth under another. For example, we prove that random-walk tokenization is lossy for any walk length, making it impossible in general to recover the graph from it, and that while spectral tokenization is lossless, it is ill-conditioned for local tasks. We further show that although both random-walk and spectral tokenizations are derived from adjacency information, it is impossible for a limited-depth transformer to convert between tokenization families in general. In particular, we establish lower bounds and impossibility results showing that unfavorable tokenizations may preclude the efficient recovery of more suitable structural representations. Finally, we complement our theory with controlled experiments on synthetic and real-world tasks, validating the predicted separations and showing that different tasks favor different structural views, and combining complementary tokenizations allows the transformer to leverage distinct signals from each representation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑