PubGuard is a lightweight, CPU-optimized document classifier that screens PDF text to determine whether it represents a genuine scientific publication. It rejects non-publications (posters, abstracts, review articles, flyers, invoices) before expensive downstream processing.
Three classification heads provide a multi-dimensional screening verdict:
Document type — Is this a paper, review, poster, abstract, or junk?
AI detection — Was this written by a human or generated by an LLM?
Toxicity — Does this contain toxic or offensive content?
Developed by Jamey O'Neill at the California Medical Innovations Institute (CalMI²).
Architecture
Three linear classification heads on frozen model2vec (potion-base-32M) embeddings:
Each head is a single linear layer stored as a numpy .npz file (8–12 KB). Inference is pure numpy — no torch needed at prediction time.
The doc_type head additionally receives 14 structural features (section headings present, citation density, sentence length, etc.) concatenated with the embedding — these act as strong Bayesian priors.
3.3ms per PDF screening — negligible pipeline overhead
No GPU required
Gate Logic
Only scientific_paper passes the gate. Everything else — literature reviews, posters, standalone abstracts, junk — is blocked. The PubVerse pipeline processes original research publications only.
scientific_paper → ✅ PASS
literature_review → ❌ BLOCKED (narrative/scoping reviews)
poster → ❌ BLOCKED (classified, but not a publication)
abstract_only → ❌ BLOCKED
junk → ❌ BLOCKED
Note: Meta-analyses and systematic reviews are classified as scientific_paper (they are primary research). Only narrative and scoping reviews are classified as literature_review.
AI detection and toxicity are informational by default — reported but not blocking.
PDF corpus (microbiome/metagenomics), armanc/scientific_papers, OpenAlex OA review PDFs + abstracts, poster-sentry-training-data, gfissore/arxiv-abstracts-2021, ag_news
The poster class uses real scientific poster text from the posters.science corpus (28K+ verified posters from Zenodo & Figshare), extracted by PosterSentry.
The literature_review class uses a mix of open-access review article PDFs downloaded from OpenAlex and review abstracts as fallback. See the training data repo for full details.