Elamur Research

Generalizing Unmasking for Short Texts

Paper · 2019 · Janek Bevendorff, Benno Stein, Matthias Hagen et al.

Summary

When only a few pages of writing are available, how much can they reveal about who wrote them? Authorship verification asks whether a pair of texts came from the same person. The question is easy to state, but a system can correctly decide many pairs in an experiment and still be difficult to trust on a particular case. Bevendorff and colleagues address both problems. They adapt a technique called unmasking, originally developed for book-length material, to work with much shorter texts. They also give the verifier a way to leave a pair undecided when its evidence is weak.

Unmasking starts by learning to distinguish samples from the two texts in a pair. It then removes the word-frequency features that best distinguish those samples and repeats the comparison. The sequence of scores shows how much the distinction depends on the strongest features. In the original method, scores tended to fall faster for texts written by the same person. With short texts there are too few substantial passages to run this procedure as designed. The authors instead shuffle and reuse the words from each text to make samples, repeat the comparison with freshly drawn samples, and average the resulting curves. A second classifier learns to distinguish same-author curves from different-author curves.

The experiments use English literary texts from Project Gutenberg, each approximately 4,000 words long, with 180 labeled training pairs and 80 test pairs. The paper places the new method in the 75–80% accuracy range of other systems designed for short texts. In the head-to-head test, its precision was 0.82 at the comparison setting, edging out the other systems on that measure, while its recall was 0.54. The authors found no statistically significant difference in binary decision quality between generalized unmasking and either of the stronger comparison systems they tested against it.

The confidence threshold makes a different kind of result possible. At a threshold of 0.4, the verifier answered 50.0% of the test cases and achieved a same-author precision of 1.00. At 0.8, it answered 13.8% of cases with the same observed precision and lower recall. Those scores describe the authors’ test set. The practical contribution is a way to choose how readily to make a decision, and an evaluation that shows what happens to coverage and recall when the verifier becomes more selective.

Deep dive: Generalizing Unmasking for Short Texts

Generalized unmasking compares writing styles in short texts and can withhold authorship decisions when the evidence is weak. · about 33 minutes to read

The problem and its context

What can a pair of short texts tell us?

A verifier receives a pair of texts and has to decide whether they were written by the same person. One text can play the role of the questioned document and the other the role of material available for comparison. The reference text supplies evidence about the writing in the questioned document. The system can also be asked to compare texts without being given a writer’s name. In either case, the decision concerns the relationship between the two pieces of writing.

The paper distinguishes verification from attribution. An attribution task presents a set of candidate authors and asks which of them wrote a text. Verification takes a proposed connection and evaluates it. A positive result supports common authorship, while a negative result supports different authorship. This distinction determines how to design the training and test data. A verifier needs examples of pairs with each kind of relationship, and its output concerns that relationship even when the underlying writers vary across cases.

Short texts make the comparison difficult because the system sees relatively few instances of the choices that could distinguish writers. A word may be common in one text because it suits the subject, the period, or the kind of writing. An apparent difference in frequency could also depend on which part of a longer work became available. Reliable evidence has to come from whatever patterns remain in the material the verifier actually receives. More writing from each source gives the system more opportunities to observe those patterns and to judge whether they recur across passages.

These difficulties matter most when a user must act on the judgment about an individual pair. An overall accuracy score records how frequently a verifier was right across a collection, and it can be valuable for comparing systems. A reader still needs to know whether the verifier has a way to identify the pairs on which it is prepared to make a strong claim. In the forensic setting considered by the authors, incorrectly linking two texts can have serious consequences. Leaving a case open may be preferable to presenting an uncertain link as a confirmed match. That preference changes the question an evaluation must answer. The reader needs to know how often the system can decide and what its errors look like among the decisions it makes.

How earlier research approached the comparison

The paper traces authorship analysis back to the late 19th century and describes attribution as the task that had received much of the attention. For verification on long material, it highlights unmasking, introduced by Koppel and Schler in 2004. Their approach asks an indirect question about a pair. It begins by learning the features that best distinguish the two texts and then tests how much evidence remains when those features are taken away. The pattern of deterioration becomes evidence about whether the texts share an author.

This approach rests on an observation about the distribution of the differences. Two writings by the same person can still contain obvious contrasts, since each is a particular piece with its own subject and vocabulary. If the distinction between the two texts depends mostly on a small set of strong cues, removing those cues should quickly make their passages harder to tell apart. When two people wrote the texts, differences may extend across more of the vocabulary. Under that hypothesis, a classifier can continue to separate passages after its strongest cues have been removed. The original procedure tests for this tendency empirically by training on known examples of both kinds of pair.

The authors describe this method as a standard for long texts and single out a problem in transferring it. It was set up to compare many substantial chunks from each source, so it relied on having enough material to divide a text into that many pieces. Sanderson and Guenter found that unmasking performed much worse on short texts. According to the paper, their alternative yields acceptable results when each training text contains at least 5,000 words. That figure concerns the requirements of the earlier approach. The general problem is that short source texts can supply too few usable training examples for the comparison within a pair.

The PAN shared tasks moved verification towards shorter material. The authors discuss the shared tasks from 2013, 2014, and 2015 as places where systems designed for that setting outperformed unmasking. The English-language PAN 2015 dataset illustrates a particularly demanding length regime. An individual text averaged about 1.5 kB and contained less than 400 words on average. The paper reports that the participants did not use unmasking there. It also discusses work based on compression, where the way text can be encoded compactly provides a basis for assessing similarity. Later compression approaches within that line of prior research were competitive with systems developed for the shared tasks.

PAN also made provision for non-answers. This matters because a verifier used as a decision aid has two related jobs. It needs some way to distinguish the classes, and it needs some way to judge when the distinction is strong enough to report. An evaluation can acknowledge both jobs by allowing a system to decline individual cases while keeping those cases visible in the scoring. The paper uses PAN’s measure for that purpose and introduces an additional measure for situations in which the positive claim, that the texts have a common author, deserves particular care.

The particular obstacle for unmasking

In the original method, the chunks are passages cut from the source. This divides the main difficulty of handling short texts into two parts. The method needs enough passages to train and test a classifier within each pair. It also needs enough words within each passage for the selected frequencies to carry information. Making passages shorter addresses the first requirement at the expense of the second. Keeping passages long preserves the amount of information in each example but leaves few examples to work with.

One obvious response is to allow passages to overlap. That increases the number of examples, but neighboring examples can then contain much of the same wording. The authors found the benefit of that approach marginal. They instead draw on a property of the features that the original method already uses. Once a passage has been represented by word frequencies, the original order of its words is absent from the representation. An artificial sample assembled from scattered positions can therefore be represented in the same way as a continuous passage. The authors use that freedom to change how the training examples are made, while retaining the test of how separability changes under feature removal.

This sets up two questions for the experiment. One is whether curves made from resampled short texts can support competitive verification. The other is whether the final classifier provides a useful basis for declining difficult cases. The first concerns how informative the curves are across labeled pairs. The second concerns whether classifier scores can help select a smaller set of decisions whose positive claims are more trustworthy on the test corpus.

The method, step by step

Learn what separates the texts in a pair

Unmasking involves two levels of machine learning. At the first level, the system knows which text each sample came from. It treats the samples from text A as one class and the samples from text B as the other. The classifier’s job at this level is to recover the sample’s source. At the second level, the examples are whole pairs, represented by the curves from the first level. The classes at that level are same author and different authors. Keeping these levels distinct explains why the scores along a curve have a different meaning from the final verification score.

The original procedure cut each source into non-overlapping passages of at least 500 words, leaving paragraphs intact. It used the 250 words with the highest average frequency in the two sources as features. A feature records the frequency of a selected word in a sample. Because each sample becomes a vector of these frequencies, the classifier can work with differences in the use of words across samples. This representation is commonly called a bag of words. It retains how frequently each selected word occurs and discards its position.

The authors describe the first classifier as a linear support vector machine, or SVM. In this setting, it learns a boundary that assigns samples to one or the other source from their word frequencies. The boundary is a hyperplane, the counterpart of a dividing line when the samples have many features. Each feature has a signed weight. A strong weight in one direction makes that word evidence for one source, while a strong weight in the other direction makes it evidence for the other. The signs arise from the way the sample classes are assigned. They have no direct authorship meaning at this stage.

To estimate how well the classifier distinguishes the sources, the original method uses 10-fold cross-validation. The samples are divided into folds. In turn, a fold is held out for testing while the classifier is trained on the others. The held-out predictions yield an estimate of source-classification accuracy given the features still available. This validation occurs within the particular pair. Later, a separate split of whole pairs is used to assess whether the verifier has learned patterns that transfer to other comparisons.

The original procedure then looks at the feature weights learned in each fold and eliminates the 3 strongest positive features and the 3 strongest negative features for that fold. It performs the classification again with the reduced feature set and records another cross-validation score. Continuing through successive removals gives a curve whose horizontal progression represents rounds of elimination and whose height represents accuracy at identifying the sources. The paper describes a tendency for same-author pairs to fall faster than different-author pairs. Individual curve shapes can vary, so the final decision procedure is trained on labeled examples.

Generalized unmasking from a text pair to a decision

The steps in order.

Generalized unmasking from a text pair to a decisionStep 1: Draw word samples separately from each text1. Draw word samples separately from each textStep 2: Represent samples by frequent word counts2. Represent samples by frequent word countsStep 3: Cross-validate a classifier that distinguishes the texts3. Cross-validate a classifier that distinguishes the textsStep 4: Remove the strongest features and score again4. Remove the strongest features and score againStep 5: Repeat with fresh samples and average curves5. Repeat with fresh samples and average curvesStep 6: Describe the curve and its gradients6. Describe the curve and its gradientsStep 7: Score authorship with the trained pair classifier7. Score authorship with the trained pair classifierStep 8: Apply the confidence threshold to the decision8. Apply the confidence threshold to the decision

Make samples by drawing from each text

Generalized unmasking replaces contiguous passages with randomly assembled chunks. Each text forms its own pool of word occurrences. If a word occurs repeatedly in the text, those occurrences are available as separate draws. The system draws without replacement from the pool to fill chunks. When it exhausts a pool, it replenishes it and resumes drawing. The sampling scheme thus passes through the available words before reusing them through replenishment. The words assigned to a sample can come from anywhere in its source text.

The distinction between occurrences and distinct vocabulary items is important. Drawing from distinct items would give common and rare words the same representation in the pool. The procedure relies on the frequencies in the source, so repeated occurrences matter. The draws preserve the distinction between the sources as well. Every word in a sample drawn from A comes from A, and every word in a sample drawn from B comes from B. That gives the source classifier the same kind of labels it had when its examples were ordinary passages.

The generalized configuration generates 30 chunks of 700 words from each source. Those are the sizes of the artificial examples used to make an individual curve. They are separate from the length of each text in the corpus. Drawing chunks this way allows the system to work with far more samples than it could create by cutting a short source into passages of comparable size. Since samples can reuse words after a pool is replenished, this increase is an increase in the number of views of the source. The stylistic material comes from the original text throughout.

Random assembly also changes what sample-to-sample variation means. Contiguous passages may differ because they treat different parts of a story or argument. Randomly assembled chunks mix occurrences from across the source, and their frequencies vary with the draws. That variation gives the classifier examples to work with, but the resulting curve can depend noticeably on one random sample set. The authors found that using this sampling approach for a single run produced curves with high variance. Repetition and averaging are therefore part of the method used in the experiments.

Build a removal curve from the samples

The new procedure keeps the original selection of 250 words by highest average frequency across the pair and the 10-fold validation of a linear SVM. At a given round, the classifier learns how to distinguish the samples in each fold using the features that remain. The score summarizes how well the source can be identified at that stage. Once the score has been recorded, the procedure looks across the folds for the features that make the strongest contributions.

The removal rule changes from the original. The generalized method uses the feature importance averaged across folds and eliminates the 5 strongest features in each direction, for a total of 10 removals in a round. The direction matters because the classifier can have highly informative cues for either text. Treating the two directions separately lets the removal procedure probe the strongest evidence associated with each source. The resulting reduced set supplies the features for the next round.

Retraining after removal is central to the interpretation. If a classifier that relied on a particularly strong word loses access to it, other words may still distinguish the sources. A fresh fit shows how much discrimination the remaining features can support. The rounds therefore trace the decline of the best separation the chosen classifier can learn as its vocabulary is reduced. A sharp early drop suggests that a relatively small set of available features was doing much of the work. A slower drop suggests that the remaining features continue to carry useful differences between the samples. These interpretations concern the discriminability of a pair under the procedure. The trained verifier determines how those patterns relate to the authorship label.

The authors repeat the curve-building procedure on new random chunks and take the average accuracy at corresponding rounds. Averaging combines estimates from several sets of samples drawn from the same pair. An unusual set of chunks can alter a run, but it has less influence on the averaged curve. The experiments regard about 10 runs as sufficient for stable classification, with 15–20 still a sensible choice when extra repetition is acceptable. This averaging is performed separately for each pair. Each training or test pair ultimately has its own curve.

Describe the shape and learn the authorship decision

The averaged accuracy values are inputs to the second linear SVM. They show how well the first classifier separated the sources at each round. A verifier using only the accuracy values could learn that some parts of the curve matter more than others, but the authors also supply features that describe changes in the curve. These let the final classifier use the pace of deterioration more directly.

The generalized verifier uses first-order and second-order gradients obtained through central differences. A central difference estimates change around a point using values on either side of it. The first-order gradients describe local slopes. Large downward changes correspond to stretches where taking features away made the samples much harder to separate. The second-order gradients describe how the slope itself changes. They can distinguish a section where accuracy declines at a steady rate from one where the decline suddenly becomes steeper or starts to level out.

The representation also includes gradients sorted by magnitude. A sequence of gradients in round order keeps track of where changes occur. A sorted sequence makes the sizes of the changes available in rank order, so a large change can be represented in much the same position among the sorted features even if it takes place in a different round. The paper’s description of the original algorithm likewise includes the curve points, derivative features, and information ordered by the steepest drops. Generalized unmasking preserves the use of several complementary views of the curve while describing its gradients through central differences and magnitude sorting.

For training, the authors generate these representations for pairs whose authorship relationships are known. The final SVM sees each representation with its same-author or different-authors label. For testing, the same sequence of sampling, removal, averaging, and gradient construction produces a representation for each test pair. The final SVM then scores the pair from that representation. The word features in the first classifier serve the comparison between the two texts at hand. The second classifier learns from patterns in curves across many pairs, which gives it a common type of input even when the vocabulary differs from one pair to the next.

The score of the second classifier places a pair on one side or the other of its hyperplane. The side supplies the proposed class, and the distance from the hyperplane determines whether the pair clears the chosen confidence threshold, written as c. A pair sufficiently far from the boundary can receive either class. A pair too close to it remains undecided. Raising the threshold requires stronger separation from the boundary for a decision. The study assesses the consequences of changing this requirement through observed classification outcomes.

The two classifiers thus use their boundaries in different ways. The inner classifier produces a sequence of accuracies and supplies the weights that guide feature removal. It is fitted again as the features change. The outer classifier consumes the resulting representation, proposes the authorship class, and provides the distance used for abstention. This is why removing words and raising the confidence threshold have different effects. Feature removal creates the evidence for a pair. The threshold determines whether the final classifier will issue a decision based on that evidence.

Score decisions when the verifier can abstain

The authors use accuracy to discuss general performance, but a verifier that can leave cases open needs additional measures. Coverage, reported as the percentage of cases classified, gives the fraction that receive a decision. Precision is the proportion of predicted same-author cases that really do share an author. Recall is the proportion of actual same-author cases that the system identifies. A verifier can have high precision while recovering a small proportion of the true matches. The paper’s threshold experiment measures that possibility directly.

The PAN measure c@1 gives some credit for abstaining when the system is accurate on other cases. The paper writes the measure in terms of correct answers and unanswered problems.

c@1 = (1 / n) · (n_ac + (n_ac / n) · n_u)

Here, c@1 names the metric and is distinct from the confidence threshold c. The symbol n is the total number of problems, n_ac is the number answered correctly, and n_u is the number left unanswered. The dot indicates multiplication, the slash indicates division, and the parentheses show which terms are grouped. The 1 / n factor expresses the total credit relative to the number of problems. Inside the parentheses, correct decisions receive direct credit, and each unanswered problem contributes an amount determined by the correct-answer count divided by the total problem count. When the system answers every case, c@1 reduces to accuracy. The endpoints reported by the authors are 1 for a fully correct set and 0 for a wholly wrong or wholly unanswered set.

This measure gives correct positive and negative decisions the same role. That is appropriate if both decisions have similar value. The motivation for a second measure is a situation in which the main aim is to make reliable same-author claims. The authors take an F measure with a parameter of 0.5, which places more weight on precision than on recall, and give non-answers a specific penalty. They call this version F₀.₅u.

F₀.₅u = ((1 + 0.5²) · n_tp) / ((1 + 0.5²) · n_tp + 0.5² · (n_fn + n_u) + n_fp)

Here, F₀.₅u names the score with the adjustment for unanswered cases. The symbol n_tp counts true positives, cases correctly identified as having a common author. The symbol n_fn counts false negatives, cases given a negative answer in spite of having a common author. The symbol n_fp counts false positives, cases incorrectly linked to a common author, and n_u again counts unanswered cases. The superscript ² squares the parameter value 0.5, which the paper calls β. The dots denote multiplication, the plus signs add terms, and the slash divides the numerator by the entire denominator. The 1 + 0.5² factor gives true positives their weight. The denominator adds the weighted cost of false negatives and unanswered cases, along with the false-positive term. The value of β can be chosen to reflect a different balance between precision and recall.

There is a distinction between the way the threshold table computes recall and the way the adjusted F measure treats unanswered cases. For recall, the table assigns every unresolved pair to the negative class. An unresolved actual match therefore reduces the measured recovery of matches. In F₀.₅u, the formula adds the entire unanswered count to the false-negative term used for scoring. That includes abstentions on pairs that in fact came from different authors. This is an evaluation convention that charges the verifier for withholding decisions while assigning a heavier cost to incorrect positive claims. It does not turn an unresolved pair into a reported different-authors finding.

Together, the measures answer different questions. Coverage shows how many cases receive an answer. Precision and recall show the reliability and reach of the positive decisions. c@1 summarizes correct decisions across both classes and gives partial credit for abstaining. F₀.₅u focuses attention on positive verification and assigns its own cost to unanswered cases. The same set of decisions can consequently look more favorable under one measure than under another, particularly when a large share of cases is unresolved.

Experiments and results

A literary corpus organized into pairs

The authors draw their texts from Project Gutenberg. Each text contains about 4,000 words, or 23,000 characters, and the collection represents 390 distinct English-language authors. The authors selected material of similar genre and publication period to reduce the chance that the system would come to rely on readily detectable topic differences. The task was set up as a comparison of authorship within this literary material.

The training split contains 180 pairs, comprising 90 same-author and 90 different-authors cases. The held-out test split contains 80 pairs, comprising 40 same-author and 40 different-authors cases. Thus the classes are equally represented in each split. The training pairs supply the labels for learning to recognize types of curves and for cross-validating hyper-parameter configurations. The test pairs supply the verification results, including the score comparisons and the effects of the confidence threshold.

The paper’s notion of a short text is relative to the demands of the original algorithm. In an earlier experiment, Koppel and Schler used 21 books from 10 authors, with every book measuring at least 500 kB. Their reference profile for an author used that person’s available books, excluding the book being verified when necessary. The earlier work reported verification accuracy of over 95% in that setting. The new experiment has much less text per source, and it trains on pairwise curves formed from resampled words. Its test scores belong to that shorter-text setting. The book experiment describes the starting point for the method, with a different collection and a different arrangement of reference material.

How the alternative verifiers were tested

The authors compare generalized unmasking with Bagnall’s approach from PAN and with a reimplementation of Halvani and colleagues’ compression approach. For Halvani and colleagues’ method, the authors report parallel results for Compression-based Cosine, abbreviated CBC, and the Chen–Li metric, abbreviated CLM. Both give the classifier a way to express similarity using compression. The reimplementation uses PPMd as its compression algorithm and a random forest with 100 trees for classification. A random forest combines decisions from a collection of tree classifiers. The two reported compression settings show how the choice of similarity measure affects the comparison.

The authors set the unmasking confidence threshold to 0.1 for the head-to-head comparison. They describe this as giving approximately the same degree of c@1 optimization as in Bagnall’s system. The comparison therefore uses a setting where unmasking can decline some cases. The paper also reports that unmasking attains a higher F₀.₅u at c = 0. The choice of 0.1 reflects the intended comparison on c@1 and is one particular operating point on the verifier’s threshold curve.

Bagnall’s approach also differs in the information it uses for a decision. The paper describes it as relying on other texts in the input collection when scoring a pair. Unmasking and the compression approaches are intrinsic in the sense used by the authors. Once trained, they can evaluate a pair from its own texts. The comparison includes both kinds of system because each is a valid approach to the benchmark. The distinction matters when interpreting what the reported performance would imply for an isolated pair.

Same-author precision on the Project Gutenberg test pairs

Generalized unmasking has the highest observed precision at the comparison setting.

Same-author precision on the Project Gutenberg test pairsHalvani et al. (CBC): 0.71Halvani et al. (CBC)0.71Halvani et al. (CLM): 0.78Halvani et al. (CLM)0.78Bagnall: 0.81Bagnall0.81Generalized unmasking at c = 0.1 (this paper): 0.82Generalized unmasking at c = 0.1 (thispaper)0.82
The numbers
System or settingprecision
Halvani et al. (CBC)0.71
Halvani et al. (CLM)0.78
Bagnall0.81
Generalized unmasking at c = 0.1 (this paper)0.82

Precision favors generalized unmasking in this comparison, while recall favors the strongest compression setting. At c = 0.1, generalized unmasking has recall of 0.54 on the test pairs. Bagnall’s approach has recall of 0.71, the CLM setting has recall of 0.78, and the CBC setting has recall of 0.71. The CLM result has the same reported precision and recall, both 0.78. These results show why a choice based on precision can favor a different system from a choice based on how many actual matches it recovers.

The combined metrics reflect the difference in emphasis. The F₀.₅u scores on the test pairs are 0.74 for generalized unmasking, 0.77 for Bagnall, 0.78 for CLM, and 0.71 for CBC. Their c@1 scores are 0.76, 0.79, 0.78, and 0.70, respectively. Bagnall has the highest observed c@1, and CLM has the highest observed F₀.₅u. The paper characterizes the leading approaches as broadly comparable. Its reported rankings are specific to these variants, these measures, and the chosen settings.

What the comparison establishes

The authors use McNemar’s test to compare binary decision quality on the same held-out cases, treating unanswered cases as incorrect. The test looks at disagreements in correctness between two systems that evaluate the same examples. If one system frequently gets cases right where the other fails, and the reverse is sufficiently uncommon, that pattern can provide evidence of a difference in their decision quality. The comparison therefore draws on which cases each system gets right as well as the overall direction of the scores.

For generalized unmasking against Bagnall, the paper reports a chi-squared statistic of 0.35 and a p-value of 0.56. Against CLM, it reports a statistic of 0.83 and a p-value of 0.36. The authors interpret these tests as failing to establish a difference in binary decision quality. The tests address the correctness of the decisions with non-answers counted as wrong. The observed precision ranking answers a narrower question about the system’s positive calls and remains a descriptive result at the comparison setting.

The authors also report elapsed times on their corpus. They credit the compressor’s optimized C implementation for keeping the compression method’s runtime below one minute. Their generalized unmasking implementation took about 2–3 minutes. Bagnall’s system took 4:45 hours for all 80 test cases. These timings describe the implementations used in the study. They show that generalized unmasking was feasible to run in the authors’ setting even with repeated sampling, feature removal, and validation. The runtime comparison also gives context to the paper’s discussion of how many curves to average.

The authors released the source code for their general-purpose unmasking framework and the data used in the experiments. The framework supports experiments with different features and parameters and can aggregate intermediate or final results across runs. It associates a detailed job configuration with each run, so choices such as chunk construction, feature selection, and averaging can be recorded together. That matters for a procedure whose outputs depend both on settings and on repeated sampling. A score belongs to a full experimental configuration, including how the curve was produced.

How stricter acceptance affects the test results

The threshold experiment varies c, the minimum distance required from the final classifier’s boundary. At c = 0.0, generalized unmasking classified 100.0% of the test cases. Its precision was 0.83, recall was 0.59, F₀.₅u was 0.76, and c@1 was 0.73. With every pair answered, the c@1 score also gives the accuracy at that operating point. The positive precision describes how often same-author decisions were correct, while that overall accuracy also reflects the negative decisions.

At c = 0.1, the classifier answered 91.2% of the test pairs. Precision was 0.82 and recall was 0.54. F₀.₅u was 0.74 and c@1 was 0.76. These readings illustrate that adjoining threshold settings can look different depending on the metric. The move to this setting improves the reported c@1 while lowering the reported F₀.₅u. The precision at 0.1 is also a little below the observation at 0.0. The authors note that results at low thresholds can vary because the chunks are randomly generated.

At c = 0.4, the classifier answered 50.0% of the test pairs with precision of 1.00, recall of 0.39, F₀.₅u of 0.64, and c@1 of 0.66. At this point every reported same-author decision in the experiment was correct. The coverage figure includes answers of either class, while precision refers specifically to the positive answers. The recall records how much of the set of actual matches the verifier identified, including the effect of unresolved cases.

Coverage at different thresholds on the Project Gutenberg test pairs

Requiring greater distance from the classifier boundary leaves more pairs unresolved.

Coverage at different thresholds on the Project Gutenberg test pairsGeneralized unmasking at c = 0.0 (this paper): 100.0Generalized unmasking at c = 0.0 (thispaper)100.0Generalized unmasking at c = 0.1: 91.2Generalized unmasking at c = 0.191.2Generalized unmasking at c = 0.4: 50.0Generalized unmasking at c = 0.450.0Generalized unmasking at c = 0.5: 38.8Generalized unmasking at c = 0.538.8Generalized unmasking at c = 0.6: 23.3Generalized unmasking at c = 0.623.3Generalized unmasking at c = 0.7: 15.0Generalized unmasking at c = 0.715.0Generalized unmasking at c = 0.8: 13.8Generalized unmasking at c = 0.813.8
The numbers
System or settingclassified cases %
Generalized unmasking at c = 0.0 (this paper)100.0
Generalized unmasking at c = 0.191.2
Generalized unmasking at c = 0.450.0
Generalized unmasking at c = 0.538.8
Generalized unmasking at c = 0.623.3
Generalized unmasking at c = 0.715.0
Generalized unmasking at c = 0.813.8

Here, the starred setting gives the greatest coverage. Readers interested in the reliability of positive decisions have to read coverage alongside precision and recall. Across the reported settings from c = 0.4 through c = 0.8, precision remains at 1.00. Over those settings, coverage and recall both decline. At c = 0.5, the test coverage is 38.8% and recall is 0.32. At c = 0.6, the paper gives coverage of 23.3% and recall of 0.27. At c = 0.7, coverage is 15.0% and recall is 0.24. At c = 0.8, coverage is 13.8% and recall is again 0.24. The repeated precision score means that several thresholds made no incorrect same-author calls in this experiment, even though they reached different shares of the corpus.

The combined measures separate more clearly as the verifier answers fewer cases. At c = 0.5, F₀.₅u is 0.55 and c@1 is 0.54 on the test pairs. At c = 0.6, the respective scores are 0.47 and 0.41. At c = 0.7, they are 0.42 and 0.25, while at c = 0.8 they are 0.42 and 0.26. The paper points to a shift in the class balance among the decisions as the threshold becomes stricter. c@1 considers correct decisions across both classes, while the adjusted F measure depends on how selective and successful the verifier is in identifying matches. Each responds differently to the mix of cases left unresolved.

The authors discuss c = 0.6 or higher for settings requiring greater assurance and at least 0.7 where avoiding an incorrect link is critical. They describe the decisions at c ≥ 0.8 as nearly certain on their dataset. That characterization concerns the evidence from this experiment, where the accepted set at the strictest reported setting was small. The measurable tradeoff is that the verifier can reserve its decisions for pairs with stronger scores, maintaining high observed positive precision while giving up opportunities to recognize actual matches.

What the ablations show

Which settings make the curves informative?

The paper examines how changing the main settings reshapes the curves, using a training search over several hundred configurations and selected comparisons on the test corpus. These experiments address a question that precedes verification accuracy. A curve can come from a procedure that successfully classifies samples early on and still give the final classifier relatively little information about how discrimination degrades. The useful calibration of unmasking depends on leaving room to observe that deterioration across rounds.

The first configuration displayed in the paper’s curve comparison uses 100 features, removes 20 features per round, and draws 10 chunks of 1,000 words each. The curves tend to decline quickly, with long stretches that look close to straight lines. With a short feature vector and substantial removals at each stage, informative features can disappear early. There are fewer opportunities to observe how the system behaves after removing some of its strong evidence while retaining the rest. The resulting decline can be too coarse to reveal differences between pairs.

The center configuration starts from 250 features and removes 10 per round, with 10 chunks of 700 words each. Its curves are more informative in the authors’ comparison. This setting changes the number of starting features, the number of removals, and the chunk size together, so the contrast with the first configuration illustrates the effect of a better balanced setup as a whole. A larger starting vocabulary and smaller elimination batches allow the discrimination between sources to be measured at more stages before the feature supply is exhausted.

The last configuration holds the center configuration’s feature count, removals per round, and words per chunk fixed and raises the number of chunks to 30. Each curve in the comparison averages 10 runs. The contrast between the center and last settings therefore isolates the number of samples per text within this illustration. The authors describe larger chunk counts as generally producing shallower and smoother curves. Increasing the number of samples can make it easier for the first classifier to keep distinguishing the texts as the feature set shrinks. It also makes changes in the measured accuracy less coarse, giving the second classifier more detail about the decline.

The authors emphasize granularity alongside slope. A steep curve gives information about the data if its changes can be observed with adequate detail. A sharp collapse in the course of very few measured stages gives weaker evidence about where the signal was concentrated. In the same way, a curve with long straight stretches may display a general decline while offering few distinctive local changes for gradient features. The settings have to give the second classifier enough detail to describe how the first classifier loses its ability to separate the sources.

How the settings interact

From their training search, the authors identify 25 to 50 chunks, 250 to 400 features, and 5 to 20 removals per round as useful ranges for obtaining sufficiently detailed curves. The number of removals has to be judged in relation to the starting feature set. Taking away too many features together can eliminate most of the highly discriminating cues at once. Taking away too few from a very long vector can devote considerable computation to measuring changes among features that contribute little. The useful range leaves room to observe the decline while the remaining features still carry evidence.

The length of each chunk had a smaller apparent effect. The authors considered sizes of 300 to 1,000 words feasible and found 500–700 words to work well without too much computational overhead. Larger chunks appeared chiefly to delay the first pronounced decline. The authors suggest that limited influence is consistent with drawing repeatedly from the same small source. Increasing the size of an artificial sample changes how its frequencies are observed, but the pool of available writing remains the same.

Averaging addresses variation of a different kind. The authors conclude that about 10 runs need to be averaged for stable classification and that 15–20 can still be reasonable. More runs help smooth accidental fluctuations in individual curves, with diminishing returns as repetition increases. Increasing the number of chunks gives the source classifier more samples within each run. Increasing the number of runs instead gives the final curve more estimates to average. The paper treats both as ways to improve the curves and describes each in terms of its effect on the resulting shape.

These comparisons explain why the authors settle on a configuration with 30 chunks, 700 words per chunk, 250 starting features, and 10 removals in a round. The selected setup gives the classifier multiple opportunities to observe what happens as strong evidence is taken away. It also lies within the ranges the authors found useful on their training material. The displays support that explanation through the shapes of the curves. The test results then evaluate the verifier using curves constructed along those lines.

What changing the threshold isolates

The threshold comparisons probe a different part of the procedure. Both a liberal and a stringent threshold act on pair scores built from the same kind of curves. The change is the rule for releasing a decision. This separates the value of the representation from the possibility of choosing a more cautious operating point. High precision at a strict threshold shows that the retained positive decisions were reliable on the test pairs, while low recall shows how many real matches the system passed over.

Viewed this way, the precision plateau across the stricter settings is as important as the decline in coverage. Tightening the threshold from the point at which observed precision reaches 1.00 continues to remove cases. It therefore changes the amount of unanswered material even though the observed rate of correct positive calls stays the same. The small accepted sets at stringent thresholds make it harder to judge how large any further benefit would be on fresh cases. The threshold comparison establishes selectivity and shows its cost on this corpus.

The paper offers these tuning and threshold analyses in place of a full component-by-component ablation. It does not give a complete comparison of classifiers with and without the curve points, each order of gradient, or the sorted gradients. It also describes the instability of using randomly formed chunks alone and the marginal benefit of overlap without reporting a full matched set of verification scores for those alternatives. The clearest controlled evidence is about the construction and granularity of the curves and about how the acceptance rule changes coverage and the pattern of errors.

Limitations

Limits the authors identify

The authors make a restricted claim about the length of text they can verify. Their abstract describes results for texts as short as four printed pages, and the experimental texts contain about 4,000 words each. Their discussion of PAN 2015 concerns a substantially shorter collection, where the average text contained less than 400 words. That collection explains the motivation for studying short texts. It is separate from the test of generalized unmasking. Printed page length is also an approximate description of the amount of writing, so the word count is the clearer guide to the material examined here.

The authors emphasize that uncertainty remains when the source contains little stylistic information. An unresolved classification is an intended result at the chosen confidence level. It leaves the authorship relationship open. The threshold results therefore describe reliable positive answers and limited coverage together. In an application that needs to recover many genuine matches, the reported fall in recall at stringent settings is a central cost.

They also state that random chunk generation introduces variation, particularly at low thresholds. Averaging can smooth the curves, and the paper identifies a range of run counts that gave stable classification in its experiments. The authors also say the best hyper-parameter values can differ between datasets. The suggested values for the number of chunks, word counts, vocabulary size, removals, and repetitions come from the tuning performed for this study. A collection with different text properties could yield curves with a different degree of separation.

The authors identify a qualification in their comparisons with Bagnall. A method that uses other examples in the input collection can take advantage of patterns in the corpus when scoring a single pair. Such patterns can include biases of the collection, so the information available to the two kinds of verifier differs. Compression and generalized unmasking can score a pair intrinsically, whereas Bagnall’s approach uses collection context. The reported comparisons describe the methods under those input conditions.

The compression results also carry an implementation condition. The authors built their own version of the earlier approach, using PPMd, a random forest, and the two similarity measures. They find CLM stronger than CBC on their data and report that Halvani and colleagues found CBC stronger in their work. The comparison is thus evidence about the reimplementation and corpus actually used. The authors suggest that combinations with other classifiers, features, or chunk sizes might improve unmasking, and leave such ensembles for future work.

What the experiment leaves open

The literary test corpus gives a specific setting for the authorship question. The collection is drawn from Project Gutenberg, the writing is in English, and the pairs are selected with attention to genre and publication period. The evaluation is informative about verification among texts with those properties. Performance under changes in language, genre, period, or source length remains open. Selecting broadly similar material is a sensible way to reduce easy confounds. A separate evaluation in which topic, period, and authorship vary under explicit controls would be needed to measure the contribution of each.

The sampling procedure expands the number of examples drawn from each text. It cannot add writing choices that are absent from the source. The cross-validation score for an inner classifier measures how well samples made from these particular texts can be assigned to their sources. Chunks from the same text share the same pool of word occurrences, and replenishment allows reuse. A high score inside a pair therefore has a narrower meaning than success in recognizing an author in new writing. The relevant result for new pairwise cases comes from the held-out test of the final classifier.

The features also determine which aspects of style can affect the curve. Word frequencies can register recurring differences in vocabulary and use. Once the representation discards order, it cannot directly exploit a distinctive sequence that depends on where words appear relative to one another. If the available texts differ chiefly in such patterns, the verifier can use that difference only to the extent that it also changes its frequency features. The paper establishes the performance of this particular representation and procedure as a whole. The figure comparisons do not say which individual words carry stylistic information or quantify what a different representation would add.

The confidence threshold uses geometric distance from the separating hyperplane. The study reports observed correctness after applying thresholds, which gives an empirical indication of how the score can be used. It does not estimate a calibrated probability that a particular pair shares an author. The same numeric threshold elsewhere could retain a different fraction of cases or produce a different precision. An observed precision of 1.00 on accepted positive cases tells a reader that the experiment recorded no false positive at that setting. Its evidentiary weight depends on how many positive cases were accepted and how representative they are of future comparisons.

The experiment also starts with balanced sets of same-author and different-authors pairs. Precision in use depends on the prevalence of true matches among the cases presented to a verifier, as well as its behavior on each class. If real comparisons come from a population where true matches are more or less frequent than in the study, the fraction of positive reports that are correct can change. This matters especially for a method whose main practical claim is about trustworthy positive decisions. The reported precision values are tied to the test distributions and selection rules under which they were measured.

The significance tests have a similarly specific scope. They compare paired binary correctness when non-answers count as incorrect. They support the paper’s claim that the experiment does not establish a difference between generalized unmasking and the tested leading alternatives on that criterion. They do not establish equivalence at other operating points, nor do they measure whether stringent thresholds yield the same pattern of errors for different systems. The comparison uses a fixed threshold for generalized unmasking, and the paper’s selectivity analysis focuses on that approach. The stronger forensic question of comparative performance when every verifier is tuned to a common level of coverage remains open.

Finally, the evaluations combine several kinds of judgment about uncertainty. c@1 rewards some abstentions according to a rule based on overall correctness. F₀.₅u charges unanswered cases and puts greater weight on the reliability of positive calls. The threshold itself uses the distance from a learned boundary. These choices make the tradeoff visible, but they encode different views of what makes a verifier useful. An evaluation based on the costs of a specific application would need to determine how a false attribution, a missed match, and an unresolved case should count in that setting.

What came after

The paper releases a configurable implementation and its experimental data as a starting point for further work. The authors identify ensembles as an open direction, including combinations that use different classifiers, text features, or chunk sizes. These are proposals made in the paper. There are no later studies documented here that establish how those combinations performed or how subsequent researchers adapted the short-text verifier.

Cite

Cite as Janek Bevendorff, Benno Stein, Matthias Hagen and Martin Potthast. 2019. Generalizing Unmasking for Short Texts. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/n19-1068

@inproceedings{bevendorff2019generalizing,
  title = {{Generalizing Unmasking for Short Texts}},
  author = {Janek Bevendorff, Benno Stein, Matthias Hagen and Martin Potthast},
  booktitle = {Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)},
  year = {2019},
  doi = {10.18653/v1/n19-1068},
  url = {https://doi.org/10.18653/v1/n19-1068}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bevendorff-2019-generalizing-unmasking-short-texts/