arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.08648cs.LGcs.AI
收藏

无逆威尔逊环用于Transformer:不变性与顺序敏感性的实用诊断工具

Inverse-Free Wilson Loops for Transformers: A Practical Diagnostic for Invariance and Order Sensitivity

Stanford University(斯坦福大学);UIUC(伊利诺伊大学厄巴纳-香槟分校)

Edward Y. Chang, Ethan Y. Chang

AI总结:

WILSON是一个轻量级事后诊断工具,通过无逆曲率图和激活交换子检测Transformer对顺序和不变性的敏感性,以低成本信号支持RAG防护、微调回归检测及安全优化批准。

摘要:

大型语言模型在实践中有意义的无害编辑下可能会改变答案:当段落被重新排序时,RAG输出会翻转;微调会侵蚀预训练时学到的不变性;辩论或思维链提示会采取路径依赖的路线;编译器融合或重排会在决策边界附近扰动logits。这些失败违反了预期的不变性,破坏了持续集成,并迫使团队为了速度而牺牲安全性。这些效应虽小,但分布在层和位置上,对上下文长度和评估顺序敏感,并且通过重训练或形式验证来修复成本高昂。我们提出了WILSON,一个最小的事后诊断套件,将内部表示上的简单循环和重排检查转换为系统信号。WILSON结合了基于JVPs和Hutchinson探针计算的跨位置和层的无逆曲率图,以及激活级交换子来标记重排风险。这些信号计算成本低,对标准Transformer具有模型无关性,并作为阈值和CSV工件导出给编排器。这实现了具体行动:保护RAG免受顺序效应影响,捕获微调回归,稳定辩论路径和长多轮上下文,并在部署中门控融合或重排。简而言之,WILSON有助于预见失败并批准安全优化,从而在不改变模型架构或训练的情况下,使可靠性和吞吐量共同提高。

英文摘要:

Large language models can change answers under harmless edits that matter in practice: RAG outputs flip when passages are reordered, fine-tuning erodes invariances learned at pretraining, debate or chain-of-thought prompts take path-dependent routes, and compiler fusion or reordering perturbs logits near decision boundaries. These failures violate intended invariances, break continuous integration, and force teams to trade safety for speed. The effects are small yet distributed across layers and positions, sensitive to context length and evaluation order, and costly to repair with retraining or formal verification. We present WILSON, a minimal post-hoc diagnostic suite that converts simple loop and reordering checks on internal representations into system signals. WILSON combines an inverse-free curvature map over positions and layers, computed with JVPs and Hutchinson probes, with activation-level commutators that flag reorder risk. Signals are cheap to compute, model-agnostic for standard Transformers, and exported as thresholds and CSV artifacts for orchestrators. This enables concrete actions: guard RAG against order effects, catch fine-tuning regressions, stabilize debate pathways and long multi-turn contexts, and gate fusions or reorders in deployment. In short, WILSON helps anticipate failures and approve safe optimizations so reliability and throughput can improve together without changing model architecture or training.

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

↑