BoostTransformer: Enhancing Transformer Models with Subgrid Selection and Importance Sampling

Biyi Fang, Jean Utke, Truong Vo, Diego Klabjan · DOI

Introduction

Transformer-based architectures, such as BERT and RoBERTa, have redefined the state-of-the-art in Natural Language Processing (NLP). However, their superior performance comes at a significant computational cost. Achieving peak accuracy typically necessitates massive hardware resources, extensive training durations, and meticulous hyperparameter optimization. While Neural Architecture Search (NAS) offers a path toward efficiency, its own computational overhead is often prohibitive.

Gradient Boosting Machines (GBMs) provide a compelling alternative for performance enhancement through ensemble learning. While boosting offers strong theoretical guarantees, its application to Transformers has been historically limited. Training multiple "weak" Transformers sequentially is traditionally viewed as too slow and memory-intensive for practical use. This paper introduces BoostTransformer, a framework designed to integrate the strengths of GBMs with Transformer architectures, making boosted ensembles not only more accurate but also significantly faster than vanilla models.

The BoostTransformer Framework

The researchers propose a family of three algorithms designed to optimize the training of Transformer ensembles:

1. Baseline BoostTransformer

This foundational algorithm treats individual Transformers as "weak learners" within a gradient boosting pipeline. In each iteration, a new Transformer is added to the ensemble, specifically trained to minimize the least-squares error relative to the residuals (errors) of the existing model. This iterative refinement allows the ensemble to capture complex patterns that a single large model might miss.

2. Subsequence BoostTransformer

To address the computational bottleneck of sequential training, the Subsequence variant introduces a "plug-in" for token pruning. By leveraging the attention distributions from previously trained learners, the model identifies the most "important" tokens for a given task. Subsequent learners are then trained only on these high-value subsequences, effectively pruning approximately 20% of the input data. This targeted focus reduces the per-iteration training time without sacrificing semantic depth.

3. Importance-Sampling BoostTransformer

This variant focuses on data efficiency and regularization. It calculates a probability distribution across the training set based on current residuals. In each iteration, the algorithm selects a subset of the most "informative" samples—those the current ensemble finds most difficult—to train the next learner. The authors provide a formal proof demonstrating that the optimal sampling distribution is directly proportional to the norm of the residuals. This approach acts as a dynamic curriculum, focusing resources where they are needed most.

Experimental Evaluation

The BoostTransformer variants were evaluated against standard Transformer baselines on three prominent fine-grained language classification benchmarks:

  • IMDB: Binary sentiment classification of 25,000 movie reviews.
  • Yelp Polarity: Sentiment analysis of 100,000 restaurant reviews.
  • Amazon Polarity: Sentiment analysis of 100,000 product reviews.

Results and Discussion

Accuracy and Stability

The experimental results demonstrate consistent performance gains across all datasets. On average, BoostTransformer variants achieved accuracy improvements of 0.87% on IMDB, 0.55% on Yelp, and 0.79% on Amazon compared to standard Transformers.

Figure 1: Relative improvement across training epochs. BoostTransformer variants reach a stable, high-performance plateau much faster than standard models.

Beyond raw accuracy, the boosted models exhibited remarkable stability. While vanilla Transformers often experience performance "jitter" or decay after the initial epochs, the BoostTransformer variants converged to a stable, superior plateau. This suggests that the boosting process acts as an effective regularizer, preventing the overfitting often seen in prolonged Transformer training.

Figure 3: Relative accuracy comparison. Note the significant "jitter" in the standard subsequence transformer (blue line) compared to the steady convergence of the boosted variants.

Efficiency Gains

The most striking result is the reduction in training time. By focusing on critical subsequences and informative samples, the framework overcomes the traditional speed penalties of boosting:

  • The Subsequence BoostTransformer reduced training time to approximately two-thirds of the baseline.
  • The Importance-sampling BoostTransformer achieved a 50% reduction in training time while maintaining or exceeding baseline accuracy.

The synergy of these methods suggests that removing "noisy" tokens and redundant data samples allows the model to focus on core semantic signals, leading to faster and more robust convergence.

Conclusion and Future Work

BoostTransformer demonstrates that gradient boosting is not only viable for large-scale neural architectures but can also serve as a catalyst for efficiency. The choice between variants depends on the task: the Subsequence variant is ideal for large-scale, resource-constrained environments, while Importance-Sampling is preferred for smaller datasets where robustness is paramount.

While the hybrid "Subsequence Importance-Sampling" version is the fastest, it showed less stability and a lower peak accuracy on larger datasets like Yelp and Amazon compared to the standalone Importance-Sampling version. Future research may explore the application of these techniques to generative models or multi-modal tasks, potentially bringing the benefits of boosted efficiency to the broader landscape of foundation models.

Summary updated

BibTeX
@misc{fang2025boosttransformer,
  author = {Biyi Fang and Jean Utke and Truong Vo and Diego Klabjan},
  title = {{BoostTransformer: Enhancing Transformer Models with Subgrid Selection and Importance Sampling}},
  year = {2025},
  eprint = {2508.02924},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.02924},
}
Figure