---
title: "BERT Implementation for Detecting Adverse Drug Effects"
description: "How Gusev and colleagues used Russian BERT to spot adverse drug reaction mentions in tweets, with an F-score of 0.51 in the shared task."
canonical: "https://research.elamur.ai/free/en/papers/gusev-2020-bert-implementation-detecting-adverse-drug/"
---
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/gusev-2020-bert-implementation-detecting-adverse-drug/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / BERT Implementation for Detecting Adverse Drug Effects Mentions in Russian

# BERT Implementation for Detecting Adverse Drug Effects Mentions in Russian

Paper · 2020 · Andrey Gusev, Anna Kuznetsova, Anna Polyanskaya et al.

**Authors:** Andrey Gusev, Anna Kuznetsova, Anna Polyanskaya and Egor Yatsishin · **Year:** 2020 · **Venue:** Proceedings of the Fifth Social Media Mining for Health Applications Workshop & Shared Task · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the Fifth Social Media Mining for Health Applications Workshop & Shared Task · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2020.smm4h-1.7/)
- [PDF](https://aclanthology.org/2020.smm4h-1.7.pdf)

## Summary

A tweet can describe an unwanted effect of taking a drug in a few informal words. Recognizing such reports automatically means reading through misspellings, slang, emojis, and other features of everyday posting. Gusev and colleagues studied this problem in the Russian part of the Social Media Mining for Health shared task. The organizers supplied tweets marked for the presence or absence of an adverse drug reaction mention. The system had to assign that label to an entire tweet. Positive examples were scarce, so the experiment tested how well a classifier could find them amid a much larger number of negative examples.

The authors compared conventional [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) methods with Russian adaptations of [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/). They built their submission around Conversational RuBERT, a version adapted to the language of subtitles. To address the class imbalance, they divided the negative training examples into groups and paired each group with the positive examples. A separate classifier learned from each resulting set. Logistic regression then combined the scores from those classifiers into a single decision. This arrangement allowed the ensemble to learn from different negative examples while giving the scarce positive examples a larger share of each classifier’s training data.

The submitted ensemble used light text cleaning and kept punctuation. It ranked first in the Russian subtask with a test F-score of 0.51. The conclusion reports test precision of 0.45 and recall of 0.60 for that result. The authors also found that reducing words to their dictionary forms or stems, or deleting punctuation, hurt validation performance in their preprocessing experiments. Adding manually labeled drug reviews failed to improve the results. The reviews supplied relevant examples, but their language differed from that of tweets. The authors made their code public.

The result concerns the detection of mentions in short, noisy posts. It shows that the way a classifier encounters the scarce positive examples, the way its predictions are combined, and the details preserved in its input can all matter for this task. The paper also identifies questionable labels in the training data, a reminder that the score measures agreement with human judgments about what a tweet says.

## Deep dive: BERT Implementation for Detecting Adverse Drug Effects Mentions in Russian

How Gusev and colleagues used Russian BERT to spot adverse drug reaction mentions in tweets, with an F-score of 0.51 in the shared task. · about 32 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

#### From a post to a decision about a mention

The study starts with a distinction between the subject of a post and what the post says about that subject. A tweet about a drug might discuss its price or express an opinion about it. For the Russian shared task, the relevant question was whether the tweet mentions an adverse drug reaction, abbreviated ADR. A topic detector that merely recognizes talk about medication would therefore answer a broader question than the one the organizers posed. The task belongs to [information extraction](https://md.research.elamur.ai/free/en/topics/information-extraction/) in the sense that it asks a system to find a particular kind of information in free text. Its output is a judgment about the post as a whole.

That output is deliberately compact. Each post receives a positive or negative label. A positive label says that a mention occurs somewhere in the text. The output format has no field for the words that express the reaction or for the drug to which a reader would attribute it. A classifier can thus receive credit for detecting the mention without giving a separate account of how it understood the sentence. For a reader interpreting the experiments, the unit of prediction is the tweet, and the unit of evaluation is the agreement between a predicted tweet label and the organizers’ annotation.

This framing also separates the textual task from the question of medical causality. If a writer presents an experience as a reaction to taking a drug, the text can carry the kind of mention the task seeks. Determining whether a drug caused the experience would require evidence beyond the post and its binary label. The paper’s practical concern is the earlier step of finding relevant reports in written material. That step is demanding even when the intended output is only a yes or no decision, because a post can use loose wording and leave part of its meaning implicit.

The organizers supplied raw tweets. A classifier therefore met the language as users wrote it, with inconsistent spelling, informal vocabulary, abbreviations, expressive symbols, and platform conventions such as hashtags and usernames. Some variation can distract a learner. A username can have a different spelling in every post and still play a similar role. Other variation carries meaning. An unusual spelling can emphasize a word, and punctuation can signal a reaction or mark how words belong together. The authors’ preprocessing experiments grew out of this distinction. They had to decide which surface details could be collapsed into a common form and which were worth preserving.

#### Why the rare label changes the experiment

The positive label is uncommon in the supplied data. That creates a different problem from classifying a collection in which both labels are encountered about equally often. A learner that habitually chooses the common class can agree with many annotations and still overlook the posts the task was designed to retrieve. The authors therefore organized their comparisons around the positive class. Identifying a large share of the annotated mentions matters, as does keeping irrelevant posts out of the set flagged for review.

The imbalance also shapes what each training example can teach. A negative tweet may be easy to exclude because its content gives little reason to infer an adverse reaction. Other negative tweets may resemble positive ones because they name medications or discuss health experiences. Both receive the same negative label. Positive tweets likewise need only share the property marked by the annotation, so they can express it in different ways. Faced with very few positive texts relative to the rest, the authors explored changes to the training data as well as changes to the classifier. They could add examples from drug reviews or rebalance what each classifier saw by drawing on different portions of the available negative tweets.

The Russian collection mattered to the design of the study. The organizers had included a distinct set of Russian tweets for the first time in this shared task, according to the authors. That made the Russian data a setting in which to try an encoder already adapted to the language, while also testing preprocessing tools designed for Russian words. The paper treats morphology and punctuation as potential sources of useful information. It also takes seriously the gap between Russian as found in edited material and the Russian of short posts, a gap that motivated the comparison between the general Russian BERT adaptation and its conversational counterpart.

#### The earlier work the authors draw on

The paper gives a compact account of its predecessors. Its text cleaning takes part of its starting point from the earlier shared-task work of Ellendorff and colleagues. Its main classifier belongs to the BERT line of work and uses the Russian adaptations described by the authors. The distinction between those adaptations is principally a distinction in the text used to prepare them. RuBERT draws on Russian Wikipedia and news material. The conversational version undergoes further adaptation using subtitles. Those are starting resources for the supervised task, whose labeled examples come from the organizers’ tweets.

Earlier work also enters through the authors’ explanation of why preserving form might matter. They cite research on BERT’s ability to handle grammatical dependencies. That idea has a concrete implication for their experiment. If a Russian word’s ending or the punctuation around a phrase helps indicate how words relate, converting the text into a list of simplified forms changes information the encoder could use. The paper tests several of those changes directly. It uses prior work on syntax to interpret the outcome of those tests. [Assessing BERT’s Syntactic Abilities](https://md.research.elamur.ai/free/en/papers/goldberg-2019-assessing-bert-s-syntactic-abilities/)

The study also keeps a conventional feature-based route in view. A classifier can learn from a representation that gives each tweet a set of weights for the terms it contains. That approach makes a different use of the input from a contextual encoder, which represents a token in relation to the other tokens in the same sequence. Comparing the two on the same task gives the authors a starting point for deciding where to spend their experimental effort. It also makes the paper a comparison of ways to represent and classify tweets, alongside its comparison of ways to clean them.

### The method, step by step

#### The path from a tweet to an ensemble decision

The submitted system can be understood as a set of readers trained on different selections of the same collection. Each reader starts from Conversational RuBERT and learns to score whether a tweet has the positive label. The readers all see the available positive training tweets. Each sees a different portion of the negative training tweets. When they encounter a tweet to classify, each produces a score for it. A separate logistic regression component learns how to use those scores together.

The authors vary several parts of this process in their experiments. The final version takes lightly processed text and retains punctuation as tokens. A classifier trained without the ensemble gives them a way to compare an individual Conversational RuBERT system with the combined approach. They also consider voting as a simpler way to combine the separate classifiers. The distinctive feature of the chosen submission is that it uses the component probabilities as inputs to a learned combiner.

Training and using the submitted ensemble The steps in order.

#### Preparing the tweet text

The cleaning procedure starts with [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/), the division of a text into units that a later stage can process. The authors used CrazyTokenizer from the RedditScore package with a Russian spaCy tokenizer as its basis. This preprocessing tool operates on the tweet as text. It determines, for example, whether punctuation is available as its own unit in the processed input. The paper evaluates choices at that level and gives the names of the tools it used. It leaves the internal token sequence produced by the BERT encoder’s own input processing undescribed.

The authors lower-cased ordinary text while exempting words written entirely in capitals. They give the Russian abbreviation АД for antidepressants as a reason to keep such a distinction. All-capital writing can carry lexical information in a collection where short forms occur. The pipeline also standardized the Russian letter ё to е. These operations reduce the number of spellings the system has to contend with while preserving a distinction the authors judged useful for the domain.

Web addresses, usernames, and hashtags each became a dedicated placeholder. This replaces a potentially distinctive string with a token that signals the type of material that was present. For instance, the system can see that there was a username at a particular point in a tweet. Its input no longer carries the handle itself. Hashtag replacement makes a similar trade between retaining a structural trace and retaining the original string. Numbers became a common number token, and units of measure such as those for kilograms and milliliters became a common measure token. These choices make the processing specific to the sort of text and subject matter the authors expected to encounter.

Emojis received a different treatment. The pipeline mapped them to categories associated with positive affect, negative affect, or health. The health-related category was called neutral in the pipeline. The rationale was to keep a coarse version of the semantic information the symbol could contribute. Several visually different emojis can serve a similar function in a tweet. Giving them the same representation lets the classifier encounter that shared function more consistently, at the cost of distinctions among individual symbols. The paper describes this grouping as part of the preprocessing package, and the evaluation tests the package in combination with other choices.

The authors also normalized runs of 3 or more copies of the same letter to 1 copy, deleted line breaks, and removed stopwords. Stopwords here are words the pipeline discards according to a list. The authors began with the Russian NLTK list and added some colloquial forms, including кароч, типа, and прост. Repeated letters and colloquial fillers illustrate two different decisions about informal language. In one case, the word remains in a more standardized spelling. In the other, a listed token is removed. The best-performing preprocessing setup is called light relative to the alternatives the authors tested, even though it includes several such transformations.

#### Deciding how much word form to keep

The authors prepared versions of the data that differed in their treatment of punctuation and word forms. Punctuation could remain as tokens or be deleted. [Lemmatization](https://md.research.elamur.ai/free/en/concepts/lemmatization/) maps an inflected word to a dictionary form when the analyzer can identify it. [Stemming](https://md.research.elamur.ai/free/en/concepts/stemming/) reduces words to stems through a normalization procedure. Both can make different forms look alike, but they do so with different objectives. A lemma is meant to identify a lexical entry. A stem is a normalized string intended to group related forms. Either can erase distinctions conveyed by the original ending.

The lemmatizer was PyMorphy2. The authors preferred it to Mystem because of processing time on their Windows setup and because they favored its handling of unfamiliar words. Drug names and medical terms featured among the unfamiliar forms they cared about. For stemming they used the Russian Snowball stemmer through NLTK. They prepared different versions of the data for the experiments to see whether these reductions helped. Keeping the tools and variants distinct matters because a result about a preprocessing pipeline is also a result about the actual transformations applied by its software.

One version retains punctuation and leaves words in their inflected forms after the common cleaning steps. This is the version used for the ensemble described in the conclusion. Its input still contains the placeholders and other normalizations introduced earlier. In particular, retaining word form in this experiment means leaving out stemming and lemmatization. It is a narrower claim than preserving every feature of the original tweets. The experiments also include a genuinely unprocessed condition, which provides a comparison for the common cleaning steps taken together.

#### Choosing how to represent the post

The conventional classifiers learned from [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/) vectors. A vector in this setting represents a tweet by weights associated with its terms. The weighting uses the occurrence of a term in the text and its prevalence across texts. It gives the classifier direct access to vocabulary patterns in the collection. The authors trained a linear support vector machine, logistic regression, and a gradient boosting machine with this representation on the original data. Each learned the same binary task from the weighted features.

The three conventional approaches make decisions in different ways. The linear support vector machine learns a separating boundary in the weighted term space. Logistic regression uses the features to estimate support for a label. Gradient boosting builds its decision from successively fitted components. For the experiment, their shared input representation is the important point. A comparison among these approaches explores how the choice of classifier affects performance when all use TF-IDF on the original tweets. The later use of logistic regression in the ensemble is a separate experiment with different inputs.

The neural route starts with a [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/) encoder. In BERT, a representation of a token can use its surroundings in both directions. This allows the same word to have a representation that reflects the rest of the tweet. For a classification task about a reaction mention, that property is pertinent because the role of a word can depend on the phrase in which it occurs. The study uses this encoder as a starting point for supervised learning on labels, with the decision trained specifically for the positive and negative categories supplied by the organizers.

The authors compare RuBERT with Conversational RuBERT. They describe RuBERT as cased, with 12 layers, a hidden width of 768, 12 attention heads, and 180M parameters. Cased means that its input can preserve distinctions in capitalization. Layers are successive stages of computation, and the hidden width describes the size of the internal representation passed through the encoder. Attention heads are parallel ways of relating positions in a sequence. Parameters are the values learned during training. The paper gives the same architectural specifications for the conversational version, so the comparison changes the history of adaptation while holding these reported dimensions fixed.

RuBERT was initialized from multilingual BERT and adapted using Russian Wikipedia and news. Conversational RuBERT starts from RuBERT and receives further [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) on subtitles. Fine-tuning means continuing training from learned parameters so they can better fit a new body of text or a new task. The subtitle stage and the supervised tweet stage serve different purposes. The former exposes the encoder to a different kind of Russian. The latter teaches the classifier to use the tweet labels for the decision the organizers require. The subtitle collection was [OpenSubtitles2016](https://md.research.elamur.ai/free/en/papers/lison-2016-opensubtitles2016-extracting-large-parallel-corpora/).

#### Giving the positive examples more influence

The imbalance procedure changes the composition of the data seen by an individual classifier. The authors split the negative class into equal-sized groups. For each of those groups, they create a training set containing its negative tweets together with the positive samples. In their notation, N is the number of negative groups and also the number of classifiers they train for the ensemble. Individual training sets have a negative share close to 0.5, according to the method description. The share describes the training sets constructed by the procedure. The originally collected tweet data have a much larger negative majority.

This is an undersampling procedure because each classifier uses only part of the negative class. Across the ensemble the negative groups differ, allowing the combined system to draw on the negative collection through its members. The positive class provides a common set of examples across all of them. Accordingly, the separate classifiers can learn from different contrasts. A positive tweet that appears alongside one kind of negative post in one training set may be paired with a different range of negative posts in another. This is how the design changes the learning conditions without requiring additional positive tweets.

The ConvUnder configuration uses Conversational RuBERT with undersampling and a voting combination. A vote treats the predicted class as the thing each member contributes. Under majority voting, the final choice follows the class supported by most members. ConvLogReg uses undersampling as well, then applies logistic regression to the members’ probability predictions. This procedure is called stacking because the predictions from the first stage become the inputs to a second stage. The numeric scores give the combiner access to the strength of each member’s prediction. Majority voting works with the decisions those scores produce.

Logistic regression has two roles across the paper. The original standalone baseline receives TF-IDF features describing the words in a tweet. In ConvLogReg, it receives scores from classifiers that have already read the tweet. A weak score for the standalone baseline therefore says little by itself about whether logistic regression can combine the ensemble. The latter problem begins with features that encode the members’ judgments. The paper explains the inputs to the combiner and its choice of classifier. It does not specify how the training predictions for the combiner were generated.

#### Choosing settings and preparing the submissions

After the initial comparisons, the authors used cross-validation to look for suitable settings for Conversational RuBERT. Cross-validation uses different partitions of data for fitting and checking candidate settings. The prose reports a batch size of 32, a dropout probability of 0.4 for layers outside BERT, and a learning rate of 10⁻⁵ for further experiments. A batch size counts the examples collected for a training update. Dropout temporarily suppresses parts of a network during training as a form of regularization. The learning rate controls the scale of the updates. Another batch size appears in the configuration results, so the prose settings cannot be assumed to describe every reported run.

An epoch is a pass through the data used to train a classifier. The authors used relatively few epochs in the undersampling experiments because they regarded overfitting as a risk. Each member trains on its own reduced set, with positives reused across members. The number of passes determines how often a given member sees examples from its group. The paper’s validation results distinguish between performance at the final epoch and the best result obtained during training. This distinction matters because a good score encountered partway through training may fall before the run ends.

For the final ensemble the authors report 6 negative splits. They submitted a standalone Conv classifier for comparison as well. The name Conv denotes Conversational RuBERT in the paper’s configuration scheme. The submitted ensemble used the lightly normalized text with punctuation retained, and the authors publicly released the implementation. The main design choices are thus available at the level of the stages that turn text into predictions. The reported settings and results supply a record of selected experiments, with some training details left open.

### Experiments and results

#### The tweet splits and the measure of success

The shared-task data comprised 7,612 training tweets, 1,522 validation tweets, and 1,903 test tweets. The training data supply examples for fitting the classifiers. The validation data give the authors a way to compare representations, preprocessing choices, and training configurations. The test data serve to evaluate the final submissions. The paper reports 666 tweets with the affirmative annotation in its description of the imbalance and describes the class proportions as 9% positive and 91% negative. Its dataset account introduces that count alongside the split sizes without listing separate positive counts for each split.

The reported F-score is for the positive class. Precision concerns the tweets that the system flags. It asks how many of those flags agree with the positive annotation. Recall concerns the tweets annotated as positive and asks how many of them the system retrieves. These measures view errors from different sides. A system that flags many posts can retrieve more real mentions but also burden the result with false alarms. A stringent system can produce a cleaner list of flags while overlooking positive cases. The F-score brings precision and recall together, giving the authors a single criterion for comparing configurations.

Validation and test measurements answer different questions. A good validation result tells the authors that a candidate worked on the examples used to guide their choices. The values selected after comparing settings depend on that process. The test score shows how a submitted configuration performed on the shared task’s test split. Even when the reported values coincide, a validation score and a test score remain separate observations. This distinction is especially important because the paper reports the same headline F-score for a validation configuration and for the winning test result.

#### The original tweets and the baseline comparison

The initial comparison used original tweets without the custom preprocessing pipeline. Among the TF-IDF classifiers, the gradient boosting machine reached a validation F-score of 0.29, the linear support vector machine reached 0.28, and standalone logistic regression reached 0.07. These numbers measure positive-class retrieval performance on the validation split. They say how those combinations of features and classifiers behaved in this study. The authors dropped the conventional route after this comparison and concentrated on the BERT alternatives.

For the standalone BERT configurations, the configuration table gives RuBERT a best-epoch validation F-score of 0.37 and Conversational RuBERT 0.47. Their last-epoch entries are 0.36 and 0.45, respectively. The ordering is the same whichever of those checkpoint summaries is used. The authors took the conversational variant forward. Because the table reports the best observed epoch as well as the final one, the following comparison uses the best-epoch score for the standalone BERT entries and the validation figures reported for the conventional baselines.

Classifiers on the original Russian tweets, validation F-score Conversational RuBERT leads the reported comparison, ahead of the conventional classifiers.

**The numbers**

| System or setting | F-score |
| --- | --- |
| TF-IDF and logistic regression | 0.07 |
| TF-IDF and linear support vector machine | 0.28 |
| TF-IDF and gradient boosting | 0.29 |
| RuBERT, best epoch | 0.37 |
| Conversational RuBERT, best epoch (this paper) | 0.47 |

The chart compares the approaches at the level at which the authors tried them. The BERT classifiers come with a prior training history that the TF-IDF baselines do not share, and the way the variants represent text differs. The paper’s comparison is consequently useful as a choice among complete classification approaches. It provides a weaker basis for isolating the contribution of any particular architectural property. The gain is visible on the validation split even when the BERT runs are read at their final checkpoints, so the decision to continue with them did not depend solely on selecting their peak epochs.

The conventional baselines also help in reading the ensemble. The standalone logistic regression score of 0.07 concerns the binary label learned from weighted term features. Once logistic regression receives predictions from separately trained Conversational RuBERT classifiers, it is learning a different mapping. Its performance in the latter role shows that the success of this simple classifier depends strongly on the representation supplied to it. The paper explored both uses because training a first-stage classifier and combining existing predictions are separate problems.

#### Trying supplementary examples from drug reviews

The authors supplemented the tweet collection with texts from RuDReC, a Russian drug-review corpus. They describe manually labeling about 1,800 reviews and report 627 positive and 1195 negative labels in that supplementary collection. The idea was to expose the classifier to more relevant examples, particularly to examples of the scarce positive category. Reviews and tweets both discuss drugs, and the authors found much of their vocabulary similar. The two forms of writing offered enough overlap to make the trial reasonable, while leaving open how much their differences would matter.

Their comparison of the text sources identified differences in subject emphasis and style. The reviews gave more attention to the cost of medication and used more words conveying that a product was expensive. They were also more grammatical in the authors’ assessment, with less slang and fewer shortened forms. Those observations matter to the augmentation experiment because the evaluation still takes place on tweets. A richer collection of positive examples can help only to the extent that what the learner takes from them carries over to the target posts.

The added texts produced no visible improvement in the reported experiments. The authors report a decrease of 0.05 in F-score in their discussion of the extended-data trials. That figure describes the drop they observed when trying additional data. The paper gives no detailed breakdown assigning it to a specific added-data recipe or a separately identified split in that paragraph. The authors interpret the result as evidence that the linguistic differences between the two sources may be greater than their preliminary comparison suggested. The experiment establishes the outcome of the trial. The explanation of the drop remains their interpretation.

#### Preprocessing on the same source of tweets

The preprocessing table compares standalone RuBERT and Conversational RuBERT on the main collection. For each setting, the chosen treatment is applied to both training and validation input. The table presents last-epoch and best-epoch validation F-scores. For RuBERT, the original text yields 0.41 at the best epoch in this table, and light preprocessing with punctuation retained yields 0.37. For Conversational RuBERT, the corresponding entries are 0.45 and 0.47. The light pipeline’s effect in these two comparisons therefore depends on the encoder.

Conversational RuBERT with original or lightly cleaned Russian tweets, best-epoch validation F-score Light cleaning with punctuation and inflected words preserved gives the higher score.

**The numbers**

| System or setting | F-score |
| --- | --- |
| Original tweets | 0.45 |
| Light cleaning, punctuation retained (this paper) | 0.47 |

The preprocessing table is a separate set of runs from the earlier configuration table. Its raw-text best-epoch figures differ from the standalone values in the initial comparison. Both comparisons are worth keeping in their own experimental context. The preprocessing table addresses what happens when the text passed to a given encoder changes. The configuration table compares training and combination approaches and records several epoch settings. An isolated number taken from each table would conceal the reason each experiment was run.

The strongest best-epoch Conversational RuBERT entry in the preprocessing comparison is 0.47. The table’s corresponding final-epoch score is 0.45. On the unprocessed tweets in this comparison, Conversational RuBERT reaches 0.45 at its best epoch and 0.42 at its last epoch. For RuBERT, the best-epoch raw result of 0.41 is accompanied by a final-epoch result of 0.40. These readings illustrate why the paper includes both checkpoints. A pipeline may change the best score reached during training and also how much of that performance is present at the end.

#### The ensemble and the shared-task submission

The ensemble experiments compared ordinary single-classifier training with the undersampled configurations. The names distinguish the separate decisions being made in the experiments. RuBERT and Conv are standalone systems based on their respective encoders. ConvUnder trains several conversational classifiers on the rebalanced subsets and combines their decisions through voting. ConvLogReg uses the rebalancing procedure and learns the combination from the probability scores. The authors report that the logistic regression ensemble improved F-score by 0.05 in their ensemble comparison with systems trained without an ensemble.

The configuration table is a validation table. Its ConvLogReg entries reach a validation F-score of 0.51. The paper also gives final-epoch and best-epoch scores for different training durations. Its account indicates that the authors selected the configuration using 6 splits and kept the number of training epochs small. That selection incorporates both the way the negative examples were partitioned and the way member predictions were combined. The resulting validation score therefore pertains to the configured system, including its training choices.

The authors report three final submissions, including the standalone Conv comparison. The headline result is the ConvLogReg ensemble’s test F-score of 0.51, which the authors say placed it first in the Russian subtask. They give test precision of 0.45 and recall of 0.60 in the conclusion. The submission table presents validation F-score and test precision, recall, and F-score, but it does not display a value of 0.60. The recall of 0.60 is thus specifically the value stated in the conclusion. The paper leaves the reporting difference unresolved.

The strongest reported test score should be read together with what it measures. An F-score of 0.51 represents the balance of two kinds of agreement with the positive annotations on held-out tweets. The precision reported in the conclusion shows that positive flags include many tweets outside that annotated class. The recall shows that some annotated mentions still escape detection. The shared-task ranking establishes how the submission placed in the comparison described by the authors. It answers a different question from whether the amount of remaining error would be acceptable in another use of the system.

### What the ablations show

#### Punctuation and original word forms

The clearest component comparison alters the preprocessing while leaving the task and its main data source in place. The authors trained the standalone encoders on versions of the tweets that retained or deleted punctuation and that applied or omitted reductions of word forms. They used the matching preprocessing on validation tweets. Accordingly, these runs answer a practical question about which representation the classifiers should learn to use. They are different from a test that would remove a feature only at prediction time and present a trained classifier with an unfamiliar input.

For the conversational encoder, the best reported setting preserves punctuation and avoids stemming and lemmatization. The more aggressive variants in the table fall below that setting. Retaining punctuation also leaves the original inflected word forms available when neither word reduction is applied. Together those choices preserve a substantial part of the structure of the sentence while still allowing the shared cleaning operations. The strongest result therefore supports selective normalization in this setup. The evidence for each individual cleaning operation is more limited, because several of those operations enter together.

The authors give punctuation two possible roles. It can help indicate the grammatical relationships within a sentence, and it can express part of the writer’s attitude or emphasis. Their examples include an opening parenthesis used to signal sadness and repeated exclamation marks used to convey importance. Removing those marks can discard the content they signal as well as the boundaries or relations they help make visible. This interpretation is plausible given the functions the authors describe. The table measures the aggregate effect of changing the input, without assigning errors to particular marks or establishing which role contributes most.

The authors make a related argument about [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/). An inflected form can provide information about how its word fits with the rest of the sentence. They emphasize that Russian word order has some freedom and that grammatical relations are frequently carried by morphology and punctuation. Bringing different inflected forms together can help a system recognize a common vocabulary item, while obscuring information about how that item participates in a particular statement. A contextual encoder can potentially benefit from the latter information. In these experiments, simplifying the forms was less successful than letting the encoder see the inflections.

The raw-text comparison qualifies the lesson. Light cleaning improves the best-epoch validation score for Conversational RuBERT in the preprocessing table. For RuBERT, the best-epoch raw-text entry is higher than the light-cleaning entry. The authors’ final choice concerns the conversational encoder, and their strongest textual conclusion is about retaining certain cues when using it. The difference between the two encoders suggests that the benefit of a preprocessing package can depend on what the encoder learned before the classification experiment.

#### Rebalancing and combining predictions

The architecture comparisons change how the negative examples are distributed and how the resulting predictions are merged. The single Conv classifier gives a baseline for the ensemble variants. ConvUnder supplies evidence from rebalanced training sets and a straightforward voting rule. ConvLogReg supplies evidence from rebalanced training sets and a combiner fitted to the member probabilities. The strongest validation result appears with the learned combination. The reported improvement of 0.05 concerns the ensemble compared with the systems without an ensemble in the authors’ experiment.

These comparisons support the complete recipe more directly than any isolated account of its gain. Moving from a standalone classifier to ConvLogReg changes the class mixture seen during training, the number of fitted classifiers, and the decision procedure applied at the end. A comparison between the two ensemble variants focuses more closely on how predictions are combined, but the configuration results also span training durations and settings. The paper establishes which reported configuration performed best. It leaves the separate contributions of rebalancing, member diversity, and logistic regression only partly resolved.

There is a concrete reason the alternatives could behave differently. A voting system makes each member’s decision count as a vote. With a learned combiner, scores of different strengths enter the decision, and a fitted weight can give different influence to different inputs. A probability score may carry useful information that is lost when it is reduced to a class decision. The experiments show that the version using the probabilities worked well here. They give no member-level analysis to show whether its advantage came from handling borderline cases, favoring particular members, or another pattern in their scores.

The best- and last-epoch entries give another kind of analysis. They let the reader see where a configuration’s performance at the end of training differs from the best validation performance it attained. That makes the authors’ decision to use few epochs easier to interpret. A large number of passes was a concern because the members train on reduced samples. The entries illustrate that the strongest result in a run may occur before the last epoch. They do not by themselves identify a single stopping point that would transfer to every member or dataset.

#### Additional data and the source of the examples

Adding the RuDReC reviews is a data-source comparison. The basic question is whether relevant annotations from another form of writing compensate for the scarcity of positive tweet labels. The reported result gives an empirical answer for the authors’ attempt. The extension failed to improve the tweet classification results. The authors’ accompanying lexical and stylistic observations explain why they regard this as a plausible outcome, even though the reviews and tweets discuss related subject matter.

The trial also helps distinguish what the authors learned about quantity from what they learned about source. They tested a collection of extra examples that changed both at once. Adding reviews increased the training material and changed its mixture of linguistic styles. The reported drop cannot isolate those effects. Its value is that it gives the authors a comparison with the other way they addressed scarcity. The ensemble reorganized the examples from the target collection. The review experiment brought in examples from a different collection. The former produced the stronger reported result in the setups they tried.

### Limitations

#### Limits the authors identify

The authors found problems in the training annotations. Some labels seemed debatable to them, and some appeared plainly erroneous. A training label functions as supervision, so a disputed or incorrect label can give a classifier misleading feedback about the decision it is supposed to learn. The paper raises this as a possible influence on performance. It gives no count of the problematic labels and presents no rerun after correcting them, leaving the size and direction of that influence open.

Debatable and erroneous annotations also pose somewhat different problems. An erroneous annotation can put a clear case in the wrong class. A debatable one can reveal that the boundary of the task is difficult to apply to informal text. A binary label makes both kinds of disagreement look alike to the learning procedure. The paper’s observation gives a reason to read some classification errors in light of the decisions made during annotation. Its report concerns problems the authors noticed in training, and provides no basis for estimating the frequency of disputed labels in validation or test.

The authors recognize differences between the added reviews and the target tweets. Price talk is more prominent in the reviews, and the two sources differ in how they use grammar, slang, and shortened forms. They propose that the apparent mismatch was understated in their initial comparison. This limits what can be inferred from the failure of the extension. The results concern the review data and use of those data reported in the paper. The penalty from changing genre is an explanation the authors favor, with no separate experiment quantifying how much of the result each difference accounts for.

The authors also flag overfitting during undersampled training. Their response is to use a small number of epochs. Since an individual member sees only one selection of negative posts, prolonged training can make its behavior depend closely on that selection. Repeated access to the positive examples is useful for giving those examples more influence. It can also make the member fit their particular wording closely. The paper gives validation figures at different training stages, but does not follow the behavior of particular samples over the course of training.

#### Limits visible in the experimental design

The evaluation is bounded by the shared-task collection. Training, selection, and test all concern Russian tweets labeled for the same binary decision. The supplementary reviews were tried as additional training material. They did not serve as a separate test of performance on reviews. The study therefore gives a benchmark result on a defined tweet task. Its score cannot by itself describe how frequently the system would retrieve mentions in another collection, where the writing, the range of drugs discussed, or the prevalence of the affirmative label could differ.

The output format likewise sets a boundary on the abilities being measured. A correct positive decision shows that the system marked a post that the benchmark labels positive. It leaves the location of the mention, the identity of the suspected drug, and the wording of the reported effect outside the score. The same correct label could result from interpreting the relation expressed by the whole post or from recognizing some combination of words that typically accompanies the label in the collection. The authors report aggregate classification performance, so the evaluation cannot distinguish those explanations for an individual correct answer.

The article’s linguistic explanation of the preprocessing results is more specific than the test itself. The authors hypothesize that endings and punctuation provide cues to grammatical structure, and that punctuation can convey feeling or emphasis. The changes they apply affect many such cues at once. For instance, the consequences of deleting punctuation include both losing expressive signs and changing how the sentence is segmented. A decline in overall validation F-score is consistent with their explanation, but the experiment does not establish which signs or relations were responsible for the difference.

The normalization package also involves several decisions that are never evaluated individually. Capitalization, spelling normalization, placeholder replacement, emoji grouping, reduction of repeated letters, and stopword removal are all part of the shared pipeline applied before the additional variants. The experiments therefore give a result for the package, plus comparisons of some treatments layered on top. They give no separate estimate of how much each shared operation contributes. In particular, a good score for light preprocessing cannot tell a practitioner how well the same encoder would fare if it kept the words inside hashtags or distinguished the original emojis.

The conversational encoder comparison isolates dimensions of the architecture only to the extent indicated by the paper’s descriptions. RuBERT and Conversational RuBERT have the same reported layer structure, width, head count, and parameter count, while their histories of adaptation differ. The conversational version also receives further training. A comparison with the general Russian version thus offers evidence for using the available conversational initialization. It does not assign the gain uniquely to subtitle dialogue as a genre, because the paper does not run a matching additional adaptation on another text source.

The ensemble description gives enough detail to understand why its members see different negatives and how their scores become useful features. It leaves some important fitting details unspecified. In particular, it does not say whether the examples used to fit the logistic regression combiner were separate from those used to train the members, or whether the combiner saw predictions made on held-out portions of the training data. This matters because predictions for text a member has already seen can behave differently from predictions for fresh text. The paper gives too little information to determine how its implementation handles that distinction.

The settings also limit how precisely the runs can be matched to one another. The prose names a batch size of 32 for further Conversational RuBERT experiments, while the validation configuration table includes a batch size of 64. The paper does not reconcile those entries into a single setting applicable across the experiments. Similarly, the raw-text checkpoint scores in the preprocessing table and the architecture comparison differ. Both sets of measurements can be reported in their own contexts. Combining them into a single controlled sequence would imply more alignment across runs than the paper documents.

Finally, the selected scores describe particular runs and checkpoint choices. The paper gives best-epoch and last-epoch values, which provide a view of variation during training. It gives no uncertainty intervals or analysis of how results vary when the training procedure is repeated. The differences are therefore best read as observed outcomes of the reported comparisons. The final test result establishes the performance of the submitted system under the shared task’s evaluation. The ambiguity around the conclusion’s recall figure limits how confidently that secondary metric can be tied to the submission table.

### What came after

The authors identify two directions for further work. One was to combine learned classification with explicit rules. They cite earlier work using a mixed approach to sentiment analysis as motivation and say that they had begun exploring rules for the reaction-mention task. The paper gives no evaluation of a rule-based component on the Russian tweets. This idea belongs to the authors’ account of what they hoped to investigate after the shared task.

The other direction was to extend the labeled data using Russian social networks and RuDReC. That proposal follows directly from the study’s mixed experience with additional text. The positive tweet examples were scarce, and the particular attempt to use drug reviews failed to help. More social-network data would offer another source of examples in a form closer to the target posts. The authors also retained an interest in the review corpus despite the outcome of their initial trial. They report these as plans, with no later findings attached to them.

There are no documented subsequent studies to trace here. The reported result is the shared-task experiment itself, and the proposed rules and data extensions describe where the authors intended to take it.

## Cite

Cite as Andrey Gusev, Anna Kuznetsova, Anna Polyanskaya and Egor Yatsishin. 2020. BERT Implementation for Detecting Adverse Drug Effects Mentions in Russian. Proceedings of the Fifth Social Media Mining for Health Applications Workshop & Shared Task.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{gusev2020bert,
  title = {{BERT Implementation for Detecting Adverse Drug Effects Mentions in Russian}},
  author = {Andrey Gusev, Anna Kuznetsova, Anna Polyanskaya and Egor Yatsishin},
  booktitle = {Proceedings of the Fifth Social Media Mining for Health Applications Workshop \& Shared Task},
  year = {2020},
  url = {https://aclanthology.org/2020.smm4h-1.7/}
}
```

> 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)
