Clonal boilerplate: filtering recurring non-research documents with core-template SNP phylogenies

Digital libraries and corpus builders keep accidentally ingesting documents that are not research: journal mastheads listing editorial boards, conference front matter, calls for papers, obituaries, committee rosters that refresh every year. Individually these artifacts are easy to shrug off, but collectively they distort citation metrics, poison co-authorship graphs, and dilute the training data of scientific language models. Existing defenses classify each document in isolation from its "shape" — page count, section headers, the presence of phrases like "curriculum vitae" — and this works well for obvious cases but stumbles on grey areas like position papers and tutorial abstracts that look structurally like real papers (Document Type Classification in Online Digital Libraries).

This proposal borrows a trick from genomic epidemiology, where researchers face a structurally identical problem. When bacteria spread clonally through a hospital or a food chain, the isolates in a transmission chain differ from their common ancestor by only a handful of single-nucleotide substitutions — Huang et al. found that a dominant Salmonella lineage spreading through Shenzhen over 17 years held its genetic diversity to $\le 38$ core SNPs across 1,908 isolates (Plasmid-driven clonal expansion of multidrug-resistant monophasic Salmonella Typhimurium in a Global Food Trade Hub) — while unrelated isolates sit hundreds of SNPs apart. The key methodological move is the separation of a stable, slowly mutating core from a volatile accessory component (plasmids, transposons) that is exchanged horizontally and would otherwise wreck the tree (Evolutionary Origins and Virulence Determinants of ST25 Hypervirulent Klebsiella pneumoniae in Swine: Genomic Insights and Functional Validation). My claim is that recurring non-research documents behave exactly like a clonal outbreak: an annual masthead is a near-copy of last year's masthead with a few "SNPs" (a new editor-in-chief, a changed fee, a rotating committee chair), whereas a genuine research article is phylogenetically isolated — nothing in the corpus is a low-mutation-distance ancestor of it. So instead of asking "does this document look like a paper?", we ask "does this document have a recent clonal ancestor in the corpus?" — a question no current filter asks, and one that resolves grey-area cases by a signal orthogonal to document shape.

Core Claim

Recurring non-research documents form low-divergence clonal lineages when aligned against a shared template, and the density of core-template substitutions — the text-level analogue of a core-genome SNP distance — is a discriminative feature for filtering them out of scholarly corpora. Concretely: align documents in a candidate cluster to a consensus template, partition aligned characters into a conserved core (positions stable across the series, the "skeleton" of the boilerplate) and an accessory set (positions that churn: names, dates, page numbers, prices), then count substitutions only at core positions. A document whose core distance to another corpus member falls below a clonality threshold, with accessory divergence concentrated in the churn positions, is boilerplate regardless of how paper-like its structure is. Building a maximum-likelihood tree over the series additionally gives what flat similarity cannot: direction (which masthead descends from which), a mutation-rate estimate via root-to-tip regression against publication year — the textual analogue of the temporal-signal analysis used in bacterial outbreak tracing (Plasmid-driven clonal expansion of multidrug-resistant monophasic Salmonella Typhimurium in a Global Food Trade Hub) — and a principled way to mask parser noise.

The definition of the core distance, in one line: for two aligned documents $x$ and $y$, $d_{\text{core}}(x, y) = \frac{1}{|C|}\sum_{i \in C} \mathbf{1}[x_i \ne y_i]$, where $C$ is the set of core positions identified from the cluster's multiple alignment (positions conserved in at least, say, 90% of members, excluding positions flagged as accessory by variance across the series). The threshold $\theta$ on $d_{\text{core}}$ is calibrated on labeled series, exactly as SNP thresholds are calibrated to separate direct transmission from background in hospital outbreak studies (Dissemination of KPC-2-producing carbapenem-resistant Klebsiella pneumoniae ST656 in Eastern China).

I am deliberately honest about scope: the phylogenetic signal catches recurring boilerplate — mastheads, front matter, committee lists, calls for papers that reappear on a periodical cycle. A one-off obituary or a position paper with no clonal relative cannot be caught by ancestry alone; for those, the method contributes a complementary feature to existing structural classifiers rather than a replacement. The headline test is whether adding clonality features to a structural classifier fixes the grey-area errors the structural classifier makes alone.

Research Program

The program has three parts. First, benchmark construction: recurring non-research document series are abundant in the kind of material that contaminates real indexes — e.g., the annually refreshed "publication information" pages of IEEE journals such as IEEE Transactions on Cybernetics publication information, the front matter of successive proceedings volumes such as Front Matter, and recurring committee listings. We will assemble a benchmark of several hundred recurring-series instances paired with (a) genuine research articles drawn from the genomic-epidemiology literature in the same venues and (b) a grey-area set — tutorial abstracts (Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 5: Tutorial Abstracts)), position essays (Position: If Open Source Is to Win, It Must Go Public; Position: Stop treating `AGI' as the north-star goal of AI research), and memorial retrospectives (Remembering Don Bryant (1950–2024)). Because existing corpora underrepresent this material and underrepresent life-science literature (unarXive 2022: All arXiv Publications Pre-Processed for NLP, Including Structured Full-Text and Citation Network is 57% physics, 20% mathematics, 17% computer science), the benchmark deliberately includes biomedical-venue boilerplate, testing the domain-skew gap directly.

Second, the method itself: a pipeline that (i) crawls or ingests a corpus, (ii) performs cheap pre-clustering to nominate candidate clonal groups (roughly, near-duplicate detection restricted to documents sharing layout templates), (iii) runs a multiple sequence alignment over each group at line-then-character granularity, (iv) infers the core/accessory partition from conservation across the series, (v) computes $d_{\text{core}}$ and flags sub-threshold documents as recurring boilerplate, and (vi) for flagged series, builds a tree and runs root-to-tip regression on publication year to verify a real temporal clock rather than an artifact of the pre-clustering. The alignment and masking step is where the biological analogy does real work: PDF-extraction failures splice large jumbled blocks into the text, and these act exactly like recombination events in bacterial genomes — single horizontal events that mimic many independent mutations and distort distances (Genomic and phenotypic characterization of methicillin-resistant Staphylococcus aureus ST965: an emerging hospital-adapted clone with enhanced invasiveness describes the recombination-masking logic of pipelines like Gubbins). Core/accessory partitioning plus block masking is the proposed defense.

Third, the integration: clonality features (min-$d_{\text{core}}$ to any corpus neighbor, accessory-churn fraction, tree-derived depth) appended to the 43 structural features of Caragea et al. (Document Type Classification in Online Digital Libraries), retraining the same Random Forest, so the comparison isolates exactly what the phylogenetic ingredient adds.

Prior work constrains this design in two ways. Media phylogeny has already applied tree reconstruction to non-biological objects — Provenance Filtering for Multimedia Phylogeny and DeePhy: On Deepfake Phylogeny reconstruct transformation histories of images — but on single objects and their edits, not on recurring document series, and never as a filter inside a digital library. Text-reuse measurement (METER: MEasuring TExt Reuse) detects copying but produces flat similarity scores, not ancestry, rate estimates, or core/accessory separation. S2ORC clusters near-duplicate paper versions with Jaccard-style containment metrics (S2ORC: The Semantic Scholar Open Research Corpus) — flat equivalence only, no direction, no temporal model, and boilerplate is not modeled at all. The proposal supplies exactly those missing pieces.

Proposed Experiments

Experiment 1 measures filter quality on the new benchmark with three evaluation sets: recurring boilerplate, genuine research articles, and the grey-area set. Metrics are accuracy, macro-F1, and precision on a deliberately hard "Test References"-style split of documents that contain paper-like markers, mirroring the protocol of Caragea et al. (Document Type Classification in Online Digital Libraries), who report 88.7% accuracy and 0.891 F1 for structural features with a Random Forest (Str/RF) on their crawl test set, and a precision improvement from 0.842 (rule-based) to 0.925 on their Test References set. No reported result found on Lacuna for any classifier on recurring-series or grey-area benchmarks in biomedical venues, so our numbers there will be the first. The decisive comparison is structural features alone versus structural features plus clonality features, with identical training data and tuning budget; the method wins only if it moves the grey-area error rate materially without degrading the easy cases.

Experiment 2 tests the clock. For each recurring series (e.g., a decade of a journal's publication-information pages), we regress $d_{\text{core}}$ against year separation. A genuine clonal series should show a linear, positive slope — a textual mutation rate — exactly as root-to-tip regression validates temporal signal in pathogen phylogenies (Plasmid-driven clonal expansion of multidrug-resistant monophasic Salmonella Typhimurium in a Global Food Trade Hub). Genuine papers clustered by topical similarity should show no such structure; a positive control for "clonal but not boilerplate" — near-duplicate preprint/published pairs — should show high divergence concentrated in accessory positions (venue formatting, acknowledgments), not core ones, which is precisely the signal that separates legitimate versioning from boilerplate recurrence.

Experiment 3 stress-tests the recombination analogy. We inject controlled PDF-extraction noise (transposed column blocks, duplicated headers, interleaved running text) into the benchmark at graded severities, and measure whether the core/accessory partition plus block masking keeps $d_{\text{core}}$ stable where raw full-text edit distance collapses. This experiment is the answer to the "just use edit distance" objection, and it must be won honestly: if raw edit distance survives the noise test, the extra machinery is not earning its keep.

Experiment 4 tests domain transfer (the skew gap): train on computer-science-venue boilerplate, test on biomedical-venue boilerplate and genomic-epidemiology articles. Neither the CiteSeerX classifiers (CiteSeerX: AI in a Digital Library Search Engine) nor the unarXive IMRaD machinery has been benchmarked there; clonality is in principle venue-agnostic because it depends on series recurrence, not on venue-specific vocabulary, and this experiment is where that claim is proven or dropped.

Baselines

The "do nothing" reference point is an unfiltered corpus: every ingested document is indexed as if it were research. The cost is not hypothetical — the contaminated corpus is the status quo, since aggregator feeds and crawl pipelines demonstrably admit mastheads and front matter as ordinary entries (e.g., IEEE Transactions on Cybernetics publication information, Front Matter, Events Colocated with IJCAI-09 / xxi), and unarXive's matching to OpenAlex still reached only a 44.4% citation completeness rate (unarXive 2022), so metadata alone cannot be leaned on. We quantify the do-nothing baseline by the downstream damage metric: fraction of resolved citation links and co-authorship edges that involve boilerplate documents.

The strongest existing competitor is the structural-feature Random Forest of Caragea et al. (Document Type Classification in Online Digital Libraries), the best-performing published filter in the file: 43 structural features (page count, words per line, canonical section headers, anchor-phrase containment), Random Forest, 88.7% accuracy and 0.891 F1 on their test set, and 0.925 precision on the hard Test References set where the prior rule-based system scored 0.842. It is the strongest competitor because it is the only method with published head-to-head evidence against both keyword rules and content models, and because our proposal's headline claim is an improvement on its error profile, not a replacement of it. For fairness we reimplement their feature set, retrain on our benchmark's training split with the same class balance they used, give it the identical tuning budget (grid search over the same Random Forest hyperparameters), and evaluate on the same held-out sets. We also run the CiteSeerX SVM filter of Wu et al. (CiteSeerX: AI in a Digital Library Search Engine), which reports 88.9% precision and 88.11% accuracy on ingestion filtering, as a second reference point for the easy-case regime. Beating the baseline means: matching or exceeding Str/RF accuracy and macro-F1 on the easy sets while reducing grey-area false-negatives (boilerplate and position-style documents passed as research) by a margin whose confidence interval excludes zero, at fixed false-positive rate on genuine research articles. The key ablation isolates the proposal's ingredient: the identical combined model run with clonality features replaced by raw full-text nearest-neighbor edit distance (no core/accessory partition, no alignment masking). That ablation, not the headline comparison, is what decides whether the phylogenetic machinery specifically — rather than any near-duplicate signal — is doing the work.

Why not just…?

Why not just use keyword rules and title patterns? The file contains direct evidence that this fails at the margin: the rule-based filter evaluated by Caragea et al. (Document Type Classification in Online Digital Libraries) achieved only 0.842 precision on a 1,000-document Test References set, misclassifying resumes, book reviews, and syllabi precisely because non-papers routinely contain paper-like markers; and grey-area items such as Position: If Open Source Is to Win, It Must Go Public carry no administrative keywords at all. Rules remain useful as the cheap pre-clustering step inside our pipeline; they cannot be the filter.

Why not just use a bag-of-words or standard text classifier? Caragea et al. report that their structural Random Forest beat the best bag-of-words model by an 18.5% relative margin, because non-research artifacts share domain vocabulary with genuine papers — a lecture slide on neural networks contains "neural networks." Our method does not compete with content models; it competes on a signal content models cannot express at all (corpus-level ancestry). That said, a modern text classifier retrained on our benchmark is a legitimate threat, and Experiment 1 includes it: if a plain classifier with our benchmark's training data matches the combined model, the phylogenetic component is not needed and we will report that.

Why not just rely on publisher metadata from OpenAlex, Crossref, or DBLP? Two problems, both evidenced in the file: aggregator indexes themselves ingest mastheads and front matter as ordinary entries (the examples above are indexed artifacts), and coverage is partial — unarXive matched against OpenAlex yet reached only a 44.4% citation completeness rate (unarXive 2022), while autonomous crawlers like CiteSeerX harvest from places where publisher metadata never exists (CiteSeerX: AI in a Digital Library Search Engine). We will still report an metadata-only baseline in Experiment 1 to quantify how much residual contamination it leaves on our benchmark.

Why not just use edit distance or Jaccard similarity instead of all the phylogenetic apparatus? This is the sharpest objection, because S2ORC already clusters near-duplicate versions with Jaccard-style containment metrics (S2ORC: The Semantic Scholar Open Research Corpus). The honest answer: flat pairwise similarity alone has two documented failure modes. It cannot distinguish recurring boilerplate from legitimate versioning (preprint versus published article), because both are near-duplicates — the core/accessory partition separates them, since versioning churns accessory positions while boilerplate mutates its core template slowly. And it is brittle to extraction noise, which acts like recombination — single spliced blocks that mimic dozens of substitutions and wreck raw distances, the exact failure that motivates recombination masking in bacterial SNP pipelines (Genomic and phenotypic characterization of methicillin-resistant Staphylococcus aureus ST965: an emerging hospital-adapted clone with enhanced invasiveness). Experiment 3 is designed to settle this on data rather than argument, and the Experiment 1 ablation (edit distance in place of clonality features) makes the comparison explicit. If masked core distance does not beat raw edit distance under noise and on the versioning control, the simpler method wins and the proposal should be cut back to what survives.

Decisive checks

Three findings would make the proposal: first, structural-plus-clonality features beat the reimplemented Str/RF (whose published numbers — 88.7% accuracy, 0.891 F1, 0.925 hard-set precision — we treat as the bar to clear or contextualize on our harder benchmark) primarily on grey-area recall; second, recurring series show a clean temporal clock in root-to-tip regression while topical clusters of genuine papers do not; third, core-distance stability under injected extraction noise where raw distances collapse. Conversely, three findings would kill it: a plain text classifier matching the combined model, edit distance surviving the noise test, or the clock regression failing on real masthead series — any of these means the biology metaphor was decoration, and we will say so.