Recursive Tripartite Inference Network
Phase-partitioned inference, recursive execution cells, reversible state collapse, and evidence-bound evaluation
Program state
Current evidence state: SPECIFIED
What exists now: a formal architecture, phase contracts, recursive control rules, typed state handoffs, benchmark design, test schemas, and falsification criteria.
What does not yet exist: a qualifying measured result showing that Tripartite Structural Partitioning or recursive nesting improves task quality, cost-adjusted quality, or peak-memory efficiency over matched baselines.
This page is the evolving canonical public artifact for the program. It is intended to absorb revisions, benchmark receipts, negative results, implementation notes, and narrower sub-studies without pretending that the initial theory has already been proven.
Abstract
Long-context language models are often asked to establish a problem, perform the core work, maintain global consistency, close open loops, and format the final deliverable inside one uninterrupted generation. That combines several cognitively different objectives in one attention trajectory. Even when the context window is technically large enough, relevant instructions, evidence, and intermediate commitments may be used unevenly.
Tripartite Structural Partitioning, or TSP, divides one generative objective into three explicitly conditioned phases:
- Beginning: frame the objective, constraints, inputs, completion tests, and initial state;
- Middle: execute the primary transformation without spending capacity on presentation or premature closure;
- End: verify the trajectory, reconcile unresolved state, and commit the final deliverable.
A Recursive Tripartite Inference Network, or RTIN, composes those cells into a dependency-aware execution graph. A Middle phase may subdivide its workload into child Tripartite Cells when a deterministic control plane determines that local execution would exceed a bounded context, output, dependency, verification, or work-unit budget.
The proposal is not that three prompts are automatically more intelligent than one model call. Its testable claim is narrower: for some complex tasks and explicit resource budgets, logical phase partitioning plus typed state handoffs may produce more complete, auditable, and recoverable work than uninterrupted inference. Recursive nesting may extend that effect when decomposition quality exceeds coordination cost.
1. Core thesis
A model should not necessarily be asked to begin, execute, evaluate, repair, conclude, and format a complex task in one pass.
The central design move is to partition the logical lifecycle of inference, not merely the source text.
A simple chunking system divides a document into token ranges. A simple agent system divides work among conversational personas. TSP instead divides one objective by the transformation that must occur:
FRAME -> TRANSFORM -> RESOLVE
The three phases form a local inference primitive. RTIN allows that primitive to recur inside unresolved Middle work.
Root Cell
Beginning: establish the whole task
Middle: perform or route the core work
Child Cell A: frame -> transform -> resolve
Child Cell B: frame -> transform -> resolve
Child Cell C: frame -> transform -> resolve
End: reconcile children and commit the result
The structure is self-similar, but it is not required to form a perfect ternary tree. The three-part lifecycle is fixed; the number of child work units is determined by the dependency graph and budget.
2. What TSP is and is not
TSP is:
- a phase contract over model invocations;
- a way to separate setup, execution, and closure pressures;
- compatible with one model invoked repeatedly;
- compatible with several identical or heterogeneous models;
- compatible with sequential or partially parallel execution;
- compatible with raw text, typed state, retrieval, and model-specific cache reuse;
- testable under explicit quality, cost, latency, and memory budgets.
TSP is not:
- a claim that Beginning, Middle, and End are three personalities;
- a requirement to load three models simultaneously;
- a promise that three 14B calls equal one 70B call;
- ordinary document chunking;
- a hidden chain-of-thought protocol;
- a license for models to decide their own budgets or authority;
- evidence that recursive prompting bypasses hardware limits.
The phase labels describe responsibility, not prose position. A Beginning phase may produce no user-facing introduction. An End phase may produce a code patch rather than a conclusion. A Middle phase may invoke tools, mutate an artifact branch, or dispatch child cells.
3. The Tripartite Inference Cell
For task (T_i), incoming state (S_i), and local contract (K_i):
F_i = B(T_i, S_i, K_i)
W_i = M(T_i, F_i, K_i)
R_i = E(T_i, F_i, W_i, K_i)
Where:
- (B) is the Beginning contract;
- (F_i) is the Task Frame;
- (M) is the Middle contract;
- (W_i) is completed work or a child-work graph;
- (E) is the End contract;
- (R_i) is the Resolution Packet.
A cell is complete only when the End phase can evaluate the local completion tests and emit a resolution that preserves provenance, uncertainty, remaining open loops, and artifact mutations.
3.1 Beginning: Frame
The Beginning phase establishes the smallest complete aperture within which the task can be executed correctly.
It emits a Task Frame containing:
- objective;
- accepted inputs;
- authoritative instructions;
- requirements and prohibitions;
- assumptions;
- unresolved ambiguities;
- output contract;
- completion tests;
- dependencies;
- decomposition candidates;
- budget;
- provenance references;
- permitted tools and mutations.
The Beginning phase must stop before performing the primary workload. Its purpose is not to write an opening paragraph. Its purpose is to prevent the Middle phase from repeatedly reconstructing what the task is.
Canonical phase instruction:
Establish the smallest complete frame within which the objective can be executed correctly. Preserve all binding requirements. Define completion without performing the primary workload.
3.2 Middle: Transform
The Middle phase performs the authorized work.
It may:
- analyze evidence;
- execute tools;
- generate or modify artifacts;
- test hypotheses;
- apply bounded state mutations;
- resolve subproblems;
- instantiate child Tripartite Cells.
It must not silently redefine the objective, weaken a requirement, promote an assumption into a fact, or announce completion.
Canonical phase instruction:
Perform the work authorized by the Task Frame. Preserve invariants, record evidence, expose unresolved dependencies, and subdivide only when local execution would exceed the assigned budget.
3.3 End: Resolve
The End phase is a verifier and commit boundary, not a decorative summarizer.
It must:
- compare work against the Task Frame;
- evaluate completion tests;
- reconcile child results;
- detect contradictions;
- distinguish completed work from proposed work;
- preserve unsupported claims as unresolved;
- compile the final artifact or state mutation;
- emit a durable Resolution Packet.
Canonical phase instruction:
Determine what has actually been completed. Verify it against the contract, preserve uncertainty and provenance, and commit only the resolution that the evidence supports.
4. State is the protocol
Raw prose alone is not a sufficient inter-phase protocol.
Every phase should emit:
- an immutable raw record;
- a compact typed state packet;
- references to source spans and generated artifacts;
- a transition recommendation that the control plane may accept or reject.
The typed packet is the authoritative computational handoff. Raw text remains available as evidence and for recovery.
A minimal state packet:
{
"task_id": "rtin:task:...",
"parent_id": "rtin:task:...",
"depth": 2,
"phase": "MIDDLE",
"objective": "...",
"invariants": [
{
"id": "inv-01",
"operator": "PRESERVE",
"statement": "...",
"authority": "user"
}
],
"claims": [
{
"id": "claim-07",
"statement": "...",
"status": "verified",
"confidence": 0.91,
"evidence_refs": ["sha256:...#span-14"]
}
],
"artifact_deltas": [],
"dependencies": [],
"contradictions": [],
"open_loops": [],
"coverage": {
"required": ["req-01", "req-02"],
"satisfied": ["req-01"],
"unsatisfied": ["req-02"]
},
"budget": {
"context_tokens": 16000,
"output_tokens": 4000,
"maximum_children": 6,
"maximum_depth": 4
},
"next_transition": "SPLIT"
}
The public machine-readable schema for this program is available as RTIN State Packet Schema v0.1.
5. Handoff modes
5.1 Raw text concatenation
The first baseline is:
P -> O1
P + O1 -> O2
P + O1 + O2 -> O3
Benefits:
- universal compatibility;
- easy inspection;
- no runtime-specific integration;
- fast implementation;
- complete raw record.
Drawbacks:
- repeated prompt tokens;
- positional sensitivity;
- style contamination;
- accidental authority escalation;
- prose summaries that erase distinctions;
- growing context at every phase;
- no deterministic validation of state.
Raw concatenation is an essential baseline, not the target protocol.
5.2 Typed semantic state
Typed state preserves distinctions that summaries often collapse:
- requirement versus preference;
- evidence versus interpretation;
- proposed work versus executed work;
- verified result versus provisional claim;
- accepted state versus working state;
- user authority versus model suggestion;
- unresolved contradiction versus omitted detail.
A state compiler may parse model output into the schema, but the control plane must reject invalid packets rather than forwarding malformed or incomplete state.
5.3 Retrieval by reference
A parent should normally receive compact child Resolution Packets rather than all child source text. Every material claim remains linked to exact source spans, raw artifacts, and child state.
This creates progressive semantic resolution:
compact resolution by default
-> child packet on demand
-> raw phase output on demand
-> immutable source as final authority
Collapse is therefore reversible. The system compresses the active working set without deleting the evidence path.
5.4 KV cache reuse
KV cache is a runtime optimization, not the semantic protocol.
Cache state depends on model weights, tokenizer, architecture, positions, runtime implementation, quantization, and exact prefix. It can reduce repeated prefill for compatible executions, but it does not explain what the system knows, what changed, or what authority a statement has.
RTIN may attach model-specific cache references to a state packet. It must never use a KV cache as the only durable representation of task state.
6. Recursive Tripartite Inference
RTIN permits a Middle phase to instantiate child cells when the assigned work exceeds local execution capacity.
A recursive cell contains the same lifecycle:
child Beginning -> child Middle -> child End
The child End phase returns a Resolution Packet to its parent. The parent consumes the packet, not a free-form assertion that the child is done.
6.1 Recursive trigger
A model should not recurse merely because the task feels difficult. The control plane calculates a recursion pressure score:
P_r = \max
\left(
\frac{I_e}{I_b},
\frac{O_e}{O_b},
\frac{U_e}{U_b},
\frac{D_e}{D_b},
\frac{V_e}{V_b}
\right)
Where:
- (I_e): estimated active input requirement;
- (I_b): safe input budget;
- (O_e): estimated output requirement;
- (O_b): output budget;
- (U_e): unresolved work units;
- (U_b): local work-unit budget;
- (D_e): dependency complexity;
- (D_b): local dependency budget;
- (V_e): required verification surface;
- (V_b): local verification budget.
A split is authorized only when:
recursion_pressure > 1
AND decomposability_score >= decomposition_threshold
AND expected_focus_gain > coordination_cost
AND remaining_global_budget permits recursion
A bounded local attempt may also trigger a split when:
- requirement coverage stalls;
- independent evidence domains compete for active context;
- the completion contract contains separable tests;
- dependencies form a natural DAG;
- repeated repair exceeds the local repair budget;
- the model returns an explicit inability with a valid decomposition proposal.
6.2 Base case
A task becomes a base case when:
- required source material fits within safe active context;
- it has one locally executable objective;
- dependencies are resolved or explicitly bounded;
- output fits the Resolution Packet contract;
- completion can be evaluated locally;
- further decomposition would cost more than it saves.
6.3 Global recursion limits
Every root task defines:
- maximum depth;
- maximum child count;
- maximum total invocations;
- maximum input and output tokens;
- maximum wall time;
- maximum monetary or energy budget where measured;
- cancellation conditions;
- failure and recovery behavior.
A model may recommend a larger budget. It may not grant one to itself.
7. Collapse without amnesia
The naive recursive architecture says that low-level nodes summarize their chunks and pass only the summary upward. That creates a compression cascade in which omissions and errors can become irreversible.
RTIN instead requires source-linked collapse.
Every child End phase emits:
{
"resolution": "...",
"verified_claims": [],
"constraint_deltas": [],
"artifact_deltas": [],
"coverage_map": {},
"unresolved_items": [],
"contradictions": [],
"evidence_refs": [],
"child_resolution_refs": [],
"completion_tests": [],
"confidence": {},
"receipt": {}
}
A parent normally receives that compact packet. If the packet lacks enough evidence for a parent decision, the parent follows the references and retrieves a lower-level packet or source span.
The governing rule is:
Raw data is never eagerly loaded up the tree, but it remains reversibly addressable from every conclusion derived from it.
8. Control plane
RTIN requires a deterministic control plane around the language models.
Task compiler
Transforms the user objective into the initial Task Frame while preserving source, authority, scope, requirements, prohibitions, and ambiguity.
Scheduler
Maintains the task DAG, dispatches ready work, respects dependencies, enforces budgets, retries idempotent operations, and prevents unbounded recursion.
Runtime adapter
Invokes one or more models under phase-specific contracts. It records model identity, weights or API version, tokenizer, quantization, runtime flags, prompt digests, and cache state where available.
State store
Stores source objects, phase outputs, Task Frames, Resolution Packets, artifact deltas, child links, receipts, and benchmark artifacts with content identities.
State compiler
Validates and canonicalizes model outputs into typed state. It rejects missing required fields, invalid transitions, unsupported authority, and unresolved source references.
Verifier
Evaluates completion tests, checks citations and artifacts, compares work against invariants, detects contradictions, and authorizes or rejects closure.
The model proposes transitions. The control plane owns them.
9. Hardware model
Sequential TSP can reduce peak model memory because one bounded model invocation may be resident at a time. Recursive RTIN can distribute independent child work across heterogeneous machines.
That does not make hardware irrelevant.
RTIN trades vertical scale for:
- additional inference passes;
- duplicated prefill unless caching succeeds;
- orchestration and validation cost;
- network transfer;
- recursive scheduling latency;
- merge and contradiction handling;
- possible loss from compression or decomposition;
- greater total compute.
The defensible hypothesis is:
Commodity inference nodes may contribute to a larger bounded-context computation through a hardware-agnostic state and scheduling protocol.
The stronger statement—that horizontal orchestration reliably substitutes for frontier model capacity—is not claimed.
10. Failure modes
Decomposition destroys the problem
Some tasks depend on global interactions that cannot be separated cleanly. A recursive split may remove the very cross-dependency needed for the answer.
Setup errors become inherited constraints
A weak Beginning phase can frame the task incorrectly. Later phases may execute the wrong objective with impressive discipline.
Compression drift
Child resolutions may omit a caveat, minority evidence, or local contradiction. Source-linked recovery reduces this risk but does not eliminate it.
Coordination cost dominates
For small or tightly coupled tasks, three or more invocations may be slower, more expensive, and less coherent than one call.
Premature closure
An End phase may polish an incomplete result. Completion tests must be externalized and mechanically checked where possible.
Recursive explosion
A model can produce plausible decompositions indefinitely. Global depth, child, token, time, and repair budgets are mandatory.
Identical-model correlated error
Using the same checkpoint in all phases does not provide independent verification. Role separation can reduce task interference without eliminating shared blind spots.
Heterogeneous-model mismatch
Different tokenizers, capabilities, safety behavior, schemas, and representations may make handoffs lossy. Typed state helps, but model selection becomes an experimental variable.
Benchmark leakage
The same tasks used to tune phase prompts, recursion thresholds, or schemas cannot serve as final held-out evidence.
11. Benchmark program
The first registered contract is B16 — RTIN Structural Partitioning.
The benchmark is designed to answer several separate questions rather than produce one decorative score.
Question A: Does phase partitioning improve completion?
Compare uninterrupted inference with sequential Beginning-Middle-End calls using the same model and source material.
Question B: Does typed state outperform raw concatenation?
Compare raw prose handoff, compact natural-language summaries, and schema-validated state packets.
Question C: When does recursion help?
Measure task quality as workload size, dependency depth, and cross-partition coupling increase.
Question D: What does the improvement cost?
Report total input tokens, output tokens, wall time, model invocations, peak VRAM, total energy where available, and orchestration overhead.
Question E: Does collapse remain recoverable?
Test whether a root conclusion can identify and retrieve the exact child evidence from which it was derived.
Question F: Does the architecture calibrate completion better?
Measure false-completion rate: cases in which a system declares success while a required test, artifact, constraint, or source obligation remains unsatisfied.
12. Required baselines
The initial matrix should include:
- Single-pass: one model call asked to produce the final result.
- Plan-and-answer: one model call plans, then completes the task in the same context.
- Linear TSP / raw: three phase calls with raw-text concatenation.
- Linear TSP / summary: three phase calls with compact prose summaries.
- Linear TSP / typed: three phase calls with validated state packets.
- Recursive TSP / typed: controlled child cells and reversible Resolution Packets.
- Large-model reference: a stronger model under disclosed cost and memory conditions.
- Matched-total-compute control: a baseline allowed comparable aggregate inference compute.
- Matched-peak-memory control: systems constrained to comparable peak accelerator memory.
The large-model reference is informative but does not replace matched-resource comparisons.
13. Task families
The benchmark should use tasks whose completion can be evaluated from observable outputs rather than private reasoning traces.
Repository transformation
- inspect a versioned codebase;
- preserve stated invariants;
- implement a multi-file feature;
- run deterministic tests;
- produce a patch and receipt.
Long-document synthesis
- answer source-grounded questions across distributed evidence;
- preserve minority findings and limitations;
- provide exact source references;
- expose unresolved contradictions.
Structured artifact generation
- transform a specification into a schema-valid artifact;
- preserve every required field;
- reject prohibited operations;
- pass deterministic validation.
Dependency-aware planning
- produce an executable plan with prerequisites;
- identify parallel and sequential work;
- preserve blocked tasks;
- avoid impossible ordering.
Multi-stage analytical work
- frame assumptions;
- perform calculations or transformations;
- run checks;
- report uncertainty and failure conditions.
Adversarial closure tests
- include hidden unmet requirements;
- include contradictory evidence;
- include stale or lower-authority instructions;
- test whether the End phase refuses false completion.
14. Metrics
No single composite score should hide a regression.
Primary quality metrics:
requirement_coveragecompletion_test_pass_ratesource_fidelityunsupported_claim_ratecontradiction_ratefalse_completion_rateartifact_validityevidence_recoverabilityopen_loop_preservationcross_child_consistency
Resource metrics:
input_tokens_totaloutput_tokens_totalmodel_invocationspeak_vram_byteswall_time_msprefill_time_msdecode_time_msnetwork_bytesorchestration_time_msenergy_joulesestimated_cost_usd
Topology metrics:
recursive_depthchild_cellssplit_precisionsplit_recallmerge_conflictsevidence_escalationscache_hit_rate
Human evaluation, when used, must be blinded to condition labels and supported by an explicit rubric. Human usefulness cannot replace deterministic correctness where a test exists.
15. Experimental discipline
Separate prompt development from evaluation
Phase prompts, state schemas, recursion thresholds, and repair strategies must be frozen before held-out evaluation.
Report two resource views
Every result should be reported under:
- matched peak-memory conditions;
- matched total-compute or total-token conditions.
This prevents a system from claiming efficiency by hiding repeated calls.
Preserve row-level results
Aggregates must link to task rows, configuration, raw artifacts, invalid-run checks, and receipts.
Count all dependencies
Charge or disclose:
- retrieval preprocessing;
- embedding generation;
- cache warming;
- external tools;
- verifier calls;
- stronger routing models;
- human repair;
- failed child calls.
Do not score hidden chain of thought
The benchmark evaluates visible artifacts, source references, state transitions, test results, and receipts. It does not require models to reveal private reasoning.
16. Falsification criteria
The practical TSP hypothesis weakens or fails when:
- single-pass or plan-and-answer baselines match or exceed quality at lower cost;
- gains vanish under matched total compute;
- typed handoffs do not outperform simpler raw or summary handoffs;
- false-completion rate is not reduced;
- recursive coordination cost exceeds quality gain for the intended task sizes;
- source recoverability falls below the baseline;
- decomposition increases contradictions or loses global constraints;
- results depend on one narrow task family or one prompt template.
The hardware-distribution hypothesis weakens or fails when:
- network and orchestration overhead dominate;
- heterogeneous nodes introduce unacceptable variance;
- cache transfer or reuse is too brittle;
- aggregate energy or cost is worse than the monolithic baseline;
- the system cannot maintain evidence and dependency integrity across nodes.
Negative and inconclusive results remain part of the program ledger.
17. Minimum implementation
The first implementation should use one frozen mid-weight model invoked sequentially. No distributed cluster is required.
Phase 0: deterministic shell
Implement:
- Task Frame schema;
- Resolution Packet schema;
- control-plane transitions;
- budgets;
- source references;
- artifact delta log;
- completion tests;
- run receipts.
Phase 1: linear raw-text baseline
Execute the same task as:
Beginning -> Middle -> End
Pass raw outputs and record all token and latency costs.
Phase 2: typed-state handoff
Replace prose handoffs with schema-validated packets. Preserve raw phase output separately.
Phase 3: one-level recursion
Permit the Middle phase to create bounded child cells. Require every child End to return a Resolution Packet.
Phase 4: reversible collapse
Force root claims to resolve to child evidence references. Test escalation when compact state is insufficient.
Phase 5: distributed execution
Only after semantic correctness is stable, run independent child cells across multiple physical nodes.
Phase 6: cache and transport optimization
Evaluate prefix reuse, model-specific KV caching, compact binary transport, and content-addressed state.
18. Relationship to existing Glyphd work
RTIN is adjacent to, but not identical with, existing Glyphd systems.
P13: Locality-Preserving Multiscale Computation
P13 asks where expensive computation should look and how information can be organized across multiscale regions. RTIN asks how one objective should progress through framing, transformation, and resolution, and how that lifecycle should recurse.
P13 can supply locality, Q-Frontier selection, and evidence-preserving omission. RTIN supplies the recursive execution grammar and closure boundary.
LCSM / Backboard
LCSM owns canonical state, authority, provenance, journal, and receipts. RTIN should write proposed state and work receipts into that plane rather than becoming a competing memory system.
GlyphCAS
GlyphCAS supplies exact content identity, typed derived identities, dependency tracking, and reusable state objects. RTIN state packets and child resolutions can be content-addressed through it.
SurfaceMind / SurfaceDelta
SurfaceMind supplies bounded artifact mutation. An RTIN Middle phase may return SurfaceDelta patches instead of regenerating an entire artifact.
Haygent
Haygent supplies deterministic spines, bounded intelligence slots, and truthful halt. RTIN can be implemented as a recursive Haygent workflow rather than an autonomous agent society.
Glyph Tokens
Glyph Tokens can represent phase contracts, authority, constraints, conditions, and transitions between natural language and governed operations.
19. Public artifacts
- B16 benchmark contract
- RTIN State Packet Schema v0.1
- RTIN Benchmark Matrix v0.1
- RTIN Test Cases v0.1
These artifacts define the test surface. They contain no measured performance result.
20. Next work
- Implement the deterministic control-plane shell.
- Pin the first model, runtime, quantization, and hardware profile.
- Build the held-out task corpus with authority, dependency, and completion annotations.
- Run single-pass, plan-and-answer, and linear raw TSP baselines.
- Add typed state and measure whether it changes quality or only structure.
- Add one-level recursion and measure decomposition benefit against coordination cost.
- Publish raw task rows, receipts, failures, and limitations.
- Promote claims only when the registered evidence supports them.
Canonical statement
Tripartite Structural Partitioning is a bounded inference primitive that separates framing, execution, and resolution into independently conditioned model invocations.
The Recursive Tripartite Inference Network composes those primitives into a dependency-aware, content-addressed computation graph whose Middle phases may instantiate child cells and whose End phases compile their work into reversible, verified Resolution Packets.
The architecture does not attempt to make one model remember an indefinitely expanding conversation.
It constructs a durable graph of resolved work through which models can navigate at the resolution required by the present objective.