doxa-lab / CLAIM_CHECK.md
Giuliocc's picture
Add local long-PDF evidence verification and held-out paper evaluation
b121b8f verified
|
Raw History Blame Contribute Delete
6.36 kB

Claim Check in DOXA Evidence Lab

Claim Check compares your claim with a PDF, UTF-8 text file or Markdown file. It returns a source-relative assessment and shows the text used in that assessment. Page numbers refer to physical PDF pages. Text files show source lines. On PDFs, line numbers follow the extraction order.

Run a check

  1. Open Claim Check.
  2. Choose a source file and write one specific claim. Include the actor, outcome, time period or comparison where it affects the meaning.
  3. Run the check and read the highlighted location and quoted passage. Use Open source page for the supplied PDF. A detected abstract may offer a second passage after a separate model check.
  4. Use Download claim report to save the assessment, source excerpt, retrieval coverage and model scores. Keep the report private if it contains sensitive text.

How the tool works

The browser searches every extracted window using BM25, a term matching score. A WebAssembly runner evaluates up to eight distinct windows using the pinned DeBERTa backbone and the released Evidence Verifier adapter. A small CPU-trained selector combines the strongest evidence scores into a document-level prediction. A suitable abstract can corroborate a decisive prediction after its own inference pass. Distinct, strongly opposed readings can appear as competing passages. Quotes use extracted text. Layout, column order, footnotes and hyphenation can affect the extraction and what the model sees.

The first model run downloads about 185 MB of public model and runtime assets. Source bytes and claims stay in your browser. Claim Check accepts up to 32 MiB and 5,000 selectable-text PDF pages. It reports pages without selectable text and extraction errors. Image-only scans need OCR before use. The browser skips model inputs exceeding the tokenizer ceiling and reports the count. The local runner uses a worker so you can cancel.

The report gives an experimental model prediction, with a resolution relative to retrieved passages. Use the full source for claims that depend on multiple sections or on tables and appendices. A paper can report an association, a plan or a projection without establishing a causal effect or a completed intervention. Semantic paraphrases with little shared vocabulary may be missed during search.

The Lab screenshot uses the open-access article “Automatic large-scale political bias detection of news outlets” by Rönnback, Emmery and Brighton. PLOS ONE, CC BY

Held-out paper results

The selector was fitted on 45 judgments from 15 previously published DOXA paper records. Its first holdout improved verdict macro-F1 from 0.803 (strongest-window baseline) to 0.871, and located the annotated evidence with the correct verdict on 10 of 32 decisive judgments. That variant failed the evidence gate. We left the selector weights fixed, added the independently checked abstract, and froze 16 different articles before running the confirmation. All articles came from PLOS ONE JATS full text. The claims and exact reference anchors are AI-provisional and use the papers as supplied. The report scores exact matches to the annotated anchors, so other valid evidence can still be missed by that metric.

Method on 48 confirmation judgments Macro-F1 Correct with annotated evidence
Released verifier on top retrieved window 0.711 13 / 32
Released verifier on strongest window 0.693 13 / 32
Released verifier on the supplied abstract 0.795 25 / 32
Claim Check full-paper workflow 0.832 23 / 32

The 95% document-bootstrap interval for the difference from the strongest-window baseline was +0.020 to +0.261. The fixed workflow passed the preregistered verdict and evidence thresholds. The abstract-only control had higher exact-anchor coverage in this fixture, where the reference anchors were authored from abstracts. The confirmation used JATS article text and a separate browser test exercised live local PDF extraction, the pinned model assets and page pointers.

The WebAssembly runner agreed with the native runner on 47 of 48 verdicts. WebAssembly macro-F1 was 0.809, compared with 0.709 for its top-window control and 0.670 for its strongest-window control. One contradiction flipped to support in WebAssembly. The linked predictions identify the case and preserve both versions of the model output.

Political symmetry and limits

The model does not score party preference. In a synthetic audit of 48 matched pairs, consistently swapping political names or ideological terms in the source and the claim changed zero hard verdicts. Both variants were correct in 44 pairs. Score shifts were detectable. The median largest per-class shift per pair was 0.008 and the maximum was 0.265. The cases cover four short source patterns. These checks establish a limited form of verdict stability. They leave open source-selection bias, disparities on real speech, effects of historical context, and language and topic coverage. Claims of political impartiality need broader independently reviewed evaluation.

Machine-readable results · Per-example audit · Evidence Verifier on Hugging Face

Reproduce

The Space source archive includes claim_review/ with annotations, training and evaluation scripts. From the extracted source root, install evidence_benchmark/requirements.txt in a Python 3.12 environment and use Node.js 24 or newer. Reproduce entirely on CPU with these commands.

python claim_review/fetch.py
python claim_review/prepare.py papers-confirmation.yml
node claim_review/shortlist.mjs
python claim_review/encode.py dev
node claim_review/features.mjs dev
python claim_review/fit.py
python claim_review/encode.py test audit
node claim_review/features.mjs test audit
node claim_review/evaluate.mjs

The held-out source rows include publisher rights, DOI and the SHA-256 digest of each JATS record. Compare those digests before reusing changed publisher files. Original DOXA annotations and political swap examples are CC BY 4.0. PLOS ONE excerpts carry the publisher's CC BY attribution.