UQO Working Paper No. 2 — WP-AI-0002 — Human Text Reconstruction Transformer (HTR)

peer review: not yet peer reviewed field: Finance & Economics

commits: 43 last commit: 2026-11-09 files: 279 Python: 101 files LaTeX: 23 files Shell: 5 files UQO: Sciences administratives

📄: Manuscript (PDF) 🧾: Commit history 🌐: Reviewed papers of the series

## 🔬 Review status This working paper has **not yet gone through the multi-referee review** of the UQO working-paper series (blinded referee reports, editorial decision, re-execution, full revision, independent verification). Its results should be read as preliminary. Only reviewed papers of the series are presented on [wp.spboucher.ai](https://wp.spboucher.ai) and [www.spboucher.ai](https://www.spboucher.ai/research). --- # WP-AI-0002 — Human Text Reconstruction Transformer (HTR) **Question.** Can a Transformer reconstruct characteristics of pre-2018 human-authored scientific prose from LLM-rewritten versions of the same passages? **Deliverables.** The project, part of UQO Research (series AI, id AI-0002), has two deliverables: - a peer-review-ready paper, *Human Text Reconstruction: Learning the Inverse of LLM-Induced Transformations in Scientific Writing*; - a released model family (HTR-Tiny/Small/Base, plus Large if feasible) that can actually be used. **Prior work.** Paraphrase inversion already exists (Rivera Soto et al., 2024, 2026). This project studies something different: - **Reconstruction fidelity** against identity and paraphrase baselines. - **Rights-verified, pre-2018 scientific originals** with controlled Claude rewrite variants. - **Factual integrity.** - **Non-identifiability.** - **Memorisation.** See `docs/RESEARCH_GAP.md`. ## Status (2026-11-09) - **Gate A: GO.** 100-paper PMC smoke test with 2 013 eligible passages; licence governance in place (`docs/gates/GATE_A.md`). - **Pilot corpus.** 1 180 PMC documents with 23 658 eligible passages (`data/parsed/pilot_pmc`). Book trials: 11 Gutenberg books and 17 NCBI Bookshelf chapters. arXiv and Crossref economics/finance adapters are in progress. - **Vertical slice.** Runs end to end with mock rewrites at 0 USD spend. M1-nano passes the one-batch overfit test. - **Not started:** real Claude rewrites (Gate B, ceiling 30 USD), trained models at release scale, and the paper draft. - **Full status:** `docs/IMPLEMENTATION_CHECKLIST.md`, `docs/architecture/RESEARCH_PLAN.md`. ## Quick start ```bash python3 -m venv .venv && .venv/bin/pip install -e ".[api,hf,dev]" .venv/bin/python -m pytest tests -q -m "not network" # unit tests, no network scripts/vertical_slice.sh # corpus → mock rewrites → pairs → M1-nano → metrics (0 USD) .venv/bin/python scripts/discover_pmc.py --candidates 400 --max-docs 100 --seed 1 --out data/raw/pmc_smoke ``` Using a trained checkpoint: ```python from htr.inference.pipeline import HTRReconstructor r = HTRReconstructor.from_pretrained("artifacts/runs//best").reconstruct(text, {"discipline": "economics"}) print(r.reconstruction, r.warnings) ``` **Spending money.** Real API calls require `--live` and respect the budget ceilings (`docs/reproducibility/COMPUTE_BUDGET.md`). All commands are listed in `docs/reproducibility/REPRODUCIBILITY.md`. ## Layout ``` configs/ rewriting (pilot.json, pricing.json); data/training/evaluation/release (to fill) src/htr/ ingest · licenses · parse · segment · dedup · data · rewrite · validate · models · training · inference · evaluation · release · utils scripts/ discover_{pmc,arxiv,books} · build_corpus · make_splits · rewrite · validate_pairs · train_tokenizer · train · predict · evaluate · vertical_slice.sh tests/ unit · integration (network-marked) · regression data/ manifests (committed) · raw · parsed · pairs · splits (not committed) artifacts/ runs/checkpoints (not committed) · metrics · figures · tables · reports docs/ MANDATE · RESEARCH_GAP · PREREGISTRATION · DECISION_LOG · RISK_REGISTER · IMPLEMENTATION_CHECKLIST · architecture/ · data_governance/ · experiments/ · reproducibility/ · gates/ · literature/ paper/ model_cards/ demo/ ``` ## Honest-claims notice HTR outputs are **synthetic reconstructions**. They are a model's estimate of pre-2018-style scientific prose given an LLM rewrite. They are not the original text, they do not restore authorship, and they are not evidence that a text was written by a human. HTR is not an AI-text detector. Every result is reported against identity and paraphrase baselines with confidence intervals, and null or negative results are reported. ## Licence - **Code:** Apache-2.0 (`pyproject.toml`). - **Data and derived text:** per-document licences. Only CC0, public-domain and CC BY items are redistributable (`docs/data_governance/LICENSE_MATRIX.md`). - **Model weights:** licence to be decided at release. It depends on the training licence set and on Anthropic's terms for model outputs (open question, `LICENSE_MATRIX.md` §4). - **Attribution:** NLM/PMC and all source authors are acknowledged. ## Citation ```bibtex @techreport{boucher2026htr, author = {Boucher, Simon-Pierre}, title = {Human Text Reconstruction: Learning the Inverse of {LLM}-Induced Transformations in Scientific Writing}, institution = {Universit{\'e} du Qu{\'e}bec en Outaouais}, type = {Working Paper}, number = {AI-0002}, year = {2026}, note = {In preparation} } ```