Hierarchical Kernel Transformer: Multi-Scale Attention with an Information-Theoretic Approximation Analysis
Organizations: Laboratoire LTI, Université de Picardie Jules Verne, 33 rue Saint-Leu, Amiens, 80039, France
Abstract
The Hierarchical Kernel Transformer (HKT) is a multi-scale attention mechanism that processes sequences at L resolution levels via trainable causal downsampling, combining level-specific score matrices through learned convex weights. The total computational cost is bounded by 4/3 times that of standard attention, reaching 1.3125x for L = 3. Four theoretical results are established. (i) The hierarchical score matrix defines a positive semidefinite kernel under a sufficient condition on the symmetrised bilinear form (Proposition 3.1). (ii) The asymmetric score matrix decomposes uniquely into a symmetric part controlling reciprocal attention and an antisymmetric part controlling directional attention; HKT provides L independent such pairs across scales, one per resolution level (Propositions 3.5-3.6). (iii) The approximation error decomposes into three interpretable components with an explicit non-Gaussian correction and a geometric decay bound in L (Theorem 4.3, Proposition 4.4). (iv) HKT strictly subsumes single-head standard attention and causal convolution (Proposition 3.4). Experiments over 3 random seeds show consistent gains over retrained standard attention baselines: +4.77pp on synthetic ListOps (55.10+-0.29% vs 50.33+-0.12%, T = 512), +1.44pp on sequential CIFAR-10 (35.45+-0.09% vs 34.01+-0.19%, T = 1,024), and +7.47pp on IMDB character-level sentiment (70.19+-0.57% vs 62.72+-0.40%, T = 1,024), all at 1.31x overhead.
Figures & tables
| Model | Val Acc (%) | Overhead |
| Same setting ( , synthetic ListOps, 3 seeds): | ||
| MHA (retrained) | ||
| HKT-Small ( ) | ||
| HKT-Medium ( ) | ||
| HKT-Large ( ) | ||
| Contextual reference (LRA, , Tay et al. 2021 ): | ||
| Configuration | Val Acc (%) | |
| Full HKT-Small | 55.2 | — |
| w/o hierarchy ( , flat) | 36.8 | |
| w/o conv branch ( ) | 52.1 | |
| w/o attn branch ( ) | 43.7 | |
| w/o dynamic fusion ( uniform) | 53.6 | |
| w/o | 54.1 |
| Val Acc (%) | Overhead | Params | ||
| 1 | 2 | 49.9 | 738K | |
| 2 | 2 | 55.7 | 749K | |
| 3 | 2 | 55.3 | 752K | |
| 4 | 2 | 57.7 | 755K | |
| 1 | 3 | 49.9 | 738K | |
| 2 | 3 | 55.7 | 749K |
| Model | Val Acc (%) | Test Acc (%) | Overhead |
| Same setting ( , 3 seeds): | |||
| MHA (retrained) | |||
| HKT-Small ( ) | |||
| Contextual reference ( Tay et al., 2021 ) : | |||
| MHA (LRA) | — | 42.44 | |
| Model | Val Acc (%) | Overhead |
| Same setting ( , 3 seeds): | ||
| MHA (retrained) | ||
| HKT-Small ( ) | ||
| Contextual reference ( Tay et al., 2021 ) : | ||
| MHA (LRA, ) | 65.90 | |
| Level | Scale | Mean | Mean ratio |
| 0 (local) | 0.153 | 1.529 | |
| 1 (medium) | 0.248 | 1.480 | |
| 2 (global) | 0.277 | 1.112 |
| Model | Train (ms/batch) | Inf. (ms/batch) | Peak Mem. (MB) | |
| 128 | MHA | 13.4 | 1.4 | 96 |
| HKT | 30.7 | 4.6 | 118 | |
| 256 | MHA | 9.9 | 1.4 | 160 |
| HKT | 20.4 | 4.6 | 240 | |
| 512 | MHA | 10.1 | 2.6 | 291 |
| HKT | 18.0 | 4.6 | 586 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Pre-training | Post-training | |||
| Level | ||||
| 2978.7 | 24.82 | 3980.0 | 33.17 | |
| 2951.9 | 24.60 | 3980.0 | 33.17 | |
| 2793.6 | 23.28 | 3980.0 | 33.17 | |