Text Classification
Transformers
ONNX
Safetensors
English
bert
political-discourse
media-bias
wording
contextual-review
text-embeddings-inference
Instructions to use Giuliocc/doxa-wording-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Giuliocc/doxa-wording-encoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Giuliocc/doxa-wording-encoder")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Giuliocc/doxa-wording-encoder") model = AutoModelForSequenceClassification.from_pretrained("Giuliocc/doxa-wording-encoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download EVALUATION_REGISTRATION.md from Giuliocc/doxa-wording-encoder: direct link, hf CLI and curl.
- Browser
- Download file 3.88 kB
-
https://huggingface.co/Giuliocc/doxa-wording-encoder/resolve/main/EVALUATION_REGISTRATION.md
- Command line
-
hf download hf://Giuliocc/doxa-wording-encoder/EVALUATION_REGISTRATION.md
-
curl -L -o EVALUATION_REGISTRATION.md https://huggingface.co/Giuliocc/doxa-wording-encoder/resolve/main/EVALUATION_REGISTRATION.md
3.88 kB
| # DOXA contextual wording experiment | |
| Registered before fitting or evaluating the held-out test on 28 November 2026 | |
| UTC. Compute uses the local CPU with zero new spend. Training text stays in | |
| the local benchmark cache. Published evaluation records use source IDs, | |
| labels, scores and hashes where article-text redistribution is unresolved. | |
| ## Task and sources | |
| The task is the BABE expert-majority biased-wording judgment. It concerns | |
| sentence wording under the upstream annotation protocol. It establishes no | |
| author ideology, group-prejudice diagnosis or political-neutrality finding. | |
| Preserve the upstream source, revision, annotation provenance and ambiguous | |
| labels according to the benchmark builder's documented admission rule. | |
| The benchmark builder freezes article/source groups, exact repeated text and | |
| train/validation/test assignments before model fitting. The model experiment | |
| uses text only. Outlet, author, query, source identity, labels, split and | |
| annotation rationale are excluded from inputs. The training code will log | |
| the frozen benchmark fingerprints before fitting. | |
| ## Fixed candidates | |
| - The current DOXA evaluative-framing head is a task-mismatch control. | |
| Its present-versus-absent scores produce a binary comparison. Report its | |
| original insufficient-context and abstention coverage separately. | |
| - Word and character TF-IDF logistic controls choose C from 0.1, 1 and 10 on | |
| the validation set. Fit all vocabulary and IDF values on training text. | |
| - Frozen MiniLM mean-pooled embeddings plus a logistic head choose C from | |
| 0.1, 1 and 10 on validation. The base checkpoint is | |
| `sentence-transformers/all-MiniLM-L6-v2` at | |
| `1110a243fdf4706b3f48f1d95db1a4f5529b4d41`, licensed Apache-2.0. | |
| - Fine-tune the same compact BERT encoder and classification head with | |
| learning rates 0.00002 and 0.00005, up to three epochs each, AdamW, | |
| batch size 16, maximum 256 tokens and seed 1729. Select the epoch and | |
| learning rate using validation macro-F1. Temperature calibration and any | |
| displayed uncertainty threshold use validation only. | |
| Temperature is chosen from 0.5, 0.75, 1, 1.5, 2, 3 and 4 by validation | |
| negative log likelihood. The uncertainty threshold is chosen from maximum | |
| class scores 0.55, 0.60, 0.65, 0.70, 0.75, 0.80 and 0.85. Prefer the greatest | |
| validation coverage among thresholds with at least 60% coverage and a | |
| resolved macro-F1 gain of at least 0.03 over full-coverage macro-F1. If none | |
| meets both conditions, use 0.65 and report its observed tradeoff. Displayed | |
| numbers remain model scores, with the calibration method and errors visible. | |
| The model task uses token context within the supplied sentence or passage. | |
| Additional document context remains source material for reviewer reading. | |
| The experiment makes no claim that arbitrary Methods and Results context | |
| has supervised wording labels in BABE. | |
| ## Release gate | |
| Evaluate the frozen selected candidate once on the test set and report all | |
| controls. Publish a qualified wording candidate only if its macro-F1 exceeds | |
| the strongest control by at least 0.02 and the paired 95% article-group | |
| bootstrap interval for the gain is above zero. Use 2,000 bootstrap draws | |
| with seed 1729. Preserve per-case ID predictions and observed errors. | |
| Export the candidate as native Transformers weights and quantized ONNX. | |
| Quantized held-out macro-F1 must stay within 0.01 of the native candidate, | |
| and native-versus-quantized class agreement must be at least 98%. Record | |
| browser/native parity checks and the file sizes. The browser weights target | |
| is below 40 MB. A failed gate remains a documented local experiment. | |
| Matched political-name/viewpoint fixtures, legitimate-criticism controls and | |
| mitigation tests are separate diagnostics with their actual annotation | |
| provenance. Report symmetry differences and false alarms without converting | |
| those engineered cases into an independent human benchmark. | |