DreamDrug - A crowdsourced NER dataset for detecting drugs in darknet markets
Paper · 2021 · Johannes Bogensperger, Sven Schlarb, Allan Hanbury et al.
Summary
A marketplace listing can name a drug without spelling it the way a medical text would. It can also put a drug name beside a brand, a strength, or a description of its physical form, leaving an automated reader to decide where the name ends. DreamDrug turns that problem into a test of named entity recognition. Given a listing, a system must locate the exact stretches of text that identify drugs. The authors focus on this narrow task because informal spelling, slang, and irregular sentence structure make it difficult to transfer tools designed for more formal writing.
DreamDrug contains 3,507 listings sampled from a filtered collection of DreamMarket items. The finished corpus has 364,003 tokens and 14,934 annotated drug spans. To establish what counts as a span, the authors first worked through listings themselves, then gave crowdworkers a set of rules and examples. The task covers conventional names and informal expressions that identify a drug in context. It leaves out descriptions that convey only form or strength, and it allows consecutive names to be marked separately. The authors reviewed the crowd annotations, corrected span boundaries and labels, and made another pass to find omissions.
The experiments ask how well standard recognition systems learn the task with the full training set or with just 100 labeled listings. They also test domain-adaptive pretraining, an intermediate stage in which a system reads related text without human labels before learning from DreamDrug’s annotations. The comparison uses unused DreamMarket listings, listings from other marketplaces, and passages drawn from drug-related Wikipedia articles. The clearest gains from adaptation appear when annotated examples are scarce. In that setting, the best configuration in the authors’ test comparison reached 73.55 F1, against 62.13 for FLAIR. With the full training set, the corresponding test scores were 83.86 and 81.82. A prediction counted as correct only when it matched a reference span exactly.
The results establish a benchmark for identifying mentions in this particular collection. The labels describe what sellers wrote and how that language was interpreted under the annotation rules. They leave questions such as the identity of a product’s contents, the strength attached to a mention, and performance on another marketplace open. The authors published the software and sample data and made access to the full corpus available on request.
Deep dive: DreamDrug - A crowdsourced NER dataset for detecting drugs in darknet markets
DreamDrug labels drug mentions in darknet market listings and tests how much training on related text helps when labeled examples are scarce. · about 35 minutes to read
The problem and its context
Why the name is hard to find
A product listing is written to communicate with a prospective buyer. It may assume that the buyer recognizes familiar abbreviations, knows which words belong to a name, or can supply context that the seller has left implicit. A reader following the listing can often work around awkward grammar or missing punctuation. A recognition system has to make an explicit decision about each mention’s beginning and end. Even a passage whose general subject is obvious can present several decisions about what to mark.
The paper approaches this as information extraction. Relevant information is present in prose, and a system is asked to recover a defined part of it in a form that can be compared across documents. Here the output is a set of locations in the text. A listing can use a drug name more than once, give several names for the same substance, or mention a substance other than the product being advertised. The target is the language used at each location. A field identifying the product as a whole would answer a different question.
The authors motivate the task with applications that share this need for locating names. Public health researchers may study descriptions of drug use. Pharmaceutical researchers may look for references relevant to adverse reactions. Investigators may examine marketplace activity. In each case, recognizing a name can help identify a passage worth examining. The next decision depends on the application. A report of an adverse reaction requires evidence about what happened to someone, while a study of listings requires evidence about how products were described.
Informal writing complicates this first step. A spelling can vary because the writer made a mistake, used a locally familiar form, or deliberately changed a name. The paper cites earlier work describing deliberate misspellings on social media, but a variation in a DreamDrug listing does not reveal its author’s intention. For recognition, the practical question is whether the surrounding words give enough evidence to identify the expression and locate it accurately. A list of standard spellings addresses only some of those cases.
The paper also points to a mismatch between the text used to develop drug recognition systems and the text in which people may want to use them. Medical sources can support methods that work with relatively established terminology. Marketplace descriptions combine specialist vocabulary with inconsistent spelling, punctuation, and grammar. One listing shown by the authors runs together claims about the item and its qualities with little sentence structure. A system has to identify the name amid that material, and grammatical cues may be unreliable.
What earlier benchmarks asked systems to recognize
The paper situates DreamDrug alongside the WNUT2017 Shared Task on Novel and Emerging Entity Recognition. That task brought together social media text from sources including Twitter, Reddit, YouTube, and StackExchange. Its 6 categories ranged from people and locations to products and creative works. Crowdworkers contributed annotations, which the task authors corrected. The breadth of both the source material and the labels made it a reference point for research on names in informal text.
The approaches reviewed in the paper show how researchers combined kinds of evidence. One system represented words and their component characters and consulted lists of known entities for the target categories. It read the sequence in both directions and used a conditional random field as its output layer, so that neighboring label decisions could be considered together. Other entries used topic information to help represent words or brought in part-of-speech tagging and dependency parsing to supply information about grammatical roles and how words relate to one another.
The paper also describes Pooled Contextualized Embeddings for Named Entity Recognition. The approach collects character-based representations of a word from contexts in which that word has appeared. The aim is to give the recognizer evidence beyond the immediate occurrence while retaining information derived from the word’s characters. The method was available through FLAIR, the framework the DreamDrug authors also use for a baseline of their own.
Earlier studies had already explored recognition on darknet text. One annotated 1,938 posts from 4 cybercrime forums to identify products. Its comparisons distinguished training on the same forum from working across forums. That distinction is relevant to DreamDrug because a shared setting such as online trade can still contain sizable differences in vocabulary, conventions, and what people advertise. A system trained on one collection faces a different test when its annotations must transfer to another.
The other corpus the authors discuss, NUToT, contains 851 manually annotated sentences drawn from darknet sources and uses the W-NUT categories. Its researchers tried a method called Local Distance Neighbor to compensate for the absence of domain-specific name lists. The idea was to enrich a word’s representation with information from nearby words in a space of word embeddings, where a word is represented numerically and related representations can be compared. A word with an unfamiliar surface form could thereby receive evidence from other words with related representations.
DreamDrug changes the question addressed by those resources. Its single category is narrower than product and can be defined in terms of an application that needs drug mentions specifically. Reducing the number of labels removes the need to choose among categories such as person, place, and product. It also makes the remaining decisions more specific. An annotator now needs to distinguish a drug name from a brand-like expression that identifies only a prepared item, and to decide which modifiers belong inside a drug span. Those distinctions would look different in a benchmark organized around broad product names.
Why the annotation comes first
A narrow label is useful only if the people applying it can make reasonably consistent decisions. The authors consulted prior work on linguistic annotation, including the NoSta-D guidelines and dataset and guidelines for other specialist domains. They also drew on studies of annotation agreement, crowdsourcing practice, and the estimation of work involved in named entity tagging. They regarded the estimate of effort as part of treating annotators fairly.
Crowdsourcing offered a way to collect judgments on many listings with limited resources. It also put pressure on the instructions. An author can resolve an uncertain example by returning to the purpose of the study. A worker needs enough information in the task itself to make a comparable decision. The benchmarks and annotation studies cited in the paper supplied precedents for collecting judgments from several people and reviewing the result. DreamDrug still needed its own account of what a drug mention was and how precisely a worker should mark it.
The two parts of the paper follow from this problem. The corpus work establishes which passages are examples of successful recognition. The experiments then ask how far systems can learn those decisions from human-marked text, and whether related writing can help before that training begins. The usefulness of the numerical comparisons depends on the connection between the label’s definition and what a reader wants to recover from the listings.
The method, step by step
The process starts with archived listings and ends with a comparison against human-reviewed spans. In between, the authors choose documents, reduce some kinds of redundancy, decide how expressions should be marked, and produce labeled splits. The recognition experiments then use a separate supply of unlabeled text to test whether familiarity with the subject or style helps a system learn those marks.
From archived listings to evaluated drug spans
The steps in order.
Selecting and cleaning the listings
The source for the labeled corpus was a portion of AZSecure containing 91,463 DreamMarket listings collected between 2013 and 2017. The authors first selected 45,446 items from categories associated with drugs. The category supplied a reason to examine the listing. It did not supply the locations of drug names in the text. Those still had to be established by annotation, and a document chosen through its category could end up with no marked mentions.
The first filter compared the descriptions as complete strings. Removing repeated descriptions excluded 25,012 listings, reported as 55.0% at that step, and left 20,434. The comparison used the description, which meant the authors did not need every field of a listing to match before treating its text as redundant. Listings with distinct metadata could give annotators the same passage to read. Removing that kind of duplication reduced the amount of repeated prose in the material that could be sampled.
The next step used automatic language identification. Descriptions judged to be in a language other than English were set aside. This excluded 2,102 listings, reported as 10.3% at that stage, and left 18,332. The language filter operated on descriptions, so the criterion concerns the prose supplied for annotation. It is possible for a drug name to look similar in several languages while the surrounding words, which help resolve its meaning or boundaries, differ.
The authors then excluded descriptions shorter than 30 characters or longer than 3000 characters. The step removed 1,488 listings, reported as 8.1%, and left 16,844. A very short description might consist of a shipping note with little to annotate. A very long one might devote much of its space to delivery terms or other repeated text. The authors acknowledge that the threshold also discarded some relevant material. Its role was to make the pool more suitable for this particular annotation task.
A final filter looked for repeated openings. It compared the nonnumeric characters in the first 100 characters of each description. A pair of descriptions could thus be treated as redundant when their opening differed in a number, a pattern the authors associated with separate listings of the same product in different quantities. This step removed 5,170 items, reported as 30.7%, and left 11,674. It used a much shorter piece of text than the exact duplicate filter and could therefore catch a family of listings that would survive a comparison of whole descriptions.
The authors randomly selected 3,507 of the remaining items for DreamDrug, retaining the product name and description. The random choice occurred after the filters. The result is a sample of the retained drug-category listings rather than a cross-section of everything in AZSecure. It inherits the decisions about what counted as an acceptable language, length, and degree of textual repetition. Those decisions are relevant to interpreting both the typical document and the performance on it.
Seller names were available as fields in the source, and the authors replaced identifying strings found in descriptions with substitute values. Their preprocessing account describes handling phone numbers, email addresses, and web addresses with detection and substitution procedures. Pseudonymization was also part of the paper’s ethics process. The age, content, and category of a listing could remain useful for corpus construction even when a contact string carried no information needed for marking its drug mentions.
The descriptions were divided into tokens with Stanza version 1.2.0. Tokenization determines the text units with which an annotation or recognizer works. In a span task, a sequence can contain several such units and still count as a single mention. The tokenization used during corpus preparation also has to be distinguished from the sub-word splitting used by the recognition systems. A familiar-looking word may occupy several positions in their input, a fact that later matters for how much of a document the recognizer can read.
Deciding where a drug span begins and ends
The definition came out of a pilot in which the authors annotated 500 listings. They took the Food and Drug Administration’s definition as a starting point. Its scope includes articles used for purposes such as diagnosing, treating, or preventing disease, and nonfood articles intended to affect the body’s structure or functioning. For annotation, the authors translated that broad scope into a rule about expressions in text. A label requires an expression that identifies a particular article under their definition.
An ordinary substance name such as cocaine or THC is a straightforward case. An informal name can also qualify when its meaning is clear in context. The recognition target therefore extends beyond matching a list of formal chemical names. Context matters in deciding whether an expression supplies an identity. The text around a candidate can make a familiar slang use apparent or leave the reader with a phrase that sounds like a name but gives insufficient information about the substance.
This rule leads to several exclusions. The paper uses examples of creatively named prepared items to illustrate phrases that do not identify a particular drug on their own. A term used only for a physical form also falls outside the label. The authors use blotter as an example, even though they associate the form closely with LSD. A strength or descriptive adjective can help a buyer distinguish an item, but a span label treats the drug name and its accompanying description as different pieces of information.
The guidelines also distinguish names of substances occurring naturally in the body, such as dopamine, from particular articles that qualify for the task. This is a decision about the scope of the corpus. It prevents annotation from becoming a general inventory of chemical terms. The rule has to be applied at the level of the actual expression, since a substance’s name and a more specific drug name built from it can occur in different contexts.
The authors made a specific decision about mushroom. The word could be understood as a description of form or as a term with a much wider meaning. They included it when used in the relevant sense in this collection because they took it to identify psilocybin in that setting. The decision illustrates how a definition becomes operational. An expression’s treatment can rest on what it identifies in the documents being annotated, which gives the label a practical interpretation within the corpus and limits how literally the same decision can be exported elsewhere.
The rule for adjacent mentions follows the same emphasis on identification. A vendor can write a name followed immediately by an alternative name. When both expressions qualify independently, the authors mark consecutive spans. Their example of a strain term followed by weed illustrates the distinction. A reader looking for the advertised product could take the phrase as a single description. Under the annotation rule, the two expressions remain separately recoverable. Merging them would lose both reference boundaries in an exact-match evaluation.
A long name presents the complementary case. Several words can belong to a single drug expression, so a span must include the relevant sequence as a unit. The collection has entities with widely varying lengths, and the task requires consistency across short acronyms, ordinary single-word terms, and multiword names. Identifying a drug-related word inside a longer name is only part of making a correct prediction. The system also has to determine whether the words next to it complete the name or convey something else about the item.
Collecting judgments and reviewing the result
The authors tried annotation interfaces on Appen and Amazon Mechanical Turk. They initially selected Appen for its facilities for checking worker performance and qualifying workers through test questions. A licensing issue led them to move work to Mechanical Turk during the project. Both platforms contributed to the final corpus, so the paper reports agreement and subsequent review effort for each portion.
A worker saw a listing and marked the beginning and end of each sequence that identified a drug. The title was visible to help interpret the description. That is a useful distinction in difficult cases. A title can suggest what category of expression appears below, while the task still requires the worker to locate the expression itself in the description. The paper presents the interfaces as instances of that same span-marking procedure, with differences in how the written instructions were made available.
The long guidelines were in a separate window on Appen. Mechanical Turk workers could open them through an instructions control and also had a shorter presentation available. The authors revised the guidance during pilots and adjusted conditions such as payments, the time allowed for assignments, and the amount of overlapping annotation. They reviewed samples of work in addition to measuring agreement. These steps gave them ways to see whether a difficult decision was recurring across workers or whether an individual submission required a closer look.
The project obtained over 4,000 valid annotations on Appen and over 7,400 on Mechanical Turk. These figures refer to contributions from workers, whereas 3,507 is the number of listings in the final corpus. Repeated judgments on a listing made it possible to compare the spans that workers selected. They also gave the authors a starting point for review, since the same boundaries marked independently carry different evidence from a single isolated mark.
The paper reports payments in the units used on each platform. The Appen rate was either $0.06 or $0.08 for an annotated document, depending on the batch. On Mechanical Turk, rates ranged from $0.09 to $0.30 per row and from $12 to $18 per hour. The reported expenses were $548 for Appen and $1505 for Mechanical Turk. The Appen expense covered 995 additional annotations that were subsequently invalidated based on performance on the test questions. These are accounts of the collection process under changing conditions, so they give context for the work involved without fixing a universal cost per usable listing.
When assembling the final spans, the authors manually reviewed and corrected annotations supported by at least two workers. They then went through the annotated documents again to recover missed mentions. The distinction between the two review passes matters. Agreement can identify places where people independently chose the same text. It cannot, by itself, identify a name that everyone overlooked. Reviewing the document as a whole lets the authors address omissions as well as change the spans that workers already proposed.
The resulting reference combines crowd input with the authors’ interpretation of the annotation rules. When a recognition system is scored against it, the target is the reviewed corpus. The worker agreement measurements describe an earlier stage and answer a different question about consistency during collection. A comparison between those measurements and the recognizer’s F1 would mix different sets of labels and different purposes for computing the score.
Splitting the corpus and preparing the recognizers
The final split contains 2244 listings for training, 561 for validation, and 702 for testing. The training portion supplies the human-marked examples from which a recognizer learns. A validation portion provides material for comparing settings during development. The test portion is reserved for reporting performance after configurations have been selected. In the few-shot experiment, the authors used the first 100 documents of the training portion. That choice defines the scarce-label condition precisely and ties its results to a particular subset of the labeled corpus.
The standard architecture uses a transformer to produce representations of the input and a linear layer to turn those representations into decisions about entity labels. A representation derived from a transformer depends on surrounding input, so the same spelling can carry different evidence in different passages. The study uses bert-base-cased and roberta-base through the PyTorch implementations described in Transformers. The architecture follows the standard application of BERT to recognition.
The final prediction layer is trained for this task during fine-tuning. In this stage, the systems adjust to the labeled listings. They have already acquired representations from earlier training on text, and the annotated examples connect those representations to span decisions. According to the paper, the standard configuration uses Adam for optimization, sets the learning rate to 5 · 10⁻⁵, and uses batches of four. The learning rate controls the scale of the parameter updates, and the batch size counts how many training examples are processed together for an update. Both the full and few-shot versions were trained for 10 epochs, with an epoch being a pass through the selected training data.
The configurations also vary dropout, which suppresses some activations while a system is training. A dropout rate of 0 leaves those activations intact. With a positive rate, the prediction layer learns under partial suppression. The experiments test both situations because dropout can interact with the training data and the initialization of a system. It is a setting of supervised training, distinct from the question of which unlabeled documents a system reads during domain adaptation.
The authors train FLAIR for 50 epochs with its default hyper-parameters. They feed it representations from bert-base-cased because, in their comparison, these worked better than FLAIR’s own contextualized embeddings. FLAIR is thus a baseline with a different recognition setup and its own training schedule. The name does not imply that the comparison separates all techniques using BERT from all techniques outside it. BERT contributes the input representation to the FLAIR baseline as well as appearing in the direct transformer setups.
Listings are processed as documents so that the recognizer can use context across the short or irregular sentences they contain. The paper gives an average of 103.79 words per document and an average of 152.18 tokens under BERT’s tokenizer. Subword tokenization can split a word into smaller pieces, which is why a limit expressed in those tokens cannot be read as a word limit. The maximum input was 512 sub-word tokens. The authors clipped the 4.1% of documents that exceeded that limit for training and evaluation across the baselines.
The authors also applied a final cleaning step to reduce punctuation noise in item descriptions, describing commas as the exception to the general removal. The appendix gives the custom text substitutions used during preprocessing, including removal of links and handling of repeated special characters. The treatment of punctuation matters to what a result describes. The recognizers are compared on listings prepared through this pipeline, and some original visual signals around names or surrounding material can be altered along the way.
Adapting the systems before labeled training
Domain-adaptive pretraining adds a stage before supervised fine-tuning. A system first continues training on a collection related to DreamDrug, with no hand-marked drug boundaries in that collection. It then learns span decisions from the designated DreamDrug training examples. The unlabeled stage can make representations more responsive to familiar spellings, vocabulary, or uses of words in that text. The supervised stage still supplies the evidence that a particular sequence should count as a mention under the corpus rules.
The Dreammarket adaptation collection consists of drug listings from the same marketplace that were not used to create DreamDrug. The paper describes it as slightly above 800,000 words. It is the closest match to the labeled corpus in both subject and document style. Its role is valuable to distinguish from that of the annotated listings. Reading additional descriptions from the same setting gives the system exposure to how sellers write, but the adaptation collection does not supply expert judgments about where those sellers’ drug mentions begin and end.
The Grams adaptation collection draws on the Darknet Market Archives. The selected subsets come from other marketplaces and cover multiple categories of listings. The resulting corpus contains nearly 1.7 million words. Grams thus offers exposure to marketplace prose across a broader range of goods. Its relationship to DreamDrug is especially relevant to the question of genre. Listing conventions can occur in descriptions of many products, even where the substances and terminology of interest are less concentrated.
The Wikipedia collection emphasizes subject matter in a different kind of writing. The authors downloaded 3,210 drug-related articles and removed sections such as references, further links, and related entries to concentrate on running text. They then used Spotlight to find approximate mentions of entities in DBPedia, a knowledge graph. They retained sentences containing an entity bearing either of the drug-related properties they had chosen, dbp:legalUs or dbp:legalUn. The resulting text amounts to more than 880,000 words.
The DBPedia step is a way of selecting passages. A sentence enters the corpus because an approximate match connects it to a relevant entity with one of the specified properties. The selected sentence is then used as unlabeled text for adaptation. The graph’s entity matches do not become DreamDrug’s answer key. That key comes from the separately annotated marketplace listings and their rules for colloquial words, neighboring names, and exact boundaries.
Together, the adaptation collections contain nearly 3.4 million words. The study compares individual collections as well as the pooled text. This creates settings that differ in topical proximity, genre, and amount of text. The experiment can show whether a given combination helps a recognizer under a reported training setup. Since the collections differ on several dimensions, a performance change alone cannot tell which property of the input was responsible.
The authors published their construction and experiment software under an MIT license and supplied sample files. The paper makes the complete annotated corpus available on request. The software account and the detailed description of annotation explain different parts of what it would take to reproduce the study. The software implements data preparation and experiments, while the review process establishes the judgments that the final scores use as their reference.
Experiments and results
How success was measured
The evaluations use the exact-match convention of the CoNLL-2003 Shared Task. The beginning and end of a predicted mention must both agree with the human-reviewed span. If a recognizer includes an extra descriptor, its prediction misses the exact target even if it picked out the right underlying drug. If it joins adjacent names that the annotation treats as separate, the longer prediction does not match either of the two references.
Precision describes how many of the returned spans are correct as a share of the system’s predictions. Recall describes how many of the reference spans the system recovers as a share of the annotations it is meant to find. F1 combines precision and recall through their harmonic mean. A setting that marks additional candidates can recover more reference spans while making more mistakes, and a more selective setting can make the opposite trade. Reporting all three measures lets a reader see which kind of change accompanied a difference in F1.
A distinction runs through the results. The paper first compares configurations under the few-shot and full-training conditions, varying the base system, adaptation corpus, and dropout. It then provides a separate test table for the best configurations and FLAIR. The configuration scores explain choices among setups. The test scores answer how the selected systems and FLAIR performed on the 702-listing test portion. The paper does not label the split in its configuration table captions, so the figures below identify those measurements as configuration comparisons and reserve “test” for the numbers explicitly reported that way.
What the corpus contains
The full corpus contains 14,934 marked spans in 3,507 listings. The paper reports 3,048 unique drug entities and 364,003 tokens. Its vocabulary analysis shows why a tally of unique entities should be read with care. The corpus preserves textual forms, including variations and misspellings. The same underlying drug can appear under multiple spellings or with differently expressed parts of a chemical name. The count of unique entities therefore describes diversity in the annotation inventory, rather than a count of chemically distinct substances.
The mean number of entities per document is 4.26, while the median is 2. The observed range is from 0 to 101. A typical listing by the median can offer a small number of decisions, while some descriptions contain many more. The mean entity length is 1.9 words, and the median is 2 words. Entities range from 1 to 20 words. These figures give both an intuition for why many spans are short and a reason to evaluate full boundaries. The existence of longer expressions means that single words are an incomplete unit for measuring success.
The table of frequent lower-cased forms includes cocaine with 476 occurrences, THC with 435, and MDMA with 428 across DreamDrug. These are counts of annotated mentions in the corpus. They show which expressions recur frequently enough to contribute repeatedly to evaluation, and they illustrate a variety of surface forms even among the most frequent terms. Some are ordinary lexical names and others are acronyms whose surrounding text can be important to interpretation.
The authors also inspected a sample of rare spans. They found some names of cannabis strains and some specific chemical descriptions. Most items in the sample were spelling variants of common drugs or misspellings. One distinction they draw is between writing out the hydrochloride part of a name and using its abbreviated form. A recognizer could be very familiar with the drug in one form and still have to learn how the alternate wording is used and how much of it belongs inside the span.
Results with limited labeled training
With the first 100 labeled training listings, the plain BERT configuration at dropout 0 scored 63.80 F1 in the configuration comparison. Its precision was 67.84 and its recall was 60.21. BERT adapted on all the unlabeled collections at the same dropout reached 69.86 F1, with precision of 72.91 and recall of 67.06. Within the reported setups at that dropout, the adapted configuration improved both components of the score.
The strongest few-shot configuration in that comparison was BERT adapted on all the collections with dropout 0.5. It reached 70.98 F1, with 76.73 precision and 66.04 recall. BERT with adaptation on the Dreammarket collection alone, at the same dropout, reached 69.43 F1, with 74.20 precision and 65.23 recall. The pooled collection gave the highest reported F1 under these conditions, and Dreammarket by itself accounted for much of the gain the authors discuss.
The reported few-shot RoBERTa entry used all adaptation text and dropout 0.35. It recorded 69.11 F1, with 73.54 precision and 65.18 recall. The FLAIR entry in the configuration comparison recorded 59.72 F1, 60.29 precision, and 59.16 recall. These are comparisons of trained configurations, with their accompanying settings. They show which combinations were stronger in the reported few-shot results and leave open how the base systems would compare across an identical array of settings.
DreamDrug few-shot test F1 with 100 training listings
The selected transformer configuration recovered more exact spans while maintaining higher precision than FLAIR.
The numbers
| System or setting | F1 |
|---|---|
| FLAIR | 62.13 |
| Authors’ best configuration (this paper) | 73.55 |
On the test set, the best few-shot configuration scored 73.55 F1, with precision of 78.38 and recall of 69.28. FLAIR scored 62.13 F1, 65.18 precision, and 59.35 recall. The higher F1 therefore reflects improvement in both evaluation measures in this comparison. The selected system found a larger share of the annotated spans while more of the spans it returned agreed with the reference.
The terms few-shot and full-training concern the number of labeled listings used to train the recognizer for this task. The few-shot system can still read the unlabeled adaptation corpora and draw on the base system’s existing representations. The experiment describes how much annotated supervision this setup can work with, which is the practical constraint the authors want to study. It does not quantify the total amount of text behind a trained system by counting the 100 annotations alone.
Results with the full training set
With all 2244 training listings available, the best configuration in the paper’s comparison was RoBERTa adapted on Wikipedia with dropout 0.1. It scored 82.16 F1, with 84.86 precision and 79.62 recall. RoBERTa without adaptation and with dropout 0 reached 80.84 F1, with 81.13 precision and 80.56 recall. The higher F1 of the selected adapted setting comes with higher precision and a lower recall than that unadapted entry, an example of why the separate measurements matter.
The full-training configuration table also shows FLAIR at 81.42 F1, 80.83 precision, and 82.01 recall. Recall is especially competitive in that comparison. The table’s BERT entry, using all the adaptation corpora and dropout 0.45, scored 81.64 F1, with 85.71 precision and 77.94 recall. This puts the selected BERT setup close in overall score while giving it a different balance of exact matches and coverage of the reference spans.
In the same comparison, RoBERTa adapted on all the text at dropout 0 reached 81.21 F1. It had 86.63 precision and 76.43 recall. The pooled corpus therefore appears in a configuration with high precision, while the setting with the highest reported F1 uses the Wikipedia collection and a different dropout rate. The scores support conclusions about those settings as tested. They do not establish that the source producing the highest value of one metric will also be the preferred source for a system whose objective gives more weight to another metric.
DreamDrug full-training test F1 with 2244 training listings
The selected transformer configuration finished ahead of FLAIR in the full-training test.
The numbers
| System or setting | F1 |
|---|---|
| FLAIR | 81.82 |
| Authors’ best configuration (this paper) | 83.86 |
On the test set with full training, the selected system reached 83.86 F1, with 84.83 precision and 82.92 recall. FLAIR reached 81.82 F1, with 82.75 precision and 80.92 recall. The margin in F1 over FLAIR is visibly smaller here than in the few-shot test comparison. All the reported test settings benefit from having access to the full set of annotations, and FLAIR is a substantially stronger reference point once it has that training material.
The test tables compare complete configurations. They do not give separate test rows for each choice of adaptation corpus and dropout. The evidence for the effect of adaptation comes mainly from the configuration comparisons, where the authors actually vary those settings. The evidence for the overall performance of the selected recognizers comes from the separate test table. Keeping these roles clear matters because an advantage over FLAIR includes all of the differences between FLAIR and the selected setup.
What the ablations show
Adaptation helps most in the few-shot comparison
The clearest comparison holds the base system and dropout fixed while changing the text used for adaptation. In the few-shot BERT runs at dropout 0.5, adding text from any of the reported sources improves F1 over the configuration without adaptation. The unadapted run scored 62.93 F1. The Dreammarket and Grams collections produced the stronger individual-source results, the Wikipedia result was closer to the unadapted score, and the pooled collection gave the highest F1.
DreamDrug few-shot configuration F1 by adaptation corpus at BERT dropout 0.5
The pooled corpus led the comparison, and Dreammarket was the strongest individual source.
The numbers
| System or setting | F1 |
|---|---|
| No adaptation | 62.93 |
| Dreammarket | 69.43 |
| Grams | 68.49 |
| Wikipedia | 64.32 |
| All adaptation corpora (this paper) | 70.98 |
Precision and recall clarify the change. The no-adaptation run at dropout 0.5 had 70.59 precision and 56.77 recall. The pooled-text run at that dropout reached 76.73 precision and 66.04 recall. The Dreammarket run reached 74.20 precision and 65.23 recall. Grams produced 71.87 precision and 65.41 recall. Its recall was slightly higher than Dreammarket’s in this comparison, whereas Dreammarket had the higher precision and F1. With Wikipedia alone, precision was 68.76 and recall was 60.42. Its F1 gain over the unadapted setting thus accompanies greater coverage of reference spans and lower precision.
The authors characterize the improvement from pooled adaptation in this comparison as an 8 point increase in F-score, of which 6.5 can be obtained with Dreammarket alone. Those are the gains as described in the paper. Their interpretation is that access to unlabeled text in the same subject and genre can be especially helpful when the recognizer sees little labeled training material. Dreammarket is a natural example of that kind of match, as its text comes from the same marketplace and concerns drugs.
The source comparison supports that interpretation within the reported settings. It also leaves room for other explanations. Grams has more text than the Dreammarket collection and covers a broader set of products. Wikipedia was assembled through sentence selection from articles, while the marketplace collections consist of listings. A controlled comparison of corpus identity is therefore a comparison of several properties at once. The figures show that certain sources give better results under the tested setup, while the contributions of topic, genre, volume, and selection method remain unresolved.
There is a second few-shot comparison that holds dropout at 0. At that setting, BERT moves from 63.80 F1 with no adaptation to 69.86 with all sources. Adaptation on pooled text helps at both reported dropout rates. The recurrence of the gain makes the main few-shot observation less dependent on a single dropout choice. The available rows still describe specific configurations using the same small collection of labeled examples, so the paper cannot trace how stable the size of the gain would be across different few-shot samples.
More annotation changes the source comparison
With full training, the same broad argument about related text has a more qualified result. At RoBERTa dropout 0.1, no adaptation scores 80.55 F1. Dreammarket gives 80.41 and Grams gives 80.52. Wikipedia gives 82.16, while the pooled corpus gives 81.51. Among entries that hold both the base system and dropout fixed, Wikipedia is the strongest source in the full-training condition. The closest source to the labeled material, which was particularly helpful in the few-shot experiment, does not improve F1 in this comparison.
The full-training numbers help separate an F1 result from a simple increase or decrease in the willingness to predict a mention. At dropout 0.1, RoBERTa without adaptation has 81.43 precision and 79.69 recall. The Wikipedia configuration has 84.86 precision and 79.62 recall. Its principal advantage in those reported measures is higher precision, with recall close to that of the unadapted setting. Grams has 84.99 precision and 76.49 recall, so a higher precision than the unadapted configuration can coexist with a lower F1 once the loss in recall is included.
The best source differs between the reported few-shot and full-training settings, and the configurations also switch from BERT to RoBERTa. That means the comparison cannot give a clean account of what would happen if only the number of labeled documents changed. It does give a concrete result about the experiments the paper ran. With scarce labels, adaptation on listing prose is especially promising. In the full-training comparison, drug-related encyclopedic text has the best individual result among the RoBERTa sources at the chosen dropout.
The full-training rows at dropout 0 reinforce the importance of reading the exact conditions. RoBERTa without adaptation recorded 80.84 F1, compared with 80.83 for Wikipedia and 81.21 for all sources. The preference for Wikipedia seen at dropout 0.1 is absent in that group. A reader selecting among complete configurations can use the ordering as reported. A reader asking for a single best adaptation source across settings would need additional evidence.
Dropout and data change the balance of errors
Some rows let the reader compare dropout with the adaptation source held fixed. In few-shot BERT without adaptation, dropout 0 produces 63.80 F1 and dropout 0.5 gives 62.93. Precision rises from 67.84 to 70.59 while recall falls from 60.21 to 56.77. With adaptation on all sources, F1 is 69.86 at dropout 0 and 70.98 at dropout 0.5. The higher dropout again accompanies higher precision and lower recall, but the combined score now favors the configuration with dropout.
The same pattern should not be read as a general law of dropout. The rows show what happened for particular trained systems. They are enough to explain why the selected configuration includes a particular rate even though that rate performed worse in the no-adaptation comparison. An ablation that changes a single setting isolates a contrast within a configuration, and changing the configuration can alter the answer. The practical effect of dropout here depends on the other conditions with which it is combined.
The study’s best reported few-shot configuration uses BERT, and its best reported full-training configuration uses RoBERTa. Since the rows also differ in the adaptive corpus and dropout, those standings do not isolate the architectures. The evidence is stronger for specific comparisons that keep those conditions visible. It shows that ordinary recognition architectures can learn from this annotation, that adaptive pretraining adds appreciable value in the fixed few-shot comparisons, and that choosing among the reported full-training setups depends on how precision and recall move together.
The annotation comparisons describe the review workload
The crowd agreement analysis compares the process on the two platforms. Mechanical Turk has Cohen’s kappa of 0.76, micro F1 agreement of 0.79, and macro F1 agreement of 0.78. Appen has corresponding scores of 0.43, 0.55, and 0.60. Kappa accounts for agreement expected by chance. For macro F1 in this table, the authors average the F1 scores across annotator pairs. Micro F1 pools their relevant decisions before computing the score, which gives more influence to the decisions represented in greater numbers.
The review statistics describe the work that followed. Review added 13.19% of spans in the Mechanical Turk portion and 27.49% in the Appen portion. The percentages of spans deleted or altered were 8.65 and 10.45 respectively. Additions show that omissions were substantial enough to merit a review of the whole document, even where workers had agreed on some spans. Deletions and boundary changes show the value of inspecting the marks that were already present.
Character-level edits provide another view of the same work. The paper reports 8.56% of characters added on Mechanical Turk and 25.81% on Appen, with 3.51% of characters deleted on Mechanical Turk and 0.89% on Appen. Character counts and span counts can move differently because changing a boundary by a small amount and adding a full phrase affect the annotated text in different ways. The authors give both measures to describe how much intervention their reviewers made.
These observations do not amount to a controlled comparison of the platforms. The authors used Appen first, revised the instructions over the course of the work, and used a different presentation of the guidance on Mechanical Turk. The qualification and incentive arrangements differed as well. They suggest those factors as possible explanations for the differences. What the figures establish is that the Mechanical Turk portion showed higher agreement under the conditions used and that the Appen portion required more additions during review.
Limitations
Limits described by the authors
The authors acknowledge that filtering for length removed some useful material. They retained the filter because it also removed uninformative short descriptions and long stretches of boilerplate. The result is a corpus built for practical annotation, with fewer listings at the extremes. A system applied to unusually short or long descriptions would face material deliberately underrepresented by that procedure. Even within the retained corpus, the documented 512-token input limit means that some tail text was clipped in the experiments.
The paper also limits its interpretation of the crowd comparison. It reports differences in agreement and manual correction effort but leaves the reasons open. The instructions evolved, platform eligibility criteria differed, and workers saw the guidance in different ways. The reported expense and edit figures are therefore tied to the course of this project. They cannot predict how much rework another group would face under different instructions or comparable rates on the two platforms.
The annotations cover drug spans. In the conclusion, the authors describe extensions involving additional entity classes, relations between a drug and its quantity or strength, and links from mentions to a knowledge base. The experiments leave those extensions untested. In a listing containing several names and a strength statement, the evaluated system can receive credit for finding the names without identifying which name the strength belongs to. This distinction determines how far a successful recognition result can support a broader extraction task.
The paper describes an ethical review through the COPKIT project, including approval for the source used in annotation and the decision to pseudonymize identifying details. Access to the complete data is managed by request to limit use outside research. The authors made the software and sample files available. For someone seeking to repeat the full experiments, the distinction matters because reproduction of the exact scores requires access to the reference annotations as well as the processing and training procedures.
Limits of the experimental setup
The held-out DreamDrug listings come from the corpus constructed through the same marketplace selection, language filtering, and annotation process as the training listings. Test performance therefore describes generalization within that setting. Grams contributes text from elsewhere during adaptation, but those listings are not a separately annotated evaluation set in the paper. Exposure to other marketplaces in training gives no direct measure of whether the resulting recognizer maintains its performance when the test marketplace changes.
The annotation rules are part of that scope. They treat an expression as a drug mention when the expression identifies the relevant article under the definition used for DreamDrug. Some decisions depend on what a word means in these listings. The treatment of mushroom is an example. A reader applying the same label to medical text, general conversation, or another marketplace would need to establish whether the word carries the same implication there and whether the intended annotation should preserve it.
Both the document filters and the test metric shape what the benchmark can show. A repeated description is deliberately less likely to remain in the sample when its text matches another listing. This limits repeated boilerplate and very similar product descriptions, yet the paper does not establish a separate split by seller, underlying substance, or naming convention. The experiment accordingly cannot quantify transfer to entirely unfamiliar sellers or names, or determine how much its performance depends on encountering familiar terminology during training.
Similar care is needed with the rare-span analysis. The authors’ manual inspection indicates that unusual forms frequently include variants of familiar drugs. The main evaluation pools the exact matches across the test material. It supplies no separate score for rare spellings, unfamiliar names, unusual slang, or especially long spans. The corpus contains these phenomena, but their inclusion does not reveal which ones drive the remaining recognition errors or whether adaptation primarily helped common expressions.
The few-shot setup uses the first 100 documents in the training set. The study does not report a distribution of scores across differently drawn groups of that size. A recognizer could see a different mix of names, document lengths, and challenging boundaries in another group of 100 listings. The reported comparison demonstrates what adaptation achieved under the chosen labeled sample. It offers less evidence about the variability a reader should expect from another selection of the same size.
The unlabeled collections also make several properties change at once. Dreammarket shares both subject and marketplace with the target corpus, Grams covers listings across domains, and Wikipedia applies a topic-based sentence selection procedure to a different genre. Their sizes differ. The experiment compares these sources in usable combinations, which is appropriate for deciding how a particular system performed. It has no size-matched or topic-matched contrast that could identify the effect of genre independently.
In the experiment, exact span scores are a measure of adherence to the annotation. They cannot distinguish every kind of mistake that a downstream reader might care about. A partial span can miss the evaluation criterion even when a person can infer the intended drug. Conversely, a perfectly matched span may occur in a passage whose relevance depends on whether the seller is describing the current product, invoking a comparison, or making another kind of claim. The evaluation resolves the boundary question and leaves interpretation of those claims to a separate task.
Finally, the description of a drug in a listing is evidence about the listing’s language. The paper gives no independent verification of what was sold or what a named product contained. Counts of spans measure mentions in a curated text collection. Even a recognizer that reproduced every reference span would leave the real-world identity of products and the prevalence of particular transactions open. Those questions require evidence beyond the strings that DreamDrug was designed to mark.
What came after
No subsequent studies are documented for this article. The paper itself identifies directions for extending the corpus, including marking other entity types, linking a drug mention to a quantity or strength, and connecting names in listings to entries in a knowledge base. Each would add a different judgment to the existing span labels. The reported experiments establish performance on locating drug mentions, which is the part those extensions would build on.
Cite
Cite as Johannes Bogensperger, Sven Schlarb, Allan Hanbury and Gábor Recski. 2021. DreamDrug - A crowdsourced NER dataset for detecting drugs in darknet markets. Proceedings of the Seventh Workshop on Noisy User-generated Text (W-NUT 2021).
@inproceedings{bogensperger2021dreamdrug,
title = {{DreamDrug - A crowdsourced NER dataset for detecting drugs in darknet markets}},
author = {Johannes Bogensperger, Sven Schlarb, Allan Hanbury and Gábor Recski},
booktitle = {Proceedings of the Seventh Workshop on Noisy User-generated Text (W-NUT 2021)},
year = {2021},
doi = {10.18653/v1/2021.wnut-1.17},
url = {https://doi.org/10.18653/v1/2021.wnut-1.17}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bogensperger-2021-dreamdrug-crowdsourced-ner-dataset-detecting/