# Mathematical semantic extraction — experimental protocol v2

## Separation of layers

- **Source**: immutable manuscript commit, original source file and lines; each normalized passage has SHA-256, with character offsets relative to the normalized text. Preserve formula operators, quantifier order, LaTeX environment, and cross-reference identifiers.
- **TBox**: defined classes, typed predicates and domain/range constraints. Document modeling decisions and competency questions. A theorem is a claim; a theorem title is not an algorithm. A premise is not a result. A number is not a complexity measure.
- **Reference ABox**: explicitly curated calibration annotations grounded in source spans. These represent the assistant's reading of the supplied source; not an independent mathematical validation. Frozen independently of subsequent runs. Existing GLiNER outputs were already visible during calibration; do not call the calibration score blind.
- **Engine candidate layer**: immutable raw outputs, model/version, input hash, parameters and timing. Nothing is a fact merely because the extractor emitted it.
- **Resolution**: preserve mention IDs; resolve explicit aliases to canonical entities only with referent/scope evidence. Preserve conflicting types, duplicate candidates and rejected output. A variable is scoped; never merge symbols across field contexts merely because spelling matches. A standalone discourse token is not a referent.
- **Assertion layer**: retain directed, typed edges only with valid endpoints, supported predicate, matching mathematical role and source evidence. Represent conditional claims as a theorem plus scopes, premises and conclusions. Do not use a generic relation to hide a modeling gap.
- **Evaluation**: show raw, mapped/retyped, merged, rejected, unresolved and newly curated (missed) separately. Exact spans validate anchoring, not meaning. Counts do not measure quality. Report calibration checklist coverage, then held-out evaluation after freezing ontology and extraction settings. Do not treat missing/failed runs as zero accuracy.

## Three independent methods

A. **GLiNER-Relex (schema-directed joint NER/RE).** Freeze label inventory, thresholds and model revision. Record exact spans and typed directed edges. Test discourse rejection and entity/statement role confusion. Use manuscript theorem environments as structural evidence in a separately labeled postprocessing step. Do not silently repair directions or type labels in raw results.

B. **KGGen (open-vocabulary discovery).** Run the actual library without the curated ontology or reference answers in its extraction prompt. Preserve entity strings and open predicate vocabulary, then ground spans. Test entity clustering separately; align candidate concepts and predicates with the frozen TBox or register an ontology-change proposal. Unknown predicates are not automatically errors; they require semantic review. Compare open graph coverage and typed alignment separately.

C. **OntoGPT (schema-guided population).** Derive a LinkML schema from the frozen TBox; use separate premise/conclusion/scope fields. Preserve raw SPIRES outputs, schema validation and unresolved values. Enforce source grounding and type/role checks after parsing. Schema conformance is not proof of correctness. Grounding here means source and local vocabulary, not external terminology validation.

For KGGen and OntoGPT, record identical local model revision, decoding settings and source passages for matched comparisons. Quantized 3B smoke tests are not state-of-the-art quality benchmarks. Do not rank methods until actual completed, matched runs and a held-out evaluation exist.

## Acceptance gates

1. Every accepted node/edge has at least one precise source span; no orphan endpoints.
2. No standalone discourse cues (e.g. "Suppose", "Write", "Here") as mathematical entities.
3. No raw inequality hypothesis promoted to an unconditional result.
4. No theorem label misrepresented as an algorithm in the reviewed graph.
5. Each edge has a defined predicate and valid endpoint types; a failed edge is quarantined, not deleted from the audit.
6. Quantifiers, premise/conclusion scope and equation sign are retained.
7. The source, manual reference, raw model output and reconciliation decisions are separately accessible. Missing output is labeled not run/failed, not fabricated.
8. Hold-out examples are locked by source hash before tuning; calibration and held-out scores are never pooled.

## Competency questions

- Which statement claims omega_F = 9/4, over what field scope?
- Which strict inequality is a premise of compression rather than a result?
- What network size and exterior-bit restrictions govern that theorem?
- What is asserted to exist, and what bound is placed on the resulting network?
- Which components are counted by size versus volume?
- Which candidate entities were discarded, and why?
- What did each engine actually recover without the curated reference?
