[0015] Post-Processing Theoretical Enrichment (Phi_spec) and Tenability Evaluation (TS_local, TS_edge)¶
Status: Accepted (2026-09-08)
Context¶
Scientific theories cannot be adequately characterized as flat collections of linguistic assertions. In the structuralist metatheory of science ([Stegmüller, 1976]; [Balzer et al., 1987]; [Schurz, 2024]), a theory is formalized as a system of model classes \(T = \langle K, I \rangle\), comprising a formal core \(K = \langle M_p, M, M_{pp}, GC, GL \rangle\) and a domain of intended applications \(I \subseteq M_{pp}\).
Initial NLP ingestion and argument mining phases (Phases 1–4) must remain strictly domain-agnostic (\(\Phi_{\text{gen}}\)). If extraction prompts were hardcoded to extract domain-specific parameters (e.g. neurological fMRI BOLD signals vs. psychoanalytic repression intensities): 1. The extraction pipeline would become brittle, requiring new prompt schemas for every scientific discipline. 2. Token budgets would balloon, and models would hallucinate numeric parameters not present in the source text. 3. Multi-theoretical texts (e.g. neuropsychoanalysis combining Neurology and Freudian psychology) would suffer catastrophic type collisions when attempting to force heterogeneous concepts into a single parametric model.
Furthermore, evaluating whether an empirical application satisfies a theory requires continuous approximation rather than binary truth values ([Stegmüller, 1976, pp. 75, 110]; [Balzer et al., 1987, pp. 209–217]). Using Bourbaki's uniform spaces and admissible blurs (\(\mathcal{A}\)), tenability evaluates the tightest inaccuracy neighborhood \(\delta\) under which theoretical parameters satisfy core laws \(M\) and intertheoretical constraints \(GL\).
Decision¶
We implement a dedicated, modular post-processing runner: Theoretical Enrichment & Tenability Evaluation (TheoreticalEnrichmentRunner), decoupled from sequential pipeline phase numbers into pipeline/post_processing/theoretical_enrichment/, executing the dual-enrichment architecture \(\Phi(y) = \Phi_{\text{spec}}(\Phi_{\text{gen}}(y))\):
1. Separation of Domain-Agnostic Extraction from Specific Enrichment¶
- General Extraction (\(\Phi_{\text{gen}}\)) remains in core Phases 1–5, emitting domain-agnostic
ObservationUnit(Partition \(B\)),EmpiricalStatement(\(B\)), andTheoreticalHypothesis(\(A\)) nodes with typed relations (CONSTRAINS,REDUCES_TO,COHERES_WITH). - Specific Enrichment (\(\Phi_{\text{spec}}\)) is deferred to Theoretical Enrichment post-processing, where domain-specific lenses project empirical clusters into bespoke theoretical spaces \(M_p\).
2. Multi-Theory Lenses over Shared Empirical Clusters (Mixed Models)¶
- When a text discusses multiple theories, empirical clusters of
ObservationUnitnodes are treated as shared Intended Applications (\(I\)). - The cluster is evaluated through multiple distinct theoretical lenses in parallel (these are examples, and should be dynamically extracted during pipeline run)
- Neurology Lens (\(\Phi_{\text{spec-Neuro}}\)): Filters physiological/fMRI dimensions, ignores verbal associations, and estimates neurochemical parameters (e.g.
DopamineDepletion,AmygdalaHyperactivity). - Psychoanalysis Lens (\(\Phi_{\text{spec-Freud}}\)): Filters verbal repetition and affect dimensions, ignores fMRI blood flows, and estimates unconscious parameters (e.g.
RepressionMagnitude,UnconsciousResistance). - Intertheoretical Links (\(GL\)): Inter-model relations (
CONSTRAINS,REDUCES_TO,COHERES_WITH) connect the theoretical hypotheses, checking whether Freud's parameters mathematically cohere with the neurological parameters.
3. Continuous Tenability Optimization Solvers¶
- Local Tenability (\(TS_{\text{local}}\)): Computes the tightest admissible blur \(\delta^*\) reconciling projected parameters with core laws \(M\): $\(TS_{\text{local}}(y, M) = \sup \{ 1 - \delta \mid \exists x^* \in M : (\Phi(y), x^*) \in u_\delta \}\)$
- Edge Tenability (\(TS_{\text{edge}}\)): Evaluates cross-cluster constraints and inter-theory links: $\(TS_{\text{edge}}(e) = \sup \{ 1 - \delta_C \mid (\Phi(y_a), \Phi(y_b)) \in v_{\delta_C} \}\)$
- Anomaly Flagging: Any hypothesis or constraint edge with \(TS < 0.5\) is flagged as an untenable anomaly or category error.
4. Pluggable Runner, Config & Registry Architecture¶
- Implements
PhaseRunner[Phase4ArtifactsView]with machine keyphase_key = "theoretical_enrichment". - Configured via
TheoreticalEnrichmentConfigunderpipeline_config.theoretical_enrichment. - Provides
TheoryRegistryfor user-defined Theory-Element schemas and customTheoryProjectorimplementations. - Supports pluggable injection via
Pipeline(phases=[...])andPipeline.for_task(..., post_processors=[...]). - Emits domain events (
TheoreticalClusterIdentified,TheoreticalParametersProjected,TenabilityEvaluationCompleted,TenabilityAnomalyDetected) hooked intoEventEmitter.
5. Dynamic Two-Stage Theory Induction & Safe Symbolic Laws¶
- Instead of hardcoding default scientific domains (e.g. neurology or psychoanalysis),
TheoryRegistryis dynamically populated byLLMTheoryInducer. - The inducer inspects the graph's
TheoreticalHypothesisnodes (Partition \(A\)) and empirical observation types (Partition \(B\)) at macro graph scope to discover active Theory-Elements \(T = \langle K, I \rangle\) with their non-theoretical dimensions (\(M_{pp}\)), latent parameters (\(M_p\)), and symbolic constraint laws (\(M\)). - Core laws are evaluated safely via an AST-based formula evaluator (
SafeFormulaEvaluator), eliminatingeval()security risks while supporting non-linear and functional constraints.
Alternatives Considered¶
- Extracting Parameters During Ingestion (Phase 2/4): Rejected because it destroys pipeline domain-independence, blows up prompt sizes, and fails when texts discuss novel or conflicting theories.
- Binary Truth Values (\(\text{Score} \in \{0, 1\}\)): Rejected because real-world empirical data always contains noise; threshold discontinuities obscure meaningful gradations in empirical fit ([Stegmüller, 1976]).
- Single Universal Parametric Space: Rejected because heterogeneous quantities (meters, seconds, Hz, psychic repression) cannot be meaningfully combined into a single metric distance without arbitrary scaling factors.
- Hardcoding as Sequential "Phase 7": Rejected because theoretical enrichment is an optional, analytical post-processing pass. Forcing an ordinal phase number creates false linearity and awkward numbering when other post-processors are introduced or skipped.
- Hardcoding Default Domain Theories: Rejected because real-world scientific literature spans physics, biology, economics, philosophy, and psychology; hardcoding theories breaks library generality and requires manual updates for each new domain.
Consequences¶
- The pipeline maintains pristine separation between domain-agnostic structural extraction and theory-specific quantitative semantics.
- Mixed-domain scientific literature can be evaluated without ontological confusion or hardcoded domain schemas.
- Tenability scores provide continuous, grounded epistemic confidence for computational philosophy of science.
- Custom theories and laws can be induced autonomously by LLM or registered programmatically.
- Post-processing suites remain modular and independently configurable.
Related¶
docs/concepts/theory/metrics/epistemic_coherence/tenability.md— Mathematical specification of tenability and admissible blurs.docs/reference/theoretical_enrichment.md— Theoretical Enrichment post-processor reference documentation.pipeline/post_processing/theoretical_enrichment/runner.py— Post-processor runner implementation.- ADR 0006: QBAF Mapping Deferred — Early precedent for deferring quantitative weight computation.
- ADR 0011: Declarative Graph Metrics Framework — Async metrics architecture.