Skip to main content
QUICK REVIEW

[Paper Review] ConvBERT: Improving BERT with Span-based Dynamic Convolution

Zihang Jiang, Weihao Yu|arXiv (Cornell University)|Aug 6, 2020
Topic ModelingComputer Science69 references118 citations
TL;DR

ConvBERT introduces a span-based dynamic convolution to replace redundant attention heads, forming a mixed attention block with bottleneck and grouped feed-forward, achieving better GLUE/SQuAD performance with lower pre-training cost than BERT.

ABSTRACT

Pre-trained language models like BERT and its variants have recently achieved impressive performance in various natural language understanding tasks. However, BERT heavily relies on the global self-attention block and thus suffers large memory footprint and computation cost. Although all its attention heads query on the whole input sequence for generating the attention map from a global perspective, we observe some heads only need to learn local dependencies, which means the existence of computation redundancy. We therefore propose a novel span-based dynamic convolution to replace these self-attention heads to directly model local dependencies. The novel convolution heads, together with the rest self-attention heads, form a new mixed attention block that is more efficient at both global and local context learning. We equip BERT with this mixed attention design and build a ConvBERT model. Experiments have shown that ConvBERT significantly outperforms BERT and its variants in various downstream tasks, with lower training cost and fewer model parameters. Remarkably, ConvBERTbase model achieves 86.4 GLUE score, 0.7 higher than ELECTRAbase, while using less than 1/4 training cost. Code and pre-trained models will be released.

Motivation & Objective

  • Motivate and reduce redundancy in BERT's self-attention heads by exploiting local dependencies.
  • Introduce span-based dynamic convolution to capture local context efficiently.
  • Build ConvBERT with a mixed attention block, bottleneck attention, and grouped feed-forward to improve efficiency and performance.
  • Evaluate ConvBERT on GLUE and SQuAD to demonstrate gains in accuracy with lower training cost.

Proposed method

  • Propose span-based dynamic convolution that generates kernels from a local input span, conditioned on Q and local K_s.
  • Combine Self-Attention and Span-based Dynamic Convolution into a Mixed-Attn block sharing the same Q but using different keys/bases.
  • Introduce a bottleneck structure to reduce the dimensionality of the self-attention pathway and heads.
  • Apply a grouped linear operator in the feed-forward module to reduce parameters and computation.
  • Train ConvBERT in a pre-training setup similar to ELECTRA’s replaced token detection and evaluate on GLUE and SQuAD.

Experimental results

Research questions

  • RQ1Can span-based dynamic convolution capture local dependencies more efficiently than standard self-attention?
  • RQ2Does integrating span-based dynamic convolution with self-attention reduce redundancy and improve downstream task performance?
  • RQ3What are the gains in GLUE and SQuAD benchmarks when using ConvBERT compared to BERT and ELECTRA under similar or lower training cost?

Key findings

  • ConvBERT outperforms BERT and ELECTRA baselines of similar size on GLUE with lower pre-training cost.
  • The base-sized ConvBERT achieves 86.4 GLUE score, 0.7 higher than ELECTRAbase, with under 1/4 of the training cost.
  • Span-based dynamic convolution yields notable gains over plain dynamic convolution and parallel conventional convolution.
  • Bottleneck attention and grouped feed-forward help reduce parameters while maintaining or improving performance.
  • ConvBERT small/base models show favorable FLOPs/params versus baseline models while preserving or enhancing task performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.