将预训练模型转为可解释的B-cos网络,无需重训即可获得高可信解释。
B-cosification: Transforming Deep Neural Networks to be Inherently Interpretable
- 通过架构改造将现有DNN转换为内置可解释性,无需从头训练。
- 在少量数据下对CLIP模型改造后,零样本性能仍具竞争力。
- 相比原生B-cos模型,推理精度更高,训练成本降低显著。
B-cos网络通过强制输入与权重间更强对齐,已证明能生成高度人类可理解的决策解释。其卷积神经网络(CNN)和视觉变换器(ViT)变体,通过将线性层替换为B-cos变换,在保持竞争性分类性能的同时,实现设计即可信的解释。然而,此前需从头训练,难以适应大模型时代。本文提出'B-cosification',一种将预训练模型转化为内在可解释模型的新方法。针对CNN和ViT进行系统设计研究,发现该方法在可解释性上媲美从头训练的B-cos模型,且常在分类性能上更优,训练成本仅为一小部分。进一步将B-cosification应用于预训练的CLIP模型,在有限数据与算力条件下,仍获得高度可解释且零样本性能优异的模型。代码与权重已开源。
原文摘要 · Abstract (English)
B-cos Networks have been shown to be effective for obtaining highly human interpretable explanations of model decisions by architecturally enforcing stronger alignment between inputs and weight. B-cos variants of convolutional networks (CNNs) and vision transformers (ViTs), which primarily replace linear layers with B-cos transformations, perform competitively to their respective standard variants while also yielding explanations that are faithful by design. However, it has so far been necessary to train these models from scratch, which is increasingly infeasible in the era of large, pre-trained foundation models. In this work, inspired by the architectural similarities in standard DNNs and B-cos networks, we propose 'B-cosification', a novel approach to transform existing pre-trained models to become inherently interpretable. We perform a thorough study of design choices to perform this conversion, both for convolutional neural networks and vision transformers. We find that B-cosification can yield models that are on par with B-cos models trained from scratch in terms of interpretability, while often outperforming them in terms of classification performance at a fraction of the training cost. Subsequently, we apply B-cosification to a pretrained CLIP model, and show that, even with limited data and compute cost, we obtain a B-cosified version that is highly interpretable and competitive on zero shot performance across a variety of datasets. We release our code and pre-trained model weights at https://github.com/shrebox/B-cosification.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。