SPB Git

spb/wpai0002_uqo

Public
4.7 KB · 102 lines markdown
1# WP-AI-0002 — Human Text Reconstruction Transformer (HTR)23**Question.** Can a Transformer reconstruct characteristics of pre-2018 human-authored scientific prose from4LLM-rewritten versions of the same passages?56**Deliverables.** The project, part of UQO Research (series AI, id AI-0002), has two deliverables:78- a peer-review-ready paper, *Human Text Reconstruction: Learning the Inverse of LLM-Induced Transformations in9  Scientific Writing*;10- a released model family (HTR-Tiny/Small/Base, plus Large if feasible) that can actually be used.1112**Prior work.** Paraphrase inversion already exists (Rivera Soto et al., 2024, 2026). This project studies13something different:1415- **Reconstruction fidelity** against identity and paraphrase baselines.16- **Rights-verified, pre-2018 scientific originals** with controlled Claude rewrite variants.17- **Factual integrity.**18- **Non-identifiability.**19- **Memorisation.**2021See `docs/RESEARCH_GAP.md`.2223## Status (2026-11-09)2425- **Gate A: GO.** 100-paper PMC smoke test with 2 013 eligible passages; licence governance in place26  (`docs/gates/GATE_A.md`).27- **Pilot corpus.** 1 180 PMC documents with 23 658 eligible passages (`data/parsed/pilot_pmc`). Book trials:28  11 Gutenberg books and 17 NCBI Bookshelf chapters. arXiv and Crossref economics/finance adapters are in29  progress.30- **Vertical slice.** Runs end to end with mock rewrites at 0 USD spend. M1-nano passes the one-batch overfit31  test.32- **Not started:** real Claude rewrites (Gate B, ceiling 30 USD), trained models at release scale, and the paper33  draft.34- **Full status:** `docs/IMPLEMENTATION_CHECKLIST.md`, `docs/architecture/RESEARCH_PLAN.md`.3536## Quick start3738```bash39python3 -m venv .venv && .venv/bin/pip install -e ".[api,hf,dev]"40.venv/bin/python -m pytest tests -q -m "not network"      # unit tests, no network41scripts/vertical_slice.sh                                  # corpus → mock rewrites → pairs → M1-nano → metrics (0 USD)42.venv/bin/python scripts/discover_pmc.py --candidates 400 --max-docs 100 --seed 1 --out data/raw/pmc_smoke43```4445Using a trained checkpoint:4647```python48from htr.inference.pipeline import HTRReconstructor49r = HTRReconstructor.from_pretrained("artifacts/runs/<run>/best").reconstruct(text, {"discipline": "economics"})50print(r.reconstruction, r.warnings)51```5253**Spending money.** Real API calls require `--live` and respect the budget ceilings54(`docs/reproducibility/COMPUTE_BUDGET.md`). All commands are listed in55`docs/reproducibility/REPRODUCIBILITY.md`.5657## Layout5859```60configs/      rewriting (pilot.json, pricing.json); data/training/evaluation/release (to fill)61src/htr/      ingest · licenses · parse · segment · dedup · data · rewrite · validate · models · training ·62              inference · evaluation · release · utils63scripts/      discover_{pmc,arxiv,books} · build_corpus · make_splits · rewrite · validate_pairs ·64              train_tokenizer · train · predict · evaluate · vertical_slice.sh65tests/        unit · integration (network-marked) · regression66data/         manifests (committed) · raw · parsed · pairs · splits (not committed)67artifacts/    runs/checkpoints (not committed) · metrics · figures · tables · reports68docs/         MANDATE · RESEARCH_GAP · PREREGISTRATION · DECISION_LOG · RISK_REGISTER · IMPLEMENTATION_CHECKLIST ·69              architecture/ · data_governance/ · experiments/ · reproducibility/ · gates/ · literature/70paper/  model_cards/  demo/71```7273## Honest-claims notice7475HTR outputs are **synthetic reconstructions**. They are a model's estimate of pre-2018-style scientific prose76given an LLM rewrite. They are not the original text, they do not restore authorship, and they are not evidence77that a text was written by a human. HTR is not an AI-text detector. Every result is reported against identity78and paraphrase baselines with confidence intervals, and null or negative results are reported.7980## Licence8182- **Code:** Apache-2.0 (`pyproject.toml`).83- **Data and derived text:** per-document licences. Only CC0, public-domain and CC BY items are redistributable84  (`docs/data_governance/LICENSE_MATRIX.md`).85- **Model weights:** licence to be decided at release. It depends on the training licence set and on86  Anthropic's terms for model outputs (open question, `LICENSE_MATRIX.md` §4).87- **Attribution:** NLM/PMC and all source authors are acknowledged.8889## Citation9091```bibtex92@techreport{boucher2026htr,93  author      = {Boucher, Simon-Pierre},94  title       = {Human Text Reconstruction: Learning the Inverse of {LLM}-Induced Transformations in Scientific Writing},95  institution = {Universit{\'e} du Qu{\'e}bec en Outaouais},96  type        = {Working Paper},97  number      = {AI-0002},98  year        = {2026},99  note        = {In preparation}100}101```102
Files · main
Menu

Theme