---
title: "An Investigation of Transfer Learning-Based Sentiment Analysis"
description: "The study tests transfer learning for Japanese review classification and measures how domain adaptation, corpus size, and labeled data affect error."
canonical: "https://research.elamur.ai/free/en/papers/bataa-2019-investigation-transfer-learning-based-sentiment/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bataa-2019-investigation-transfer-learning-based-sentiment/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2019](https://md.research.elamur.ai/free/en/papers/2019/) / An Investigation of Transfer Learning-Based Sentiment Analysis in Japanese

# An Investigation of Transfer Learning-Based Sentiment Analysis in Japanese

Paper · 2019 · Enkhbold Bataa and Joshua Wu

**Authors:** Enkhbold Bataa and Joshua Wu · **Year:** 2019 · **Venue:** Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **10** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/bataa-2019-investigation-transfer-learning-based-sentiment/cited-by/) · Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/P19-1458/)
- [PDF](https://aclanthology.org/P19-1458.pdf)
- [DOI 10.18653/v1/p19-1458](https://doi.org/10.18653/v1/p19-1458)

## Summary

A review site already has plenty of text, but it may have relatively few reviews labeled in the way a particular classification task requires. The authors ask how much of the work of learning to classify Japanese reviews can be done before the classifier sees any ratings. They study [transfer learning based on language model pretraining](https://md.research.elamur.ai/free/en/topics/language-models/), in which a system first learns from ordinary text and then uses what it learned to predict a review’s sentiment. The experiments cover product reviews from Rakuten and movie reviews from Yahoo. Rakuten provides both a binary task and a 5-class task. The Yahoo experiment is binary.

The authors compare ELMo, ULMFiT, and BERT BASE, all with Japanese Wikipedia as their source of pretraining text. The systems differ in how they use that preparation. ELMo usually supplies contextual features to a separate classifier, ULMFiT carries a language predictor into task training, and BERT ordinarily updates its pretrained layers together with the classifier. Each approach improves on the strongest earlier result for Rakuten binary classification, where ULMFiT records 4.45% test error. BERT BASE leads on the full Rakuten task at 40.68% test error and on Yahoo binary at 8.42%. On Rakuten full, the earlier Super Character system edges out the standard ELMo configuration, so the advantage over earlier systems depends on the transfer method as well as the task.

The smaller Yahoo collection lets the authors ask how much labeled data the transferred systems need. With the reduced labeled set, adapted ULMFiT and BERT BASE achieve 10.62% and 10.14% test error, respectively. The strongest task-specific comparator, RCNN, achieves 12.67% with access to 3 times as much labeled data. ELMo comes closer to that baseline than the simpler recurrent and convolutional systems do, while finishing behind RCNN. A separate Yahoo experiment reduces the Wikipedia pretraining corpus to 100MB. ELMo and adapted ULMFiT stay close to their results with the entire Wikipedia corpus, while BERT BASE’s test error rises to 14.26%.

The paper also distinguishes two ways of adapting a system. Extra training on unlabeled reviews improves ULMFiT on every benchmark in the paper, with mixed results for ELMo and BERT. During supervised training on Yahoo, letting ELMo’s encoder learn alongside its classifier improves its result, and keeping BERT’s encoder fixed worsens its result. These comparisons show where the benefits of pretraining survive changes in data and training procedure. The authors release pretrained weights and code for further work on Japanese text classification.

## Deep dive: An Investigation of Transfer Learning-Based Sentiment Analysis in Japanese

The study tests transfer learning for Japanese review classification and measures how domain adaptation, corpus size, and labeled data affect error. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Learning a classifier when labels are scarce

The task is to read a review and assign it to one of the categories defined by the dataset. In the binary setting the classifier chooses between the two available categories. The full Rakuten setting asks it to distinguish among 5. Each prediction concerns the review as a whole. A classifier can therefore be evaluated by comparing its decisions with the recorded categories on held-out reviews. This is the form of [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) investigated in the paper.

The distinction between unlabeled and labeled text determines what the experiment can test. A review label tells a classifier which decision it should make for a particular example. Ordinary prose can teach a system which expressions occur together and how a word’s surroundings affect what it means, provided the training objective gives the system a way to learn from those surroundings. A Wikipedia article contains plenty of evidence of the latter kind. It does not have to carry a sentiment label to participate in pretraining. The research question is whether that preparation helps enough when the system eventually has to learn a review classification task.

The authors motivate this question through the state of Japanese sentiment research as they describe it. Their account places much of the recent progress in deep learning for sentiment classification in English, with a smaller body of comparable Japanese work. The dependence of task-specific neural classifiers on large labeled collections makes that imbalance consequential. The paper treats the smaller movie-review collection as closer to a practical training situation, while the large product-review benchmarks make it possible to compare with published results. These are different reasons to test on a dataset, and the paper uses them to pose different questions about [sentiment and emotion](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/).

Japanese also makes the transformation from text to input units part of the problem. Ordinary Japanese writing leaves word boundaries unmarked by spaces, and a character sequence can admit different divisions with different meanings. A system needs a procedure for choosing units before it can count frequent ones, build a vocabulary, or learn what tends to appear near what. An inappropriate division can change the evidence available to the predictor before training starts. This is why [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/) appears in the paper as an experimental choice alongside the choice of encoder.

#### From fixed word representations to contextual ones

The earliest family of approaches in the paper’s account starts with a vector for each word. A vector is an ordered collection of learned values. A classifier works with these values when deciding how a word contributes to a sentence or review. In the fixed setting, a given vocabulary item begins with the same values wherever it occurs. The surrounding sentence can still affect what the classifier ultimately decides, through the operations it performs on the sequence of vectors. Its initial representation of the item is shared across occurrences. The paper uses word2vec, fastText, and GloVe to illustrate this tradition of [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/).

A contextual representation moves some of that interpretation earlier. The values for an occurrence of a word can depend on the text around it. A classifier that receives those values starts with information about the occurrence in its sentence, including clues that can help distinguish different uses of the same written form. The question then becomes how a system acquires that ability before it has access to examples for the downstream task, meaning the task it will ultimately perform.

The authors describe CoVe as a way of acquiring contextual representations through [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/). Its encoder reads the source sentence in both directions, while a decoder produces the translation with the aid of attention. The part carried into a downstream classifier is the encoder, whose representations were learned in service of translating. That approach depends for pretraining on text available in aligned source and target versions. The paper contrasts the availability of translation pairs with the opportunity to train on much larger collections of text in a single language. [Learned in Translation](https://md.research.elamur.ai/free/en/papers/mccann-2017-learned-translation-contextualized-word-vectors/)

ELMo illustrates the monolingual route. Its language prediction machinery learns from sequences of words in both directions. A downstream classifier can receive representations built from the resulting states, with information derived from either side of a word. The authors present ELMo as a feature source for a task-specific architecture. That distinction matters because the classifier can be designed and trained separately, and the pretrained feature source can remain fixed. [Deep Contextualized Word Representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/)

ULMFiT offers another arrangement. A language predictor provides the starting weights for work on a new task, and the method has specific rules about how to change those weights during adaptation. The authors group ULMFiT and the GPT approach they cite as examples of unidirectional pretraining. In that arrangement, the language prediction objective uses context in a single direction. BERT instead learns to recover hidden content using surrounding text from either side within its encoder. The paper recounts this difference as part of the motivation for BERT, particularly for tasks where the interpretation of a word can depend heavily on what follows it. [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/)

The authors compare their overall strategy to using a system trained on ImageNet as preparation for a new vision task. The useful part of the analogy is the division of labor. One expensive stage learns general representations and later stages adapt them to particular problems. For the Japanese experiments, the general stage uses text prediction objectives whose targets are supplied by the text itself. Review category labels are needed when the task becomes predicting a category. The analogy concerns the reuse of learned weights and leaves the source of training supervision specific to each field. [What makes ImageNet good for transfer learning?](https://md.research.elamur.ai/free/en/papers/huh-2016-what-makes-imagenet-good-transfer/)

#### The systems a new approach had to beat

The paper’s account of earlier text classification includes recurrent, convolutional, attention-based, and hybrid classifiers. A recurrent classifier processes a sequence through a state that is updated as the sequence is read. A convolutional classifier can detect useful local patterns as a filter moves across the text. Attention gives the classifier a way to assign different amounts of influence to information from different parts of the input. These are ways to build a representation for deciding the class. They also supply concrete competitors for an approach that puts more of the work into pretraining.

The Japanese work surveyed by the authors includes systems based on fixed embeddings. It also includes experiments that vary how text is encoded before classification. Zhang and LeCun compare ways of presenting Chinese, Japanese, Korean, and English to a classifier. In the authors’ description, those comparisons include indicators for distinct input units, rendered character shapes, and learned embeddings. Super Character takes the visual proposal further by arranging text as an image and treating the prediction as an image classification problem. Those approaches give the paper alternatives whose main innovation lies in the encoding or classifier itself.

The resulting study is a comparison between complete ways to build a review classifier. An earlier system may get useful evidence through glyphs, local patterns, or a learned representation trained for the target task. The transfer systems bring additional experience from Wikipedia and can differ in how they let the review data modify it. The main results compare the finished classifiers. The follow-up experiments change specific parts of the transfer procedure to examine how much particular choices matter.

### The method, step by step

#### What moves from Wikipedia to a review task

The authors organize training around a general source of text, a collection of reviews from the target domain, and supervised examples carrying the target categories. The source stage teaches a system to make language predictions. The optional domain stage teaches it from the text of reviews while setting their labels aside. The classification stage uses the labels to teach the system what decision to make about a whole review. [Fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) is the process of taking learned parameters as a starting point and adjusting them through further training. Here, the parameters are the learned weights that determine how the system transforms and combines its inputs.

A language prediction task supplies its own targets. For instance, once part of an existing sequence is treated as hidden, the original sequence tells the system what should fill the gap. BERT uses this general form of training. ELMo and ULMFiT make predictions from ordered context in their respective language predictors. At the review stage, the answer to be learned comes from a different source. The training example carries a designated review category, which becomes the target for the classifier.

This separation gives the authors a useful comparison. They can take weights prepared on Wikipedia directly into supervised review classification. They can also put an unlabeled review training stage in between and see what changes on the final classification test. Both routes learn from labeled reviews. The difference is whether the system also gets a chance to adjust its language predictions to review text before the classification training begins.

From Japanese Wikipedia to a review classifier The steps in order.

#### Preparing the Wikipedia input

Japanese Wikipedia is the common source for pretraining. Using the same type of text gives the comparison a shared starting domain. The paper reports extracting the text with WikiExtractor and segmenting it with MeCab using the IPADIC neologism dictionary. That segmentation supplies the units that the word-based pipeline works with. The vocabulary is limited to the most frequent 32,000 tokens or sub-words, as appropriate to the particular system.

The BERT weights come from Kikuta’s Japanese BERT BASE rather than from the multilingual release the authors considered. The paper gives a specific reason for the choice. Its authors judge the multilingual input treatment unsuitable for Japanese distinctions involving okurigana, the kana that can express parts of inflected forms, and marks that distinguish pronunciations and words. They illustrate the latter issue with *aisu*, glossed as to love, and *aizu*, glossed as signal. The example matters because the written distinction changes the word available to a language predictor. It is a problem at the input level, before the network can use the sentence to decide how to represent the occurrence.

Kikuta’s BERT uses [SentencePiece](https://md.research.elamur.ai/free/en/papers/kudo-2018-sentencepiece-simple-language-independent-subword/) to form its input units. A sub-word tokenizer can represent a stretch of text using pieces smaller than an entire word. In this experiment, the Japanese BERT weights and the units in which the system reads text come from the same preparation. The MeCab processing and the BERT processing are consequently different routes from Japanese writing to the positions on which a language predictor operates.

The published Japanese BERT preparation included 1 million training steps with a sequence length of 128 and 400 thousand further steps with a sequence length of 512. A step is an update during training. Sequence length measures the number of input positions configured for that stage. These settings describe the training behind the starting weights. The later BERT runs on review text, labeled or unlabeled, are separate stages.

The authors describe Wikipedia pretraining as the costliest part of the procedure and intend its output to be reused across tasks. They report using 1 NVIDIA Quadro GV100 for ULMFiT pretraining and 4 NVIDIA Tesla V100s for ELMo pretraining. They keep the respective hardware for the supervised work with those systems and use a v2.8 TPU for BERT fine-tuning. These are implementation conditions. The study evaluates prediction errors, while the hardware descriptions explain how the authors carried out the work.

#### ELMo turns each occurrence into a contextual feature

ELMo learns from reading in both directions. A forward language predictor learns the regularities that make a word plausible given preceding text. A backward one learns corresponding regularities from the other direction. Their states can be used together to make a representation that depends on the context of the occurrence. The downstream classifier receives these representations and learns how to use them for the review decision.

The authors attach a biattentive classification network, abbreviated BCN, to ELMo. The BCN is the review classifier in this pairing, and ELMo supplies the representations it operates on. The authors select it because of the performance associated with this classifier on the sentiment treebank experiments they cite. That prior work motivates the choice of downstream architecture. The actual Japanese classification decision is learned from the Japanese review labels. [Sentiment Treebank](https://md.research.elamur.ai/free/en/papers/socher-2013-recursive-deep-models-semantic-compositionality/)

In the ordinary BCN+ELMo configuration, the pretrained ELMo weights are frozen during supervised classification. Freezing means that the values still influence every prediction but training does not alter them. The learning procedure changes the BCN parameters. This makes the standard configuration a test of how well contextual representations can serve as fixed inputs to a trainable task-specific system.

There are two opportunities to change that arrangement in the paper. In the domain adaptation experiment, the language predictor can continue learning on unlabeled reviews before it supplies features to the classifier. In the parameter updating experiment, the authors allow ELMo and BCN to change together while the system trains on the labeled classification task. Both interventions change the eventual source of the features. The first uses signals available in review text, while the second uses the errors made on category predictions.

#### ULMFiT continues training a pretrained predictor

ULMFiT makes language prediction the first stage of preparing a classifier that can be fine-tuned for the task. Its training scheme allows parameters learned on general text to be carried into the new domain and then into supervised learning. The authors describe its source language prediction as unidirectional. Its route to transfer therefore differs from ELMo’s combination of contextual features from forward and backward predictors.

Two named techniques are relevant to the experiment. Discriminative fine-tuning assigns different learning rates to different parts of the pretrained system. A learning rate controls the scale of the adjustments made as training responds to errors. Different rates allow some layers to change more readily than others. Slanted triangular learning rates vary the rate over the course of training, with a rise and a subsequent decline. The authors present both techniques as ways to make further training more stable.

The ULMFiT results are reported for a direct route from Wikipedia into supervised review classification and for a route with the extra unlabeled review stage. The label *adapted* identifies the latter setting. That label is important when interpreting the small-data experiments. A result for adapted ULMFiT reflects both transfer from Wikipedia and a procedure for getting closer to the language of reviews before learning the classification labels.

#### BERT learns from masked text and transfers its encoder

BERT’s encoder uses attention in multiple layers so that its representation of an input position can draw on other positions in the sequence. The paper describes two source training tasks. Masked language modeling hides selected input items and asks the system to predict their content. The authors describe this setup as masking 15% of the words. Because the remaining sequence is visible on both sides of a masked position, a prediction can draw on preceding and following text. Next sentence prediction supplies a further signal about the relationship between sentences presented together. Both tasks use targets derived from the training text. [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/)

In the ordinary supervised configuration, the Japanese BERT BASE weights provide the initialization, and training on review labels updates the encoder as well as the classification components. The initial weights supplied by pretraining thus influence the path the classifier takes through training. The final encoder can also reflect what the review labels teach it. This joint update contrasts with the ordinary BCN+ELMo arrangement, where the classifier learns to use the supplied features while the ELMo parameters stay fixed.

The paper also implements BERT as a fixed feature extractor for an ablation. The system takes the hidden state associated with the first position of the input and passes the pooled representation to a linear classifier. A hidden state is the set of internal values the encoder computes for a position. The linear layer converts the supplied values into scores for the possible review categories. In this experiment, only the classification layer is adjusted by the labeled examples. The authors describe this arrangement as cheaper and faster because the pretrained layers no longer require updates during classifier training.

#### How the optional stage and the labeled stage fit together

For domain adaptation, the authors return to the language prediction task, this time using reviews in the target domain as text. The product-review or movie-review collection supplies language that differs from the general Wikipedia source. The system can learn from those differences before it needs to predict a category. The review text at this stage supplies the learning signal without use of its sentiment labels.

The implementation uses 5 adaptation epochs for ELMo and ULMFiT. An epoch is a pass through the data used at that stage. The BERT comparisons use 10K and 50K adaptation steps, with coverage differing by benchmark. An epoch and an update step describe different properties of a run. The reported counts identify the adaptation settings within each family, while the experiments compare the resulting classification errors.

For supervised training, the authors follow settings from the original implementations. On Rakuten, they run ELMo with BCN and ULMFiT for 10 epochs each and report the best-performing checkpoint. They train BERT for 3 epochs, following the fine-tuning guidance they cite. This classifier training is part of the primary comparison that starts directly from Wikipedia weights. Domain adaptation is evaluated as a separate intervention on that route.

The paper presents the method through these training procedures and measured error percentages. Its stages are specified by the prediction task, the data available at each point, and which weights are allowed to change. Within that setup, the transfer systems differ in both how they produce a representation and how they adjust it once the review task enters the experiment.

### Experiments and results

#### What the datasets contribute to the comparison

The Rakuten product-review data come from the benchmark used by Zhang and LeCun. The dataset table gives 4,000,000 training reviews and 500,000 test reviews for Rakuten full, the 5-class task. For Rakuten binary, it gives 3,400,000 training reviews and 400,000 test reviews. For the development procedure, the authors specify 80% for training and 20% for validation, with the test set taken from the earlier benchmark. Validation data support choices during development, such as deciding which trained checkpoint to retain. The external benchmark’s test split provides the basis for the reported comparison with earlier classifiers.

For Yahoo movie reviews, the dataset table reports 30,545 training examples and 7637 test examples. The paper separately describes the split procedure as 60% training, 20% validation, and 20% testing. The movie-review collection supplies the baseline for experiments with fewer labels, a smaller pretraining corpus, and alternate parameter updates. The large Rakuten data provide a direct comparison against previously published Japanese benchmarks. The paper uses Yahoo’s smaller scale to make additional runs practical and to examine what transfer can do in a more constrained labeled setting.

The score throughout is test error percentage. It measures the share of test reviews assigned a category different from the recorded one. On a given test set, a lower value means fewer wrong labels relative to the size of that set. The full Rakuten and binary Rakuten tasks have distinct category sets and distinct test examples. Their error percentages answer separate questions about classification performance. A cross-task comparison of the raw percentages cannot identify which part of the setup accounts for one task’s higher errors.

The headline transfer results start from the Wikipedia weights and proceed to training on labeled reviews. Separate experiments insert additional language training on unlabeled reviews. Keeping those conditions clear matters for reading the baseline numbers. In particular, the standard ULMFiT scores in the main comparison and the adapted ULMFiT scores in the later analyses refer to different training sequences.

#### Rakuten product reviews

For Rakuten the paper draws earlier benchmark results from Zhang and LeCun and the Super Character study. The chart for the full task includes a glyph-based classifier, a system using one-hot inputs, a fastText result, and the visual Super Character method. One-hot inputs identify each unit through a dedicated active entry, while a glyph-based representation makes the form of the written character available to the classifier. Together with the earlier embedding and linear results reported by the authors, these systems put the transfer methods in the context of several different encoding strategies.

Selected systems on Rakuten full test error BERT BASE and ULMFiT lead the full review classification comparison.

**The numbers**

| System or setting | error % |
| --- | --- |
| GlyphNet | 48.97 |
| OnehotNet | 45.1 |
| Fasttext | 43.27 |
| Super Character | 42.30 |
| BCN+ELMo | 42.95 |
| ULMFiT | 41.39 |
| BERT BASE (this paper) | 40.68 |

BERT BASE leads the direct-transfer comparison on Rakuten full with 40.68% test error. ULMFiT follows at 41.39%. Super Character, with 42.30%, performs better than standard BCN+ELMo at 42.95%. The paper describes transfer favorably across both product-review tasks. The full-task ordering shows the importance of naming the comparator. The best transfer results improve on the strongest earlier figure in the table, while one strong earlier system still ranks ahead of ELMo.

The binary task changes that ordering. ULMFiT has the lowest test error among the main results, with BERT BASE and BCN+ELMo also ahead of Super Character. The earlier fastText and glyph-based results provide additional context for how the methods compare in this setting.

Selected systems on Rakuten binary test error ULMFiT leads the binary product review comparison, with the other transfer systems also ahead of Super Character.

**The numbers**

| System or setting | error % |
| --- | --- |
| GlyphNet | 8.55 |
| OnehotNet | 5.93 |
| Fasttext | 5.45 |
| Super Character | 5.15 |
| BCN+ELMo | 4.77 |
| ULMFiT (this paper) | 4.45 |
| BERT BASE | 4.68 |

The two Rakuten tasks offer a useful check on any ranking inferred from a single benchmark. BERT BASE leads on the full classification task, while ULMFiT has the lower error on the binary task. The network families, training schedules, input representations, and categories all contribute to the comparison. The reversal establishes that the strongest system depends on the benchmark in this experiment. It leaves the cause of the reversal open. In particular, the results alone cannot isolate label granularity as the explanation, since the two versions also have different datasets and splits.

Transfer shows value on Rakuten even with substantial labeled training sets. That matters for the paper’s broader question about training on less labeled data. The usefulness of a Wikipedia starting point can be tested with abundant labels as well as with fewer of them. Rakuten establishes how the complete systems compare in the former situation, and the reduced-data Yahoo runs test the latter directly.

#### Yahoo movie reviews

The authors train local baselines for the Yahoo task. The simple RNN reads through the input while updating its internal state. The LSTM baseline is also recurrent and has a mechanism for controlling what information the recurrent state carries forward. A linear layer on top provides scores for the review categories. The paper also tests a convolutional sentence classifier, a self-attentive classifier that assigns influence to parts of an input while forming its representation, and a recurrent-convolutional hybrid, RCNN. These baselines give the transfer systems more demanding comparisons than the plain recurrent models alone. [Convolutional Neural Networks for Sentence Classification](https://md.research.elamur.ai/free/en/papers/kim-2014-convolutional-neural-networks-sentence-classification/) · [A Structured Self-attentive Sentence Embedding](https://md.research.elamur.ai/free/en/papers/lin-2017-structured-self-attentive-sentence-embedding/)

Yahoo binary test error for transfer systems and task-specific baselines BERT BASE gives the lowest Yahoo test error, and each transfer system improves on the strongest task-specific baseline.

**The numbers**

| System or setting | error % |
| --- | --- |
| RNN baseline | 35.29 |
| LSTM baseline | 32.41 |
| KimCNN | 14.25 |
| Self-attention | 13.16 |
| RCNN | 12.67 |
| BCN+ELMo | 10.24 |
| ULMFiT | 12.20 |
| BERT BASE (this paper) | 8.42 |

In the main Yahoo run, RCNN is the strongest task-specific baseline, with 12.67% test error. The ordinary ULMFiT run reaches 12.20%, BCN+ELMo reaches 10.24%, and BERT BASE reaches 8.42%. The close comparison between RCNN and ULMFiT is informative because the more elementary recurrent baselines produce much higher error. A comparison limited to the latter would give an incomplete account of how much a well-chosen task-specific architecture can already accomplish on the movie reviews.

The Yahoo ranking also supplies a starting point for interpreting interventions. The direct Wikipedia-to-classification route gives BERT a strong result before an additional review-language stage is introduced. ULMFiT starts closer to RCNN and has more scope for a change in procedure to affect its relative standing. ELMo’s fixed feature configuration already ranks ahead of both in the main comparison. Its unfreezing experiment then asks how much of its remaining error is sensitive to letting supervised training change the encoder.

#### Deciding what counts as an improvement

The comparison with earlier Rakuten systems and the locally trained Yahoo baselines supports a practical claim about complete classification pipelines. In each of the main tasks, a transferred system has the lowest reported error. The setups behind those results differ in architecture and training history, so the scores combine the effect of bringing weights from Wikipedia with the way each system uses those weights. The later comparisons narrow the question by retaining a transfer family and changing a particular stage or resource.

The metric also governs what an improvement means. A lower overall error indicates better agreement with the recorded categories across the test examples. It gives no separate score for how a classifier handles a particular star category or a particular kind of difficult review. On Rakuten full, where the possible labels are finer than in the binary task, the aggregate also treats each wrong classification as an error. Its interpretation therefore concerns category agreement, independent of how far an incorrect prediction might be from the recorded category.

Taken together, the main experiments show that the best configuration can vary across tasks and domains. They supply direct baselines for asking the more specific questions the authors pursue next. Those questions concern the value of extra unlabeled in-domain text, the relationship between labeled-data quantity and performance, sensitivity to the pretraining corpus, and the point at which supervised training should be allowed to change the pretrained weights.

### What the ablations show

#### Additional training on unlabeled reviews

The domain adaptation study inserts review-language training between Wikipedia pretraining and supervised classification. Its main comparison combines the method’s standard classification procedure with a different starting point for that procedure. In an adapted run, the source parameters have already been adjusted toward the language of the target reviews. The resulting difference measures the value of that training stage for the particular family, schedule, and dataset.

ULMFiT improves on all of the reported tasks. On Rakuten binary, test error changes from 4.45% to 4.18%, and on Rakuten full it changes from 41.39% to 41.05%. On Yahoo binary, domain-adapted ULMFiT reaches 8.52%, compared with 12.20% in the original configuration. The Yahoo result puts it close to the main BERT BASE run at 8.42%. For ULMFiT in this study, the intermediate stage consistently helps, and its most visible effect appears on the smaller movie-review benchmark.

The authors associate this behavior with ULMFiT’s discriminative fine-tuning and the slanted triangular schedule. Both are plausible contributors because they control how pretrained parameters change during further language training. The experiment varies domain adaptation as a package. A comparison that changed those training rules independently would be needed to measure their individual roles. The repeated improvement across the tested datasets supports the effectiveness of the package used in the study.

BCN+ELMo has a mixed response. On Rakuten binary, the adapted feature source brings test error from 4.77% to 4.65%. On Yahoo binary it brings test error from 10.24% to 8.76%. On Rakuten full, however, the standard result is 42.95% and the adapted result is 43.12%. The same type of intervention therefore helps on both binary tasks while the reported full-task score is slightly worse. This pattern also gives the later supervised unfreezing experiment a point of comparison. Adjusting the language predictor before training the classifier is one way to change the features, while changing it in response to classification errors is another.

For BERT, the tested adaptation schedules improve Rakuten full slightly. The main setting records 40.68% test error, and the settings adapted for 10K and 50K steps reach 40.52% and 40.57%, respectively. Rakuten binary goes in the other direction. The initial 4.68% test error is lower than 4.94% after 10K adaptation steps and lower than 5.52% after 50K steps. The extra steps on this binary benchmark correspond to a worse score under the schedules tested.

On Yahoo binary the reported BERT adaptation result at 10K steps is 10.14%, compared with 8.42% for the main BERT run. The longer adaptation result is unreported for Yahoo. These are the observations behind the authors’ caution about intermediate BERT adaptation on binary sentiment tasks. Their comparison concerns an unlabeled stage added before supervised training. The standard BERT system still uses supervised fine-tuning and turns in the lowest main Yahoo test error. The distinction is essential because a useful update under the classification objective can coexist with a harmful update under the intervening language objectives.

#### Fewer labeled movie reviews

The reduced-label experiment uses the Yahoo binary task and gives the transfer systems a smaller set of labeled examples. The task-specific systems are compared using the large labeled condition, with 3 times as much labeled data. The test outcome of interest is whether source-language training helps a classifier remain competitive under that disadvantage in labeled examples. The reduced condition uses adapted ULMFiT, standard BERT BASE, and BCN+ELMo, each with its own transfer procedure.

BERT BASE reaches 10.14% Yahoo test error, and adapted ULMFiT reaches 10.62%. RCNN, the leading task-specific comparison using the larger labeled collection, is at 12.67%. The two reduced-label transfer runs also beat the remaining task-specific baselines. This makes the benefit concrete. For the tested movie reviews, extra preparation through transfer can lead to fewer test mistakes even when the classifier trains on fewer labeled examples than its task-specific competitor.

BCN+ELMo reaches 13.51% in the reduced setting. That is lower error than KimCNN’s 14.25% with the larger labeled set, while self-attention at 13.16% and RCNN at 12.67% rank ahead of it. The authors describe the ELMo result as comparable. The close ordering gives that characterization a more precise meaning. Its score lies among the stronger task-specific baselines, whereas the reduced-label BERT and adapted ULMFiT settings lead those baselines.

The reduced-label results also quantify the cost of using fewer Yahoo labels within the transfer settings. Standard BERT’s larger labeled run records 8.42%, compared with 10.14% in the reduced setting. Adapted ULMFiT goes from 8.52% with the larger labeled condition to 10.62% with fewer examples. The experiment thus shows an advantage over the task-specific competitors under unequal label budgets, alongside continued benefit from having more labels available to the transferred classifier.

BERT’s reduced-label result happens to be numerically identical to its 10K-step domain adaptation result. The settings answer different questions. One changes the amount of labeled Yahoo training data. The other adds unsupervised review-language training before classification. Their matching reported errors give no reason to equate the two training procedures or the examples on which they succeed.

#### Less Wikipedia text

The pretraining corpus experiment changes a different resource. It asks how much source text the starting language predictor needs while retaining Yahoo binary classification as the outcome. The small source corpus is ja.text8, a 100MB sample from Japanese Wikipedia. The large source is the entire Japanese Wikipedia corpus used by the paper, reported as 2.9GB. The authors describe the smaller corpus as sampled uniformly from Wikipedia, so the comparison continues to draw on the same broad source domain.

BCN+ELMo is almost unchanged across the two configurations. It has 10.24% Yahoo test error with the whole Wikipedia corpus and 10.32% with the 100MB sample. Adapted ULMFiT records 8.52% with the large corpus and 8.57% with the small corpus. The treatment of ULMFiT matters here. Both scores in that size comparison refer to the adapted configuration. The 12.20% result elsewhere in the table describes the unadapted large-corpus system and answers the domain adaptation question.

BERT BASE is substantially more sensitive under the reported conditions. With the large Wikipedia corpus it achieves 8.42% Yahoo test error. With the 100MB sample it reaches 14.26%. That places the small-corpus BERT run behind the leading task-specific Yahoo baselines in the main comparison and behind both of the other small-corpus transfer configurations. The small-corpus experiment thus changes which family is strongest on Yahoo, even though BERT leads when the full Wikipedia corpus is available.

The authors connect this finding to the practical problem of pretraining for [low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/). The comparison shows that a much smaller body of source text can suffice for similar downstream error in the tested ELMo and adapted ULMFiT configurations. It also shows a much larger downstream penalty for BERT under the same change in corpus size. The measured outcome is Yahoo review classification. The tables give a basis for comparing the classifiers’ sensitivity to the change in source data, with the underlying language prediction performance left outside that measurement.

#### Which weights should learn from the labels

The parameter updating experiment changes the familiar configuration of both ELMo and BERT on Yahoo. It starts from pretrained weights in each case. For ELMo, it lets both the encoder and the BCN classifier learn from the sentiment labels. For BERT, it reverses the ordinary procedure and holds the encoder weights fixed, training only the classification layer above the pooled representation.

Unfreezing ELMo changes Yahoo test error from 10.24% to 8.65%. The BCN remains responsible for turning representations into class predictions, but the representation itself can now respond to classification errors. The result approaches the ordinary BERT BASE score of 8.42%. In this setting, the performance of the ELMo family depends materially on whether its encoder remains a fixed input to BCN or becomes part of the supervised training procedure.

Freezing BERT changes Yahoo test error from 8.42% to 10.68%. The fixed setting comes with the computational advantage the authors describe for feature extraction, and its error is still below RCNN’s 12.67% in the standard Yahoo baseline comparison. The result gives two ways to judge the change. Relative to the regular BERT procedure, it costs classification performance. Relative to the strongest task-specific Yahoo baseline, the fixed representation still provides enough information to lead on test error.

Both within-family comparisons favor allowing the pretrained encoder to respond to review labels. They also illustrate why the distinction between kinds of updates matters. BERT performs better on Yahoo when supervised training can modify the encoder, even though the extra unsupervised review-language stage worsens the result. ELMo benefits in the Yahoo experiments from adapting on review text and from letting the supervised classifier alter its features. These are results from separate interventions. A combined setting would require its own measurement to establish how the changes interact.

### Limitations

#### Limits identified by the authors

The authors say that they forgo K-fold validation because of its computational cost. K-fold validation would repeat the evaluation procedure with different parts of the data held out, providing evidence about how results vary with the partition. This study reports its chosen dataset splits. The large Rakuten test sets make the benchmark comparisons substantial, while the effect of changing the development partition remains an open question. The practical cost is understandable in light of the repeated training involved in the pretraining and adaptation comparisons.

The authors also limit the demonstrated result to the Japanese review classification tasks they test. They identify [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/), [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/), and [aspect-based sentiment analysis](https://md.research.elamur.ai/free/en/papers/pontiki-2016-semeval-2016-task-5-aspect/) as directions for future work. These tasks place different demands on a system. A whole-review classifier returns a category for the entire text, while aspect-based sentiment asks about a particular entity, feature, or subject of the opinion. The review results give an empirical starting point for those questions. Their outcomes remain outside the study’s evidence.

The paper describes the work as an ongoing effort and anticipates additional benchmarks and baselines. Its strongest conclusions refer to the settings actually compared. For example, ULMFiT improves after the intermediate domain stage in all of the reported datasets. That consistency belongs to the experiment’s particular text sources and adaptation schedules. The authors’ caution about binary BERT adaptation likewise comes from the tested binary review tasks and the schedules available for them.

#### Limits of the experimental comparisons

The shared source domain makes the transfer comparison easier to interpret, yet several details vary across families. BERT reads SentencePiece units and starts from Kikuta’s pretrained weights. The word-based preparation follows a different segmentation route. The families use different objectives and rules for updating their parameters. Their final ranking compares these complete configurations. It cannot show how they would rank with the input representation, amount of training, and update policy all held constant.

The choice of Japanese BERT illustrates a related limit. The authors make a reasoned choice based on their account of what the multilingual implementation does with Japanese writing. The experiments evaluating sentiment use the chosen Japanese BERT setup. A direct comparison involving both BERT variants would be needed to estimate the size of the effect from switching between them. The paper’s discussion establishes why the authors chose the Japanese weights, while its error tables evaluate the result of using those weights.

The reduced-label experiment compares the amount of supervised data supplied to the competing systems. The transferred systems can also draw on the source corpus, and adapted ULMFiT has an intervening training stage on review text. The practical finding is about the extent to which that preparation can substitute for labeled examples. It gives no estimate of equal-budget performance if the budget counts all text or all computation. The hardware descriptions and classifier errors are insufficient to turn the reported experiment into a comparison of total training cost.

The changes in source-corpus size are informative at the two sizes and the one downstream task evaluated. They leave the transition between those sizes open. For BERT BASE, the paper shows better Yahoo classification with the larger source corpus. The result does not establish a minimum amount of text for useful BERT pretraining, nor does it isolate which source objective contributes to the difference. The comparison also cannot establish that ELMo and ULMFiT would maintain similar results on every task. Their small-corpus scores apply to the reported Yahoo configurations, including review adaptation for ULMFiT.

The error tables give point estimates. There are no accompanying measures of variability across independent training runs, and the overall score does not break the outcome down by class. A small ordering in the table is therefore best read as an ordering of the reported runs. For instance, the close adapted ULMFiT and standard BERT scores on Yahoo indicate similar observed aggregate error. More detailed evidence would be needed to tell whether those systems tend to make the same mistakes or whether their errors fall on different kinds of reviews.

Finally, the ablations establish the effects of changing stages and update choices within the settings the authors ran. The causal explanation can be narrower than the interpretation proposed for it. Adding domain adaptation changes both the text seen during language training and the training history of the system. Unfreezing an encoder changes which weights the sentiment loss can update. These comparisons are enough to establish how the variants scored. Isolating the role of a particular schedule, source objective, or representation would require additional controlled comparisons.

### What came after

The later works that cite the study bring it into a survey of pretraining, research on sentiment annotation for another language, and research on topic classification. The connections differ in scope. The survey shares the paper’s interest in pretrained representations. The Luxembourgish work shares the sentiment task and foregrounds annotation. The Arabic work moves to a different kind of text classification. The citation relationships establish these points of contact, while the specific role assigned to the Japanese experiments in each work remains open.

[Pre-trained Models for Natural Language Processing: A Survey](https://md.research.elamur.ai/free/en/papers/qiu-2020-pre-trained-models-natural-language/) (2020) takes up pretraining at the level of a field survey. The Japanese study fits that subject as an application in which the usefulness of a pretrained representation is tested under several ways of preparing it for a downstream classifier. It compares fixed feature extraction, supervised encoder updates, and an additional unlabeled domain stage. Those design choices make the study an example of how a broad idea about reuse becomes a concrete classification procedure. The survey’s subject and citation establish that connection. They leave open which of the Japanese comparisons it discusses in detail.

[An Annotation Framework for Luxembourgish Sentiment Analysis](https://md.research.elamur.ai/free/en/papers/sirajzade-2020-annotation-framework-luxembourgish-sentiment-analysis/) (2020) takes up sentiment through the problem of annotation. The question in the Japanese study is how to make effective use of the labeled reviews a classifier receives, including when their number is reduced. An annotation framework concerns how labels for a sentiment task are specified and assigned. The two works therefore meet at the labeled examples that define a classification task, from the perspectives of using those examples and producing them. The citation places the Japanese paper in the later work’s account of sentiment research. Its scope leaves the use of any Japanese training procedure or dataset undetermined.

[Arabic Topic Classification in the Generative and AutoML Era](https://md.research.elamur.ai/free/en/papers/albared-2023-arabic-topic-classification-generative-automl/) (2023) takes up classification of Arabic text by topic, with generative approaches and automated machine learning in its stated scope. Its point of contact with the Japanese study is text classification across languages. The desired prediction changes from how a review is rated to what a text is about. That change matters because the usefulness of a representation depends on the evidence the target categories require. The citation connects the Japanese transfer study to this later classification setting, while leaving any adoption of its adaptation recipe or its evaluation procedure unspecified.

## Cite

Cite as Enkhbold Bataa and Joshua Wu. 2019. An Investigation of Transfer Learning-Based Sentiment Analysis in Japanese. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/p19-1458](https://doi.org/10.18653/v1/p19-1458)

```bibtex
@inproceedings{bataa2019investigation,
  title = {{An Investigation of Transfer Learning-Based Sentiment Analysis in Japanese}},
  author = {Enkhbold Bataa and Joshua Wu},
  booktitle = {Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1458},
  url = {https://doi.org/10.18653/v1/p19-1458}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
