{ "protocol_id": "doxa-discourse-basil-v0.2.0", "status": "registered_before_fit_and_heldout_model_outputs", "seed": 1729, "new_spend_usd_limit": 0, "cpu_threads": 1, "tasks": ["BASIL_lexical_bias", "BASIL_informational_bias"], "label_origin": "Existing BASIL human source annotations, aggregated to the annotated sentence. No new human reviews are invented.", "non_equivalent_tasks": ["DOXA six prejudice criteria", "framework-specific antisemitism", "material omission", "comparative double standard", "author ideology", "speaker endorsement"], "source_lock": "The context-data agent supplies pinned upstream revision, exact restoration hashes and event/URL/duplicate-component roles. A separate DATA_LOCK.json must be fingerprinted by the independent quality agent before fitting.", "leakage_policy": "Event, canonical article URL and exact/near duplicate components cannot cross train/validation/test. Audit prior DOXA data overlap before fitting. Prior-overlap groups cannot enter the fresh qualified test. Source/outlet/label metadata cannot enter model features.", "input": { "target": "Complete source sentence with immutable article offsets", "context": "Real preceding and following source sentences, with source offsets; never another event article or a generated explanation", "maximum_tokens": 256, "maximum_neighbors_per_side": 2, "packing": "CLS target SEP nearest preceding context SEP nearest following context SEP; full target retained, context uses remaining budget balanced between the two sides", "overlong_target": "unresolved rather than silently truncate the labeled target", "target_only_ablation": "Same complete target, without neighboring context", "excluded_features": ["outlet", "topic", "political orientation", "source URL", "human label", "annotator", "reference spans", "stance or polarity annotation"] }, "controls": { "constant": "Training prevalence and most-frequent labels", "tfidf": { "representations": ["target_only", "target_plus_real_context"], "features": "word 1-2grams min_df2 max40000 plus character 3-5grams min_df2 max40000, L2 TF-IDF fitted only on train", "classifier": "One balanced L2 logistic head per source task", "C": [0.1, 1.0, 10.0] }, "frozen_encoder": { "base": "sentence-transformers/all-MiniLM-L6-v2", "revision": "1110a243fdf4706b3f48f1d95db1a4f5529b4d41", "representations": ["target_only", "target_with_real_context"], "pooling": "Attention-masked means over target and context token positions, each L2 normalized; context model concatenates both vectors", "classifier": "One balanced L2 logistic head per source task", "C": [0.1, 1.0, 10.0] }, "previous_wording_model": "Optional lexical-only transfer diagnostic, explicitly not a matched informational-bias control" }, "fine_tuning": { "base": "sentence-transformers/all-MiniLM-L6-v2", "revision": "1110a243fdf4706b3f48f1d95db1a4f5529b4d41", "representations": ["target_only", "target_with_real_context"], "architecture": "BERT encoder with two independent sigmoid heads; positive-weighted BCE, not a two-class softmax", "learning_rate": 0.00003, "epochs_per_representation": 2, "batch_size": 8, "gradient_accumulation": 2, "optimizer": "AdamW weight_decay0.01, gradient_clip1.0, linear schedule with10percent warmup", "selection": "Best validation epoch for each representation; retain every epoch receipt" }, "validation_selection": { "metric": "Mean of lexical-positive F1 and informational-positive F1, each explicitly reported with per-class macro-F1 and prevalence", "candidate": "Best validation contextual pipeline among frozen and full fine-tuned contextual candidates", "task_threshold_grid": [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95], "threshold_rule": "Highest per-task validation positive F1, tie closest to0.5 then lower threshold", "calibration": "Per-task affine Platt map fitted on validation native logits using logistic C1; report native and exported calibration separately with the same locked map", "abstention_margin_grid": [0.0, 0.025, 0.05, 0.075, 0.1, 0.15, 0.2, 0.25], "abstention_rule": "Per task prefer maximum resolved coverage at least0.60 and resolved positive F1 gain at least0.03; otherwise margin0.05. Missing context, overlong target, unsupported rubric/genre/language remain separate statuses." }, "heldout": { "read_timing": "Only after data/protocol locks, train/validation selection and calibration are saved", "primary_metric": "Mean positive-class F1 across the two source tasks", "bootstrap": "Paired event/component resampling,2000draws,seed1729,percentile95percent intervals", "strongest_control": "Strongest held-out task-matched target/context TF-IDF control; contextual encoder and target-only ablations reported separately", "native_release_gate": "Primary gain>=0.02 over strongest TF-IDF control with positive paired95percent lower bound, neither task positiveF1 more than0.02 worse than that control, target usability>=0.95", "context_benefit_gate": "Primary gain>=0.01 over strongest target-only encoder/fine-tuned/TF-IDF ablation with positive paired95percent lower bound; failure withholds the specific claim that added context improves quality", "deployed_artifact_gate": "Exported singleton primary gain>=0.02 over strongest lexical control with positive paired95percent lower bound, native/export label agreement>=0.98, primaryF1 difference<=0.01, weightbytes<40000000, browser parity>=0.98", "claims": "Qualification applies only to these BASIL source tasks and source/event scope. Failure preserves artifacts and public receipts but withholds promotion. No gate relaxation after held-out feedback." }, "export": { "selection_uses": "Validation native agreement only, before any chosen graph's test evaluation", "bounded_settings": "DynamicQInt8 MatMul/Gemm/Gather, four per_channel false/true by reduce_range false/true settings", "selection_rule": "Require validation native label agreement>=0.98, primaryF1 difference<=0.01 and bytes<40000000; select maximum agreement, then lowest mean score error, then smallest bytes", "runtime": "Local ONNX Runtime singleton input, exact tokenizer, locked Platt maps/thresholds/margins and SHA256 hashes", "failure": "No eligible export means no browser model promotion" }, "evidence": "Always retain exact target/context source offsets and hashes. Human source reference spans are reference annotations, not arbitrary-input model explanations. Any predicted cue span or sensitivity analysis must be labeled as such; no sufficiency claim without its own measured reference test.", "diagnostics": "After locking selection, run source-derived quote/nonquote cohorts and deterministic OCR/linebreak perturbations. AI-authored stance/criticism fixtures remain diagnostic-only and cannot train, calibrate or qualify the model.", "public_policy": "Publish ID-only predictions, provenance, learned parameters only when qualified and the lead source-rights review establishes redistributable weights status, original code, failures and reproduction metadata. Keep restored copyrighted article text/annotations and caches local. BASIL lacks a repository LICENSE at inspection; do not infer Apache/CC rights from public availability. Source-rights review is a distinct publication gate." }