SPB Git

Repository Public Research preview

README.md 4.9 KB 86 lines markdown

1---2language: en3license: cc-by-nc-4.04library_name: htr5pipeline_tag: text2text-generation6tags:7  - scientific-writing8  - style-reconstruction9  - inverse-paraphrase10  - research11  - wp-ai-000212---1314# HTR-Tiny 0.3.01516**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 and **not** evidence of human authorship or of AI use. Do not use this model for AI-text detection, authorship attribution, grading, or academic-integrity decisions, and do not present its output as human-written.1718Part of **UQO Working Paper WP-AI-0002, "Human Text Reconstruction: Learning the Inverse of LLM-Induced Transformations in Scientific Writing"**19(Simon-Pierre Boucher, Université du Québec en Outaouais, 2026). Try it at **https://htr.spboucher.ai** (model id `htr-tiny-0.3.0`).2021| Field | Value |22|---|---|23| Family | htr (this paper's encoder–decoder Transformer, trained from scratch) |24| Parameters | 33,538,945 |25| Base model | none (trained from scratch) |26| Speed (Apple M4 Pro GPU, greedy) | ≈0.3 s per paragraph (greedy or beam 3, Apple GPU) |27| Exported | 2026-11-10T06:45:15Z |2829## What it does30Given a paragraph of scientific prose that a large language model has rewritten, the model produces a passage closer to the31register of the pre-2018 human original: it reverses part of the LLM's lexical and stylistic transformation while keeping numbers,32citations (as `[[C1]]`/`⟦C1⟧` placeholders), equations and URLs unchanged. Gains are measured against the **identity baseline**33(returning the input unchanged), which is itself a strong baseline because reconstruction from a paraphrase is non-identifiable.3435## Results (paired differences vs identity, chrF++, ± 1.96 SE)36| Split | Δ chrF++ vs identity (B0) |37|---|---|38| Validation (3 000 pairs) | — |39| Test (15 649 pairs) — confirmatory | +0.44 |40| Held-out disciplines (physics, earth sciences; 2 493) | -0.10 |41| Held-out period (books < 1900; 2 574) | -0.53 |4243Preservation on the test split: number recall 0.991, placeholder (citation/equation/URL) exactness 0.992.44Pangram 4.1 detector sensitivity (54 test passages; input rewrites 46 % flagged): **54/54 labelled Human**, mean AI-likelihood 0.0. This measures one commercial detector's behaviour on a 54-passage sample. A low AI-likelihood is not evidence of human authorship, and HTR must not be used to evade AI-text detection or for integrity decisions.4546## Training data47Medium stage of WP-AI-0002: denoising pretraining on 258 264 rights-verified pre-2018 passages (PMC Open Access, CC BY economics and finance journals, arXiv, public-domain books), then fine-tuning on 72 698 validated Haiku rewrite → original pairs of 14 000 passages (32k SentencePiece).48The originals are rights-verified scientific passages published before 2018 (PMC Open Access, CC BY economics and finance journals,49arXiv, public-domain books, NCBI Bookshelf, OpenStax); the rewrites were produced by Claude Haiku 5.5 (Anthropic) with five prompt50variants. The pairs are not released. 5152## How to use53```bash54pip install torch sentencepiece safetensors rapidfuzz sacrebleu rouge-score numpy pydantic55huggingface-cli download spboucher04/htr-tiny --local-dir htr-tiny56```57```python58import sys; sys.path.insert(0, "htr-tiny")          # the repo ships the `htr` inference package59from htr.inference.pipeline import HTRReconstructor60rec = HTRReconstructor.from_pretrained("htr-tiny")61r = rec.reconstruct("LLM-rewritten paragraph …", metadata={"discipline": "economics", "pub_year": 2012, "section_role": "results"})62print(r.reconstruction); print(r.warnings)       # warnings list any number / citation / negation change63```6465## Limitations and intended use66- Research on how LLM rewriting transforms scientific prose, stylometric analysis, benchmarking inverse-paraphrase models, and67  drafting suggestions that **must be checked by the author**. Not for AI-text detection, authorship attribution or integrity decisions.68- The model can change meaning; the inference code returns warnings when numbers, citations, negations or hedges differ from the input.69- Trained on English scientific prose of 60–400 words; other genres and languages are out of scope.70- The paper's confirmatory model M* (selected by the frozen validation rule, seed 3).71- Architecture m1 does not condition on the context fields (discipline, era, section); they are recorded with the run only.7273## Licence74Weights: **CC BY-NC 4.0 — non-commercial research use** (the training pairs include CC BY-NC sources and LLM75outputs). Code (the `htr` package) is Apache-2.0.7677## Citation78```bibtex79@techreport{boucher2026htr,80  title  = {Human Text Reconstruction: Learning the Inverse of LLM-Induced Transformations in Scientific Writing},81  author = {Boucher, Simon-Pierre},82  institution = {Université du Québec en Outaouais},83  series = {UQO Working Papers}, number = {AI-0002}, year = {2026}84}85```86
Files main
Menu

Theme