这篇论文提出了Transformer注意力头在表格数据中的重要性评分方法,能帮你优化模型结构并提高效率。
研究人员提出了一种重要性评分方法来解释多头Transformer模型在表格数据学习中的应用。在40个多样化表格数据集上的实验表明,基于该评分移除低重要性注意力头时,模型在72.5%的案例中表现最稳定。研究还发现,重要注意力头分布在六个注意力层中,没有特定层的集中趋势,且不同特征空间的表格数据集间注意力头重要性差异显著。
Importance Scoring of Transformer Attention Heads in Learning Tabular Data
Computationally demanding and opaque deep learning models can be better understood and optimized by analyzing how they transform data. While deep transformers have been widely studied in computer vision and natural language processing, their application in tabular data remains relatively underexplored. This paper presents one of the first applications of an importance-scoring metric to interpret multi-head transformer models in learning from tabular data. Experiments conducted on 40 diverse tabular datasets demonstrate robustness to head drops based on the proposed head importance score. In 72.5\% of experimental examples, the model remains most resilient to performance drops when heads with the lowest importance scores are gradually removed. In contrast, removing the most important attention head first results in the greatest reduction in classification performance. A closer look at individual head importance scores across six attention layers reveals that important heads are scattered across layers, with no consistent layer-specific trends. In contrast to the image and language domains, the importance of individual attention heads varies considerably across tabular datasets with different schemas and feature spaces. The proposed importance score can improve efficiency and redundancy within transformer architectures. We make the source code for measuring the importance of individual attention heads publicly available.