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

从内到外:通过模型内部机制衡量视觉变换器的泛化能力

Inside-Out: Measuring Generalization in Vision Transformers Through Inner Workings

University of Delaware(特拉华大学);George Mason University(乔治梅森大学)

Yunxiang Peng, Mengmeng Ma, Ziyu Yao, Xi Peng

AI总结:

本文提出依赖深度偏差和电路移位分数两种指标,通过分析模型内部电路来评估泛化能力,显著提升与实际泛化性能的关联性。

摘要:

可靠的泛化度量对于评估机器学习模型至关重要。特别是在高风险应用中,标注目标数据稀缺时,评估模型在分布偏移下的泛化性能是迫切需求。本文聚焦两个实际场景:(1)在部署前,如何选择最适合目标数据的模型?(2)在部署后,如何监控模型在分布偏移下的性能?核心需求是可靠的、无标签的代理度量。然而,现有代理度量如模型置信度或线性准确率往往不可靠,因为它们仅评估模型输出而忽略产生它们的内部机制。本文通过引入新的视角:使用模型内部机制,即电路,作为泛化性能的预测度量。利用电路发现,我们提取内部表示之间的因果交互作为电路,从而推导出两种度量标准,分别针对这两个实际场景。(1)在部署前,我们引入依赖深度偏差,衡量不同模型在目标数据上的泛化能力。(2)在部署后,我们提出电路移位分数,预测模型在不同分布偏移下的泛化能力。在各种任务中,这两种度量标准在与泛化性能的关联性上显著提高,分别比现有代理度量平均高出13.4%和34.1%。我们的代码可在https://github.com/deep-real/GenCircuit获取。

英文摘要:

Reliable generalization metrics are fundamental to the evaluation of machine learning models. Especially in high-stakes applications where labeled target data are scarce, evaluation of models' generalization performance under distribution shift is a pressing need. We focus on two practical scenarios: (1) Before deployment, how to select the best model for unlabeled target data? (2) After deployment, how to monitor model performance under distribution shift? The central need in both cases is a reliable and label-free proxy metric. Yet existing proxy metrics, such as model confidence or accuracy-on-the-line, are often unreliable as they only assess model output while ignoring the internal mechanisms that produce them. We address this limitation by introducing a new perspective: using the inner workings of a model, i.e., circuits, as a predictive metric of generalization performance. Leveraging circuit discovery, we extract the causal interactions between internal representations as a circuit, from which we derive two metrics tailored to the two practical scenarios. (1) Before deployment, we introduce Dependency Depth Bias, which measures different models' generalization capability on target data. (2) After deployment, we propose Circuit Shift Score, which predicts a model's generalization under different distribution shifts. Across various tasks, both metrics demonstrate significantly improved correlation with generalization performance, outperforming existing proxies by an average of 13.4\% and 34.1\%, respectively. Our code is available at https://github.com/deep-real/GenCircuit.

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

↑