Revisiting Token Dropping Strategy in Efficient BERT Pretraining

Qihuang Zhong, Liang Ding, Juhua Liu, Xuebo Liu, Min Zhang, Bo Du, Dacheng Tao · DOI

Introduction

Pretraining large-scale language models like BERT is a computationally intensive process, often requiring significant time and energy resources. To mitigate these costs, researchers have explored various efficiency-driven strategies. One prominent approach is "token dropping," which reduces computation by skipping the processing of redundant or less informative tokens in the model's intermediate layers. While this method significantly accelerates training, it often introduces a trade-off: a degradation in the model's ability to capture complex semantic nuances.

This paper introduces Semantic-Consistent Token Dropping (SCTD), a novel framework designed to retain the speed advantages of token dropping while eliminating the associated semantic loss. By leveraging a self-distillation mechanism, SCTD ensures that the model maintains a coherent internal representation of the text, even when processing incomplete sequences.

The Problem: Semantic Drift in Token Dropping

Standard token dropping strategies operate on the assumption that many tokens in a sequence are redundant for the final objective. However, the authors identify a phenomenon termed semantic drift. When tokens are aggressively dropped in the middle layers, the model's internal "understanding" of a sentence begins to diverge from the representation it would have formed with the full sequence.

This drift is particularly detrimental for "semantic-intense" tasks—those requiring deep contextual reasoning rather than simple keyword matching. For instance, in tasks like Recognizing Textual Entailment (RTE), the loss of structural and contextual nuances leads to a significant performance gap. The authors' analysis reveals that this degradation is most severe in the penultimate layer (e.g., the 11th layer of a 12-layer BERT-Base model), where the model's world view becomes fundamentally compromised.

The SCTD Framework

To address semantic drift, SCTD introduces two primary innovations: Semantic-Consistent Learning and a Hybrid Training schedule.

1. Semantic-Consistent Learning (Self-Distillation)

SCTD employs a teacher-student paradigm where the model acts as its own teacher. During specific training steps, the system performs two forward passes:

  • Teacher Pass: Processes the full sequence of tokens.
  • Student Pass: Processes the sequence with tokens dropped.

The framework uses Kullback–Leibler (KL) divergence to align the student's representations with the teacher's. This alignment occurs at two critical levels:

  • Global-level Alignment: Synchronizing the output of the final layer.
  • Local-level Alignment: Synchronizing the penultimate layer, specifically targeting the area where semantic loss is most acute.

2. Hybrid Training Schedule

Performing two forward passes at every step would double the computational cost, negating the benefits of token dropping. SCTD solves this by using a hybrid schedule. The model performs standard, efficient token dropping for $Fi-1$ steps and only engages the expensive semantic-consistent alignment once every $Fi$ steps. Empirical testing identified $Fi=10$ as the optimal balance between training speed and semantic preservation.

Experimental Evaluation

The authors evaluated SCTD across a wide array of Natural Language Understanding (NLU) benchmarks, including GLUE, SuperGLUE, and SQuAD (v1.1 and v2.0). They also utilized specialized probing tasks (e.g., "Tense" and "SubjNum") to measure the preservation of specific linguistic information.

Key Results

  • Efficiency Gains: SCTD achieves up to a 57% reduction in pretraining time compared to standard BERT-Large models without sacrificing performance.
  • Performance Improvements: On the GLUE benchmark, SCTD outperformed vanilla token dropping by an average of +1.56%.
  • Recovery of Semantic Tasks: On the RTE task, which is highly sensitive to semantic drift, SCTD improved performance by +3.4% over vanilla token dropping, eventually surpassing the full-sequence baseline.
  • Accelerated Convergence: A BERT-Base model trained with SCTD for 150K steps reached performance parity with a standard model trained for 250K steps.

Discussion and Insights

Beyond speed, the authors suggest that SCTD provides a regularization bonus. The process of forcing the model to reconstruct full-sequence semantics from partial data appears to help the model generalize better, leading to superior performance on downstream tasks compared to models trained on full sequences alone.

Probing experiments confirmed that the penultimate layer is the most critical site for semantic information. By specifically targeting this layer for alignment, SCTD effectively "anchors" the model's representations, preventing the drift that plagues other efficiency-focused methods.

Conclusion and Future Work

SCTD demonstrates that it is possible to significantly accelerate BERT pretraining without compromising the model's semantic integrity. By combining token dropping with strategic self-distillation, the method offers a path toward more sustainable and accessible large-scale model training.

Future research directions include scaling SCTD to models with billions of parameters and investigating its applicability to decoder-only generative architectures like GPT-4 or Llama. Additionally, further study is needed to evaluate the robustness of SCTD-trained models against adversarial attacks and their generalization capabilities across more diverse domains.

Summary updated

BibTeX
@inproceedings{zhong2023revisiting,
  author = {Qihuang Zhong and Liang Ding and Juhua Liu and Xuebo Liu and Min Zhang and Bo Du and Dacheng Tao},
  title = {{Revisiting Token Dropping Strategy in Efficient BERT Pretraining}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.579},
}
Figure