arXiv:2505.06745cs.CVcs.AI2025-05被引 7

从视觉Transformer中提取可执行逻辑规则,提升模型可解释性。

Symbolic Rule Extraction from Attention-Guided Sparse Representations in Vision Transformers

  • 设计稀疏概念层,通过注意力加权激活高阶视觉概念
  • 提取的规则集使准确率比标准ViT高5.14%,且逻辑简洁可读
  • 首次实现基于稀疏表示的可执行逻辑程序生成,适合可信AI研究者

近期神经符号方法成功从基于CNN的模型中提取符号规则集以增强可解释性。然而,由于视觉Transformer(ViTs)缺乏模块化概念检测器且依赖全局自注意力机制,此类技术在ViTs上的应用仍具挑战。本文提出一种从ViTs中提取符号规则的框架,引入受稀疏自编码器(SAEs)启发的稀疏概念层。该线性层作用于注意力加权的图像块表示,学习解耦且二值化的表示,其中单个神经元对应一个高层视觉概念。为促进可解释性,采用L1稀疏性、熵最小化与监督对比损失相结合的方法。这些二值化概念激活输入FOLD-SE-M算法,生成以逻辑程序形式存在的规则集。所提方法在分类准确率上比标准ViT高出5.14%,同时支持符号推理。关键在于,提取的规则集并非事后解释,而是直接作用于稀疏概念表示的逻辑决策层。生成的程序简洁且语义明确。本工作首次基于稀疏符号表示从ViTs中提取可执行逻辑程序,弥合了基于Transformer的视觉模型与符号逻辑编程之间的鸿沟,推动可解释且可验证的神经符号人工智能发展。

原文摘要 · Abstract (English)

Recent neuro-symbolic approaches have successfully extracted symbolic rule-sets from CNN-based models to enhance interpretability. However, applying similar techniques to Vision Transformers (ViTs) remains challenging due to their lack of modular concept detectors and reliance on global self-attention mechanisms. We propose a framework for symbolic rule extraction from ViTs by introducing a sparse concept layer inspired by Sparse Autoencoders (SAEs). This linear layer operates on attention-weighted patch representations and learns a disentangled, binarized representation in which individual neurons activate for high-level visual concepts. To encourage interpretability, we apply a combination of L1 sparsity, entropy minimization, and supervised contrastive loss. These binarized concept activations are used as input to the FOLD-SE-M algorithm, which generates a rule-set in the form of logic programs. Our method achieves a 5.14% better classification accuracy than the standard ViT while enabling symbolic reasoning. Crucially, the extracted rule-set is not merely post-hoc but acts as a logic-based decision layer that operates directly on the sparse concept representations. The resulting programs are concise and semantically meaningful. This work is the first to extract executable logic programs from ViTs using sparse symbolic representations. It bridges the gap between transformer-based vision models and symbolic logic programming, providing a step forward in interpretable and verifiable neuro-symbolic AI.

视觉Transformer符号推理可解释性逻辑规则

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。