SPB Git

Repository Public Research preview

MANDATE.md 15.7 KB 196 lines markdown

1# Author mandate — WP-AI-0002 (verbatim, supplied 2026-11-09)23> Reproduced verbatim from the author's CLAUDE.md brief. Author additions during the first session (2026-11-09):4> "mets aussi accent sur le fait que le modèle sera utilisé par la suite" (the released model must be genuinely5> usable), "mets aussi article en économie et finance" (include economics and finance articles), "ça doit être6> quand même large" (the corpus must be large), "tu peux installer torch ailleurs si nécessaire" (PyTorch may be7> installed on other cluster nodes), "ça peut aussi être des livres de référence en anglais pré-2018" (English8> reference books published before 2018 are in scope).910CLAUDE.md — WP-AI-0002: Human Text Reconstruction Transformer (HTR)1112Mission1314Build a rigorous, reproducible research program and releasable model family investigating whether a Transformer can reconstruct characteristics of pre-2018 human-authored scientific prose from LLM-rewritten passages. Work under the UQO Research project, in a dedicated wp-ai-0002/ directory. Never overwrite other research projects. Deliver BOTH a peer-review-ready paper and a usable, documented model release.1516Scientific caution: Exact recovery of an original passage from a paraphrase is generally non-identifiable. Do not claim restoration of actual human authorship or reliable AI detection. Separate verbatim reconstruction, stylistic distribution matching, and factual fidelity. Test whether the apparent gains exceed simple copying and generic paraphrasing.1718Non-negotiable principles19201. Research integrity over impressive-looking results. Never fabricate data, metrics, experiments, sources, licenses, or model checkpoints.212. Open access is not synonymous with open licensing. Ingest, transform, train on, and redistribute only where applicable licenses, provider terms, and institutional policies permit. Track rights at the document and derivative level.223. Preserve equations, citations, numerical values, units, negation, uncertainty, and domain terminology; identify and report failures.234. Avoid leakage across training, validation, and test: split at least by article, and add author-group, publication-family, and near-duplicate controls.245. Store all runs, configurations, provenance, random seeds, data hashes, environment versions, and checkpoint metadata.256. Make all expensive API calls and large training runs opt-in, with dry runs, quotas, budgets, retries, and resumability.267. Use local resources first where appropriate, but do not assume available compute or hardware. Detect macOS/MLX/MPS and CUDA and benchmark before scaling.278. Respect robots.txt, rate limits, and repository bulk-access policies. Prefer official bulk datasets and APIs.289. Do not claim that generated text is human-authored; outputs are synthetic reconstructions.2910. A paper and an independently runnable model are mandatory final artifacts.3031Research questions3233• RQ1: What syntactic, lexical, rhetorical, and discourse features change systematically when an LLM rewrites historical scientific prose?34• RQ2: Which pre-rewrite features can be recovered from rewritten text beyond an identity baseline?35• RQ3: How does recovery vary across disciplines, publication periods, writing styles, and paragraph/section types?36• RQ4: Does a model trained on Claude rewrites generalize to rewrites from held-out prompts and other LLM families?37• RQ5: How does performance change with data scale, model capacity, and style-conditioning?38• RQ6: What factual distortions, memorization risks, and irreversible information losses remain?3940Repository structure4142wp-ai-0002/43  CLAUDE.md44  README.md45  pyproject.toml46  configs/{data,rewriting,training,evaluation,release}/47  src/htr/{ingest,licenses,parse,segment,dedup,rewrite,validate,data,48           models,training,inference,evaluation,release,utils}/49  scripts/50  tests/{unit,integration,regression}/51  data/{manifests,raw,parsed,segments,pairs,splits}/52  artifacts/{checkpoints,metrics,figures,tables,reports}/53  paper/{main.tex,references.bib,figures,tables,supplement.tex}54  model_cards/55  demo/56  docs/{architecture,data_governance,experiments,reproducibility}/5758Do not commit raw licensed papers, credentials, paid API outputs, or large checkpoints by default. Use gitignore and configurable storage paths.5960Phase 0 — Audit and feasibility6162Inspect existing UQO Research structure and available hardware, Python environments, storage, credentials (never print secrets), scholarly datasets, and project conventions. Create a dependency/compute/cost feasibility report. Identify any preexisting project ID collisions before proceeding. Write an executable roadmap with decision gates and acceptance criteria.6364Phase 1 — Historical corpus6566Target scientific papers published before 2018-01-01; publication date must be verified, not inferred from an upload or revision timestamp. Prioritize clearly reusable sources, e.g., appropriately licensed arXiv material and PMC Open Access subsets; verify each item and version individually. Record DOI, title, authors, venue, publication year, subject area, source URL, license URI, license evidence, acquisition time, document hash, and permitted operations.6768Implement metadata-first discovery; license filtering; official API/bulk acquisition; PDF/XML/LaTeX parsing; section and paragraph extraction; language identification; citation/math/table preservation; reference-list exclusion; deduplication; and quality scoring. Preserve document, section, paragraph, and sentence hierarchy. Keep raw and normalized text with offsets and provenance.6970Target stages, not promised counts:7172• Pilot: ~1,000 papers / ~20,000 eligible passages.73• Medium: ~10,000 papers / ~200,000 passages.74• Large: ~100,000 papers / ~2,000,000 passages.75• Stretch: ~500,000 papers / ~10,000,000 passages.76Actual eligible counts depend on rights, parsing quality, costs, and budget.7778Build a sampling plan stratified by discipline, year, section role, length, language, and venue. Avoid domination by one archive. Create document/author/near-duplicate-safe splits before generating rewrites. Hold out entire domains and, if possible, venue/author groups.7980Phase 2 — Claude rewriting engine8182Build a configurable, versioned provider adapter for Anthropic Claude. Pin and log the actual model identifier, prompt version, sampling parameters, request ID, token usage, cost, and timestamps. Do not assume any model identifier or price remains current: retrieve current provider documentation during implementation.8384Generate controlled rewrite variants:85A. Neutral academic paraphrase.86B. More polished and standardized academic prose.87C. Concise rewrite.88D. Structure-preserving rewrite.89E. Diverse sampling with repeated independent generations.9091Explicitly instruct preservation of all scientific propositions, numbers, units, named entities, equations, references, uncertainty, and negation. Retain both original and rewrite and never overwrite either. Record failures and abstentions. Support concurrency limits, exponential backoff, checkpointing, deduped requests, caching, cost ceilings, and pause/resume. No paid batch beyond the approved pilot budget without explicit authorization.9293Phase 3 — Pair quality and integrity9495Implement automated checks: language consistency, semantic similarity, bidirectional entailment where feasible, numeric and unit invariance, named entity checks, equation/citation consistency, negation and hedging checks, length ratios, and parsing integrity. Use manual expert review on stratified samples. Flag, quarantine, and report invalid pairs rather than silently dropping them. Report acceptance rates and selection bias. Version the data schema (JSONL/Parquet) with immutable IDs and source traceability.9697Phase 4 — Architectures9899Implement strong baselines before novel architectures:100101• B0: Identity/copy input.102• B1: Generic paraphrase or minimally trained rewrite baseline.103• B2: Standard pretrained encoder-decoder fine-tuning (e.g. T5-family where rights and resources permit).104• M1: From-scratch encoder-decoder Transformer at pilot scale.105• M2: Style-conditioned encoder-decoder with learned discipline, era, and section-role embeddings.106• M3: Dual-latent Human Text Reconstruction Transformer (main research hypothesis).107108M3 design:109110• Semantic encoder E_c(x) extracts content representations from LLM-rewritten input.111• Style branch E_s(x, metadata) predicts a distribution over historical writing styles using training-only style supervision; at inference never feed the unknown original target.112• Cross-attentive Transformer decoder D(E_c, E_s, metadata) produces reconstructed historical-style prose.113• Consider gradient reversal, orthogonality regularization, or contrastive objectives to discourage style-content entanglement; verify with ablations rather than assume disentanglement.114• Include optional pointer/copy mechanisms and constrained preservation of citations, equations, and numerical spans.115• For section-level work, implement hierarchical chunking, context windows, overlap management, and consistency checks across paragraphs.116117Candidate training objective:118L = λ_ce L_token + λ_sem L_semantic + λ_style L_style + λ_con L_contrastive + λ_fact L_factual.119Define each term mathematically and operationally, document differentiability, optimize weights only on validation, and compare with token-loss-only training. No use of held-out originals in inference.120121Phase 5 — Model family and training122123Target sizes are approximate design points, not promised parameter counts:124125• HTR-Tiny: ~30M126• HTR-Small: ~125M127• HTR-Base: ~350M (primary release target)128• HTR-Large: ~1B (conditional on measured feasibility)129130Use PyTorch as the portable reference; support MPS and CUDA, and investigate MLX only where justified by performance and compatibility. Implement mixed precision when safe, gradient accumulation, clipping, efficient batching, activation checkpointing, distributed training only when available, early stopping, LR scheduling, and resumable checkpoints. Include data-loader tests, one-batch overfit test, smoke training, profiling, memory estimation, and loss/gradient diagnostics. Train baselines under comparable compute/data budgets; publish FLOPs, accelerator-hours, energy estimates if measurable, and API expenditure.131132Phase 6 — Evaluation133134Report both instance-level and corpus-level outcomes:135136• Exact-match, edit distance, chrF, ROUGE/BLEU (with clear limitations).137• Semantic preservation: embedding similarity, entailment, expert judgments.138• Factual integrity: numerical/citation/equation consistency, contradiction rates.139• Style fidelity: lexical diversity, sentence-length distributions, syntactic complexity, discourse markers, calibrated historical-style classifiers, and distributional distances.140• Authorship/style attribution only as exploratory analysis; never equate classifier scores with proof of origin.141• Memorization: training-set nearest-neighbor overlap, canary checks where lawful, contamination audits.142• Human blind evaluations on fidelity, fluency, authenticity of historical style, and factual safety.143144Core tests: document-safe held-out evaluation; author-safe splits; held-out discipline and time; held-out rewriting prompt; cross-provider generalization (only with legally/contractually permitted outputs); model scaling; rewrite strength; input length; error propagation; confidence calibration; ablations of all style and loss components; multiple random seeds and confidence intervals. Report null and negative findings.145146Explicitly test non-identifiability: generate multiple valid rewrites from distinct originals and measure ambiguity. Do not frame lower lexical overlap as proof of a failure to recover style.147148Phase 7 — Model and benchmark release149150Prepare a real usable model, not only a paper figure:151152• SafeTensors weights, tokenizer, configs, model architecture, inference and batch scripts.153• Hugging Face-compatible repository structure and model cards for each checkpoint.154• Versioned API/CLI, installation instructions, examples, deterministic inference options.155• Reproducible train/eval scripts and manifests.156• Separate benchmark documentation, data cards, and licensing matrix.157• Lightweight web demo showing input, reconstruction, differences, and preservation warnings.158• Explicit limitations, intended research uses, provenance, ethical risks, and license restrictions.159• Security/privacy/copyright review before publishing weights or any source/derivative text.160• If full training data cannot be shared, release only permitted subsets and metadata/scripts that comply with source and provider conditions.161• Do not upload models, datasets, or spend cloud money without explicit user approval.162163Proposed naming: HTR-Tiny, HTR-Small, HTR-Base, HTR-Large, HTR-Benchmark. Model names and hosting namespace require final confirmation.164165Phase 8 — Scientific paper166167Write a complete English LaTeX paper, working title:168"Human Text Reconstruction: Learning the Inverse of LLM-Induced Transformations in Scientific Writing."169170Required sections: Abstract; Introduction; Related Work (historical style, paraphrase inversion, style transfer, authorship, synthetic text effects); Research Questions and Hypotheses; Data and Rights; Rewrite Protocol; Models and Objectives; Experimental Design; Results; Ablations; Robustness; Human Evaluation; Threats to Validity; Ethics and Licensing; Limitations; Conclusion; Reproducibility Checklist. Add architecture diagrams, dataset flowchart, sample audit, scaling plots, error taxonomy, quantitative tables, confidence intervals, compute/cost disclosures, and appendices with prompts/hyperparameters. Cite verified primary sources; never fabricate references or results. Assess ACL/EMNLP/TACL suitability only after genuine experiments.171172Implementation milestones / acceptance gates173174Gate A: repository + license governance + 100-paper ingestion smoke test + parsed quality audit.175Gate B: 500–1,000 validated Claude pairs with documented spend and human review.176Gate C: leakage-safe splits, reproducible baselines, initial benchmark and statistical plan.177Gate D: working M1/M2/M3 training, one-batch overfit, reproducible pilot results.178Gate E: larger training only if pilots justify cost and quality; publish all negative findings.179Gate F: independent inference from a clean environment, full model card, audited release candidate, and compiled paper.180181Each gate must output a brief GO/NO-GO report, measured metrics, issues, and next action. Never mark a gate complete without evidence.182183First execution instructions for Claude Code1841851. Inspect the existing repository and identify the correct UQO Research location.1862. Create wp-ai-0002/ without modifying unrelated projects.1873. Produce docs/architecture/RESEARCH_PLAN.md, docs/data_governance/LICENSE_MATRIX.md, docs/experiments/EXPERIMENT_MATRIX.md, docs/reproducibility/COMPUTE_BUDGET.md, and an implementation checklist.1884. Implement the minimum vertical slice: one licensed document → parsed paragraphs → versioned Claude rewrite (dry-run/mock first) → validated pair → train/val/test split → baseline inference → metrics.1895. Run unit/integration tests and report actual outputs, failures, and costs.1906. Request approval before any material API spend, mass acquisition, public upload, or long training job.1917. Continue iteratively toward trained checkpoints and a scientifically defensible paper.192193Definition of done194195The project is complete only when (i) data rights and provenance are auditable, (ii) results are reproducible and beat appropriate baselines on pre-registered primary metrics or report convincingly why not, (iii) an independently loadable trained model and complete model card exist, (iv) the benchmark is legally distributable or an explicitly documented compliant substitute exists, and (v) the English LaTeX manuscript compiles with genuine figures, tables, citations, and honest limitations.196
Files main
Menu

Theme