doxa-wording-encoder / EVALUATION.md
Giuliocc's picture
Release CPU-trained contextual wording encoder with heldout and runtime audits
b6e07f2 verified
|
Raw History Blame Contribute Delete
4.72 kB

Contextual wording evaluation

The selected pipeline uses full encoder and classification head fine-tuning. Selection used validation macro-F1 after the fixed search. The held-out cohort contains 384 upstream expert-majority judgments in 227 article/source components.

Pipeline Test macro-F1 Accuracy
word_tfidf 0.716 0.716
character_tfidf 0.742 0.742
word_character_tfidf 0.724 0.724
frozen_encoder_logistic 0.745 0.745
doxa_framing_control 0.498 0.534
Selected contextual pipeline 0.789 0.789
Quantized browser model 0.784 0.784

The existing DOXA framing head is a task-mismatch proxy: its binary control uses present/(present+absent), with original abstention states retained in the JSON receipt. It was trained for the broader evaluative-framing review criterion. The strongest control here was the character TF-IDF wording classifier, so the reported improvement does not depend on that proxy.

The selected pipeline's gain over the strongest lexical/current-model control was 0.0467. Its paired 95% source-group bootstrap interval was [0.0027, 0.0924], using 2,000 draws. The registered minimum gain was 0.02 with a positive lower bound.

The deployed quantized model's point gain over that control was 0.0415. Its separately reported 95% group-bootstrap interval was [-0.0044, 0.0885]. That interval includes zero. The native model's positive interval and the registered quantization-parity gate support this provisional release; standalone superiority of the browser export at 95% is not established.

Fine-tuning's observed macro-F1 difference from the frozen contextual pipeline was 0.0441. Both contextual pipelines were evaluated after validation selection. That comparison remains distinct from the product promotion gate. The original gate and its pre-test amendment are published alongside the export plan.

The initial matrix-only and default matrix-plus-embedding quantized exports failed parity. After those held-out measurements, a bounded four-setting exporter comparison used validation passages to select per-channel, reduced-range QInt8. The final graph uses singleton inference matching the browser. Learned weights, calibration and registered release thresholds stayed fixed. EXPORT_REPAIR.md, EXPORT_VALIDATION.json and EXPORT_ATTEMPTS.json preserve the process and failures. The export repair occurred after initial held-out measurement; it is not a second untouched model-selection experiment.

Quantized/native class agreement was 98.958%. The quantized graph is 23,157,564 bytes. Browser/native agreement was 100.000% over 128 deterministic cases. Input above 256 tokens returns unresolved in the browser. Test input-limit counts are recorded in EVALUATION.json. Scores were temperature-scaled on validation and the uncertainty threshold was selected there. These model scores need validation for additional populations and genres. The temperature grid was fitted on the native validation outputs and chose 1.0, which leaves logits unchanged. The native validation outputs also chose the 0.70 resolution threshold. The exported graph uses those same locked settings; it has no separately fitted calibration. Its held-out Brier score was 0.163, negative log likelihood 0.501 and 10-bin ECE 0.079. Its resolved coverage was 84.4%, with resolved macro-F1 0.818. These coverage figures are distinct from full-cohort quality and are not model confidence guarantees.

Data and interpretation

The benchmark contains human wording judgments from BABE. DOXA added no new human annotations. It uses article URLs and exact/near-duplicate components to separate roles. The same outlets can occur across roles. Source metadata has known imperfections, including an upstream topic/link mismatch for case babe-sg2-00611. This is an article-group evaluation within the collected outlets, with those source limitations retained.

The input is the supplied sentence/passage text. Outlet, topic, source IDs, annotators, reference labels and rationales stay outside the model input. Additional document context has no supervised BABE wording label here. English news is the evaluated genre. Academic papers, historical speech, translation, other languages and different political settings require separate validation. A wording flag can describe advocacy, criticism, quotation or an allegation that is warranted in context.

No author ideology, prejudice category, factual-truth score or political neutrality certification follows from this binary wording screen. Use the other DOXA criteria and the original sources for their declared tasks. Review disagreements and the ID-only error records before drawing a finding.