Elamur Research

BERT Implementation for Detecting Adverse Drug Effects Mentions in Russian

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

Summary

A person can report an unwanted reaction to a medicine in a tweet, using informal wording and leaving much of the connection between the drug and the experience implicit. Gusev and colleagues asked whether a system could recognize these reports in Russian. Every tweet in the Russian portion of the shared task called Social Media Mining for Health was labeled according to whether it mentioned an adverse drug reaction (ADR). The goal was to assign that label to the whole tweet. Misspellings, slang, emojis and expressive punctuation complicated the reading, and there were far fewer examples of tweets with a mention than without one. This made finding the rare positive examples the central challenge of the text classification task.

The authors compared classifiers that work from weighted terms with Russian versions of BERT. They chose Conversational RuBERT, a version further trained on subtitles, as the basis for their submission. They distributed the negative training tweets among groups and included the positive examples in every group. A separate classifier trained on each resulting subset. Each classifier could therefore learn from a different set of negative examples while encountering positive ones much more frequently within its own subset. The authors then fitted logistic regression to the probability scores from those classifiers so it could learn how to combine them.

The resulting ensemble, called ConvLogReg, placed first in the Russian subtask with a positive-class test F-score of 0.51. The conclusion gives test precision of 0.45 and test recall of 0.60, although the submission table leaves the recall figure unresolved. The chosen system used light cleaning and kept punctuation. In the validation experiments with Conversational RuBERT, the best result came from this lighter treatment, ahead of variants that simplified word forms or discarded punctuation. Adding manually labeled drug reviews gave no visible improvement. The reviews shared much of the tweets’ vocabulary, but the authors observed differences in what reviewers discussed and how they wrote.

The authors released their code and reported finding debatable and erroneous training labels. The experiment thus measures how well the system recovers mentions as defined by the shared task’s annotations. Its strongest result comes from changing several things together: which examples each classifier learns from, how the classifiers’ scores are combined, and which cues are left in the text. The separate comparisons help explain why the authors chose that combination, while the test result measures the submitted system as a whole.

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

The study tests how Russian BERT, balanced training subsets and light text cleaning help detect mentions of adverse drug reactions in tweets. · about 33 minutes to read

The problem and its context

What counts as finding a reaction

The work starts with a collection of Russian tweets whose labels show whether or not they mention an adverse drug reaction. In this setting, finding a reaction means recognizing that a post describes or refers to an unwanted response to a drug. The shared task asks for a decision about the post as a unit. Its labels give the authors a way to train a system on examples and then check whether it makes the corresponding decision on other tweets. The Russian collection was a new part of this shared task, according to the paper, which made it possible to evaluate the approach directly on Russian posts.

The subject of a tweet is only part of that decision. A post about a medicine might say something about its price while offering no account of an unwanted effect. Similarly, a word associated with health can occur without supplying the relationship the task is looking for. The affirmative label is about what the writer conveys in the post. This gives the task a connection to information extraction, where the goal is to recover a specified kind of information from text. Here the output records whether that information is present. It gives no separate identification of the drug or the expression describing the reaction.

The distinction between a textual mention and a medically established reaction is important for interpreting the experiment. The annotation is evidence about how a post has been read. A correct classification means the system agrees with that judgment about the tweet. The annotations supply no independent evidence about the writer’s health, the timing of an event or the cause of an experience. The paper studies whether the language of a post is sufficient to find the kinds of mentions the organizers labeled.

Even with a short output, the judgment can require attention to several parts of a tweet. The same word may describe a symptom, someone’s emotional response, or part of a complaint about something else. Where an author places such a word and what surrounds it can affect how the post reads. A tweet may also contain abbreviations or expressive signs that affect the interpretation of the rest of the sentence. The classification task leaves it to the learner to find which combinations of cues are predictive from the examples it sees.

Why the raw tweets matter

The organizers supplied posts in their original form. The authors mention spelling errors, slang, emojis, hashtags and usernames among the features they encountered. Such features vary in the degree to which their exact written form contributes to a reading. A web address can occur in many distinct forms while playing essentially the same role in the sentence. An unusual capitalization, by comparison, can distinguish a short form from an ordinary word. The preprocessing problem is to reduce variations that give the learner little help while preserving variations that may carry information.

Punctuation poses a particular difficulty for that judgment. It can mark how clauses or phrases fit together, and social media writers can also use it to express a feeling or add emphasis. A mark that looks dispensable in a vocabulary-based view of the text can therefore be part of the message. The paper treats these possibilities as reasons to test punctuation handling instead of fixing it at the outset. Russian word forms present a related choice. Their endings can vary while the words retain a common dictionary identity, and the endings can still tell a reader something about the sentence.

The scarcity of affirmative examples makes each of these choices harder to assess. A learner has many more opportunities to see how negative tweets are written than to see different ways of reporting an adverse reaction. Even a policy of predicting the common label would agree with many annotations while recovering none of the posts of interest. That is why the paper evaluates the positive class specifically. The study asks how many annotated mentions the system recovers and how well the set of tweets it returns corresponds to that annotation.

The same imbalance motivates the authors’ experiments with the composition of the training data. Splitting up the negative class is a way to change how frequently the positive examples appear within a classifier’s actual training set. Adding labeled reviews is a way to increase the supply of examples. These approaches answer different practical questions. The former uses the diversity already present in the target collection, while the latter depends on whether a classifier can use lessons from a different kind of writing when it reads a tweet.

The work the study starts from

On preprocessing, the authors credit earlier shared-task work by Ellendorff and colleagues as a partial starting point. Their own choices address features of these Russian posts, including conversational spellings, shortened forms and written conventions encountered in the data. The paper places that preparation alongside a comparison of conventional classifiers and a contextual encoder. This gives the project a relatively simple starting setup against which the Russian adaptations of BERT can be evaluated.

The earlier BERT work supplies the starting architecture. The paper then draws on an adaptation for Russian and a further conversational adaptation distributed through DeepPavlov. The first had been prepared using Russian Wikipedia and news, and the second had received additional training on movie and television subtitles. That history matters here because the conversational version begins the tweet task with experience of a different kind of language. The overlap between subtitle dialogue and the kind of informal expression found in tweets is a reason to try that version. The tweet labels still provide the evidence for the particular ADR decision.

Earlier work also informs the authors’ account of why preprocessing can be consequential. They cite a study of BERT’s ability to capture syntactic dependencies, meaning grammatical relationships between parts of a sentence. In their view, Russian endings and punctuation make such relationships easier to recover when the position of a word alone leaves some freedom. An encoder capable of using grammatical structure has a reason to benefit from access to those cues. The paper’s experiments approach that issue through classification performance after the cues are retained or altered. Assessing BERT’s Syntactic Abilities

The RuDReC drug-review collection supplies the material for the other line of experimentation. Reviews are relevant because they discuss people’s experiences with drugs, and the authors could label them for the same broad distinction they wanted the tweet classifier to learn. Their initial comparison of the two sources considered both vocabulary and writing style. The extension therefore tests whether topical relevance and additional labels are sufficient to make the reviews useful for this target, given the differences the authors saw between reviews and tweets.

The method, step by step

The route from training examples to a tweet label

The final system uses several classifiers with a common starting point. Each is based on Conversational RuBERT, and each learns to judge the presence of an ADR mention from a different selection of negative examples. They all learn from the available positive examples. When the system classifies a new tweet, it processes that tweet using the selected cleaning procedure, obtains the individual predictions, and passes those scores to logistic regression. This last stage determines how the collection of scores contributes to the final classification.

This arrangement is an ensemble, a system that combines predictions from multiple fitted classifiers. In this case the members differ in the negative tweets on which they train. The distinction between the members and the final combiner is important. The members take text as input and learn the ADR task from labeled tweets. The combiner takes their probability estimates as input, so its training concerns how to read the pattern of predictions for a tweet. The paper also tries a voting rule in this second role.

How the submitted tweet classifier is built and used

The steps in order.

How the submitted tweet classifier is built and usedStep 1: Clean the tweets and preserve punctuation1. Clean the tweets and preserve punctuationStep 2: Partition the negative training examples2. Partition the negative training examplesStep 3: Add the positives to each partition3. Add the positives to each partitionStep 4: Train a conversational classifier on each subset4. Train a conversational classifier on each subsetStep 5: Obtain each classifier’s probability for a tweet5. Obtain each classifier’s probability for a tweetStep 6: Feed the probabilities to logistic regression6. Feed the probabilities to logistic regressionStep 7: Assign the tweet its final label7. Assign the tweet its final label

Reducing surface variation

The custom preparation begins with tokenization, which divides the text into units that the pipeline can handle separately. The authors used CrazyTokenizer in the RedditScore package, with a spaCy tokenizer for Russian as its basis. Working with units at this stage makes it possible to treat a piece of punctuation or a username differently from an ordinary word. The paper describes these operations as preprocessing. Its account of the subsequent BERT classifier is at the level of the encoder and training procedure.

The pipeline converts most text to lower-case while exempting words written entirely in capitals. The authors illustrate the reason for the exception with АД, an abbreviation for antidepressants. An all-capital form can convey a difference that ordinary lowercasing would erase. The pipeline also standardizes the Russian letter ё to е. These choices apply different treatments to different kinds of variation. The letter replacement merges spellings, while the capitalization rule leaves a class of potentially meaningful written forms intact.

Addresses, user handles and hashtags are replaced with separate placeholder tokens. The placeholders retain the fact that text of a particular type occurred and its position in the sequence. A handle’s exact characters, for instance, give way to a common indicator used for handles. The same design is used for numbers and for measures, with a different placeholder for each category. The paper names kilograms and milliliters as examples of units handled by the measure replacement. The resulting input can mark the occurrence of a quantity without keeping all the distinctions among its original written forms.

Emoji handling also uses placeholders, but the grouping is based on meaning. Symbols given a positive or negative interpretation receive corresponding categories, and health-related emojis are assigned to a category the authors call neutral. A variety of individual symbols can thus contribute a common signal. The health grouping illustrates why the authors chose to represent those symbols explicitly. Their presence might matter to a classifier even when the exact symbol is unnecessary for the chosen representation. The operation keeps category information, with the original choice of emoji lost in the mapping.

The pipeline has other rules for common features of informal text. A sequence of 3 or more repetitions of a letter is reduced to 1 occurrence. Line breaks are removed. The authors also delete stopwords, using a Russian NLTK list that they extended with conversational forms. They name кароч, типа and прост among their additions. These illustrate the intended difference between shortening a spelling and deleting a token altogether. The repeated-letter rule changes the surface form of a word, whereas the stopword list removes particular forms from the input.

These common steps already make the cleaned tweet quite different from its original form. The description of the winning treatment as light concerns what happens after this common preparation. The authors’ choice was to allow punctuation to remain as tokens and to avoid further reduction of the words to lemmas or stems. The classification experiments also used original tweets, so the effect of this whole package can be compared with the performance of a classifier that receives text without the custom cleaning.

Testing further changes to the input

The authors construct data variants by changing how punctuation and word forms are handled. One option strips punctuation tokens. Another uses lemmatization to replace a word form with the dictionary form identified by an analyzer. A further option uses stemming to reduce words to standardized stems. A lemma aims to name the vocabulary item to which an inflected form belongs. A stem groups forms by reducing their written variation. Both can bring similar words together while taking away some of the information available in their original endings.

PyMorphy2 provides the morphology analysis for lemmatization. The paper gives practical reasons for choosing it over Mystem. Processing time on the authors’ Windows setup was a consideration, and they favored the way PyMorphy2 handled unfamiliar words. In this collection, drug names and medical terms were important examples of unfamiliar forms. The stemming experiments used the Russian Snowball stemmer through NLTK. The identity of these tools matters because the experiments use their actual outputs on the collection, including whatever they produce for unusual words.

For the validation comparisons, the chosen input treatment is applied to both the training and validation tweets. A classifier trained on a stemmed version of the collection is therefore evaluated on a corresponding stemmed version. This gives it a chance to learn patterns in the altered representation. Punctuation removal is likewise a choice about the data available throughout the run. It changes the evidence the learner can use while fitting its decision and the evidence it receives when predicting the validation labels.

Two ways to represent a tweet

The authors first tried conventional classifiers on the original posts, represented by TF-IDF vectors. A vector here is a list of numerical features for a tweet. TF-IDF assigns weight using the occurrence of a term in a document and how widely that term occurs across documents. It gives a classifier a way to use the terms in a tweet while taking account of their distribution in the collection. The paper uses these vectors as the common input to a linear support vector machine, standalone logistic regression and a gradient boosting machine.

The linear support vector machine learns a boundary in the space defined by the term features. Standalone logistic regression uses those features to estimate support for the positive label. Gradient boosting builds up a prediction through successive fitted components. The baseline comparison keeps the general representation the same while trying different ways to learn a decision from it. For this stage, logistic regression thus works directly with a representation of the words. Its later use as a combiner starts from a different kind of evidence.

The other family of classifiers is based on a Transformer and attention encoder. BERT uses context on both sides of a token when building its representation. The same word can therefore contribute a different representation depending on its surroundings. For the tweet task, this gives the classifier a route to use information about how the words occur together. The authors start from existing Russian adaptations and train those classifiers for the two labels in the shared task. This supervised stage gives the encoder a specific decision to support.

The paper describes RuBERT as cased and reports 12 layers, a hidden width of 768, 12 attention heads and 180M parameters. A cased encoder can use capitalization distinctions that survive preprocessing. The layers are successive stages of computation, and the hidden width is the size of the internal representation. The attention heads provide parallel ways for positions in the text to influence one another. Parameters are the learned values used in these computations. The paper gives the same architectural specifications for Conversational RuBERT, making their training histories the main difference the authors describe between the encoders.

RuBERT started from multilingual BERT and was adapted using Russian Wikipedia and news. The conversational version started from RuBERT and underwent further fine-tuning on subtitles. Fine-tuning continues training from an existing set of learned parameters. The subtitle stage exposes the encoder to language from dialogue, and the later tweet stage fits it to the ADR classification task. The subtitles used for the conversational adaptation come from OpenSubtitles2016.

Redistributing the negative examples

In ordinary training on the shared-task collection, the learner encounters many more negative examples than positive ones. The authors change the mixture by dividing the negative training class into equal-sized groups. Each group is then paired with the positive training samples. This is undersampling at the level of an individual classifier, because that classifier receives only a portion of the available negatives. Across the ensemble, different portions of the negative class are represented by different trained members.

The paper uses N for the number of negative groups. It is also the number of classifiers trained, since the construction gives each group its own classifier. The method description puts the negative share of a resulting training subset near 0.5. That figure characterizes the aim of the balancing procedure. The paper gives 6 as the split count for the final system. It reports the share near 0.5 in its general account of undersampling and gives no measured class proportions for the final subsets separately.

Each member receives evidence about what counts as a mention from the common positive examples. The group it receives determines which negative examples it learns to distinguish from those positives. This is how the approach both increases positive exposure within a training set and gives the ensemble access to a wider range of negative tweets. Sharing examples across members in this way changes the weight of the existing positive material in training. The positive tweets themselves remain the same examples, with the same wording and labels.

The partition of negatives plays a different role from the cross-validation the authors used to choose settings. Here the partition produces distinct training sets for classifiers that will work together. Each group supplies examples to its assigned classifier. Cross-validation concerns measuring performance while exploring training choices. Both involve dividing data, but only the undersampling partition defines which negative examples an ensemble member encounters in its own training.

Voting or learning from scores

The configuration names follow the choices made at these stages. RuBERT denotes the standalone classifier based on the general Russian adaptation. Conv denotes standalone Conversational RuBERT. ConvUnder adds undersampling and combines the resulting members by majority vote. ConvLogReg uses the undersampled training sets and learns the final combination with logistic regression. These names let the authors compare a change of encoder, a change in how the training examples are allocated and a change in how predictions are aggregated.

Voting uses the predicted label from each classifier. Each label counts towards the collective decision, and the prevailing class determines the answer under majority voting. This is a simple way to exploit the diversity introduced by the different negative groups. It reduces each classifier’s contribution to its decision about the tweet. The strength of the probability that led to that decision plays no separate role in the vote.

In ConvLogReg, the individual probability scores become features for a fitted classifier. This arrangement is called stacking because a second stage learns from predictions made at the first. Logistic regression can use how strongly each member favors the positive label and can give the members different influence through its fitted coefficients. The input to the regression is therefore a numerical account of several readings of the same tweet. The paper explains this setup at the level of the member predictions and their aggregation. It leaves the procedure for constructing the combiner’s training examples unspecified.

Choosing training settings

After the first comparison of the Russian encoders, the authors report using cross-validation to look for training settings for Conversational RuBERT. Cross-validation evaluates candidate settings by varying which data are used to fit and check them. The prose gives a batch size of 32, a dropout probability of 0.4 outside the BERT layers and a learning rate of 10⁻⁵. A batch is a group of training examples processed together for a parameter update. Dropout suppresses some activations during training as a form of regularization. The learning rate controls the scale of the updates. The configuration table separately lists a batch size of 64, so the settings need to be read in the context in which they are reported.

Training duration is expressed in epochs. An epoch is a pass through a classifier’s training set, which for an undersampled member consists of its portion of the negatives and the shared positives. The authors were concerned about overfitting on these smaller sets and preferred relatively short training runs for the ensembles. Overfitting in this setting would mean that a classifier learns details of the examples it encounters that are less helpful on fresh tweets. The paper reports scores at the end of runs and at their best observed validation epochs, allowing those stages of training to be distinguished.

The submitted ConvLogReg system used the undersampled Conversational RuBERT classifiers with punctuation retained in the lightly processed text. The authors also entered a standalone Conv classifier. Their public release makes the code part of the study’s output, alongside the reported experiments. The method account establishes the stages from the original tweet to the combined prediction. The reported comparisons then show how well particular settings of those stages worked on the shared-task data.

Experiments and results

What the dataset and the scores represent

The Russian collection had 7,612 tweets for training, 1,522 for validation and 1,903 for testing. The training texts provide the examples that teach the classifiers the two labels. The validation texts give the authors a way to compare encoders, preparation choices and ensemble configurations. The final submissions are evaluated on the test texts. All these measurements concern the same output, a binary decision about the presence of an ADR mention, but they answer different questions about fitting, selection and performance on held-out data.

In the discussion of imbalance, the paper reports 666 tweets labeled as containing mentions and describes the class proportions as 9% positive and 91% negative. It does not break the 666 down by split. The proportions explain the motivation for giving positive examples greater exposure during training. They also explain why the authors choose a score focused on the class that matters to the retrieval task. Reading the proportions as separate measurements of each split would go beyond the data breakdown in the paper.

Precision starts with the tweets flagged by the system and asks what share carry the affirmative annotation. Recall starts with the tweets carrying that annotation and asks what share the system flags. The F-score combines the two measures. A classifier that spreads its positive judgments too freely can recover true mentions while also including many other tweets. A stricter classifier can yield a cleaner flagged set and miss a larger share of the relevant posts. The combined measure gives the authors a common criterion for comparing systems across these competing error patterns.

The positive label is the reference for all these readings. A false positive is a flagged tweet that the dataset labels negative, and a missed positive is a tweet that has the affirmative label but receives a negative prediction. That is why the quality of the labels matters to the experiment. The metric measures agreement with the task annotations. Further interpretation of an individual disagreement would require looking at the tweet and at the reasons for its label. The reported scores give aggregate results across the split.

Comparisons on original tweets

In the early experiment, the authors used the original text without their custom preprocessing. The TF-IDF classifiers produced a validation F-score of 0.28 for the linear support vector machine, 0.07 for standalone logistic regression and 0.29 for gradient boosting. Gradient boosting produced the highest result within that group. The authors judged these results too weak to continue pursuing the conventional approaches and shifted their experimental effort to the BERT classifiers.

For the standalone BERT configurations, the validation configuration table gives RuBERT a best-epoch F-score of 0.37 and Conversational RuBERT a best-epoch F-score of 0.47. At the last epochs, the corresponding scores are 0.36 and 0.45. The conversational encoder is ahead in the comparison using either checkpoint convention. The chart uses the best-epoch entries for the encoder runs and the reported validation results for the original-text TF-IDF baselines.

Classifiers on the original Russian tweets by validation F-score

The conversational BERT classifier leads the comparison with the conventional baselines.

Classifiers on the original Russian tweets by validation F-scoreTF-IDF with logistic regression: 0.07TF-IDF with logistic regression0.07TF-IDF with linear support vector machine: 0.28TF-IDF with linear support vectormachine0.28TF-IDF with gradient boosting: 0.29TF-IDF with gradient boosting0.29RuBERT at its best epoch: 0.37RuBERT at its best epoch0.37Conversational RuBERT at its best epoch (this paper): 0.47Conversational RuBERT at its best epoch(this paper)0.47
The numbers
System or settingF-score
TF-IDF with logistic regression0.07
TF-IDF with linear support vector machine0.28
TF-IDF with gradient boosting0.29
RuBERT at its best epoch0.37
Conversational RuBERT at its best epoch (this paper)0.47

The original-text comparison is useful for understanding why the authors proceeded with the conversational version. The conventional systems and the BERT runs represent the input differently and bring different learning procedures to the task. Their results are comparisons of complete classifiers as implemented in this experiment. The RuBERT-to-Conv comparison is closer in structure, since those encoders share the reported architectural sizes. It gives the authors evidence for using the conversational starting point in the remaining runs.

The low score of standalone logistic regression belongs to this initial comparison. It evaluates predictions derived from TF-IDF features. In the ensemble, the regression examines scores that already reflect supervised judgments about ADR mentions. Its input has been through a substantial amount of task-specific learning before the regression sees it. The paper’s use of the same classification technique in these different positions shows the importance of distinguishing the input representation and the job assigned to it when comparing the results.

Adding manually labeled reviews

The authors also tried expanding the training material with reviews from RuDReC. They describe labeling about 1,800 reviews and report 627 positive and 1195 negative labels. The experiment was motivated by the dearth of positive tweets. Reviews could contribute further ways of describing drug experiences, including additional examples with the label the classifier needs to learn to find. The target of evaluation remained the tweet task.

The authors found considerable overlap in vocabulary between the sources. The distinctions they report concern both subject matter and form. The reviews talk about medication prices more often and give greater prominence to words for high cost. Their writing is also more grammatical in the authors’ assessment, with less slang and fewer shortened expressions. A classifier trained with the additional material thus encounters shifts in how the topic is discussed and in the forms the language takes. Those shifts are relevant even where the same drugs or effects could be discussed in either source.

The added texts brought no visible gain in the experiments, and the authors report an F-score decrease of 0.05 when discussing the extended data. The paper supplies that decrease for the augmentation trials without tying it to an individually identified split or a particular mix of the extra texts. The authors suspect that the differences between reviews and tweets were more consequential than their initial comparison suggested. The outcome establishes that the attempted extension failed to improve the reported tweet classification. The proposed explanation concerns why the extra examples may have been hard to use.

Comparing input treatments

A separate validation experiment tested the preprocessing choices with standalone RuBERT and Conversational RuBERT. It used the main tweet data, with matching treatment of the training and validation text. The original-text comparison within this experiment gives Conversational RuBERT a best-epoch F-score of 0.45 and a last-epoch F-score of 0.42. With the light treatment that retains punctuation and avoids reducing the word forms, the corresponding scores are 0.47 and 0.45. Within this comparison, the lightly cleaned tweets give the conversational encoder its strongest result.

Original and lightly cleaned Russian tweets with Conversational RuBERT by best-epoch validation F-score

Conversational RuBERT scores higher with light cleaning that keeps punctuation and inflected forms.

Original and lightly cleaned Russian tweets with Conversational RuBERT by best-epoch validation F-scoreOriginal tweets: 0.45Original tweets0.45Light cleaning with punctuation retained (this paper): 0.47Light cleaning with punctuation retained(this paper)0.47
The numbers
System or settingF-score
Original tweets0.45
Light cleaning with punctuation retained (this paper)0.47

RuBERT behaves differently in the corresponding comparison. Its best-epoch result on the original input is 0.41, with 0.40 at the end of training. The light treatment gives it a best-epoch result of 0.37 and a last-epoch result of 0.36. These results put the choice of preprocessing in context. The highest performance among the variants considered for Conversational RuBERT supports the treatment used in the final system. The corresponding raw and cleaned runs for RuBERT show why the cleaning package should be assessed together with the encoder that will use it.

The original-text figures in this preprocessing experiment are distinct from those in the configuration comparison. That distinction matters for interpreting the best-epoch scores, because the paper uses each set of runs for a different comparison. The configuration figures help track the choice of encoder and the move to an ensemble. The preprocessing figures show the performance of the standalone encoders under the input variants. Differences between the experiments should be read within those contexts, without treating their raw-text entries as interchangeable.

The ensembles and the submitted scores

The configuration experiment compares standalone training, undersampled training with voting and undersampled training with the logistic regression combiner. It reports validation scores for runs of different durations. The authors attribute an F-score improvement of 0.05 over the non-ensemble approaches to their ConvLogReg experiment. The configuration table gives ConvLogReg a validation F-score reaching 0.51. The authors proceeded with the ensemble built using 6 splits and a short training schedule.

The final submissions include the standalone Conv comparison and ConvLogReg configurations. The submission table identifies 6 epochs for Conv and lists ensemble runs with 2 and 4 epochs. According to the paper, the top submission took first place in the Russian subtask and earned an F-score of 0 on the test set.51. The same numeral occurs in the validation results, but the test F-score refers to performance on the shared task’s test tweets. The validation figures informed the choice of system and represent separate measurements.

The conclusion gives the winning system’s test precision as 0.45 and its test recall as 0.60. The latter figure has no matching entry in the submission table, whose presentation also leaves the complete alignment of the figures uncertain. The F-score and rank are stated directly in the paper’s account of its result. For the precision and recall pair, the conclusion is the place where the authors explicitly associate those values with the headline performance. The table and the conclusion leave the discrepancy in the supporting metrics unresolved.

Taken as reported, the precision shows that the flagged set contains posts that fall outside the positive annotation, and the recall shows that annotated mentions remain unflagged. Both are part of the meaning of the result even though the system led the subtask. The ranking measures relative performance in the shared-task comparison. The positive-class metrics describe how much agreement the winning system achieves on the test set, given the labels and the evaluation used there.

What the ablations show

What happens when the text is simplified further

The preprocessing experiments are the clearest component comparisons in the paper. They hold the classification task and source collection in place while changing which features of the tweets reach the learner. The same transformations are applied on either side of the training and validation boundary. The effect measured is therefore the performance of a classifier fitted to each representation and evaluated with that representation. It includes any opportunity to adjust to the modified input during training.

For Conversational RuBERT, the strongest result comes from the light pipeline that preserves punctuation and leaves inflections alone. The more aggressive variants fall below that setting. The authors interpret the declines as evidence that simplifying the input can remove usable language cues. Stemming and lemmatization each bring word forms into closer agreement with one another, which can help if the forms mainly introduce sparsity. In these runs the best conversational result comes from allowing the encoder to keep the distinctions that those procedures would reduce.

The authors discuss word order as part of the explanation. In their account, Russian allows some flexibility in where words appear, so a form’s ending can help establish its relationship to nearby material. Normalization can preserve a word’s dictionary identity while changing the evidence about its role in the sentence. If the classifier benefits from analyzing a phrase in context, those are distinct kinds of information. The observed validation pattern is consistent with that explanation. The test reports performance on tweet labels and supplies no direct measurement of which grammatical relations the encoder identifies.

Punctuation can carry several signals at once. The authors point to an opening parenthesis used to express sadness and to repeated exclamation marks used to indicate importance. Those uses give the marks a role in conveying the speaker’s stance or emphasis. Other marks can also help a reader connect or separate pieces of a sentence. The punctuation comparison removes all such tokens together. It tells the reader about the effect of that overall choice, while leaving the relative contributions of grammatical grouping and expressive meaning undetermined.

There is an important distinction between preserving punctuation and preserving the full original tweet. The light pipeline still modifies capitalization, spellings, handles, hashtags, numbers, emoji forms and other parts of the input. The best setting preserves certain cues after the common transformations have already been applied. The comparison of original and lightly cleaned inputs can assess those common transformations as a package. The runs with further processing then show how the package behaves when more information is removed or condensed.

The raw-text results also qualify the interpretation of the winning preparation. The runs in the preprocessing experiment favor light cleaning for Conversational RuBERT and favor original text over that same treatment for RuBERT. The paper therefore offers evidence about the interaction between the available encoder and the representation of the input. The useful degree of standardization depends in part on what that encoder can do with the forms it encounters. The comparisons support the final choice for Conversational RuBERT while leaving the effect of each operation in the common cleaning package open.

What the ensemble comparison isolates

The architecture variants offer a partial comparison of the ensemble’s stages. Moving from Conv to ConvUnder introduces negative-class partitioning, multiple fitted classifiers and a voting rule. Moving from ConvUnder to ConvLogReg uses the same broad sampling idea and changes the way predictions are combined. The strongest validation result comes from ConvLogReg. The reported improvement over training without an ensemble supports the combined recipe, including the way the individual training sets and the final prediction are constructed.

The comparison with voting helps explain why the authors retained the probability scores. Two tweets can receive the same collection of votes even if the classifiers are more confident about one of them. Regression on scores can respond differently to such patterns. It can also learn that the output of a particular classifier should carry more or less weight. The performance of ConvLogReg shows that a learned combination was useful in the settings the authors tried. The paper gives no per-member score analysis that would identify which specific configurations of estimates account for the advantage.

The runs also vary in training duration and other recorded settings. This limits how narrowly the validation gain can be attributed. The overall comparison changes the number of classifiers, their exposure to the positive examples and the final aggregation. The closer voting comparison addresses aggregation more directly, although the table reports performance under several training choices. A validation advantage for the selected setup is evidence for the system the authors built. Estimating an individual contribution for rebalancing, diversity among members or the regression weights would require a more tightly matched set of comparisons.

The last-epoch and best-epoch reports add a view of how performance behaves during training. A score at the last epoch measures the result when training stops under the recorded schedule. A best-epoch score reports the strongest validation observation during that run. The difference between those ways of reading a run helps explain the authors’ concern about training for too long on the smaller subsets. The evidence concerns validation performance under the schedules tried. It leaves open how training duration interacts with the specific makeup of each negative group.

What the review experiment adds to the comparison

The RuDReC trial varies the source of the training material. The additional examples are broadly on topic and labeled for the task the authors want to learn. They also bring different habits of writing and a stronger emphasis on medication costs. The absence of a gain helps the authors judge this particular method of addressing the rare class. The ensemble’s training subsets retained the language of the target tweets, while the review extension introduced language from a different setting.

Adding the reviews changes the volume, composition and style of the training material at the same time. The experiment can show what happened when the authors tried that extension. It cannot determine how much of the result came from cost-related vocabulary, more grammatical phrasing or any other difference they observed. The linguistic comparison gives reasons to investigate transfer between the sources, but the results are measured at the level of the addition as a whole. This is a broader comparison than the experiments that remove punctuation or reduce inflections in the same tweets.

Limitations

Limits raised by the authors

The authors point to questionable supervision in the training set. They saw annotations they considered debatable and others they judged erroneous. A label in this part of the data supplies feedback to the classifier about the decision it should learn. A mistaken label can teach the learner to disfavor a genuine indicator or to treat an unrelated expression as a clue. The authors report this as a possible influence on the result. They give neither a count of the cases they identified nor a rerun using revised labels.

A debatable label can also reflect uncertainty about what the tweet communicates. Informal wording sometimes leaves a relation implicit, and a reader may have to decide how much inference to allow before marking a mention. A clearly erroneous label and a hard borderline judgment can both appear as a single training target to the classifier. The paper distinguishes them in discussion, but it offers no breakdown that would allow the reader to estimate their respective effects. The authors’ observations concern the training set and do not establish how often similar issues occur in validation or test.

The paper also recognizes the difference between the labeled reviews and the target posts. The authors had already noticed contrasts in grammar, slang, shortening and the frequency of price talk before discussing the disappointing augmentation result. They suggest that those contrasts may have had more bearing on classification than their early inspection indicated. This is a limit on interpreting the additional labels as interchangeable with tweet labels. The shared subject establishes some relevance, while the test requires the classifier to apply what it learns to the forms of expression used in a different source.

Overfitting on the undersampled sets is a further concern the authors mention. Each classifier trains on a reduced portion of the available tweets, and the positive examples form a much larger share of that portion than in the original collection. More passes could fit the particular wording of those examples at the expense of new ones. The authors respond with a small number of epochs. Their validation figures show the outcomes of the runs they trained, while the extent of overfitting and its effect on individual member predictions remain unmeasured.

Limits of the task and comparisons

The study establishes performance on a particular collection of Russian tweets constructed for the shared task. The researchers try using the supplementary material to support training. It does not constitute an independent test on a new source. As a consequence, the assessment supports conclusions about held-out posts from this benchmark. It leaves performance on other Russian social networks or on text with a different balance between positive and negative examples open. Changing the types of posts or their annotation criteria would change the decision the classifier is evaluated on.

The binary output also sets the scope of the result. An affirmative prediction tells the evaluator that a classifier marked the tweet for an ADR mention. It supplies no evaluated identification of the relevant stretch of text, the drug and reaction as separate items, or the link between them. The score cannot establish which clues led to a correct decision. Different patterns of words or punctuation could support the same output, and the paper reports no span-level or relation-level evaluation that would distinguish those routes to the label.

The linguistic explanation for preprocessing goes beyond what the score alone can resolve. An effect from punctuation removal might arise from loss of word grouping, loss of expressive cues, or the combination of these changes. Stemmed and lemmatized forms can change the evidence supplied by endings and can also change the strings the encoder encounters for familiar or unfamiliar words. The experiments assess the resulting representations as units. They leave the part played by particular marks, inflections and relations unspecified.

Similarly, the studies of the common cleaning pipeline give no individual measurements for all of its choices. Placeholder substitutions, stopword removal, changes to repeated letters and categorization of emojis occur within the same package. The favorable result for lightly cleaned input with Conv indicates how that package performed. With the reported comparisons alone, a reader cannot assign the result to replacing handles, retaining health-related emoji categories or any of the other component steps in isolation.

The comparison between the encoders has a similar boundary. The paper gives matching architectural dimensions for RuBERT and Conversational RuBERT. The conversational version has also undergone an additional stage of training, using subtitles. Its stronger performance supports using that available initialization on these tweets. A tighter claim about why it works would require evidence that distinguishes the genre of the subtitles from the effect of simply continuing training on additional material. The reported experiment compares the actual preparation histories of the available encoders.

Details that remain unresolved in the report

The training inputs for the logistic regression combiner are only described as probabilities from the ensemble members. The paper leaves open whether its training predictions came from tweets those members had fitted, from data held out for the combiner, or from another arrangement. That distinction matters because a classifier’s probabilities on familiar examples can have a different distribution from those on unseen tweets. The account identifies the strategy of learning on top of the scores, while leaving a part of the fitting procedure needed for an exact reconstruction unspecified.

There are also some difficulties in aligning the settings and the results across runs. The prose describes a batch size of 32 for further Conversational RuBERT experiments, and the configuration table lists 64. The paper leaves the relationship between these records unexplained. The separate original-text runs in the configuration and preprocessing experiments also have different reported scores. They remain usable as observations within their respective comparisons. A precise account of why those scores differ would require more detail about how the runs were matched.

The strongest test result is stated clearly as an F-score of 0.51, but the recall of 0.60 stated in the conclusion cannot be located in the submission table. That limits the degree to which the complete precision and recall report can be checked against the tabulated results. More generally, the paper gives scores for selected configurations and training stages, without reporting uncertainty intervals or the results of repeating each setting. The observations establish the performance of the runs the authors present. They leave the stability of smaller differences across repeated training open.

What came after

The subsequent research record for this study remains undocumented here. The paper itself describes follow-up plans, including a rule-based component to accompany the learned classifier. The authors point to earlier work that combined learned and rule-based methods for aspect-level sentiment analysis as motivation. They say they had begun exploring rules for the ADR task, with evaluation of such an addition still ahead. The shared-task results therefore establish the performance of the ensemble they submitted, while the proposed rules mark a direction the authors intended to pursue.

The other direction was to gather further material from Russian social networks and from RuDReC. Social-network text would provide another way to seek examples closer in form to tweets. The authors also retained an interest in reviews after the initial augmentation attempt, which had combined topical overlap with differences in style and subject emphasis. These plans identify the questions the experiment left open about where to find useful positive examples and how to make evidence from different sources work together. The paper ends with those plans and reports no subsequent evaluation of either extension.

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.

@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/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/gusev-2020-bert-implementation-detecting-adverse-drug/