arXiv:2608.27241cs.LGAug 2026

Manuscript Offprint

arXiv:2608.27241

Importance Scoring of Transformer Attention Heads in Learning Tabular Data

Ahmad Jad Allah, Kazi F. Akhter, Md. Kamrozzaman Bhuiyan, Manar D. Samad

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

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 the experimental examples, the model remains most resilient to performance drop when heads with the lowest importance scores are gradually decreased. 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 without consistent layer-specific trends. In contrast to the image and language domains, the importance of individual attention heads varies considerably across tabular datasets that differ in their schemas and feature spaces. The proposed importance score can improve efficiency and redundancy within transformer architectures. The source code for measuring the importance of individual attention heads is made publicly available. 1^{1}

Keywords tabular data, multi-head attention, head drop, transformer, importance score

1 Introduction

Transformer models have been introduced primarily for language translation and decoding [1, 2], with applications that extend to computer vision [3]. Extensive research has been conducted to evaluate the efficacy of transformers in language and vision applications, especially those involving image and text data. In contrast, tabular data, structured in rows and columns, have seen limited research involving transformer models. Tabular data, which are prevalent in enterprise relational databases and spreadsheets across numerous application domains, are inherently distinct from the commonly studied text and image data. While images and text are sequential and homogeneous distributions of pixels and words, respectively, tabular data are a permutation-invariant collection of heterogeneous features [4, 5, 6]. As a result, numerous intuitions about deep learning that come from language and vision work are challenged when applied to tabular data. These structural differences among tabular datasets may cause individual attention heads to contribute differently across datasets, rather than following the hierarchical patterns observed in language and vision models.

1^{1}https://github.com/mdsamad001/Attention-Head-Importance-Scoring-for-Tabular-Data.git

Indeed, transformer models have seen impressive success in classifying [7, 8, 9], transfer learning [10, 11], and the imputation of missing values in tabular datasets [12]. In most cases, transformer architectures developed for large language models are directly adapted to learning tabular data without optimizing for a performance-computational cost trade-off. Weight pruning methods for optimizing transformers have been investigated using language data [13], which have not been explored well in the context of tabular data. Although extensive language corpora exist for training deep transformer models, such large-scale architectures are often not suitable for many tabular datasets with only a limited number of samples. This paper is among the first to quantify the contribution of individual attention heads of a deep transformer model in learning tabular data across different domains and scales. Measuring the contribution of each individual attention head supports selecting and pruning heads for model compression, and this process, in turn, yields an explainable deep learning framework for tabular transformer models.

The remainder of the paper is organized as follows. Section 2 provides background information and a brief review of the literature. Section 3 outlines the methodological framework for the head importance scoring metric. The experimental cases and evaluation methods are discussed in Section 4. Section 5 presents the key findings and their discussion. The paper concludes in Section 6.

References (14)