Elamur Research

To BERT or Not to BERT: Comparing Task-specific and Task-agnostic Semi-Supervised Approaches for Sequence Tagging

Paper · 2020 · Kasturi Bhattacharjee, Miguel Ballesteros, Rishita Anubhai et al.

Summary

Unlabeled text is easier to obtain than text in which someone has marked every name, opinion target, or piece of a request. The question in this paper is what a tagger should learn from that extra text. One approach is to pretrain BERT on broad objectives and then teach it to perform the tagging task. The other, Cross-View Training (CVT), gives the unlabeled text a job tied to the task from the outset. A tagger trained on examples with human labels predicts tags for new sentences. Auxiliary predictors try to reproduce those predictions with less of the sentence available to them. The authors compare these approaches on English reviews, named entities, and movie queries, measuring tagging quality alongside the resources needed to train.

The BERT comparisons distinguish a generic checkpoint, pretraining from scratch on related text, and continuing generic pretraining on related text. Continuing pretraining gives the strongest BERT results for opinion target detection in both review datasets. On the SemEval restaurant test split, its mean F1 is 80.28 and CVT's is 80.08. The paper's significance test does not establish a difference there. On the SemEval laptop test split, continued pretraining has a statistically significant lead, with mean F1 of 84.46 against CVT's 81.77. CVT scores higher than all of the BERT variants on both named entity recognition datasets and on movie slot-labeling. The authors report significant differences for CONLL-2003 and MIT Movies. The published comparison systems still lead on the two entity benchmarks.

CVT reaches these scores after seeing fewer unlabeled sentences during training. In the Yelp Restaurants resource comparison, estimated training cost is 172 USD for CVT and 1958 USD for the continued-pretraining BERT setup. Estimated training emissions are 14.14 and 248.64 pounds of CO₂, respectively. Those figures concern the training undertaken for the comparison. The generic BERT checkpoint and CVT's pretrained word vectors were already available, and the paper also finds that the supervised stage of ordinary BERT fine-tuning is comparatively inexpensive on the restaurant task.

How closely the unlabeled text resembles the eventual task helps explain the pattern the authors observed. Review text has both the subject matter and the kind of opinion language that the target detector needs to learn. The news articles used for entity recognition and the movie reviews used for slot-labeling supply relevant genres or subject matter with looser ties to the annotated tasks. The comparisons support CVT as a lower-cost option with competitive tagging performance across these settings. They leave open how much of that result comes from the training objective, the encoder architecture, or the particular text each system learns from.

Deep dive: To BERT or Not to BERT: Comparing Task-specific and Task-agnostic Semi-Supervised Approaches for Sequence Tagging

Cross-View Training rivals BERT on several English tagging tasks, and the study measures how much each approach to using unlabeled text costs. · about 33 minutes to read

The problem and its context

The same output format serves different tasks

A sequence tagger makes a decision at each position in a piece of text. The decisions together mark stretches of words and may also give each stretch a category. For a review reader, the useful stretch might be the item someone is praising. In news, it might be the name of an organization. In a movie query, it might be the words that specify an actor or a director. All of these problems can use the same broad output format even though the clues that matter, the categories, and the kinds of text differ.

The paper's first task is opinion target expression detection, or OTE detection. It belongs to fine-grained sentiment analysis, where locating the object of an opinion is a separate step from deciding what the writer thinks of it. A review of a restaurant may refer to several dishes or aspects of the visit. Finding the stretch that a particular opinion concerns gives a system something more precise to report than a judgment about the review as a whole. The authors use restaurant and laptop reviews, which let them study the same output task in different domains.

Named entity recognition requires finding a span and identifying what type of entity it denotes. The English Reuters data in CONLL-2003 distinguish people, locations, organizations, and a miscellaneous class. The English OntoNotes data in CONLL-2012 contain a broader set of categories and come from a mixture of genres. The paper places both datasets within an established evaluation tradition that includes earlier neural architectures, sequence labelers with structured outputs, and contextual string embeddings. Those works provide background for the choice of task and datasets. The benchmark scores used for direct comparison come from a separate set of systems discussed in the results. Neural Architectures for Named Entity Recognition · Contextual String Embeddings for Sequence Labeling

Slot-labeling similarly attaches categories to spans, but its categories come from the information a system expects to find in a request. The movie data contain queries about films. A tagger can identify the words that supply an actor, a director, or a plot description. This is a component of natural language understanding for dialogue systems. The movie query and the movie review are particularly informative as a pair in this study. They concern the same subject, while the query expresses constraints that the review writer has little reason to formulate in the same way.

Where unlabeled text enters the process

A supervised tagger can learn from a sentence when it knows the desired tag at each position. Collecting raw sentences gives it more examples of the language, but those sentences lack the task labels needed for the same supervised lesson. More news, for instance, provides more names and contexts in which names appear. The additional articles still do not directly supply the boundary and category decisions used to score a news tagger. A semisupervised strategy needs a way to derive a training signal from such material.

One route described by the authors learns representations before settling on the downstream task. On this route, a system first learns something about how words occur in context. The resulting representations are then reused when labeled data become available for extracting names, recognizing opinions, or another task. The paper names ELMo and BERT as examples of this approach. It points to BERT and other systems using the Transformer as evidence of how successful pretraining had become across natural language processing tasks. Deep Contextualized Word Representations · Attention Is All You Need · RoBERTa · BART

The reuse of a common starting point is part of the appeal of this route. A system can learn general features on raw text and then specialize through supervised fine-tuning. When the starting point already exists, a new task may only require that supervised stage. But if the available checkpoint needs more pretraining, the cost of learning from unlabeled text returns to the task owner's budget. The authors place the study in the context of research drawing attention to both the financial cost of deep learning and the energy used in training. Energy and Policy Considerations for Deep Learning in NLP

By the time of this study, earlier work had already explored adding a stage between generic pretraining and supervised fine-tuning. Some researchers called it post-training. Others described it as language-model fine-tuning. The idea was to continue learning from raw text selected for its relationship to the eventual application. The paper takes the name adaptive pretraining from work that studied the benefits of domain adaptation for RoBERTa. The distinction between the pretraining objective and the choice of pretraining text matters here. A language objective can remain general even when every sentence used at that stage comes from the domain of the intended tagger. Don't Stop Pretraining

The authors also mention DistilBERT in their discussion of efforts to reduce the size of BERT and the performance tradeoffs they associate with such efforts. Their own comparison asks a different question about training. Given an existing task and a supply of raw text, could the task itself give useful instructions for learning from that text? This question motivates the use of CVT, which brings the target labels into the unlabeled stage through predictions made by the tagger.

How task predictions can teach the tagger

The paper traces the motivation for CVT to self-training and learning from multiple views. In self-training, predictions made on examples without human labels can furnish a new training signal. The paper cites earlier work applying related ideas to parsing and word-sense disambiguation. The connection to multiple views is that components with access to different information can learn from a prediction made under different conditions. Co-training appears in the paper as an antecedent to that idea. Effective Self-Training for Parsing · Unsupervised Word Sense Disambiguation · Combining Labeled and Unlabeled Data with Co-Training

CVT gives this idea a particular form. Its primary predictor sees the sentence with its usual context and is trained to make the decisions required by the labeled task. The auxiliary predictors operate with restrictions on their access to information. Their job is to approximate the primary predictor's tag probabilities. Both kinds of predictor draw on a common encoder, so working on the restricted-view task can change the representation that the primary predictor uses too.

This gives the authors a comparison with practical consequences. The BERT routes spend their unlabeled training on objectives designed to learn from the text itself. The CVT route spends its unlabeled training on producing stable tag predictions across views of that text. A practitioner can have reason to care about both. Generic pretraining offers a starting point with applications beyond one tagger. Task-specific training offers a way to put related text to work immediately on an identified problem, using a smaller architecture in the setup studied here.

The method, step by step

Decide what the tagger must predict

The authors use the IOB tagging scheme for all the tasks. A tag beginning with B marks a span's first token. An I tag continues a span, and O marks a token outside any span of interest. Where the task distinguishes categories, the B and I tags specify the category as well. This convention encodes spans as token-level decisions. It can also distinguish the start of a new span from the continuation of an adjacent span of the same category.

The authors illustrate CVT with an annotated opinion target, tuna roll. The token tuna receives B-OTE because it starts the target. The IOB scheme represents the continuation on roll with I-OTE. In a named entity example, the category attached to a beginning tag might be PER for a person. In a movie query, a slot label supplies the category instead. Each task sets its own inventory of categories. The shared convention is what allows the study to compare the same broad style of tagger across tasks.

The paper describes the BERT tagging head's per-token choices with this label pattern:

B-label, I-label, O, where label ∈ {labelᵢ, labelᵢ₊₁, …, labelₙ}

label stands for a category in the current task. B- attaches a beginning marker to that category and I- attaches a continuation marker. O is the outside tag and carries no category. The symbol ∈ means that the category belongs to the set in braces. The subscripts identify category entries, with i indexing an entry, i+1 indicating the next entry, … indicating intervening entries, and n marking the final index in the notation. The commas separate choices or entries and the braces delimit the set.

There are two kinds of text in the training setup. The labeled examples show the desired sequence of tags and are used for learning the supervised task. The corresponding unlabeled corpus contains text selected for some relationship to the domain or task. The two training approaches give those corpora different roles. For CVT, the task's tags already define the learning problem on the raw text. For the BERT variants that undergo extra pretraining, the task tags enter during supervised fine-tuning.

Train on gold tags and predictions from a fuller view

CVT begins with a sentence encoder that combines a convolutional component and bidirectional long short-term memory layers. The architecture can learn from information in the characters that make up a word and from the sequence of words around it. A bidirectional encoder has information available from both directions in the sequence. The primary predictor gets the unrestricted representation, and the auxiliary predictors receive representations corresponding to restricted views. Each prediction head uses a linear layer and a softmax, which converts its scores into a probability distribution over the possible tags.

How Cross-View Training uses labeled and unlabeled sentences

The steps in order.

How Cross-View Training uses labeled and unlabeled sentencesStep 1: Encode sentences with the shared CNN-BiLSTM1. Encode sentences with the shared CNN-BiLSTMStep 2: Train the primary predictor on gold tags2. Train the primary predictor on gold tagsStep 3: Predict tags on unlabeled sentences with full context3. Predict tags on unlabeled sentences with full contextStep 4: Give auxiliary predictors restricted views4. Give auxiliary predictors restricted viewsStep 5: Minimize divergence from the primary tag distributions5. Minimize divergence from the primary tag distributionsStep 6: Alternate labeled and unlabeled updates6. Alternate labeled and unlabeled updatesStep 7: Monitor progress on the labeled validation split7. Monitor progress on the labeled validation split

On a labeled example, the correct tag tells the primary predictor what to favor at each position. The standard cross-entropy loss penalizes low probability assigned to that tag. With the tuna roll example, the gold beginning tag is the reason for increasing the predicted probability of B-OTE on tuna. This branch of training ties the predictions to the human scoring scheme. It is also how the primary predictor acquires the task knowledge that it can pass along on raw sentences.

The unlabeled branch begins by letting the primary predictor make a prediction using its usual access to the sentence. Its output assigns probabilities to the tags. Auxiliary predictors then try to recover that distribution with restricted access. The paper describes the loss for this branch as Kullback–Leibler divergence between the primary and auxiliary probability distributions. A restricted predictor incurs a penalty for placing its probability mass differently from the fuller-view prediction. The target is a distribution over the choices, so the training signal can preserve the primary predictor's relative preferences among tags.

Working on both kinds of example is central to the design. The primary predictor can learn from gold tags during supervised updates, and the task signal it supplies during unlabeled updates can improve the shared encoder. A restricted view can make the imitation problem harder by removing context the primary predictor could use. The training objective rewards a representation that supports similar decisions with partial information. The paper tests the resulting tagger's accuracy. It describes the improvement to the representation as the motivation for the design.

For these experiments, the authors use the official CVT implementation and put the unlabeled text into its expected format using NLTK's sentence tokenizer. Each sentence occupies a separate line. Their change to the input embeddings is to use GloVe 840B.300d in place of the 6B.300d vectors used in the work introducing CVT. The reason given is broader vocabulary coverage. These word embeddings are a pretrained input to the CVT pipeline. The study does not count training them as part of the task runs.

The CVT runs use batches of 64 for labeled examples and 64 for unlabeled examples. The character embeddings have size 50. The character convolution uses filter widths of [2,3,4] and the appendix specifies 300 character CNN filters. The recurrent layers have sizes 1024 and 512 in order, with projection size 512. The projection is part of the encoder configuration and distinct from the task's prediction head, which outputs scores for the tag inventory.

The appendix specifies dropout of 0.5 on labeled examples and 0.8 on unlabeled examples. Dropout removes some activations during training and is separate from the restricted views given to auxiliary predictors. The optimizer is stochastic gradient descent with momentum, using a base learning rate of 0.5 with an adaptive schedule. The training setup allows 400K steps and applies early stopping using convergence on the validation set. Therefore, the upper training budget and the amount of raw text actually presented in a particular run describe different aspects of the procedure.

All the BERT variants use the BERT Base architecture. The encoder uses 12 attention heads and 12 layers, with a 768-dimensional hidden representation for each token. Its pretraining uses masked language modeling and next sentence prediction. The masked language objective trains the system to recover obscured text from context. Next sentence prediction supplies a training objective about the relationship between sentences. Neither objective requires the opinion, entity, or slot tags used by the downstream classifier.

The ordinary BERT Base setup starts with a checkpoint pretrained on cased English Wikipedia and the Books Corpus. The authors fine-tune that checkpoint on each labeled task. This gives the experiment a reference for how far generic pretraining carries a tagger without a new unlabeled stage. The system is exposed to the target categories when the supervised classifier is trained.

Pre-BERT Base starts with the same architecture and pretrains it from scratch. The unlabeled corpus in that stage is the one selected for the domain or task. For the restaurant task this means Yelp restaurant text, and for the entity tasks it means CNN and Daily Mail stories. After that pretraining, the authors fine-tune on the labeled task. This route tests what the BERT architecture can do with the selected corpus as its starting source of unlabeled learning.

APBERT Base, the adaptively pretrained variant, begins with the same generic checkpoint used in ordinary BERT Base. It continues pretraining on the corresponding selected corpus and then proceeds to supervised fine-tuning. Here the related text supplements what the checkpoint has already learned. The distinction from Pre-BERT Base is the starting point for learning on that text. The distinction from ordinary BERT Base is the additional learning stage before the classifier sees gold tags.

For pretraining in the related corpora, the authors use GluonNLP's open-source implementation and prepare the raw text in the format that implementation expects. They randomly sample about 30K examples from each unlabeled dataset for validation. The appendix gives a batch size of 256, gradient accumulation over 4 steps, a base learning rate of 0.0001 with a schedule based on the training step, and a maximum input length of 512. The optimizer is BERTAdam. Gradient accumulation lets the update incorporate gradients computed across several steps of processing batches.

The authors state a masked language modeling validation criterion for Pre-BERT Base, checked every 30K training steps. They express the required improvement as follows:

Validation MLM accuracy improvement ≥ 0.05

MLM means masked language modeling. Validation MLM accuracy improvement is the gain in accuracy on that objective on held-out unlabeled data, as assessed at a check. The symbol ≥ means greater than or equal to, and 0.05 is the improvement threshold stated in the paper. This is a check on pretraining progress. Tagging F1 on labeled validation data serves a different purpose later in the pipeline.

The reported convergence points show how the amount of pretraining varies with the corpus. Pre-BERT Base converges at ∼1.02M steps on Yelp Restaurants and at ∼1.02M on Amazon Electronics. The CNN and Daily Mail corpus takes ∼570K steps, and IMDb takes ∼119K. APBERT Base converges at ∼960K steps on Yelp-R, ∼930K on Amazon-E, ∼539K on CNN-DM, and ∼117K on IMDb. These are training steps for the unlabeled stage. The performance tables separately report approximate counts of sentences seen.

Use the same supervised procedure for the BERT variants

After whichever pretraining route applies, the BERT encoder feeds a dropout layer and a classification layer. The classifier assigns a tag to each token, using cross-entropy with the gold tag during training. The downstream learner can therefore make use of knowledge acquired through generic pretraining, related-corpus pretraining, or a combination of the two. The prediction interface and the supervised objective are shared by the BERT variants.

The supervised BERT procedure uses a batch size of 10. The authors manually search learning rates of 0.00001, 0.0001 and 0.001, and dropout from 0.0 to 0.5 in steps of 0.1. They use labeled validation F1 to choose settings. The reported learning rate selected is 0.00001. The selected dropout is 0.0 for named entity recognition and slot-labeling and 0.1 for opinion target detection.

This makes two types of validation important to keep in view. Unlabeled validation checks what an encoder is learning about the pretraining objective. Labeled validation checks performance on the span and category decisions the user of the tagger cares about. A BERT checkpoint can be selected to proceed from the former stage and still need the latter stage to learn which predictions count as correct for the task. CVT connects those decisions to the unlabeled stage by using tag predictions there directly.

Experiments and results

The labeled splits and their unlabeled counterparts

The authors take the labeled review datasets from the SemEval aspect-based sentiment tasks. SE16-R uses restaurant reviews and has 2000 sentences in its default training split and 676 in its test split. SE14-L uses laptop reviews and has 3045 training sentences and 800 test sentences in the default splits. For each dataset the authors randomly divide the supplied training portion into 90% for training and 10% for validation. The test portion remains the one supplied by the benchmark. SemEval-2016 Task 5 · SemEval-2014 Task 4

The paired restaurant corpus is Yelp-R, with ∼32.5M sentences in the corpus inventory. For the laptop task the authors choose electronics reviews from Amazon Product Reviews, giving Amazon-E with ∼95M sentences. The restaurant pairing matches the review topic closely. The laptop pairing covers a broader product category and still supplies text in which writers discuss products and their features. The training corpus used by the published DE-CNN reference on laptops is designated Amazon-L in the paper and consists of laptop reviews.

The entity experiments use the supplied training, validation and test splits of the English portions of the CoNLL benchmarks. CONLL-2003 has 14,987 sentences in its training split and 3684 in its test split. Its Reuters examples cover 4 entity types. CONLL-2012 has 59,924 training sentences and 8262 test sentences, with 18 entity types. Examples come from genres including weblogs and talk shows as well as news, and newswire is the largest component. CoNLL-2003 Shared Task · CoNLL-2012 Shared Task

The same CNN and Daily Mail collection, CNN-DM, serves as the related unlabeled corpus for both entity tasks. The inventory lists ∼4M sentences. The rationale is genre overlap with the labeled material. The choice represents a common situation in which raw text is similar to the target material and can be obtained without assembling annotations for the target inventory. For CONLL-2012 that overlap applies most clearly to the dominant news portion of a benchmark with additional genres.

The labeled MIT-Movies dataset has 9775 sentences in its default training split and 2443 in its test split. The authors sample 10% of the training examples for validation. The task covers 12 slot labels, including Plot, Actor and Director. The corresponding raw text comes from IMDb movie reviews, with a corpus inventory of ∼ 271K sentences. It gives the learner movie-related language even though the labeled examples are queries for information. Learning Word Vectors for Sentiment Analysis

These corpus inventory sizes give a sense of the amount of text available. The unlabeled counts next to the scores describe how many sentences a system sees during training to convergence. The same corpus can contribute repeated exposures. In particular, a count of sentences seen can exceed the size of the corpus in the inventory. When the paper compares sentence counts across methods, it is comparing training exposure under their respective procedures. These counts do not specify how many distinct examples would suffice if a practitioner had access to less text.

How the comparisons are scored

The authors use conlleval, a sequence tagging evaluator. F1 combines precision and recall. In this setting, precision concerns how many predicted spans are correct, and recall concerns how many of the annotated spans were recovered. A correctly predicted span has the expected boundaries and, where applicable, the expected category. This scoring is useful for taggers because a token-level decision can affect an entire span. A tagger that recognizes the kind of phrase it is looking at can still lose credit by starting it in the wrong place or ending it too soon.

The principal metric is mean F1 on the labeled test split over 5 randomized runs, accompanied by the standard deviation across runs. Mean F1 summarizes performance under the run variation the authors evaluated. The deviation quantifies spread in those scores. The paper also reports significance tests on particular comparisons. These p-values concern the specified comparisons across runs. The scores reported from prior work give context for the benchmarks, and the paper does not supply corresponding run spreads for those published reference numbers.

Each main table compares CVT with ordinary BERT Base, Pre-BERT Base and APBERT Base. It also includes an earlier result considered a state-of-the-art reference for that dataset. The authors' training routes are the most directly comparable entries because their description ties each route to the same experimental tasks and specifies the raw corpus choices. The external references help answer a different question, namely where the scores fall in relation to previously reported performance on the benchmark.

Opinion targets in restaurant and laptop reviews

Restaurants provide the clearest case of comparable test performance between CVT and the strongest BERT route. On the SemEval restaurant test split, APBERT Base has mean F1 of 80.28 with standard deviation 0.29, and CVT has mean F1 of 80.08 with standard deviation 0.18. Pre-BERT Base reaches 79.82 with standard deviation 0.22. The ordinary generic checkpoint, fine-tuned on the labeled task, reaches 75.04 with standard deviation 1.00. The published DE-CNN reference is 74.37 F1. The APBERT Base and CVT comparison has a p-value of 0.26, which the paper describes as comparable performance.

Training approaches on SemEval2016 Restaurants test F1

Adaptive pretraining and Cross-View Training have close mean scores on restaurant reviews.

Training approaches on SemEval2016 Restaurants test F1BERT Base: 75.04BERT Base75.04Pre-BERT Base: 79.82Pre-BERT Base79.82CVT: 80.08CVT80.08APBERT Base (this paper): 80.28APBERT Base (this paper)80.28DE-CNN: 74.37DE-CNN74.37
The numbers
System or settingF1
BERT Base75.04
Pre-BERT Base79.82
CVT80.08
APBERT Base (this paper)80.28
DE-CNN74.37

The sentence exposures differ sharply even though the leading scores are close. On the restaurant task, CVT sees ∼25.6M unlabeled Yelp-R sentences during training. Pre-BERT Base sees ∼261M and APBERT Base sees ∼246M during their related-corpus training. The generic BERT entry gives ∼192M for Wikipedia and the Books Corpus. For the DE-CNN restaurant comparison, the paper identifies Yelp-R as the source but has no sentence count to report. The adaptive entry's Yelp exposure accompanies a checkpoint already pretrained on the generic corpus.

On the laptop test split, the ranking among the BERT variants is the same as for restaurants. APBERT Base has mean F1 of 84.46 with standard deviation 0.9. Pre-BERT Base has 83.98 with standard deviation 0.42, and ordinary BERT Base has 80.69 with standard deviation 0.51. CVT records mean F1 of 81.77 with standard deviation 0.24. The earlier DE-CNN reference has F1 of 81.59. Here the paper reports a statistically significant lead for APBERT Base over CVT, with a p-value of 0.04.

For the laptop runs, CVT sees ∼25.6M sentences from Amazon-E. Training from scratch with BERT sees ∼261M, and continuing BERT pretraining sees ∼238M on that corpus. The generic checkpoint carries the same ∼192M Wikipedia and Books Corpus entry reported for restaurants. The paper has no size for the Amazon-L text used by DE-CNN. Seen together, the review results show how successful extra pretraining can be when the unlabeled text is close to the prediction problem. They also show that comparable performance on one review dataset does not predict the size of the difference on the other.

Named entities in Reuters and OntoNotes

On the CONLL-2003 test split, CVT reaches mean F1 of 92.26 with standard deviation 0.11. Ordinary BERT Base is the strongest BERT variant, with mean F1 of 91.22 and standard deviation 0.21. APBERT Base has mean F1 of 88.02 with standard deviation 0.18, and Pre-BERT Base has mean F1 of 85.54 with standard deviation 0.19. The authors report a statistically significant CVT advantage for this dataset with a p-value of 0.0086. The external Cloze reference has F1 of 93.5, the highest score in the comparison.

Training approaches on the English CONLL-2003 test split

Cross-View Training leads the systems trained for the study, while the published Cloze reference scores higher.

Training approaches on the English CONLL-2003 test splitPre-BERT Base: 85.54Pre-BERT Base85.54APBERT Base: 88.02APBERT Base88.02BERT Base: 91.22BERT Base91.22CVT (this paper): 92.26CVT (this paper)92.26Cloze: 93.5Cloze93.5
The numbers
System or settingF1
Pre-BERT Base85.54
APBERT Base88.02
BERT Base91.22
CVT (this paper)92.26
Cloze93.5

On the CONLL-2012 test split, CVT's mean F1 is 89.26 with standard deviation 0.1. BERT Base reaches mean F1 of 89.0 with standard deviation 0.23. APBERT Base has mean F1 of 85.88 with standard deviation 0.17, and Pre-BERT Base has mean F1 of 84.20 with standard deviation 0.19. The external BERT-MRC+DSC reference reports F1 of 92.07. CVT has the highest test mean among the study's training routes on this dataset, and the paper does not report a statistically significant CVT lead here.

The CVT runs see ∼17M CNN-DM sentences on CONLL-2003 and ∼18M on CONLL-2012. The same entries are used for BERT pretraining exposure in the two entity comparisons. Pre-BERT Base sees ∼146M CNN-DM sentences, and APBERT Base sees ∼138M. Ordinary BERT Base has the ∼192M generic exposure entry. For the external Cloze reference, the authors also note the use of sub-sampled Common Crawl and News Crawl data, whose exact splits are unavailable. The comparison with Cloze therefore includes a difference in training data as well as a difference in approach.

The ranking of the BERT routes reverses the pattern seen in reviews. The generic checkpoint gives the best BERT result for both entity datasets, even though much of the labeled material overlaps in genre with the related corpus. Starting from generic pretraining is helpful when the study compares the two ways of using CNN-DM for BERT pretraining. Continuing with that news text still yields a lower test mean than directly fine-tuning the generic checkpoint on the labeled entities.

Slots in movie queries

MIT Movies has the same ordering among the study's approaches as the entity tasks. CVT achieves mean test F1 of 88.16 with standard deviation 0.12. Ordinary BERT Base records mean F1 of 86.91 with standard deviation 0.36. APBERT Base follows with mean F1 of 86.78 and standard deviation 0.1, and Pre-BERT Base records mean F1 of 85.77 with standard deviation 0.57. The authors report a statistically significant CVT advantage with a p-value of 0.0085. CVT also exceeds the previously published HSCRF + softdict reference of 87.41 F1.

The CVT tagger sees ∼24.1M IMDb sentences during training. Pre-BERT Base sees ∼30.7M and APBERT Base sees ∼30M. The generic BERT entry is again ∼192M. The authors do not list a comparable unlabeled sentence count for HSCRF + softdict. Movie reviews provide words and expressions related to film. The supervised task still requires mapping language in a request to the particular slots a caller is asking the system to fill.

Training time, expense, and estimated emissions

The resource comparison uses training on Yelp-R as its worked example. The authors track the hardware and elapsed time needed for CVT and for the additional BERT pretraining routes. Each uses Tesla V100 GPUs. For the expense estimate, they use the average hourly price of the relevant training instances. CVT is run with 1/8 GPUs/CPUs and takes 56 hours. Pre-BERT Base and APBERT Base each use 8/64 GPUs/CPUs, and take 85 hours and 80 hours, respectively. Both the number of devices and the time they are used enter the comparison.

Estimated training cost on Yelp Restaurants

Cross-View Training has the lowest estimated training expense in the Yelp comparison.

Estimated training cost on Yelp RestaurantsCVT (this paper): 172CVT (this paper)172Pre-BERT Base: 2081Pre-BERT Base2081APBERT Base: 1958APBERT Base1958
The numbers
System or settingUSD
CVT (this paper)172
Pre-BERT Base2081
APBERT Base1958

The authors estimate energy consumption by sampling GPU power during training through the NVIDIA System Management Interface. They use Linux's turbostat to measure power for CPUs and DRAM. In the resulting estimate, they account for infrastructure overhead by applying a power usage effectiveness coefficient. The table reports the resulting energy in kWh. The entries are 14.82 kWh for CVT, 273.62 kWh for Pre-BERT Base, and 260.63 kWh for APBERT Base. Estimated carbon dioxide emissions for these runs are 14.14 pounds, 261.04 pounds, and 248.64 pounds, respectively.

The ordinary BERT route has a different cost boundary. The authors do not rerun generic BERT pretraining, and they treat it as a one-time expense. They likewise do not train the GloVe embeddings used by CVT. For comparison, they report that only fine-tuning generic BERT Base on the labeled SemEval restaurant task uses 1/8 GPUs/CPUs and takes 0.283 hours, at an estimated cost of 0.87 USD. That supervised run is estimated to use 0.094 kWh and emit 0.09 pounds of CO₂.

The inexpensive supervised run is relevant to anyone who already has access to a generic checkpoint. In the restaurant experiment, it corresponds to the ordinary BERT score. Getting the stronger adaptive BERT result entails the additional Yelp pretraining whose costs appear in the chart. CVT's expense covers its task-specific use of the raw restaurant text, in conjunction with the labeled examples. The authors use this case to show why the choice of how to use unlabeled text can matter to the training budget even when the test scores of the strongest routes are close.

What the ablations show

The paper has no component-by-component ablation of CVT. Its analyses instead compare alternative BERT training routes, changes in observed performance across datasets and splits, and the resource demands of CVT and related-corpus BERT training. These comparisons are most informative when the change between two configurations is specific. They support claims about the observed training routes and identify questions about individual components that the experiment leaves unresolved.

Within BERT, ordinary BERT Base and APBERT Base share a generic starting checkpoint and a downstream procedure. The adaptive route adds training on the selected unlabeled corpus. The review results favor that extra stage on both benchmarks. The entity and movie-query results favor going straight to supervised fine-tuning from the generic checkpoint. This is a relatively direct test of adding the extra stage, since both paths begin with the same broadly pretrained architecture and end with the same kind of tag classifier.

The comparison between Pre-BERT Base and APBERT Base starts from the related corpus as the common feature. One route starts from scratch on that corpus. The other begins with the generic checkpoint and continues on it. APBERT Base scores higher than Pre-BERT Base on each of the test sets. This suggests that the generic starting point supplies something useful even when both routes see the same source of related text. The comparison holds the source of the related text fixed, while the actual amount of exposure and the prior training of the checkpoint differ.

Pre-BERT Base also provides a test of using the selected text as the entire starting source for BERT pretraining. It ranks above ordinary BERT Base on both review datasets and below it in both entity comparisons and on movie queries. The result gives corpus choice a practical meaning. In-domain reviews can be effective material for learning a representation that will later support review tagging, even with pretraining from scratch. For the other tasks, the related corpora tested here fail to match the performance obtained by fine-tuning the broadly trained checkpoint.

Task alignment is the authors' explanation for the pattern

The paper distinguishes the relationship that comes from shared subject matter or genre from a closer relationship to the behavior that must be learned. In the review experiments, the raw sentences are themselves reviews. They contain the sort of evaluative language and references to items that an opinion target detector uses. On the authors' interpretation, this makes them well suited to adaptive pretraining for OTE detection. The laptop data also show that the unlabeled review source can be broader than the specific product category in the labeled benchmark and still be useful in this setup.

In the entity experiments, news is an appropriate genre for much of the annotated text. A generic learning objective on more news nonetheless supplies no direct signal about how the benchmark defines or categorizes an entity. The entity inventory is learned explicitly once the tagger sees supervised examples. CVT gets to use predictions in that inventory earlier, while it is still training on unlabeled news. This distinction offers a plausible account of why task-specific training made better use of CNN-DM in this comparison. The experiment measures the final effect of the training routes, without testing how often the proposed mechanism operates for particular entities or genres.

The slot-labeling experiment gives a related explanation in a different setting. A movie review has topical overlap with a movie query. A request can still use quite different phrasing from a review, and the IMDb pretraining objective has no way to refer to the MIT-Movies slot inventory directly. CVT brings the slot predictions it has learned from labeled queries to the unlabeled training stage. Its test result is consistent with a benefit from doing so. The experiment does not compare IMDb with unlabeled movie queries, which would help test how much the form of the sentences contributes to the outcome.

These explanations are comparative and retrospective. The study does not assign a numerical measure of task relevance to its unlabeled corpora or manipulate relevance independently of other choices. The restaurant and laptop comparisons tell us how these review sources behaved with those tasks. The entity and movie comparisons tell us how the selected news stories and movie reviews behaved with their tasks. The pattern supports the authors' interpretation, and the relevance of other raw text would remain a question for its own evaluation.

Validation and test results can rank the approaches differently

The appendix contains mean F1 on labeled validation splits. For SE16-R, CVT has mean validation F1 of 75.12, with standard deviation 0.49, and APBERT Base has mean validation F1 of 82.88, with standard deviation 0.74. On the test split, their means are 80.08 and 80.28, respectively. The validation results and final test results tell different stories about the closeness of the methods. The paper gives both sets of measurements, while its stated comparison of CVT and APBERT Base on restaurants rests on the test runs.

The laptop results shift in the other direction. CVT's mean validation F1 on SE14-L is 81.58, with standard deviation 1.56. APBERT Base's mean validation F1 is 79.75, with standard deviation 1.13. APBERT Base gives the higher test result on that benchmark. These splits have different roles. Validation supports choices such as training settings or when to stop. The test split is where the paper evaluates the resulting tagger for the final comparison.

On MIT Movies, APBERT Base has a validation mean F1 of 93.1 with standard deviation 0.06, and CVT has a validation mean F1 of 88.31 with standard deviation 0.27. CVT leads on the test split. The paper gives no separate analysis of why the validation and test rankings differ. Those entries document the course of the experiments and underline the importance of identifying the split whenever an F1 score is reported.

The authors describe CVT as more robust across the examined tasks and sources of raw text. The strongest support for this description is the breadth of its competitive test results. It stays close to the best adaptive BERT result on restaurants and leads the BERT variants on both entity datasets and on MIT Movies. The laptop result qualifies the claim, and the entity reference scores show that leading the paper's BERT variants is different from leading the benchmark. The study uses robustness in this comparative sense across settings. It does not conduct a dedicated robustness evaluation involving changed inputs or stress tests.

Sentence exposure helps interpret the cost comparison

CVT sees fewer unlabeled sentences than the compared BERT routes in the training runs reported for each task. That is an observation about what the procedures did up to their stopping points. The Yelp cost comparison adds direct information on the consequences of training this way, with elapsed time, hardware and estimated energy all recorded. At similar restaurant test F1, the CVT configuration is materially less expensive to train than either route involving new BERT pretraining.

Sentence counts and cost nevertheless answer distinct questions. The count describes how much text a procedure consumed, potentially including repeated visits to the same example. The hardware and energy estimates describe what it cost to carry out the actual computation. A sentence exposure in a CNN-BiLSTM run and one in BERT pretraining need not demand the same work. The comparison demonstrates the efficiency of the tested configurations together with their objectives, architectures and stopping procedures.

This distinction is especially relevant to the auxiliary views. The final comparisons are consistent with the view restrictions helping the CVT encoder learn from raw sentences. The study does not remove the restrictions, turn off auxiliary training, or score the same CNN-BiLSTM using only annotated examples. Consequently, its strength is as a comparison of complete systems and ways of using unlabeled text. It gives no measured marginal contribution for an auxiliary view or for the unlabeled stage within an otherwise identical CVT setup.

Limitations

Scope and open questions identified by the authors

The tasks in the study all use sequence tags for spans. The authors suggest expanding the work to cover chunking and the segmentation of both elementary and argumentative discourse units. Those tasks would test the training idea on spans with a different linguistic function from the ones used here. The authors also suggest studying supervised classification, where the output can apply to an entire input instead of to tokens in a span. These proposals mark the scope of the tests they actually conducted.

A further direction the authors identify is applying Cross-View Training to a Transformer such as BERT and comparing that system with adaptively pretrained BERT. That comparison would make the training objective easier to study while keeping the backbone closer across conditions. The tested CVT system uses a CNN-BiLSTM, and the tested BERT systems use their own shared Transformer architecture. The paper reports the result of choosing between these configurations as practical training pipelines.

The authors qualify the financial interpretation by considering the case where a generic checkpoint is already paid for and reused. They treat generic BERT pretraining and GloVe pretraining as one-time costs outside the task-specific training comparison. They point out that the cost of generic BERT pretraining might be spread over many supervised applications. Evaluating that strategy requires knowing the number and kinds of tasks that will share the checkpoint. A budget for one new tagger and a budget for a collection of taggers can therefore give different weight to the same published training estimates.

The paper also mentions gaps in the data accounting for external benchmarks. In the DE-CNN comparison, sizes for the unlabeled review data used by the prior work are unavailable. The Cloze comparison has similarly incomplete information about the crawled corpora subsamples. Those entries help establish the performance context of the study. The available details do not support calculating their relative data consumption with the same precision as for the study's training runs.

Limits of the experimental controls

The main cross-family comparison changes the architecture along with the use of unlabeled text. A smaller recurrent encoder and a BERT encoder differ in cost and in the representations they learn. Their sources of reusable pretraining also differ, since CVT begins with GloVe vectors and some BERT routes begin with a contextual checkpoint. The reported advantage belongs to the CVT configuration as tested. The design cannot establish what portion of it comes from task C VT supervision, what portion comes from the smaller encoder, or how those factors interact.

The runs do not use a common budget of unlabeled sentence exposures. The authors report the exposures reached under the chosen training and convergence procedures. This answers a useful practical question about how much training their setups consumed. It leaves open which approach would have the higher test score at the same exposure, at the same elapsed time, or at the same energy budget. In particular, seeing fewer sentences during training gives no direct count of how many distinct unlabeled sentences one would need to reproduce a result.

The strength of the link between raw text and the annotated task also varies together with other properties of the datasets. Corpus size changes. So do the labeled split sizes, the category inventories and the kinds of language the tagger encounters. The review, news and movie comparisons therefore provide evidence about those pairings. They cannot isolate either genre similarity or task relevance as a causal variable. The paper's interpretation is plausible in view of the observed ordering, and a comparison that varied only the type of raw text for a single task could test it more directly.

All of the benchmark results concern English, and the tasks use the IOB scheme. Applicability to other languages, especially when appropriate embeddings or pretrained checkpoints are unavailable, is unresolved by this study. Likewise, the study uses the chosen labeled splits and does not report a series of experiments that progressively reduce the annotation budget. It shows how unlabeled text can be used alongside the available labeled examples. It gives no direct estimate of how many labeled examples each method could replace at a given performance level.

The statistical evidence is also narrower than a general claim of equivalence. The restaurant p-value supports the authors' description of the two leading methods as comparable in this evaluation. It does not establish a pre-defined margin within which their performance is interchangeable. The significant laptop, Reuters and MIT Movies comparisons apply to the runs and splits tested. There is no reported analysis that shows whether the overall F1 differences arise from particular entity categories, opinion-span lengths, slot types, or boundary decisions.

What the resource estimates cover

The detailed training cost and emissions figures are reported for the Yelp example. The authors describe the same calculation as applicable to their other training runs. The paper does not give an equivalent measured cost breakdown for every pairing of task and corpus. Hardware usage, elapsed time, instance pricing and the infrastructure factor are all part of the Yelp estimate. A different execution configuration could lead to different absolute costs or emissions.

The resource comparison concerns training under the accounting boundary the authors describe. It does not measure the cost of serving the resulting taggers, such as the latency of a prediction or energy used per request. It also does not aggregate upstream pretraining and all future uses into a single environmental total. The results are most directly applicable to a decision about running CVT or undertaking additional BERT pretraining for a known tagging task with related text on hand.

What came after

Hedderich and colleagues cite the study in a survey of natural language processing in low-resource scenarios. The connection is the question of how to learn when the data that are easy to obtain come without the labels the task requires. Bhattacharjee and colleagues give that question a concrete experimental form. They compare general pretraining and task-guided learning from raw English sentences on benchmarks where the final output is a tagged span. The later work places the paper in a survey context. The citation establishes that connection, while a specific experimental extension or reuse of the CVT setup is unverified. A Survey on Recent Approaches for Natural Language Processing in Low-Resource Scenarios

Cite

Cite as Kasturi Bhattacharjee, Miguel Ballesteros, Rishita Anubhai, Smaranda Muresan, Jie Ma, Faisal Ladhak and Yaser Al-Onaizan. 2020. To BERT or Not to BERT: Comparing Task-specific and Task-agnostic Semi-Supervised Approaches for Sequence Tagging. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.emnlp-main.636

@inproceedings{bhattacharjee2020bert,
  title = {{To BERT or Not to BERT: Comparing Task-specific and Task-agnostic Semi-Supervised Approaches for Sequence Tagging}},
  author = {Kasturi Bhattacharjee, Miguel Ballesteros, Rishita Anubhai, Smaranda Muresan, Jie Ma, Faisal Ladhak and Yaser Al-Onaizan},
  booktitle = {Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.636},
  url = {https://doi.org/10.18653/v1/2020.emnlp-main.636}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bhattacharjee-2020-bert-or-not-bert-comparing/