提出无需反向传播的诊断工具,检测大模型对输入顺序敏感性问题。
Inverse-Free Wilson Loops for Transformers: A Practical Diagnostic for Invariance and Order Sensitivity
- 基于前向传播计算位置与层的曲率图,结合激活扰动检测顺序风险。
- 可识别微小但分布广泛的顺序敏感错误,准确率超90%且成本低。
- 适合部署优化、RAG系统和微调验证,无需修改模型结构。
大型语言模型在无害编辑下可能改变输出:重排检索结果会翻转RAG输出,微调会破坏预训练中学习的不变性,思维链提示路径依赖,编译器融合或重排序会扰动决策边界附近的逻辑。这些失败违背了预期的不变性,破坏持续集成,迫使团队在安全与速度间权衡。影响虽小但分布于各层与位置,对上下文长度和评估顺序敏感,修复代价高昂。本文提出WILSON,一个轻量级后验诊断套件,将简单的循环与重排检查转化为系统信号。WILSON通过前向传播的雅可比向量积(JVP)与哈钦森探针计算位置-层维度的无逆曲率图,并结合激活级交换子标记重排风险。信号计算成本低,对标准Transformer模型无侵入性,输出阈值与CSV文件供自动化调度器使用。可实现具体操作:防御RAG顺序效应,捕捉微调退化,稳定辩论路径与长对话上下文,部署时控制融合或重排序。总之,WILSON帮助预测故障并批准安全优化,使可靠性和吞吐量协同提升,无需改变模型架构或训练流程。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。