Evidence-Driven Closed-Loop Fine-Tuning Method, Inference System, and Applications for Large Language Models
By training an evidence-driven large language model and internalizing the evidence-driven closed-loop mechanism using the E3-Loop architecture, the problems of uncontrollability and unreliability of large language models in open-world reasoning are solved, and more rigorous evidence support and reliable decision-making processes are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
- Filing Date
- 2026-06-08
- Publication Date
- 2026-07-31
AI Technical Summary
Large language models lack evidence-driven closed-loop mechanisms in open-world reasoning, leading to a disconnect between generated conclusions and supporting evidence, unreliable tool calls, and an uncontrollable and unreliable reasoning process.
By training an evidence-driven large language model and adopting a state-action-evidence gating-rollback revision closed-loop control architecture (E3-Loop), the evidence-driven closed-loop reasoning mechanism is internalized into the model's internal strategy, including acquiring training samples, supervised fine-tuning, and trajectory preservation constraints, to ensure that the model follows the evidence-driven decision-making logic.
It significantly improves the controllability and verifiability of the behavioral decisions of large language models in complex reasoning tasks, ensuring that the model actively seeks verification and makes explicit decisions when there is insufficient evidence, and achieves reliable convergence under budget constraints, avoiding blind confidence or avoidance of verification.
Smart Images

Figure CN122334404B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and natural language processing, and in particular to a fine-tuning method for large language models that can train them to follow evidence-driven closed-loop reasoning discipline, a corresponding data construction method, a reasoning system, and applications. Background Technology
[0002] Large Language Models (LLMs) have demonstrated powerful capabilities in tasks such as text generation and question answering, but their reliability, verifiability, and controllability in open-world reasoning still face significant challenges. Current models primarily rely on the self-consistency of internal representations for generation, lacking a rigid mechanism for systematically ingesting, verifying, and utilizing external evidence. This leads to a series of problems, such as: the generated conclusions becoming decoupled from supporting evidence (“illusion”); unreliable tool invocation decisions, susceptible to cue noise; opaque revision processes and semantic drift when faced with new evidence or errors; and rigid allocation of computational resources in the reasoning process, making reliable convergence difficult within a limited budget.
[0003] Existing technologies attempt to partially address the aforementioned problems by improving model structure (such as hybrid expert models, MoE), optimizing inference systems (such as key-value cache management), and enhancing the functionality of external tools. However, most of these methods rely on manually curated prompts or static rules for control logic (how to retrieve evidence and how to adjudicate conflicts), failing to translate these closed-loop disciplines into learnable and generalizable strategies within the model. Therefore, a new training paradigm is urgently needed that can deeply embed evidence-driven, budget-constrained, and auditable closed-loop inference mechanisms into the model's behavioral distribution. Summary of the Invention
[0004] The core technical problem this invention aims to solve is: how to train a large language model so that, in open-world reasoning, it can spontaneously follow the closed-loop discipline of "hypothesis-verification-revision-convergence" like a rigorous researcher. That is, it should actively verify when there is insufficient evidence, explicitly decide when there is conflict in the evidence, make minimum difference revisions when errors are found, and achieve reliable and auditable convergence to the truth under budget constraints. This overcomes the uncontrollable and unreliable problems caused by existing models relying on internal consistency rather than external evidence.
[0005] The technical problem of this invention is solved by the following technical solution: In a first aspect, the present invention provides a closed-loop fine-tuning method for training an evidence-driven large language model, comprising the following steps: S1. Obtain training samples, which include closed-loop inference trajectory data based on the state-action-evidence gating-rollback revision closed-loop control architecture; S2. Based on the closed-loop inference trajectory data, supervised fine-tuning is performed on the pre-trained large language model base to train the large language model base to learn and output structured action decisions and atomic claims that are compatible with the state-action-evidence gating-rollback revision closed-loop control architecture. S3. After the supervised fine-tuning, perform preference convergence training based on closed-loop behavior indicators; S4. During or after the preference convergence training, when the large language model base is upgraded from the first computing architecture to the second computing architecture, the trajectory preservation constraint is applied to minimize the difference in action distribution and uncertainty vector distribution generated by the large language model base under the same input before and after the upgrade.
[0006] In some embodiments, the following technical features are also included: In step S1, the closed-loop reasoning trajectory data includes at least a serialized central state, action sequence labels, evidence object encapsulation information, and differential rollback records. The central state includes the problem objective, structured uncertainty vector, budget ledger, evidence pool, atomic claim set, and immutable circular log.
[0007] In some embodiments, the structured uncertainty vector includes at least one of the following dimensions: answer uncertainty, evidence sufficiency uncertainty, execution verification necessity uncertainty, tool specification consistency risk uncertainty, and high-risk assertion exposure uncertainty; the budget ledger is used to uniformly record and manage at least one of the following resources: lexical consumption, tool call cost, execution time consumption, and loop step consumption.
[0008] In some embodiments, step S3 specifically includes: Reasoning trajectories that follow the discipline of the state-action-evidence gating-rollback revision closed-loop control architecture will be used as positive samples, while reasoning trajectories that violate the discipline of the state-action-evidence gating-rollback revision closed-loop control architecture will be used as negative samples. At least one of the evidence gating pass rate, execution trigger accuracy, and rollback revision accuracy will be used as a reward signal to optimize the behavior distribution of the large language model base.
[0009] In some embodiments, in step S4, the trajectory preservation constraint is implemented by minimizing a loss function, and the optimization calculation of the loss function adopts the trajectory preservation cortical upgrade algorithm.
[0010] In a second aspect, the present invention provides an apparatus for evidence-driven intelligent reasoning, comprising: processor; A memory on which computer programs are stored; When the computer program is executed by the processor, the above-described closed-loop fine-tuning method is implemented.
[0011] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described closed-loop fine-tuning method.
[0012] Fourthly, this invention provides an application of an evidence-driven large language model trained by the above-described closed-loop fine-tuning method in an intelligent reasoning system. The intelligent reasoning system includes the evidence-driven large language model and a state-action-evidence gating-rollback revision closed-loop controller. The application includes: F1. The state-action-evidence gating-rollback revision closed-loop controller maintains a serialized central state, which includes the current problem objective, a structured uncertainty vector estimated by the evidence-driven large language model, a budget ledger, an evidence pool, an atomic claim set, and an immutable circular log. F2. The state-action-evidence gating-rollback revision closed-loop controller, based on the central state, calls the evidence-driven large language model to perform reasoning in order to obtain structured action decisions or atomic claims. F3. The state-action-evidence gating-rollback revision closed-loop controller performs corresponding operations based on the structured action decision, or performs evidence gating adjudication on the atomic claim; F4. Based on the execution result or decision result of step F3, update the central state and repeat steps F1 to F3 until the termination condition is met.
[0013] Fifthly, the present invention provides an evidence-driven intelligent reasoning system, comprising: The aforementioned device is used to provide a trained large language model; The status-action-evidence gating-rollback revision closed-loop control module is configured to execute the steps of the above application.
[0014] Sixthly, the present invention provides a method for constructing trajectory-based data for training evidence-driven large language models, comprising: The reasoning process of the simulated state-action-evidence gating-rollback revision closed-loop control architecture generates a complete reasoning trajectory for an input problem; In the reasoning trajectory, a serialized snapshot of the central state is recorded, and the central state includes at least the problem objective, the structured uncertainty vector, the budget ledger, the evidence pool, and the atomic claim set; Label each decision step in the reasoning trajectory with a gold standard action label; All supporting information involved in the reasoning process is encapsulated into a structured evidence object, which at least includes a source pointer and reliability information; For steps in the reasoning process that require revision, record the location where the rollback occurred, the changes in the set of claims before and after the rollback, and the increase in evidence that triggered the rollback.
[0015] In a seventh aspect, the present invention provides a database for storing trajectory data constructed by the above-described method.
[0016] Eighthly, the present invention provides a data transmission method, comprising: Generate trajectory data from the aforementioned database; and Transmit the trajectory data.
[0017] In a ninth aspect, the present invention provides a computer-readable storage medium having a bit stream stored thereon, the bit stream comprising an encoded representation of tracing data generated by the method described above.
[0018] In a tenth aspect, the present invention provides an intelligent reasoning method for fault diagnosis of industrial equipment. The intelligent reasoning method is executed by an evidence-driven large language model trained based on a state-action-evidence gating-rollback revision closed-loop control architecture, and includes the following steps: Receive fault description information about the target device and initialize the central state, which includes the fault description as the problem target, the structured uncertainty vector initially estimated by the evidence-driven large language model, the preset budget ledger, the initial evidence pool, the empty atomic claim set, and the immutable circular log. Repeat the following steps until the termination condition is met: Based on the current central state, the evidence-driven large language model is invoked to perform reasoning in order to obtain the next structured action decision or new atomic claims; If a structured action decision is obtained, the structured action decision is executed. The structured action decision includes at least one of the following: retrieving external evidence from a device database or knowledge base, calling data analysis tools to analyze device sensor data to obtain execution evidence, or conducting internal thinking to generate candidate claims. The information obtained from executing structured action decisions is encapsulated into evidence objects with source and reliability information, and then updated to the evidence pool. If an atomic claim is obtained, the evidence gating module will adjudicate the atomic claim based on the current evidence pool. The adjudication result may include approval, suspension, or failure. Based on the action execution result or claim adjudication result, the atomic claim set and the structured uncertainty vector are differentially updated, and the budget ledger and immutable circular log are updated; When the termination condition is met, a diagnostic conclusion is output, which includes the finalized atomic claim, an index of the chain of evidence supporting the atomic claim, and a description of the residual uncertainty.
[0019] In some embodiments, the structured uncertainty vector includes the following dimensions: uncertainty of diagnostic conclusion, uncertainty of sufficiency of evidence, uncertainty of necessity for implementing data analysis tools, uncertainty of risk of tool call specification matching, and uncertainty of high-risk exposure to production interruption due to misdiagnosis.
[0020] In some embodiments, the budget ledger is used to uniformly record and manage the number of tokens consumed during the reasoning process, the number of tool calls, the data analysis execution time, and the number of reasoning loop steps.
[0021] In some embodiments, when the evidence gating module adjudicates an atomic claim, if the reliability of the evidence associated with the atomic claim is lower than a preset threshold, or there are unresolved conflicts among the evidence, or the atomic claim is rejected by the enforcement evidence, the adjudication is deemed a failure and a rollback revision is triggered; if the atomic claim is supported by evidence but the evidence is insufficient or there is a path that can be further verified, the adjudication is deemed a suspension.
[0022] In some embodiments, the termination condition is one of the following: the evidence gating module rules all atomic claims as passed and the maximum value of the structured uncertainty vector is below a preset threshold; or any resource in the budget ledger is exhausted.
[0023] The beneficial effects of this invention compared to the prior art include: This invention acquires training data containing complete closed-loop reasoning trajectories (S1), and sequentially performs supervised fine-tuning (S2), preference convergence training based on closed-loop behavior indicators (S3), and trajectory-preserving constraint training (S4). This transforms the reasoning disciplines (such as evidence gating and rollback revision) of the state-action-evidence gating-rollback revision closed-loop control architecture from external rules into learnable and generalizable decision-making strategies within the large language model. Specifically, during training, the model not only learns to generate correct answers, but more importantly, it learns what verification actions (such as retrieval and execution) should be triggered under what uncertainties, how to bind claims with evidence, and how to revise at the lowest cost. This training paradigm ensures that the model's behavior distribution naturally tends to follow evidence-driven closed-loop logic during reasoning. Therefore, the overall beneficial effect of this invention is that it significantly improves the controllability and verifiability of behavioral decisions in complex reasoning tasks for large language models. This overall effect is achieved through the synergy of several technical features: First, through trajectory-based data and supervised fine-tuning (S1, S2), the model learns to output structured actions and claims compatible with the closed-loop architecture, laying the foundation for controllable behavior. Second, through preference-convergence training (S3), the model further optimizes its decision-making process, tending to choose behaviors that follow evidentiary discipline (such as proactive verification and explicit adjudication), avoiding blind confidence or avoidance of verification, thereby improving the rationality and verifiability of the decision-making process. Finally, through trajectory preservation constraints (S4), it ensures that the reliable decision-making patterns learned by the model do not drift during architecture upgrades, maintaining behavioral consistency. These technical features work in a progressive manner, collectively ensuring that the model ultimately produces conclusions with more rigorous logic and clearer evidence support.
[0024] In addition, some embodiments also have the following beneficial effects: By clearly defining multiple dimensions of the structured uncertainty vector, the model's estimation of its own cognitive state becomes more refined and comprehensive, providing a more reliable basis for subsequent entropy routing decisions and thus improving the rationality of action selection.
[0025] By managing heterogeneous resources through a unified budget ledger, resource consumption becomes measurable and predictable, providing a foundation for optimal decision-making under budget constraints and improving the system's economy and efficiency.
[0026] By using the trajectory-preserving constraint loss function, behavioral drift during model upgrade is effectively suppressed, ensuring that the system does not sacrifice the learned reliable reasoning ability while pursuing computational efficiency, thus enhancing the iterability of the system.
[0027] Other beneficial effects of the embodiments of the present invention will be further described below. Attached Figure Description
[0028] Figure 1 This is a flowchart of a closed-loop fine-tuning method for training an evidence-driven large language model, as described in an embodiment of the present invention.
[0029] Figure 2 E in the embodiments of the present invention 3 - A schematic diagram illustrating the core principles and mechanisms of the Loop architecture.
[0030] Figure 3a and Figure 3b These are the five elements embedded in E in the embodiments of the present invention. 3 - A schematic diagram of the hierarchical closed-loop architecture of the Loop, Phase 1 and Phase 2.
[0031] Figure 4a and 4b These are schematic diagrams of Phase 1 and Phase 2 of the base skin and parallel extension component architecture in the embodiments of the present invention.
[0032] Figure 5 E in the embodiments of the present invention 3 - Loop single-round decision-making flowchart.
[0033] Figure 6 This is a schematic diagram of the stabilization layer structure for mHC mapping and residual fusion in an embodiment of the present invention.
[0034] Figure 7 E is an embodiment of the present invention. 3 - A closed-loop flowchart of the Loop controller driving Sandbox for evidence collection and proof with prompts for refilling. Detailed Implementation
[0035] The present invention will be further described below with reference to the accompanying drawings and preferred embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0036] The core of this invention lies in a closed-loop fine-tuning method for training evidence-driven large language models. Its basic concept is to reconstruct traditional flat "instruction-answer" training data into "trajectory-based" data containing the complete reasoning process states. By allowing the large language model to learn this trajectory data, it internalizes a state-action-evidence gating-rollback revision closed-loop control architecture discipline, preferably E. 3- The Loop (Evidence-Enhanced-Efficient Loop) is a closed-loop reasoning discipline. This discipline requires the model to make decisions based on a central state (including the problem objective, structured uncertainty vector, budget ledger, evidence pool, atomic claim set, and immutable circular log, etc.) during the reasoning process. Decision-making actions include internal thinking, external retrieval, and execution verification. Evidence gating is applied to the generated claims, and rollback revisions are performed when necessary. All processes are budget-constrained and recorded in the immutable log. The training objective is not only to enable the model to generate correct answers but also to teach it to make correct verification decisions. The "necessary situation" in "rollback revisions when necessary" refers to situations where new information (evidence or execution results) irreconcilably contradicts existing claims or decisions in the reasoning trajectory or seriously violates pre-set reliability rules. In order to maintain the logical consistency, reliability, and verifiability of the entire system, the previous state must be revised. Specifically, this includes: when the evidence-gated decision is "FAIL", when the enforcement arbitrator returns a "FAIL" decision, and when the evidence-gated decision is "HOLD" but the claim set needs to be cleared.
[0037] In the current international context, the competitive focus of large language models has clearly shifted from the linear narrative of "larger parameters = stronger capabilities" to the system capability level of "verifiable inference control, compressible cost curve, and constrainable runtime behavior" (see [Zhang, C., Zhang, J., Lu, J., & Zhao, Y. (2026). Large language models meet energy systems: Opportunities, challenges, and future perspectives.). Applied Energy, 403 , 127076.]). This directly connects with the closed-loop technology of inference control-evidence alignment-tool execution pointed to by the embodiments of the present invention. Specifically, at the structural level, the sparsity route represented by MoE (Mixture of Experts) selects the top-k experts for each token through a router, and controls expert congestion with load balancing loss and capacity factor, so that capacity expansion is no longer equivalent to a linear increase in FLOPs per token, referring to the literature [Cai, W., Jiang, J., Wang, F., Tang, J., Kim, S., & Huang, J. (2025). A survey on mixture of experts in large language models. IEEE Transactions on Knowledge and Data Engineering.At the inference service level, the memory usage, fragmentation, and scheduling latency of the KV cache are considered decisive bottlenecks. By separating prefill / decode, using paginated KV management, and employing batch processing strategies, the conflicts between long contexts and high concurrency are transformed into an engineeringable resource allocation problem, as referenced in [Wu, Y., Chen, S., Zhong, Y., Huang, R., Tan, Y., Zhang, W., ...&Huang,P. (2026). DualPath: Breaking the Storage Bandwidth Bottleneck in Agentic LLMInference]. arXiv preprint arXiv:2602.21548. More importantly, the new trend toward reliability shapes the model into an "actionable runtime system," explicitly performing retrieval, computation, and verification within constrained tool interfaces and sandbox environments. This upgrades the "generate-execute-feedback-revise" process from a hinting technique to a replayable trajectory and an auditable closed loop, thereby binding inference quality and inference budget within the same control framework. This avoids replacing evidence and verification with lengthy, self-consistent narratives when uncertain, as seen in the reference [Gartlehner, G., Kahwati, L., Hilscher, R., Thomas, I., Kugley, S., Crotty, K., ... & Chew, R. (2024). Data extraction for evidence synthesis using a large language model: A proof-of-concept study]. Research synthesis methods, 15 (4), 576-589.].
[0038] In parallel with the aforementioned international trend towards controllability, the development of large language models in China was constrained earlier by the hard constraints of computing power cost, deployment density, and delivery stability. Therefore, its technical approach is more focused on the coupling of sparse structure and inference system engineering, which in turn exposes the mechanistic gap caused by the "lack of a trainable control plane" more quickly. See reference [Chen, S., Wang, W., Chen, X., Zhang, M., Lu, P., Li, X., & Du, Y. (2025). Enhancing Chinese comprehension and reasoning for large language models: an efficient LoRA fine-tuning and tree of thoughts framework. Journal of Supercomputing, 81 (1).] and [Li, Z., Qiu, W., Ma, P., Li, Y., Li, Y., He, S.,...&Gu, W. (2024). An empirical study on large language models in accuracy and robustness under chinese industrial scenarios. arXiv preprint arXiv: 2402.01723. On the one hand, domestic models generally use MoE sparsity and route governance to reduce the cost per unit token, and improve the controllability of online services through route stability, overflow strategies and tail delay management, referring to the literature [Abnar, S., Shah, H., Busbridge, D., Ali, AME, Susskind, J., & Thilk, V. (2025). Parameters vs flops: Scaling laws for optimal sparsity for mixture-of-expertslanguage models]. arXiv preprint arXiv:2501.12370. On the other hand, long context landing places greater emphasis on prefill acceleration, chunked scheduling, kernel pipelining and bandwidth optimization, transforming "how long can be read" into engineering problems such as "whether prefill can scale linearly, whether memory access is controllable, and whether concurrency throughput is stable," referring to the literature [Haoyang, LI, Li, Y., Tian, A., Tang, T., Xu, Z., Chen, X., ...&Chen,L. (2025). A survey on large language model acceleration based on kv cachemanagement]. Transactions on Machine Learning Research. ].
[0039] It is precisely under such strong engineering constraints that, if the rigid binding of evidence and conclusion is still lacking, citation drift and passive assertions are prone to occur; if the judgment and back-injection constraints for execution triggering are lacking, tool calls will be highly sensitive to contextual noise, resulting in false triggers / missed triggers. If the differential consistency and rollback mechanism for revision is lacking, error correction will degenerate into regeneration and cause belief drift; high-risk tail illusions will be masked by average indicators and erupt in key scenarios. From the perspective of functional differentiation rather than biological isomorphism, the internal synergy of current large language models in task allocation, attention focus, language organization, and semantic integration can approximate some of the functions of the prefrontal cortex, parietal cortex, Broca's area, and Wernicke's area in the human brain, but its fundamental limitation shared with the human brain is that the system mainly relies on the self-consistent reorganization between existing representations to complete judgment, reasoning, and generation, rather than continuously, directly, and bindingly taking in and correcting external evidence during operation. Therefore, evidence should not be regarded as supplementary information in the existing generation chain, but rather as a key fulcrum propelling large language models from "internal representation closure" to "external constraint convergence." This is precisely the most fundamental and long-neglected core issue in the current architectural evolution. Specific research gaps are as follows: The decoupling of evidence and conclusion remains a structural gap: the generation process lacks a hard protocol that "assertions must carry locatable evidence pointers and explicitly preserve conflict relationships," leading to reference drift, passive assertions, and silent overriding of conflicts in long contexts or multi-source splicing, which are difficult to suppress stably through cue engineering.
[0040] Tool triggering strategies lack learnable runtime states: current triggering decisions are often approximated by templates, static rules, or lightweight classifiers, lacking a joint representation of evidence sufficiency, verifiability, action cost, and failure risk. This makes the system highly sensitive to wording and noise, resulting in budget and tail delay inflation caused by false triggers, and missed triggers causing the system to continue generating and forming a chain of errors during the verification process.
[0041] The computational allocation during the inference period is generally rigid: difficult and easy problems share a nearly isomorphic decoding process, and the model can only pretend to delve deeper into inference by "generating more text," but it lacks a controllable mechanism to direct the extra budget to retrieval, execution, and verification. Therefore, the increase in cost does not necessarily translate into a gain in reliability.
[0042] The revision lacks "version semantics" and differential constraints: When faced with new evidence or error correction needs, the model tends to replace the minimum necessary update with regeneration. The change boundary is uncontrollable, the commitment is inconsistent and semantic drift occurs frequently, and there is no verifiable binding between the revision reason and the evidence increment, making it difficult to maintain controllability for multi-round collaboration and iterative tasks.
[0043] High-risk tail illusions are difficult to manage with average metrics: when there is insufficient evidence, conflicting information, or ambiguity in the question, the system may still make a highly certain assertion; traditional training and evaluation tend to optimize the average accuracy rate, lacking a scalable monitoring and adjudication loop for "conservative exit when lacking evidence, clarification or verification of conflicts, and meeting the evidence threshold for key assertions".
[0044] Control and auditing often remain at the "glue layer," lacking a unified behavioral contract: memory retrieval, rejection strategies, tool injection, and anomaly avoidance are not solidified into optimizable goals and replayable state transitions, resulting in online behaviors that are not attributable and cannot be retrained. The larger the system, the more difficult it is to converge the triggered deviations.
[0045] After the bottlenecks of long context and high concurrency inference stack are solved by engineering, new contradictions are amplified: control information such as evidence blocks, audit logs, and tool specifications will directly compete for resources with KV cache bandwidth, scheduling strategies and memory fragmentation. If budget governance and structured compression strategies are lacking, the introduction of the control plane may worsen tail latency and reduce system throughput.
[0046] Furthermore, current parameter fine-tuning projects, while fundamentally addressing the instability of current large language models in open tasks, have dragged the R&D process into a high-investment, low-certainty cycle of "evaluation-regression-re-parameter tuning." A single round of fine-tuning often means not only a continuous stacking of data cleaning, sample construction, training scheduling, and hyperparameter search, but also a subsequent exponentially expanded metric retesting, scenario regression, manual review, and version comparison. The workload and computational consumption often far exceed the apparent training cost itself. More importantly, given the rapid iteration and continuously rising capability boundaries of open-source foundation models like DeepSeek and Qwen, parameter patching implemented to address a single defect is often partially covered by the capabilities of the new generation of foundation models before stable verification is completed. This ultimately leads to a structural dilemma of "long adaptation cycles, high verification costs, short benefit windows, and weak overall gains." Therefore, what is truly scarce at this stage is no longer the ability to continue making localized repairs around the parameter layer, but rather the ability to build a control plane that can steadily improve system performance within a given budget, so that system performance no longer relies primarily on expensive and fragile repeated fine-tuning, but can instead achieve stable improvements through a trainable, auditable, and reproducible control plane.
[0047] The aforementioned gaps all point to the same necessity: simply relying on a larger base, longer context, or stronger alignment cannot fundamentally eliminate the structural mismatch of "being able to talk but not stable." It is necessary to elevate "evidence gating - execution verification - rollback revision - budget termination - immutable log" into a trainable and auditable operating mechanism. This will significantly reduce the variance of the model achieving similar performance metrics (such as validation set loss) in multiple independent training runs, thereby improving the repeatability and stability of the training process.
[0048] To address the aforementioned technical shortcomings, such as "generative self-consistency replacing factual constraints, lack of reproducible adjudicative semantics in tool-triggered methods, and the susceptibility to drift and difficulty in auditing multiple rounds of revisions," this invention proposes an evidence-driven closed-loop truth-seeking intelligent reasoning and generation method called "E." 3 The "-Loop" architecture. Its core innovation lies in elevating evidence from a post-generational, supplementary support to a primary control variable throughout the entire process of reasoning, execution, revision, and termination. By continuously implementing evidence constraints, conflict resolution, and closed-loop correction during runtime, it transforms the large language model from a probabilistic generation mechanism relying on internally consistent representations into an evidence-driven truth-seeking mechanism oriented towards the open world. Its distinctiveness lies in E... 3 -Loop does not simply attribute the problem to insufficient base parameters, but rather revisits the cognitive structure of the brain based on first principles. While existing large language models have functionally formed synergistic links of prefrontal cortex-like policy control, parietal cortex-like attentional integration, Broca's area-like representation generation, and Wernicke's area-like semantic understanding, their reasoning process, like human cognition, is still primarily based on the self-consistent reorganization of internal representations. They lack a rigid mechanism for continuously acquiring external evidence, explicitizing conflicts, and rewriting refutations during operation. Therefore, once entering open-world, multi-source information, and executable task scenarios, generation, triggering, revision, and risk suppression can easily become unstable simultaneously. Given that there is currently no operable "beyond the human brain" cognitive paradigm, this invention adopts a higher-order cognitive control approach borrowed from scientific researchers: "hypothesis generation - external evidence acquisition - contradiction identification - differential revision - re-verification closed loop." It systematically establishes evidence as the primary control object across the entire chain of reasoning, execution, revision, and output, proposing a model based on E... 3 -Loop is an evidence-driven, closed-loop, truth-seeking intelligent reasoning and generative architecture.
[0049] It is worth noting that E 3 The innovative Loop design is not a low-level computational backbone at the same level as Transformer, Mamba, or MoE, nor does it replace operator mechanisms such as attention. Instead, it is an evidence-driven reasoning control architecture and runtime control plane located above the base model. It addresses not the problem of training a single model, but rather the long-standing lack of a unified constraint mechanism for conclusion validity, tool triggering, revision rollback, and risk mitigation under open-world conditions. To this end, this invention uses evidence objects, state transitions, execution decisions, differential revisions, and budget governance as a unified control unit. This enables the system to achieve low-cost adaptation, multi-scenario migration, and rapid iteration to multiple open-source or closed-source base models while retaining the representational capabilities of the existing base model. This is achieved through efficient parameter tuning and context engineering, transforming the path to improving the capabilities of large language models from high-cost, low-determinism repetitive parameter fine-tuning to an upgrade to a trainable, auditable, and reproducible operational mechanism centered on evidence constraints.
[0050] Example 1 This embodiment provides a closed-loop fine-tuning method for training evidence-driven large language models, such as... Figure 1 As shown, its core lies in: reconstructing the training data from "instruction-answer" pairs into "state-action-evidence" trajectory sequences, and introducing budget constraints and auditability metrics as supervision signals during training, thereby shifting closed-loop discipline from external rules during inference to a generalizable policy distribution within the model. This embodiment includes the following steps: S1. Obtain training samples, wherein the training samples include closed-loop inference trajectory data based on a state-action-evidence gating-rollback revision closed-loop control architecture; preferably, the state-action-evidence gating-rollback revision closed-loop control architecture is E. 3 -Loop architecture; S2. Based on the closed-loop inference trajectory data, supervised fine-tuning is performed on the pre-trained large language model base to train the large language model base to learn the output and E. 3 - Structured action decisions and atomic claims compatible with the Loop architecture; S3. After the supervised fine-tuning, perform preference convergence training based on closed-loop behavior indicators; S4. During or after the preference convergence training, when the large language model base (base cortex) is upgraded from the first computational architecture (dense model) to the second computational architecture (sparse model), the trajectory preservation constraint is applied to minimize the difference in action distribution and uncertainty vector distribution generated by the large language model base under the same input before and after the upgrade.
[0051] In step S1, the closed-loop inference trajectory data includes at least a serialized central state, action sequence labels, evidence object encapsulation information, and differential rollback records. The method for constructing the closed-loop inference trajectory data includes: Traditional training samples are flat (input instructions, output answers), while this embodiment requires each training sample to be a complete, replayable E. 3 - Loop state machine execution trajectory. Each sample must contain the following structured information: Central state sequence ( S t Sequence): Serialization records snapshots of the state in each round of the reasoning process. S t = { Q , U , B , E , C , L This requires that the data construction process itself be an E. 3- Simulate the execution of the loop, recording each step. Q , U , B , E , C change.
[0052] Action sequence labels: Label each decision step with gold standard action labels, including RETRIEVE (external retrieval), MEMORY_LOOKUP (memory lookup), THINK (internal inference), SANDBOX_EXEC (sandbox execution), and specific action parameters (such as retrieval query templates and tool call specifications).
[0053] Evidence Object Encapsulation Information: All evidence supporting the final conclusion, whether internally generated or externally acquired, must be encapsulated as a structured object. Each Evidence Object must contain proof information, reliability, conflict tags, timestamps, and digest hashes, thus providing a definable basis for evidence-gated adjudication.
[0054] Differential rollback log: For samples requiring revision, the location of the rollback, the claim set before the rollback, the claim set after the rollback, and the evidence that triggered the rollback must be recorded. This provides a supervisory signal for the model to learn "minimum necessary updates" rather than "full rewrite".
[0055] Next, a training objective and method centered on closed-loop behavior metrics are adopted. The training objective is no longer traditional maximum likelihood estimation (text matching), but rather to enable the model to learn to make correct validation decisions. The training process consists of multiple stages: In step S2, supervised fine-tuning (SFT) of the closed-loop protocol is performed: Using the closed-loop inference trajectory data described above, the model is trained to learn to output structured action decisions and claims using a standard next-to-token prediction task. For example, when uncertainty U indicates insufficient evidence, the model should be trained to prioritize outputting the RETRIEVE action token and its parameters, rather than continuing to generate text.
[0056] In step S3, gating threshold and preference convergence training are performed: contrastive preference learning is introduced to construct positive and negative sample pairs. Positive samples follow E... 3- The trajectory of the loop discipline (e.g., triggering retrieval when evidence is insufficient), and negative samples are the trajectory of violating the discipline (e.g., making confident assertions when evidence is insufficient, silently covering when conflicts are unresolved). The training objective is not only to generate correct answers, but also to mimic the correct decision-making process. In this stage, closed-loop metrics such as evidence gating pass rate, execution trigger accuracy, and rollback revision accuracy are used as reward signals to converge the model's behavioral distribution through reinforcement learning or preference optimization algorithms.
[0057] In step S4, trajectory preservation constraints and model upgrade (TPCU algorithm) are performed. When it is necessary to upgrade the Base Cortex from a dense model (Phase 1) to a sparse model such as MoE (Phase 2) to improve efficiency, it is essential to ensure that the control semantics do not drift. In a preferred embodiment, the trajectory preservation cortex upgrade algorithm is used as the training constraint.
[0058] Finally, consistency between engineering implementation and auditing is ensured, specifically including: Training framework: Based on deep learning frameworks such as PyTorch, a deeply customized training pipeline is required to support the processing of trajectory-based data and structured evidence objects. It needs to integrate techniques such as FSDP / ZeRO-3 distributed training and bf16 mixed precision.
[0059] Logs and monitoring: Training logs should synchronously record the loss curve and closed-loop behavior metrics (such as gating pass rate, rollback frequency, and budget consumption ledger) to demonstrate that the model is learning decision discipline rather than merely memorizing text format.
[0060] Deployment consistency: Model weights obtained during training, E during inference 3 - The Loop controller, evidence artifact format, and audit log protocol must remain completely consistent to ensure seamless integration of training and inference and end-to-end auditability.
[0061] The method described in this embodiment will be explained in detail below: Innovations in architecture and algorithms: E 3 -Loop architecture principle In step S1, the central state includes the problem objective, a structured uncertainty vector, a budget ledger, an evidence pool, an atomic claim set, and an immutable loop log. The structured uncertainty vector includes at least one of the following dimensions: answer uncertainty, evidence sufficiency uncertainty, execution verification necessity uncertainty, tool specification consistency risk uncertainty, and high-risk assertion exposure uncertainty. The budget ledger is used to uniformly record and manage at least one of the following resources: lexical consumption, tool call cost, execution time consumption, and loop step consumption. 3The innovation of the Loop lies not in continuously stacking additional capabilities such as retrieval, memory, tools, or execution, but in consolidating these originally loosely connected processes into a unified control semantic within the same closed loop: the system is centered on a single state. S t = { Q , U , B , E , C , L As the sole decision-making vehicle, among which Q This indicates the current problem objective and its sub-objectives. B This represents a unified budget ledger for tokens, tool calls, time, and steps. E This represents an evidence pool with source pointers, reliability, timestamps, and conflict edges. C This represents a set of atomic claims with risk labels and supporting pointers. L This represents an immutable circular log; where U = ( u answer , u evidence , u exec , u spec , u risk ) is a five-dimensional structured uncertainty vector, where, u answer Characterizes the uncertainty of the candidate conclusion itself (i.e., the uncertainty of the answer). u evidence Characterizes the gap in sufficiency of evidence (i.e., uncertainty about the sufficiency of evidence). u exec Characterize the necessity of performing verification (i.e., the uncertainty of the necessity of performing verification). u spec Characterize the risk of consistency in tool specifications (i.e., uncertainty of tool specification consistency risk). u risk The high-risk assertion exposure (i.e., high-risk assertion exposure uncertainty) is represented. The aforementioned five-dimensional structured uncertainty is not manually annotated, but rather jointly generated and normalized by the uncertainty estimator after each round of reading the current hidden representation, evidence coverage, conflict edge density, tool parsing state, and risk label. It is also differentially updated after evidence addition, execution return, and rollback revision, thereby transforming the "fuzzy uncertainty" originally residing in the model's implicit representation into trainable, comparable, and auditable control variables. In a preferred embodiment, the uncertainty estimator is attached to the last layer of hidden states of the base model. h NThe lightweight trainable multilayer perceptron above takes input from the pooled representation of the last hidden state, concatenated with statistical features of evidence coverage, conflict edge density, tool specification matching state, and risk label, and outputs a five-dimensional structured uncertainty vector after being mapped by a normalization function. U = ( u answer , u evidence , u exec , u spec , u risk The uncertainty estimator is trained under supervision using inference trajectory data with gated decision results, execution receipts, and rollback revision tags. It performs differential updates on the uncertainty vector after each round of evidence addition, execution return, or claim rollback, thus making uncertainty quantification a trainable, reproducible, and auditable runtime control variable. The Entropy Router is not a token router in the sense of attention sparsity, but rather a lightweight, trainable policy network located in the runtime control plane; it reads... U , B , E and C State summary, output restricted action set A Policy distribution on {THINK, RETRIEVE, MEMORY_LOOKUP, SANDBOX_EXEC, SUBMIT} π ( S t It also provides a stopping threshold, depth of thought, and budget allocation bias, so that "internal reasoning first, proactive supplementary evidence first, memory check first, or execution verification first" no longer depends on the randomness of the prompt words, but becomes a learnable decision with the goal of reducing uncertainty benefits relative to budget costs.
[0062] In a preferred embodiment, the uncertainty estimator is a lightweight neural network (such as a multilayer perceptron, MLP). Its input vector is composed of the following concatenations: 1. Pooling vector of the last hidden state in the base model; 2. Evidence sufficiency characteristics: Calculate the reliability weighted sum of evidence items in the current evidence pool that are relevant to the candidate claim; 3. Conflict Measurement Feature: Calculate the reliability difference between the evidence supporting and opposing the claim in the evidence pool; 4. Tool Matching Features: Based on tool specification pattern matching, the compliance score of candidate tool invocation parameters is calculated. This MLP is trained under supervision on a large amount of inference trajectory data with expert-annotated uncertainty labels to learn the mapping relationship from the above features to the five-dimensional uncertainty vector.
[0063] After an action is selected and executed, the system enters a unified evidence gating and adjudication chain. Evidence Gate uses "proof-carrying gate" as its sole term, judging each atomic claim according to four categories of signals: "support coverage—source reliability—conflict relationship—risk level." It should be noted that the evidence in the evidence pool is at least divided into two categories: externally verifiable evidence and internal inference intermediate results. Externally verifiable evidence refers to evidence returned by retrieval systems, database queries, sandbox execution receipts, or other repeatable external sources, accompanied by source pointers and execution / query metadata. Internal inference intermediate results refer to intermediate semantic products generated by the THINK action, used only to form candidate claims or verification clues. For the two types of evidence, the system employs differentiated reliability assignment and update rules: externally verifiable evidence is assigned a higher initial reliability when its source is traceable, its return status is valid, and its results are verifiable; internal inference intermediate results are assigned only a conservative initial reliability and cannot be used alone as sufficient grounds for high-risk claims to pass evidence gating. Their reliability can only be increased after subsequent external evidence support or multi-source consistency verification. Therefore, the reliability of the evidence is not solely determined by model self-consistency, but rather by a combination of source type, verifiability, cross-source consistency, time validity, and conflict resolution results. This prioritizes externally verifiable constraints over internal generation tendencies and avoids evidence gating falling into circular reasoning. When evidence is insufficient or unresolved conflicts exist, but a clear next verification path (i.e., a verifiable path) exists, the ruling is HOLD. When a high-risk claim lacks any supporting evidence, the tool specification is not met, or there is conclusive rebuttal evidence, and the execution result constitutes disproving evidence, the ruling is FAIL, triggering belief_update_rollback to reduce the confidence level, rewrite the risk, or perform a minimum difference rollback on the corresponding claim. Here, tool invocation refers only to structured execution requests generated under ToolSpec, Schema, or finite state syntax constraints, while sandbox execution is the controlled execution process after the request enters an isolated environment; the two are not the same concept, the former is responsible for forming resolvable actions, and the latter is responsible for returning verifiable evidence. For conflicts between results from multiple tools, multiple receipts, or multiple sources, the Execution Arbiter does not use simple majority voting. Instead, it arbitrates based on the principles of prioritizing reproducible workpieces, weighting the reliability of the source, and prioritizing the freshness of time and the repeatability of the result. If the conflict is still unresolved, it maintains HOLD and prioritizes triggering further evidence collection, and does not allow generative wording to cover up the pending status.The Budget Governor, as an independent budget governance unit, performs unified hard deductions on tokens, tools, time, and steps, and applies soft constraints to the router when the budget approaches the boundary and triggers hard termination when the budget is exhausted; the Stop Decider only stops when the gate passes and max( U When the value falls below a threshold, convergent output is allowed; otherwise, a bounded conservative conclusion is returned, including an index of claims and evidence, residual uncertainties, and budget ledgers. This ensures that the system's "truth-seeking" is no longer based on linguistic fluency, but rather on... U The decline E The incremental changes, consistent gating decisions, and log replayability serve as unified criteria, ensuring that the model's optimization process and convergence criteria no longer implicitly depend on the fluency of the output text. Instead, controllable optimization is achieved through stabilizing the underlying training dynamics. The mHC mechanism provided in this invention, compared to standard residual connections, effectively constrains the upper bound of the gradient norm and significantly reduces the scale drift of activation values across different network depths. This stability reduces the sensitivity of the model training process to hyperparameters (such as the learning rate), resulting in smaller fluctuations and a more stable downward trend in the validation set loss within the same training period, providing a foundation for a controllable and reproducible training environment.
[0064] In its engineering implementation, this mechanism is solidified with replaceable interfaces (Policy / Uncertainty Estimator / Retriever / Memory Lookup / Thinker / Executor / Evidence Gate are replaceable), but the contract of "state - action - gating - adjudication - rollback update - budget termination - immutable log" remains unchanged, thus ensuring that the system is learnable, reproducible, and auditable. To enable this closed loop to form implementable and verifiable action selection rules under budget constraints, this embodiment uses a Budgeted Value-of-Information Router (BVoIR) as the core decision algorithm of the Entropy Router. Let the... t The wheel center state is S t = { Q t , U t , B t , E t , Ct , L t},in t Index for the number of loop iterations, Q t The current problem objectives and sub-objectives; U t This is a five-dimensional structured uncertainty vector; B t This is the remaining budget after token, tool, time, and step have been uniformly mapped to the same ledger caliber; E t For evidence pool; C t For atomic claim set; L t An immutable circular log; a set of actions A It includes five types of actions: THINK (internal inference), RETRIEVE (external retrieval), MEMORY_LOOKUP (memory lookup), SANDBOX_EXEC (sandbox execution), and SUBMIT (submit). To avoid budget overruns and specification mismatches, the system first constructs a set of actionable actions. A t feas Only actions that meet tool specification / parameter constraints and whose normalized cost does not exceed the current remaining budget are allowed to be included in the comparison. Subsequently, BVoIR uses "the expected reduction in uncertainty per unit budget" as the objective function. A t feas Select the optimal action .
[0065]
[0066] In step S2, the objective function of the budgeted value information router selection action is:
[0067]
[0068]
[0069]
[0070] in, λ tok This is the weighting coefficient for the cost of word element consumption; λ tool The weighting factor for the cost item of tool call. λ time The weighting factor for the execution time cost item. λ step These are the weighting coefficients for the cost item of the cycle steps. Each weighting coefficient is a non-negative real number, used to map different types of resource consumption to the same budget for comparison and settlement. In a preferred embodiment, it can be set to... λ tok =0.4, λ tool =0.3, λ time =0.2, λ step =0.1, prioritizing the calculation of token cost.
[0071]
[0072] in, U = ( u answer , u evidence , u exec , u spec , u risk ) T ∈[0,1] 5 These represent the uncertainty of the current claim conclusion, the gap in evidence sufficiency, the necessity of external execution verification, the risk of tool specification consistency, and the exposure of high-risk assertions, respectively. This vector is jointly estimated by the Uncertainty Estimator in each round based on the current claim set, evidence coverage, conflict edges, matching of pending action specifications, and risk labels. 。 For any candidate action, represent the predicted value of the uncertainty vector in the next round after performing the action in the current state. 。g spec The action specification feasibility gating function is used to characterize whether the candidate action meets the tool specification, parameter constraints and pattern verification requirements. It is set to 1 when it meets the requirements and 0 or a low penalty value when it does not meet the requirements. T The transpose symbol is used to represent a vector as a column vector or to perform vector dot product operations. A small positive constant is used to avoid zero denominators and improve the numerical stability of the objective function calculation. argmax is the action that maximizes the objective function. E t It is an evidence pool that includes the content of the evidence, its source, reliability, conflict markers, etc. It is in state S t Next action The uncertainty of the vector form decreases, which can be understood as Δ U =U t -U t+1 The expected version; This indicates a decrease in non-negative uncertainty resulting from the action; w The previously mentioned five-dimensional non-negative weight vector is used to aggregate different types of uncertainty reduction into a single revenue scalar, ensuring that the sum of all components is 1; cost function It consists of a normalized weighted average of four parts: token consumption, tool invocation cost, execution time, and step overhead. 、 、 、 For example, in a preferred embodiment, the lexical consumption, tool calls, execution time, and loop step costs in the cost function are normalized by dividing by the current corresponding remaining sub-budget to obtain comparable dimensionless cost items. Each normalized cost item is then combined using preset non-negative weighting coefficients to form the total cost of the candidate action under a unified budget ledger, which is used for subsequent action selection and budget settlement. "Subject to" means "satisfies the following constraints"; B t+1 The remaining budget after this round of actions; This represents the budget update equation for cost deductions. Once the action is selected, it is executed... Update the budget ledger; if no action satisfies the constraints, or if the budget has been exhausted, the action chain is no longer extended, and the Stop Decider outputs a bounded conservative conclusion with accompanying claims—an index of evidence, residual uncertainty, and a budget summary. Thus, BVoIR is no longer an empirical guideline for "think first, check first, or execute first," but rather a rewritten formal decision-making rule that is trainable, auditable, and repeatable under a unified state, a unified budget, and a unified definition of uncertainty.
[0073] Architectural and algorithmic innovations: Five elements embedded in E 3 -Loop hierarchical closed-loop collaborative mechanism In the above E 3 After the main framework of the Loop—"central state-routing-gating-execution-rollback-termination"—is established, this embodiment of the invention further concretizes it into a hierarchical closed-loop collaborative mechanism with five embedded elements. This consolidates retrieval, associative memory, internal reasoning, and external execution from scattered external capabilities into a collaborative unit that is auditable, accountable, and reproducible for the same cognitive state. The first element is the central cognitive state. S t = { Q ,U , B , E , C , L}, where sub-targets Q Define the convergence direction of the task and the uncertainty vector. U The evidence pool expresses the evidence gaps, necessity of execution, and risk pressures in a structured way. E Risk-labeled atomic claim sets carry verifiable evidence based on source pointers, reliability, timestamps, and conflict edges. C The conclusion is broken down into adjudicable atomic claims, and an immutable circular log. L The trajectory of state-action-evidence-adjudication is solidified in an immutable manner; including a unified budget ledger. B Instead of being represented as an abstract, single limit, it is implemented as a structured budget ledger under a unified standard. This ledger records tokens, tool calls, execution times, loop steps, and remaining limits for rollback retention. The budget manager scalculates these costs into comparable decision costs before action selection and then settles and corrects them based on actual consumption after action execution. This divides the governance of heterogeneous resources into three interconnected but unambiguous layers: "presentation layer ledger—decision layer cost—execution layer settlement." The second element is the entropy routing control plane, which... U and B The input is not used for word generation, but for meta-control; when U When there is insufficient evidence, unresolved conflicts, or increased exposure to high-risk assertions, the strategy prioritizes allocating budget to the proactive verification action channel. Internal inference or external execution is only allowed into the candidate set when the reduction in predicted uncertainty has a positive benefit relative to budget costs, and the action meets the constraints of tool specifications and the budget feasible region. Furthermore, the product of internal inference can only enter subsequent adjudication as a "candidate claim" and cannot directly bypass the evidence chain to become a conclusion. The third element is the action channel layer, which unifies and reparameterizes retrieval, memory lookup, internal inference, and sandbox execution into a restricted action set, ensuring that all modules can only proceed through the action channel. S tThe incremental updates affect subsequent generation, and the mechanism prohibits implicit shortcuts that bypass evidence and budget constraints. Tool invocation is the act of forming a structured execution request, while sandbox execution is the controlled process of this request running in an isolated environment. The former is responsible for expressing the action as a parsable and verifiable call package, while the latter is responsible for returning verifiable artifacts, logs, failure codes, and execution evidence. The two have clear boundaries but are continuously connected within a closed loop. The fourth element is the evidence gating layer, which uses proof-carrying as a hard constraint to force each candidate claim to bind the source, reliability, time validity, and conflict relationship of the evidence items, and keeps unresolved conflicts explicitly visible and prohibits silent overwriting. When the support is sufficient and high-intensity conflicts have been resolved, the gating is approved. When the evidence is insufficient but there is a clear verifiable path, the gating is suspended and further evidence collection is triggered first. When a high-risk claim lacks support, the tool specifications are not met, or the execution result constitutes refutation, the gating is approved as a failure, thus transforming the "sufficiency of reasoning" into a computable and verifiable adjudication problem. The fifth element is the rollback update and budget termination layer. When the gating decision is invalid or the execution returns a negative result, the system only performs minimum differential rollback on the claims refuted by new evidence and their risk labels, and writes the conflict relationship back. E To solidify the causal chain, the budget governance device first performs pre-authorization and minimum rollback limit checks on each candidate action, and then completes settlement and correction based on the actual token, tool, time and step consumption after execution, avoiding the imbalance of the ledger caused by pre-estimation alone. At the same time, it prevents budget overdraft or rollback failure by using the method of "soft constraint guidance and hard boundary termination".
[0074] Therefore, the convergence criterion for closed-loop communication is no longer language fluency, but... U The decline E The system integrates incremental growth, consistent gating decisions, and replayable budget ledger settlement. When gating passes and residual uncertainty falls below a threshold, the system converges; when the budget is exhausted, the action set is empty, or the verification path does not exist, the system outputs a bounded conservative conclusion with an attached claim-evidence index, budget summary, and residual uncertainty, ensuring the closed loop can both terminate and be reproduced. The direct purpose of this hierarchical design is to first train the control semantics of "routing-gating-execution-rollback" to a stable convergence interval on the dense cortex of Phase 1, and then introduce MoE sparsification expansion only for cortex computation in Phase 2, using trajectory preservation constraints to avoid behavioral drift, so that capacity upgrades reflect computational efficiency improvements rather than control semantic deformation. In step S4, the trajectory preservation constraint is implemented by minimizing the loss function, which is optimized using the Trace-Preserving Cortex Upgrade (TPCU) algorithm. Its loss function is as follows:
[0075] The first constraint on Phase-2 is to prevent it from turning "tasks that should be retrieved / executed" into "more thinking and more writing." This constraint aims to guide the action selection strategy of the Phase-2 model, ensuring it doesn't deviate from the goal of efficiently utilizing the budget to reduce uncertainty, and avoiding wasting resources intended for retrieval or execution on ineffective internal inference. The second constraint prevents Phase-2 from exhibiting overconfidence or uncertainty drift. This constraint aims to constrain the uncertainty estimation calibration of the Phase-2 model, preventing calibration drift relative to the Phase-1 model (including overconfidence or increased uncertainty). (·) represents the average value of the uncertainty peak across a batch of tasks. T 1 and T 2 represents the generated log or track set; exp(·) is the exponential function that maps the penalty term to the compatibility weights in (0,1]. λ It is the weighting coefficient of the action distribution offset penalty. β These are the weighting coefficients for the uncertainty drift penalty, and both are positive numbers; p 1( a )and p 2( a ) respectively represent by T 1 and T Actions in the obtained Phase 1 and Phase 2 trajectories The empirical distribution or frequency.
[0076] Architectural and algorithmic innovations: pedestal cortex and parallel expansion architecture components After fixing the control semantics of "state-action-gating-adjudication-rollback-termination-log" in the five-element hierarchical closed loop, the embodiments of the present invention further abstract the computation backbone into a base cortex contract that can be stably invoked by the control plane, and attach the necessary sensing and constraints for convergence to the truth using parallel extension components (architectural add-ons) without changing the mathematical operators of attention and FFN (Feed-Forward Network). Specifically, Phase 1 uses a Dense decoder-only Transformer + RoPE (Rotary Position Embedding) as the base cortex. Pre-Norm (Pre-Normalization), RMSnorm (Root Mean Square Normalization), GQA (Grouped Query Attention), KV-cache (Key-Value Cache), SwiGLU (Swish-Gated Linear Unit), and bound embedding form a reproducible experimental baseline. The open ports of the backbone are fixed to the hidden state of the final layer. h N The output distribution is logits (logic output), and the parallel extension components are not pre-trained from scratch with the base backbone. Instead, after general pre-training is completed in the base cortex and the port contracts are frozen, they are added to it in a parameter-efficient tuning manner during the closed-loop training phase. h N Above this, the uncertainty / calibration head maps sentence-level states to a five-dimensional uncertainty vector. UAs a policy sensor for routers, it advocates for the output of token-level binding hints in the evidence binding header to reduce the cost of subsequent evidence alignment and conflict localization. The ToolSpec Grammar Adapter uses JSON Schema as the sole tool specification description language and compiles it into a finite state machine or equivalent token-mask constraints during the decoding phase. It applies grammatical filtering only to optional token sets to ensure that tool calls can be deterministically parsed without writing back the semantics of the main operators. The Phase 2 upgrade is strictly limited to the cortical computation level, only replacing the FFN sublayer with MoE-FFN, and improving the efficiency of conditional computation through Top-k routing, load balancing, and capacity overflow management, while maintaining... h N The input / output contracts of logits and the aforementioned side ports remain unchanged, thus ensuring that capacity expansion translates into improved throughput and cost-effectiveness without introducing control semantic drift. To prevent Phase-2 from disrupting the Phase-1 control plane, the most crucial aspect is the algorithm for the auxiliary loss in MoE route governance:
[0077] The algorithm's function is to lock the MoE's "capability gain" within the FFN, while simultaneously forcing the route to prevent collapse. This allows Phase-2 to transform "conditional computation" into a controllable cost lever without altering the control plane. L bal This represents the auxiliary loss from routing load balancing; α These are the weighting coefficients of the auxiliary loss; ||·||2 refers to the L2 norm; This represents the mean of the routing probability vectors for all tokens within a batch, while p i Representing the i The routing probability vector of each token; N The number of tokens included in the statistics; u It is a uniformly distributed vector; E It represents the number of experts in the MoE architecture.
[0078] Mechanism innovation: The stability boundary of mHC at E 3 Structured Injection in a Loop mHC (Manifold-Constrained Hyper-Connection) is a method that constrains the hybrid matrix of multi-flow residual hyperconnections to a birandom matrix manifold DS through a Sinkhorn projection. nThe stabilization mechanism of the attention / FFN operator is used to achieve near-mass-conserving residual routing and suppress scale drift and gradient instability in deep propagation without rewriting the semantics of the attention / FFN operator. See reference [Xie, Z., Wei, Y., Cao, H., Zhao, C., Deng, C., Li, J., ... & Liang, W. (2025). mhc: Manifold-constrained hyper-connections]. arXiv preprint arXiv:2512.24880. After the base skin and parallel expansion components complete port freezing, E 3 For a loop to maintain reproducible convergence across multiple rounds of "evidence backfilling-gated adjudication-rollback revision," its underlying residual dynamics must possess a clear stability boundary. To this end, this invention employs the mHC (mature convolutional hash function) as a structured stability hook injected into the residual hyperconnection of the Base Cortex during training. This confines control signals (uncertainty routing, gating labels, budget deduction, and evidence binding hints) within a controllable geometric domain during cross-layer propagation. Specifically, during training, mHC approximates the multi-stream residual mixing matrix within a double-random matrix neighborhood and uses Sinkhorn-Knopp iterative execution of entropy-regularized normalized projection. This keeps the composite gain of each residual channel within a controllable boundary and approximately satisfies mean conservation, thereby mitigating the risk of representation scale drift and gradient explosion or vanishing caused by deep stacking and multi-path topology. This constraint directly serves the learnability of closed-loop control: the calibration of the uncertainty vector is not artificially inflated due to inter-layer amplification, the conflict resolution of evidence gating will not experience threshold drift due to hidden state energy fluctuations, and the differential revision of the claim set by rollback updates can maintain a stable action distribution under similar budgets. On the engineering side, mHC exists in the form of a training-period regularization that is "switchable, monitorable, and rollbackable," without changing the operator semantics of attention and FFN. It only applies projection and constraints to the hybrid weights of residual fusion, and combines kernel fusion and selective recomputation to reduce additional I / O overhead, so that this stability boundary works in the same direction as budget governance, rather than sacrificing the inference budget for apparent stability.
[0079] Mechanism Innovation: Low-cost memory collaboration mechanism for injecting engram evidence boundaries. After the training-period stability boundary provided by mHC constrains the deep residual dynamics within a controllable domain, this embodiment of the invention further borrows from and improves the Engram evidence boundary injection mechanism to achieve closed-loop collaboration that is "usable but does not overshadow the main context" with the lowest possible storage and access overhead. Engram is a sparse conditional memory mechanism constrained by evidence boundaries. It writes retrieved memory entries into the evidence pool in the form of Evidence Blocks carrying source pointers, reliability, and conflict markers, and is subject to gating adjudication, rather than injecting the context without boundaries. This provides traceable and rollbackable memory collaboration with low access overhead, as described in reference [Cheng, X., Zeng, W., Dai, D., Chen, Q., Wang, B., Xie, Z., ... & Liang, W. (2026). Conditional memory via scalable lookup: A newaxis of sparsity for large language models.] arXiv preprint arXiv:2601.07372. It is used only as an analogy for engineering functions to refer to the subject of E. 3 - This is a loop-controlled conditional memory surface, rather than a direct claim to the biological neural memory mechanism. Unlike viewing memory as a freely splicable long-term context, this embodiment reconstructs it as an auditable, evidence-based memory layer: the system uses only normally segmented Evidence Blocks as the smallest unit of writing, with each entry generating a compressed key from a stable semantic fingerprint. k and with compact value slots v The system stores evidence summaries, source pointers, timestamps, reliability, conflict flags, scope of application, and revocable signatures. In a preferred embodiment, the memory table is organized using a "hash index directory + fixed-length Evidence Block records + hotspot cache" structure to achieve deterministic queries, low random read costs, and ease of audit playback. KV Block or hierarchical vector quantization codebooks are only used as alternative implementations for different capacity or compression scenarios. To prevent evidence contamination, model-generated text that has not been approved by the Evidence Gate or verified by external retrieval / sandbox execution receipts must not be directly written into the Engram; entries can only be added to the table if their source is traceable, their metadata is complete, and they meet the minimum reliability threshold. If subsequent evidence or execution results prove otherwise, the system will revoke, demote, or isolate the corresponding entry, and retain a tombstone marker to maintain version replayability. At runtime, the Router only processes uncertain vectors. U Prioritize evidence gaps and budget ledgers BAn engram query is triggered only when MEMORY_LOOKUP has a higher unit cost benefit compared to continuing generation; the returned result does not directly increase the generation probability, nor is it allowed to bypass the main branch implicit fusion as an assertion. Instead, it is uniformly written into the evidence pool in the form of candidate Evidence Blocks. E Then, the evidence is passed to the Evidence Gate for proof and adjudication: those with sufficient support can participate in the subsequent conclusion convergence, while those with unresolved conflicts are only marked as disputed and trigger external retrieval or SANDBOX_EXEC for further verification, thus rewriting "memory recall" into "evidence candidate injection". In terms of cost governance, Engram uses a combination of sparse access, hot spot caching, batch prefetching and merged query to reduce memory access jitter during the decoding stage, and allows a portion of the sparse capacity budget to be transferred from the MoE expert side to the memory side in a controlled manner in Phase 2, replacing simple computing power stacking with the synergy of "sparse storage + sparse computation"; however, no matter how the capacity expands, its evidence boundary, write threshold, gating adjudication and rollback discipline remain unchanged, ensuring from a mechanism that memory only enters the closed loop as auditable evidence, and cannot degenerate back into a free association context that bypasses verification.
[0080] Engineering innovation: Low-cost closed-loop enhancement of external forensics and executable verification via the Sandbox. In the aforementioned E 3 -After the loop control semantics were identified as the core content of the invention, the embodiments of the present invention further provide an engineering implementation path that is strictly isomorphic to this loop, namely, low-cost loop enhancement of external forensics and executable verification of the Sandbox, in order to systematically migrate "generation when evidence is insufficient" to "adjudicable actions and back-injections". Sandbox refers to the external verification channel that drives verification and rollback revision in a virtual computing environment with least privilege isolation, using deterministically parsable tool calls to perform retrieval, file and code computation, and back-injecting the generated verifiable products and return codes as evidence, in accordance with the literature [Cheng, D., Huang, S., Gu, Y., Song, H., Chen, G., Dong, L., ...&Wei, F. (2026). Llm-in-sandbox elicits general agentic intelligence. arXiv preprint arXiv:2601.16206.In its specific implementation, the model explicitly expands the action set into external forensic and execution primitives such as search / fetch / compute / file-parse during inference runtime. It then uses ToolSpec+Schema / FSM constraints to converge the model output into a deterministically parsable call package (containing tool name, parameters, budget limit, timeout, and expected output type), enabling programmatic verification and replay of the execution chain. The Sandbox is implemented using a containerized isolated environment or other equivalent controlled execution environment, imposing least privilege constraints on network access, file system visibility, system call interfaces, and process permissions. The execution environment also sets upper limits on the time, memory, number of steps, and output size of a single execution. When unauthorized access, abnormal resource expansion, or exceeding limits is detected, execution is immediately terminated, a failure code is returned, and the exception information is written to the immutable circular log. The raw output returned by the execution is normalized into an Evidence Object and written into the evidence pool E, along with the source chain, timestamp, digest hash, and failure code. Subsequently, the Evidence Gate processes "retrieval evidence, execution evidence, and internal memory evidence" using the same adjudication semantics. When the result refutes a candidate claim, belief_update_rollback is triggered for minimum difference revision and solidification of conflict edges, thus forming an adjudicable trajectory of "hypothesis generation - external evidence acquisition - contradiction identification - differential revision - re-verification closed loop." This engineering innovation is methodologically aligned with the agency search / agent loop approach emphasized by Anthropic in recent years: its core is to allow the model to cyclically advance between tool calls and observation results, and to reduce context occupancy and error rates through clearer tool boundaries, procedural tool calls, and reproducible evaluation. The large model further structures this direction into a budget-governed closed-loop adjudication mechanism, making external evidence acquisition no longer an optional enhancement, but rather a cost-reliability integrated control mechanism that, together with stable convergence under budget constraints, mandatory alignment of evidence and conclusions, precise decision-making triggered by execution, and minimizing deviations in the revision process. This mechanism effectively suppresses high-risk assertions through evidence gating. When evidence is insufficient, the system tends to conservatively exit or actively seek verification rather than generating uncertain content, thereby systematically improving the reliability of the output.
[0081] Engineering innovations: Closed-loop fine-tuning training and auditable engineering deployment strategy under budget constraints. When the large model is already in E 3After solidifying the "external forensics—execution verification—reinjection revision" process into an adjudicable closed loop within the Loop framework, the next crucial step is to transform this closed-loop discipline from inference-phase orchestration rules into a learnable behavioral distribution during the training phase, and maintain end-to-end auditable consistency during deployment. Accordingly, this invention proposes a budget-constrained closed-loop fine-tuning training and auditable engineered deployment strategy, ensuring that convergence to truth no longer depends on the randomness of prompt words. The training side uses E... 3 - The Loop contract serves as the highest constraint; samples no longer only contain instructions and answers, but must also carry a central state. S t ={ Q , U , B , E , C , L The serialized trajectory, discrete action labels and parameter slots (such as RETRIEVE query template, SANDBOX_EXEC tool specification, MEMORY_LOOKUP key space), source information of Evidence Block (provenance / reliability / conflict tags), and differential rollback records of claim set C and uncertainty U are used to transform "evidence backfilling → gating decision → rollback revision → budget termination" into supervised state transition learning. To prevent the model from learning to "output structured text" instead of "making correct verification decisions", the training log synchronously records action distribution, gating pass rate, rollback frequency and budget deduction ledger, and requires the trajectory to be reproducible and ablation-comparable with the same budget caliber. On the engineering side, a PyTorch distributed training stack is used to handle FSDP / ZeRO-3, bf16 hybrid processing, activation recomputation, and efficient attention kernels, incorporating tool call artifacts and evidence artifacts into the first type of objects in the data pipeline. When computing power is limited, LoRA (Low-Rank Adaptation) / QLoRA (Quantized Low-Rank Adaptation) is used only as a controlled cost reduction measure, and its improvement in policy decision-making rather than format simulation must be demonstrated by closed-loop metrics. On the deployment side, the principle of "training-inference-audit consistency" is followed, unifying weight hashing and sharding versions, evidence artifact formats, log replay protocols, and budget ledger standards. Dialogue style is injected through an independent adapter or policy layer and decoupled from gating decisions. The Sandbox execution environment adopts least privilege and strong isolation, with encrypted artifact storage and an expiration destruction policy to ensure that any high-risk assertion under elastic scaling can be verified by the evidence chain and replay logs.
[0082] To facilitate a clear definition of the large model in E 3- The structural components, interface boundaries, and state transition relationships in a closed loop, with an attached diagram showing the central state. S t The diagram illustrates the connection methods between action routing and gating decisions, sandbox execution back-injection, rollback revision, budget termination, and audit logs, and serves as a unified reference for each step and data structure in subsequent specific implementations.
[0083] Figure 2 The E of the large model is given. 3 - How does the Loop “prefrontal control plane” maintain a central state (i.e., ...) during inference? Figure 2 (Central state in the middle) S Achieve auditable, budgetary convergence to truth → provable output: The system will output the current problem / sub-objective. Q Structural uncertainty (profile) U (u_answer / u_evidence / u_exec / u_spec / u_risk), Budget B (tokens / tools / time / steps), Evidence Pool E (Source chain + conflict + reliability) and set of claims C (Draft claims + confidence level + risk labels) and immutable circular logs L (Audit trail) is uniformly packaged as a single decision-making vehicle. S t ={ Q , U , B , E , C , LThe evidence items are pooled in the form of Evidence Objects, and at least include id (number), type, content_ref, source information (source, resource identifier uri, text fragment span, timestamp ts), reliability (score, calculation method method}), conflict list (conflicts [{related evidence number evidence_id, relationship type relation, conflict score}]), and hash (hash value); claims are managed in the form of Claims, and at least include id, text (draft claim text), spans, confidence, risk_tag, supporting evidence number list support [evidence_id], and status (status). A "total assertion" refers to the smallest semantic assertion unit that can be determined as true / false / pending by a single piece of evidence. Its boundaries are defined by predicate-argument or the smallest falsifiable phrase. It is not equivalent to a token-level fragment and allows nesting, but parent-child dependencies must be explicitly recorded. Candidate assertions are written into the draft output by the Base Cortex after being rule-based segmentation by the Claim Parser. C This is accompanied by initial confidence and risk labels. The control loop (meta-control) is read by the Entropy Router loop. S t ( U , E , B , C Generate action strategies π ( S (Select action) and allocate computational (computing power) budget, setting stop / continue. The action space must at least include retrieval / memory lookup / internal inference / sandbox execution / rollback revision / termination; the Router determines whether to enter external verification based on thresholds and budget, for example, when the maximum uncertainty max( U )≥ U When the uncertainty threshold is reached, or when there is a high-risk claim with insufficient supporting evidence and option B allows, priority is given to obtaining evidence or taking action. Subsequently, the Evidence Gate triggers a gated decision. g ( C , E ), testing claims C And compare with the evidence E right CExecute the "proof-carrying" verdict item by item and detect conflicts: If the risk_tag is high and there is no evidence item in support with a reliability not lower than the reliability_min (minimum reliability threshold), then judge FAIL; if the conflicts of the evidence pointed to by support are not resolved, then judge HOLD and explicitly expose the conflict edge; when judging PASS, the traceability of the claim and the evidence pointer is forcibly required. When the gating is in HOLD / FAIL or the u_exec (execution uncertainty) increases and the proposition is falsifiable, the execution arbiter (real-world feedback) executes the verdict v(exec) to trigger sandbox_exec to run checks / checks / computations / tests in a least-privilege isolation environment, perform verification, output executable facts, and return the execution verdict result exec_verdict (pass / fail) and the execution evidence Δ E , the execution product and return code are evidenced as an Evidence Object and injected back E . Trigger rollback / update: If the exec_verdict is fail or new evidence falsifies an existing claim, then call belief_update_rollback to execute "minimal differential revision", whose semantics is to only update the status / confidence / risk_tag / support of the Claim entries that are falsified or affected by conflicts and record Δ C , and simultaneously update the relevant dimensions Δ in U correspondingly U , and it is prohibited to replace local rollback with rewriting the full text. In addition, it also includes parallel action channels. After retrieval / evidence seeking, query the data source → Δ E ; think / draft claims, internal reasoning → Δ C , Δ U . After executing / verifying the facts (if feasible), then run checks / computations / tests → Δ E (execution evidence) + verdict. The Budget Governor makes hard deductions (decrement B ) for each round of tokens, tool calls, time, and steps, and uses budget exhaustion Budget.exhausted() as a strong termination boundary (hard stop rule, including step / time limits); the stop condition of the Convergence / StopDecider is: all high-risk claims pass the gating and max(U) < U_threshold (residual UThe output terminates under two conditions: "acceptable" or "budget exhausted / external execution infeasible". `finalize_answer` (answer generation) (final output) only returns the claim-evidence index (chain of evidence), a summary of residual uncertainty (unresolved uncertainty), and a minimal audit summary, without exposing the unauditable implicit reasoning text. To meet the "immutable" requirement, L An append-only audit log is used to form a hash chain. Each record contains at least ts, step, S_hash (state hash), action, gate_verdict (gating decision result), exec_verdict (execution decision result), delta_C (claim set increment), delta_U (uncertainty increment), budget_delta (budget consumption increment), prev_hash (previous hash), and entry_hash (this record hash). Any tampering will break the chain verification, thus ensuring that the closed-loop trajectory is replayable and verifiable.
[0084] exist Figure 2 Based on the given "control surface driven closed-loop decision", Figure 3a and Figure 3b E of the large model 3 - The loop unfolds into an achievable two-modal division of labor and evidence convergence path: central state (i.e. Figure 3a and Figure 3b Central Cognitive State S t ) by E 3 -After continuous reading and writing to the prefrontal control plane of the Loop, the system operates according to the uncertainty vector. U With budget B Switching between Active Seeking Mode and Internal Thinking Mode (dynamic thinking), the former is the researcher's principle, namely "if uncertain → seek verification": generating ΔE through two channels: Retrieve (external) query and Memory Lookup (conditional memory), and forcibly attaching proofance and reliability (corresponding to externally retrieved evidence and engrammed evidence, respectively). O (1) Memory evidence) (proof gating), the latter being reasoning and drafting under constraints, i.e., "only when it can reduce U "Only when the time comes to think": The computational backbone Base Cortex (dense Transformer + RoPE rotational position encoding) produces only candidate Δ values under budget constraints. CAnd update Δ U Furthermore, this update is smoothed / truncated via the manifold-constrained hyperconnection mHC Stability Constraint (mHC stability constraint, i.e., a training-stable complex path) to avoid gradient and gating threshold drift caused by control signals and memory insertion; both types of evidence are uniformly entered into the Evidence Pool. E Afterwards, Evidence Gate performs proof-carrying and conflict resolution on the risk-tagged claimset. If the claims are deferred (if unresolved), they are moved to the Execution Channel (tools & external). Verifiable run, test, and compute operations are performed in the Sandbox / Tools, outputting the deterministic artifact Exec Verdict and execution evidence Δ. E (Conflict diagram and usage history), and trigger a Belief Update / Rollback decision pair. C and U Perform minimum difference revisions and write them to the audit log. L The loop eventually ends under the condition of "convergence or budget exhaustion," rather than covering up unproven parts with lengthy narratives.
[0085] Figure 4a and Figure 4b It describes the pluggable implementation boundary of the large model "base cortex + parallel extension components": input tokens (lexicons) x l ,..., x t After tie-embedding, it is mapped to the initial hidden state. h 0 ( E [ x → h 0 ∈R B ×T×d After that, it enters the Nth layer Pre-Norm decoder block, and performs decoder block operations. l ( l =1,..., NThe network performs pre-normalization (root mean square normalization), ensuring density and compatibility with the FlashAttn algorithm. The attention sublayer is fixed as RoPE+GQA (group query attention) and compatible with KV-cache (key-value cache), i.e., causal self-attention, to stabilize decoding bandwidth. In the hybrid expert feedforward layer, Phase 2 only replaces the FFN sublayer with a Top-k gated MoE-FFN (SwiGLU hybrid expert-feedforward network), resulting in residual 1: h' = h + attn_out; residual 2: h_next = h' + ffn_out. Router r ( x Calculate the logistic regression value logits for each token. r = W r· h (Each word), and the probability is obtained by softmax normalization. p r =softmax(logits r ), then select k One expert { E1, .., En The capacity expansion is performed by dispatching and weighted composition, thus constraining capacity expansion to conditional computation and output. without changing the output port ℎ N ∈R B×T×d With logical output logits∈R B ×T×|V| Hybrid expert governance (main layer) includes load balancing loss management, capacity / overflow policies, expert discarding / redundancy, and route stability monitoring. Top-k expert selection (… e 1, e 2, w 1 ,w 2) Distribute word units → expert [ e ]; y e =Expert e ( h token Aggregation → y = w 1* y e1 + w 2* y e2 The entire process sequentially involves root mean square normalization, LM Head (Language Model Head) (linear mapping | V|, binding weights (tied), pre-normalized output logits, and each word. Among these, W To map the hidden representation of the current token to a trainable projection matrix of the expert routing score, r This corresponds to the routing logical value vector for each expert. w 1 ,w 2 represents the logical value vector from the routing path. r The weight values of the top-2 experts selected are used to adjust the output of the corresponding experts. y e1 , y e2 Perform a weighted summation. N This is the last layer number of the base decoder. d To hide the state dimension, | V | represents the vocabulary size. In the architecture add-ons, inputs include ℎ N (Main input) + logits (optional). Architectural Add-ons are read in parallel on this port. N Two types of side signals are output: one is generated by the uncertainty / calibration head. U = ( u a , u e , u x , u s , u r )∈[0,1] 5 As E 3 - The loop uses policy sensors to provide stop / continue signals and budget allocation targets; the second is the claim → evidence binding head. U =bind∈R B ×T×K By providing evidence-carrying hints, asserting fragments + evidence IDs, and supporting conflict perception, a binding hint matrix is provided at the token level to reduce the cost of subsequent evidence alignment search. u a , u e , u x , u s , u r That is, in Example 1 u answer ,u evidence , u exec , u spec , u risk The Uncertainty / Calibration Head, Claim→Evidence Binding Head, and ToolSpec Grammar Adapter are all mounted as parallel attachment heads on the same BaseCortex. h N Above this, gradients are shared end-to-end with the backbone network by default, and joint training is conducted under supervision along with the closed-loop trajectory. Alternatively, the backbone can be frozen during deployment, with only the additional headers fine-tuned to reduce migration costs. Subsequently, two types of side signals enter the control stack, E 3 - The Loop controller can optionally enable the ToolSpec Grammar Adapter to apply a token-mask to logits, forcing deterministic parsing of the tool specification flow. Then, the tool_result (the tool execution result, i.e., the original result) is wrapped into a stable Evidence Block through the Engram Evidence Boundary. The evidence is then re-injected into the next round of prompts / context, forming a closed-loop interface of "execution product → evidence object → reusable input". h N (Step-by-step) trained mHC ConstraintHooks are attached to the system in the form of hidden dynamics penalty terms. h N Above, a loss term is added without rewriting the semantics of the attention / FFN operator; it only provides a stability prior to prevent gradient and threshold drift caused by control signals and memory injection. Furthermore, Figure 4b It also includes the pedestal cortex: The MoE decoder includes: embeddings, blocks: attention (rotational position encoding + group query attention) + hybrid expert-feedforward network, h N Logits. Through porting (adaptation and porting), state snapshot: policy + evidence alignment. Conditional memory evidence boundaries: (conditional memory storage + retrieval) including: key: n-gram / context hash; value: payload vector + metadata. Through retrieval (context...) 键 Conditional memory gating: ɑ = gating ( h 词元Evidence (suppressing conflict / noise). Then, evidence is emitted, injected into the adapter via conditional memory, including ID, source, timestamp; claim fragment / n-gram; confidence, conflict; and an injection tensor, injected into the adapter via conditional memory: h' = h + ɑ∙Proj(val); where Proj(val) is a linear projection function. The actions sequentially pass through the policy sensor and controller: {query interaction / retrieval / execution / correction / ...}. Upon entering the conditional memory trigger, the context is constructed. 键 The system calls the retrieval tool to obtain the call condition memory. After entering the evidence adjudicator, it checks the source chain, detects conflicts, and determines acceptance / rejection. The final output gating is: only allowing evidence to be carried, based on accepted evidence or experience sandbox results.
[0086] Figure 5 Shown in E 3 The single-round decision-making minimum complete path under the Loop closed-loop truth-seeking architecture is designed not to make the model "think one more step," but to reconstruct generative reasoning into an auditable, reproducible, and rollback-capable verification process within budget constraints. Initially, the system reads and uses the central state... S t = { Q , U , B , E , C , L As the sole decision-making vehicle, computational action set A feas The current problem / sub-goal Q Structural uncertainty U ,Budget B Evidence pool E Atomic Claims Collection C With immutable circular logs L By unifying everything into a single state machine, every subsequent action can be traced back to a clearly defined input and resource; based on this, the Entropy Router reads ( U , E , B , C Output the action for this round. a t and the depth of reasoning and the stopping threshold, and the execution action channel (according to) a t (Branch), and select external retrieval in the action channel → generate Δ E (Including traceability / reliability / conflict) write E Conditional Engram lookup table → Fast writing of candidate evidence E Internal (base cortex) drafting candidate claims Δ C and updateΔ U (Candidates only) or trigger Sandbox executable verification → return to execution decision and Δ E Write E This explicitly transforms the researcher-driven iterative verification process of "hypothesis generation - external evidence acquisition - contradiction identification - differential revision - re-verification closed loop" into a controllable sequence of actions. Evidence gate then applies this to the claim set. C Each proof-carrying ruling is executed and marked PASS / HOLD / FAIL. The conclusion must carry a locatable evidence pointer, and conflicting relationships must not be silently overwritten. When gating fails and the proposition is falsifiable, the Execution Arbiter triggers SANDBOX_EXEC to obtain verifiable execution evidence and the ruling result. If necessary, a rollback revision is used to update the rejected claims using a minimum difference method. C And adjust simultaneously U This mechanism aims to prevent "rewriting the narrative" from replacing "revising beliefs." Budget management: The Budget Governor performs hard deductions on tokens / tools / time / steps. B The data is written to budget_delta, and the actions, gating, and execution decisions are written to an immutable log in the form of an append-only hash chain. L This ensures the closed-loop trajectory has an unalterable audit standard; ultimately, the Stop Decider uses "budget exhaustion" and "evidence gating all PASS and max( U )< U The two-conditional approach of "_threshold" completes hard termination or convergence output and returns only the claim-evidence index, residual uncertainty, and minimum audit summary, thus transforming the system's optimization objective from the fluency of generated text to a series of quantifiable, objective metrics directly related to training dynamics and generalization ability. Training stability: The gradient norm is constrained within a controllable range, and activation value scaling drift is suppressed.
[0087] Convergence performance: With the same number of training steps or budget, the model converges more stably on the validation set, resulting in a lower final loss value.
[0088] Decision reliability: When control signals (such as uncertainty vectors) propagate between different layers of the model, their numerical range remains stable, avoiding decision errors caused by signal distortion.
[0089] Figure 6 Located in E 3Within the Loop's "computational bearing layer (base cortex / Phase 2 MoE cortex)," the function is not to generate new control rules, but rather to repeatedly write Δ to the control surface. U Δ C Evidence injection provides verifiable numerical stability boundaries, ensuring that the closed loop does not exhibit gating threshold drift and calibration distortion due to instability in deep residual dynamics during multiple iterations. The mechanism unfolds sequentially along the arrow path: in the mHC mapping @ first layer, for each layer's input flow vector... x l ∈R {B×n×d} First, perform dynamic mapping generation, then generate vec( x l Obtained through linear projection and Then, in the manifold projection stage, three types of structural matrices are formed, among which... and Used to constrain the pre-mixing and post-increment to be non-negative scaling. Explicitly projected to DS ( n A double random matrix manifold is used to achieve residual routing with "approximate mass conservation"; subsequently, ( H pre I_d) for x l Premixing to obtain u l =( H pre I d )· x l Input layer function F (Composed of causal self-attention of RoPE+GQA+KV-cache and MoE-FFN of SwiGLU or Phase2), output y l= F (u1) Later use ( H pos t I d ) Form delta=( H post I d )· y l (increment) and ( H res Id )· x l Stable residual fusion is performed to obtain x {l+1} =( H res I d )· x l +delta ensures that crossflow residual propagation remains bounded, repeatable, and has a limited number of convections during both training and inference. n streams It is insensitive to dynamic changes. mHC only operates on the pre-mixing and fusion routing of residual connections, without rewriting the operator semantics or forward computation process of attention / FFN. In implementation, this module exposes forward(...) as an mHC wrapper. x , F layer The interface internally uses a sinkhorn. knopp (An iterative algorithm) Iterative implementation DS (n) projection, and in constraint hook The (constraint hook) provides row and column sums, biases, non-negative boundaries, and an optional "sharpness" penalty as a training-period stability hook; therefore, it is in E 3 - The loop serves as a "stable and controllable cortical dynamic" rather than a substitute for evidence gating or execution of adjudication semantics.
[0090] Figure 7 Give a large model in E 3 The key to implementing closed-loop forensics for Sandbox within the Loop lies not in "calling tools" themselves, but in transforming tool calls into an auditable event flow that is constrained by the control plane, accepted by the evidence gate, and capable of driving belief revisions in reverse. Policy Sensors first output policy signals related to task risk, remaining budget, and trigger thresholds. These signals are then processed by the controller and by E... 3The Loop Controller condenses this into two types of constraints: one type acts on the action tendency and stopping conditions of the LLM Policy (Large Language Model Policy), and the other type is issued to the ToolSpec Grammar Adapter in the form of policy + budgets. This applies a token-mask based on a finite state machine / schema to the candidate output, ensuring that the model can only generate resolvable calls that meet the tool specification, thus compressing the output space that is "tool-like but actually fabricated" from the source. Subsequently, the LLM Policy initiates a tool call according to controlled syntax, entering the Sandbox. Within the three isolated domains of External Access, FileSystem, and Code Execution, deterministic observations and artifacts are generated. These artifacts do not directly contribute to the final answer; instead, they are first fed into Proof-carrying Hints, binding the execution result with verifiable fingerprints such as artifact hashes, source and timestamps, and failure reasons as traceable evidence. This evidence is then fed back into the LLM Policy (loop) to trigger secondary inference and necessary rewriting. Final Output is only output when the evidence-carrying conditions are met and the control plane allows the submit() function. This structure creates a closed loop of "external evidence gathering - evidence carrying - policy loop," thus elevating execution verification from a one-off external step to a system mechanism that is budget-governed, gated, and reliably drives the convergence of metrics such as revision fidelity and execution trigger accuracy.
[0091] Example 2 To ensure the reproducibility and auditability of the large model in specific implementation, the initial implementation steps are solidified in the form of "documented contract + code implementation". 3 - Loop core technology: E 3 - The closed-loop semantics, five key elements, and central state of a loop. S t ={ Q , U , B , E , C , L Field constraints and action space AThe system includes standardized technical solutions for triggering conditions such as retrieval / memory / internal inference / sandbox execution / rollback revision / termination, strategy generation and budget allocation for Entropy Router, proof-carrying adjudication and conflict arbitration for Evidence Gate, executable verification and evidence injection for Execution Arbiter, deduction rules and hard stop boundaries for Budget Governor, convergence criteria and conservative exit for Stop Decider, and replay parameters for immutable audit log L. These are all recorded in the sword_23.md file as an unambiguous runtime contract. The corresponding Python core script provides typed state and evidence objects, run_e3_loop control functions and standardized interfaces. The ToolSpec Grammar Adapter and Sandbox tool layer implement deterministic parsing and least privilege isolation. EngramEvidence Boundary confers evidence for memory entries and injects noise suppression. mHC constraints stabilize residual dynamics with switchable training hooks, thereby locking the closed-loop truth-seeking mechanism into a reproducible implementation scheme through executable code paths.
[0092] In practical training implementation, "closed-loop post-training" serves as the main approach. You must first freeze the E data you've already completed in the aforementioned sections. 3 - The Loop control contract includes central state, action routing, evidence gating, executable verification, rollback revision, budget deduction and termination criteria. It then uses five strong bases as the starting line for capabilities. Through unified data tracing and replayable sandbox execution, it writes closed-loop discipline into the weight distribution, and finally derives new safetensors (safe tensor format) shard weights and completes auditable deployment. The five base modules are fixed according to their uses: a general flagship, two general lightweight modules, a coding agent, and an embodied VLA (Visual-Language-Action / Vision-Language Model). The general flagship uses Qwen3.5-397B-A17B, while the general lightweight modules use Qwen3-30B-A3B-Instruct-2507 and Qwen3-30B-A3B-Thinking-2507 respectively, corresponding to the Instruct and Thinker strategies. The coding side uses Qwen3-Coder-Next for agency coding and tool loop, while the embodied side uses the LingBot-VLA model for the vision-language-action loop. The engineering meaning of this combination is to entrust "general semantics and knowledge coverage" to the strong base module, and to entrust "within-budget convergence, evidence-conclusion alignment, execution trigger accuracy, revision fidelity, and high-risk fabrication zeroing rate" to E. 3- Training is solidified after the loop, ensuring that the training budget is consumed on verifiable closed-loop reliability, rather than being diluted by verbose narratives. The availability of general and lightweight bases and model artifact formats are based on their open-source repositories, and the coding base Qwen3-Coder-Next is also based on the official release.
[0093] The core of data engineering is not to "manually rewrite" all open-source corpora into complete closed-loop trajectories, but to establish a hierarchical trajectory protocol so that closed-loop supervision primarily comes from computable and replayable signals. When samples are added to the database, at least machine-readable task context and action records should be generated. Q , B The evidence and execution artifacts (including tool calls, gating decisions, execution return codes, artifact hashes, and evidence source pointers) are uniformly encapsulated as Evidence Objects and written into the evidence pool E, automatically generating auditable logs. L Uncertainty vector U With Atomic Claims Collection C By default, it does not rely on subjective manual annotation. Instead, training labels are automatically derived from the model output, gating results, execution decisions, and conflict graphs. Examples of labels include "whether evidence collection / execution was triggered," "gating PASS / HOLD / FAIL," "execution verdict (adjudication result)," and "rollback differential Δ." C "As a supervisory signal, manual labeling is introduced only for a small number of high-risk or high-value samples to calibrate thresholds and correct biases; this avoids increasing the cost of the entire dataset with subjective annotations and eliminates the logical loop that 'training data must first satisfy closed-loop discipline.' Evidence is uniformly packaged as 'Evidence'." The minimum requirements for the Object field are to include a source pointer, reliability, conflict marker, timestamp, digest hash, and verifiable product reference, making "evidence-conclusion alignment" a decisionable constraint during training rather than a post-hoc description. Deduplication and contamination control are based on cross-set hash deduplication, benchmark leakage filtering, and tool output forgery detection. Distribution balancing explicitly increases the proportion of high-risk assertions, conflicting evidence, failure rollbacks, and tool execution samples, naturally covering the closed-loop behavior of "insufficient evidence → postponement / verification," "unresolved conflicts → remaining unresolved," and "execution failure → minimum difference revision." Preference and alignment data primarily use UltraFeedback (an open-source preference dataset) and Tülu (a data system) to tighten convergence gating thresholds and conservative exit boundaries, preventing the model from confidently outputting high-risk assertions when evidence is insufficient.
[0094] Tools and Sandbox forensics should not be described as temporary add-ons during deployment, but rather as E 3- The "executable verification channel" shared by the Loop in both training and inference is consistently modeled: during the training phase, data such as ToolBench, which provides tool call trajectories, is used as the main source. The call sequences, parameter slots, return codes, and failure reasons of multiple tool tasks are standardized into replayable records. The product summary, source chain, and timestamp generated by each call are encapsulated and written back to the evidence pool so that evidence gating and rollback revisions can be learned and adjudicated on the same data structure. The sandbox employs a least-privilege isolated execution domain, separating external retrieval, web crawling, file system, numerical computation, and code execution into independent executors. Each executor is given a ToolSpec and Schema or FSM constraint. During the decoding phase, a token-level mask is applied by the syntax adapter to ensure that the model output falls only within a deterministically parsable call space, thus systematically compressing the generation freedom of "pseudo-tool call-based fabrication." Observations and artifacts returned by the sandbox are first evidenced as Evidence Objects (containing verifiable fingerprints, return codes, timeout and conflict markers) before being injected into the next round of state updates. Execution failures are also recorded as evidence events in the audit log to drive minimum-difference rollback. For coding branches, the sandbox can be extended to a repository-level execution environment to replay dependency installation, unit testing, and build processes, forming deterministic feedback. For embodied branches, an execution channel in the form of simulation or data replay can be selected, writing environmental feedback as isomorphic evidence objects into the evidence pool, thereby maintaining Evidence under different modalities. 3 - The gating semantics of the loop are consistent with the auditable closed loop.
[0095] Regarding the selection of open-source datasets, this implementation plan requires that each type of data can provide a "decidable signal" for the closed-loop mechanism, rather than simply improving language fluency. ToolBench is used for general tools and execution trajectories; Ultra Feedback and Tülu's open recipes are used for general alignment and preferences; SWE-bench is used as a benchmark for real-world defect repair and testing for coding tasks, and APPS and Code Contests are used to supplement the distribution of decidable programming problems, enabling the model to learn to transform inference into runnable products under budget constraints and accept test judgments. For embodied tasks, Open X-Embodiment and Bridge DataV2 are used as cross-platform trajectory and manipulation data sources to cover vision-language-action conditional policy learning and cross-environment generalization, and success / failure, keyframe feedback, and task progress are explicitly written into the evidence object. Although the Code Contests repository is archived, the data and task definitions can still be used as training corpus and evaluation distributions, and its public description as a source of Alpha Code training data can be used to demonstrate its task attributes and decision-making mechanism.
[0096] Step S3 specifically includes: Reasoning trajectories that follow the discipline of the state-action-evidence gating-rollback revision closed-loop control architecture are used as positive samples, while those that violate this discipline are used as negative samples. At least one of the following—evidence gating pass rate, execution trigger accuracy, and rollback revision precision—is used as a reward signal to optimize the behavior distribution of the large language model foundation. Fine-tuning training is implemented in a distributed post-training pipeline within the PyTorch framework. The core is to train the "closed-loop protocol" into a generalizable policy, rather than simply training the structured text surface. The training process first involves supervised fine-tuning of the closed-loop protocol: using trajectory data to supervise the model's output action selection and tool specifications, ensuring stable triggering of retrieval, memory, or sandbox execution when uncertainty increases or evidence gaps appear. After the evidence pool is updated, an atomic claim set (risk set) with evidence pointers is generated. C Subsequently, gating threshold and preference convergence training are performed: strategies such as “making strong assertions with insufficient evidence,” “silently covering unresolved conflicts,” “skipping execution when it should be executed,” and “excessive rollback leading to semantic drift” are penalized with preference data and failure replay samples, so that gating decisions and stopping conditions form stable boundaries; finally, sandbox consistency replay verification is performed: executable samples from a fixed set are repeatedly replayed in the later stage of training, requiring that tool calls under the same budget be reproducible, evidence injection formats be consistent, and rollback differences be interpretable, thereby making the auditability of the closed loop a hard condition for training completion.
[0097] This process applies only minimal modifications to each pedestal required for its function: Qwen3.5-397B-A17B prioritizes parameter-efficient post-training, focusing its learnable capacity on layers related to uncertainty / calibration, claim-evidence binding, and tool specification constraints. The underlying reason is that the flagship pedestal already possesses strong representations, and the larger model needs to supplement closed-loop control semantics. Qwen3-30B-A3B-Instruct-2507 leans towards execution control, with training focusing on low-overhead tool triggering and gating stability. The underlying reason is that its advantage of achieving significant results with limited resources must be realized by reducing invalid inference and improving execution trigger accuracy. Qwen3-30B-A3B-Thinking-2507 is biased towards... For highly complex reasoning but constrained by budget, the training focus is on the discipline of "reasoning output only entering the gating as candidate claims" and the minimum difference rollback after failure. The underlying reason is that its value lies in turning reasoning into adjudicable actions rather than long texts. Qwen3-Coder-Next must use repository-level sandbox replay as hard supervision and solidify the closed loop of patch generation and test adjudication as a strategy. The underlying reason is that the reliability of coding comes from execution verification and rollback rather than static completion. LingBot-VLA mainly uses behavior cloning and introduces failure replay evidence training, so that the action output is also subject to gating adjudication and rollback revision. The underlying reason is that the error cost of embodied scenarios is higher, and the zero-risk fabrication rate can only rely on verifiable feedback. The training process employs PyTorch's distributed capabilities (such as FSDP / ZeRO-like strategies), bf16 hybrid processing, activation recomputation, and an efficient attention kernel. Gating pass rate, execution trigger hit rate, rollback frequency, budget deduction ledger, and evidence conflict graph size are recorded as first-class training logs, along with the loss curve, to demonstrate that the closed-loop behavior converges rather than occurs by chance.
[0098] Weight production and engineering deployment are terminated based on the criteria of "product traceability, protocol alignment, and audit replayability." After each model training is completed, it is exported as safetensors shard weights and a version stamp and hash digest are written. The data list used for training, filtering rules, trajectory protocol version, tool specification schema, random seed, and key hyperparameters are all solidified into a product list. The inference framework uses an engine capable of handling long contexts and high-throughput decoding as its foundation, such as an inference service stack compatible with the Transformers ecosystem and supporting KV-cache and batch processing. The Qwen official model card also clearly states its compatibility with inference frameworks such as vLLM and SGLang. Meanwhile, the upper-layer runtime implements E... 3- The Loop controller, tool syntax constraints, sandbox execution, and evidence object back-injection make "evidence collection and execution" a systemic action governed by budget governance rather than a loose add-on. The backend persistence layer stores Evidence Objects, gating decision records, budget ledgers, rollback differentials, and sandbox artifact hashes as first-class artifacts, supporting offline replay review and failure attribution; online monitoring uses the full names of five Chinese indicators as a unified standard, transforming model iteration from "more eloquent" to "more stable and verifiable under the same budget," and ensuring the consistency of closed-loop semantics between the deployment and training periods through periodic sampling of sandbox replay samples.
[0099] Tools and sandbox forensics should not be described as temporary add-ons during deployment, but rather as E 3 - The "executable verification channel" shared by the Loop in both training and inference is consistently modeled: during the training phase, data such as ToolBench, which provides tool call trajectories, is used as the main source. The call sequences, parameter slots, return codes, and failure reasons of multiple tool tasks are standardized into replayable records. The product summary, source chain, and timestamp generated by each call are encapsulated and written back to the evidence pool so that evidence gating and rollback revisions can be learned and adjudicated on the same data structure. The sandbox employs a least-privilege isolated execution domain, separating external retrieval, web crawling, file system operations, numerical computation, and code execution into independent executors. For each type of executor, a ToolSpec and Schema or FSM (Finite State Machine) constraint are defined. During the decoding phase, a token-level mask is applied by the syntax adapter to ensure that the model output falls only within a deterministically parsable call space, thus systematically compressing the degree of freedom in generating "pseudo-tool call-based fabrication." Observations and artifacts returned by the sandbox are first evidenced as EvidenceObjects containing verifiable fingerprints, return codes, timeout and conflict flags, and then injected back into the next round of state updates. Execution failures are also recorded as evidence events in the audit log to drive minimum-difference rollback. For coding branches, the sandbox can be extended to a repository-level execution environment to replay dependency installation, unit testing, and build processes, forming decidable feedback. For embodied branches, an execution channel in the form of simulation or data replay can be selected, writing environmental feedback as isomorphic evidence objects into the evidence pool, thereby maintaining Evidence under different modalities. 3 - The gating semantics of the loop are consistent with the auditable closed loop.
[0100] Example 3 This embodiment provides a device for evidence-driven intelligent reasoning. This device is a dedicated computing device used to carry and run a large language model trained by the closed-loop fine-tuning method to realize evidence-driven intelligent reasoning.
[0101] The device includes a processor and a memory. The memory can be volatile memory (such as DRAM) or non-volatile memory (such as SSD, Flash), on which a computer program is stored. When the computer program is executed by the processor (such as CPU, GPU, or AI accelerator), the closed-loop fine-tuning method as described in Embodiment 1 or 2 is implemented.
[0102] Working principle: Through software programs, E 3 - The loop fine-tuning method is embedded in the physical device, enabling it to automatically perform model training tasks.
[0103] Implementation steps: The user installs the program from the storage medium into the device's memory, or loads the program directly via the network. After the device starts up, the processor executes the program, loads the training data and the base model, and follows the E... 3 The Loop protocol is used for training iterations.
[0104] Example 4 This embodiment provides an application of an evidence-driven large language model in an intelligent reasoning system, trained using the method of Embodiment 1 or 2. The intelligent reasoning system includes the evidence-driven large language model and E... 3 - Loop controller, the application includes: F1, the E 3 - The Loop controller maintains a central state of serialization, which includes the current problem objective, a structured uncertainty vector estimated by the evidence-driven large language model, a budget ledger, an evidence pool, an atomic claim set, and an immutable circular log. F2, the E 3 - The Loop controller, based on the central state, invokes the evidence-driven large language model to perform reasoning in order to obtain structured action decisions or atomic claims; F3, the aforementioned E 3 - The Loop controller executes corresponding operations based on the structured action decision, or performs evidence-gated adjudication on the atomic claims; F4. Based on the execution result or decision result of step F3, update the central state and repeat steps F1 to F3 until the termination condition is met.
[0105] Example 5 This embodiment provides an evidence-driven intelligent reasoning system, which integrates the device of Embodiment 3 (providing E... 3 -Loop-trained large language model) and E 3 - Loop control module. This system is a complete integrated hardware and software solution. It includes: Model Service Unit: Hosts a large, trained language model and provides an efficient inference API.
[0106] E 3 -Loop control module: As the core control plane of the system, it implements all the functions described in Example 6.
[0107] External tool gateway: connects to external resources such as retrieval systems, code execution sandboxes, and databases.
[0108] Audit log storage: Persistently store immutable circular logs L.
[0109] Working principle: Users submit issues through the interface, and the system initiates E... 3 - The Loop control module works in conjunction with the model service unit and external tool gateway to complete the evidence-driven reasoning loop and return auditable results.
[0110] Implementation steps: Similar to the implementation steps of Example 3, but with greater emphasis on system-level deployment and scheduling.
[0111] Example 6 This embodiment provides a method for constructing trajectory-based data for training evidence-driven large language models, including: Simulation E 3 - The Loop architecture's reasoning process generates a complete reasoning trajectory for a given input question; In the reasoning trajectory, a serialized snapshot of the central state is recorded, and the central state includes at least the problem objective, the structured uncertainty vector, the budget ledger, the evidence pool, and the atomic claim set; Label each decision step in the reasoning trajectory with a gold standard action label; All supporting information involved in the reasoning process is encapsulated into a structured evidence object, which at least includes a source pointer and reliability information; For steps in the reasoning process that require revision, record the location where the rollback occurred, the changes in the set of claims before and after the rollback, and the increase in evidence that triggered the rollback.
[0112] The large amount of tracked data generated using the above method is stored in a database. This database can be a relational database (such as PostgreSQL), a NoSQL database (such as MongoDB), or a distributed file system (such as HDFS). Each track is recorded and contains fields such as session ID, original question, and complete track data.
[0113] Example 7 This embodiment provides a data transmission method, including: generating trajectory data in the database of Embodiment 6; and transmitting the trajectory data through a communication network (such as the Internet).
[0114] This embodiment also provides a computer-readable storage medium storing a bit stream containing an encoded representation of the tracing data generated by the method described in Embodiment 6 (e.g., encoded using serialization formats such as Protocol Buffers or Avro).
[0115] Working principle: Enables the circulation of standardized trajectory data, facilitating distributed training or commercial exchange. Implementation steps: The data provider encodes the trajectory data into a bitstream and transmits it to the model trainer via FTP, HTTP, or a dedicated data channel.
[0116] It should be noted that the effectiveness of this invention depends on the acquisition of high-quality training trajectory data and the accuracy of each component (such as the uncertainty estimator). In the initial stage, the error of the uncertainty estimator may propagate and amplify in closed-loop inference. To address this challenge, adversarial examples can be introduced during training to improve the robustness of the estimator, and a decision confidence threshold can be set. When the confidence of the uncertainty estimate itself is low, a conservative default action strategy is adopted. Furthermore, constructing the initial training trajectory library may involve some manual guidance or simulation using existing strong inference models; the cost of this is a factor to consider in practical applications.
[0117] Example 8 In large chemical plants, power plants, or intelligent manufacturing production lines, sudden failures of critical equipment (such as centrifugal compressors, reactors, and industrial robots) can lead to production interruptions and significant economic losses. Traditional fault diagnosis relies on expert experience, resulting in slow response times and susceptibility to subjective factors. This embodiment utilizes an evidence-driven large language model (hereinafter referred to as "E") trained using the aforementioned closed-loop fine-tuning method. 3 The "-Loop model" is applied to this scenario to build a real-time, auditable, evidence-driven automated fault diagnosis and maintenance decision support system. This system consists of the following core components: E 3 -Loop model: As the "diagnostic brain" of the system, after closed-loop fine-tuning training, it can follow the reasoning discipline of "state-action-evidence gating-rollback revision".
[0118] E 3 -Loop Controller: Maintains the central state St and coordinates the entire inference loop.
[0119] Data interface: Connects to the device sensor data stream, the device's historical maintenance database, the knowledge base (such as the device manual and the fault mode library), and the maintenance tool execution system (such as AR glasses guidance and the spare parts management system).
[0120] The specific implementation process includes the following steps: Step 1: Problem initialization.
[0121] The operator reported: "The industrial robot RB-01 in area A of the production line experienced abnormal arm vibration and an overheating alarm while performing a welding task." E 3 - Loop controller initialization center state S0: Problem objective (Q0): "Diagnose the cause of abnormal shaking and overheating of the RB-01 robot and provide repair suggestions." The structured uncertainty vector (U0) is initially estimated as (u_answer=0.95, u_evidence=0.90, u_exec=0.80, u_spec=0.70, u_risk=0.85), indicating that the exposures to the initial answer, evidence, execution necessity, specification matching risk, and high-risk assertions are all high.
[0122] Budget Ledger (B0): Set the initial budget, such as {tokens: 5000, tool_calls: 10, time_seconds: 300, steps: 20}.
[0123] Evidence Pool (E0): Initially contains operator report text.
[0124] Atomic claim set (C0): empty.
[0125] Immutable cyclic log (L0): Records the initial state hash.
[0126] Step 2: First round of reasoning and action decision-making.
[0127] E 3 - The Loop controller inputs S0 into E 3 -Loop model.
[0128] Model Inference and Action Decision: The model is based on high uncertainty (especially u_evidence and u_exec). According to the policy learned during training, the first action of the decision is not to directly generate a diagnostic conclusion, but to trigger the RETRIEVE (external retrieval) action and generate retrieval query parameters: "RB-01 robot, abnormal shaking, overheating, fault mode, historical maintenance record".
[0129] Action execution and state update: Action execution: The system performs a retrieval, obtaining relevant information from the device's historical database and knowledge base.
[0130] Evidence object encapsulation: The search results are encapsulated as evidence objects and stored in evidence pool E1. For example: Evidence 1: {Type: “Historical Work Order”, Source: “Maintenance Database #2023-075”, Content: “RB-01 experienced similar vibrations last year due to wear of the harmonic reducer”, Reliability: 0.8, Conflict: None}; Evidence 2: {Type: "Knowledge Base Entry", Source: "Equipment Manual V3.2", Content: "Possible causes of arm overheating: motor overload, insufficient lubrication, bearing damage", Reliability: 0.9, Conflict: None}.
[0131] Status Update: The central status is updated to S1, the evidence pool is updated to E1, and the corresponding costs are deducted from the budget ledger.
[0132] Step 3: Second Round of Reasoning, Claim Generation, and Evidence Gating E 3 - The Loop controller will input S1 back into the model.
[0133] Model Reasoning and Claim Generation: The model combines new evidence to generate atomic claim C1: Claim A: "The failure may be due to wear of the harmonic reducer." (Confidence level: 0.7, Risk label: Medium, Supporting evidence: [Evidence 1]) Claim B: "The failure may have originated from an overload or lubrication problem with the boom motor." (Confidence level: 0.6, Risk label: Medium, Supporting evidence: [Evidence 2]).
[0134] Evidence gate ruling: E 3 The Loop controller adjudicates the claims. Since both claims are supported by evidence but not conflicting, and the risk level is "medium," but u_exec (necessity of execution verification) remains high, the decision is HOLD, with further verification recommended.
[0135] Step 4: Third round of reasoning and execution triggering.
[0136] Model Decision: The model decision triggers the SANDBOX_EXEC (sandbox execution) action, with the parameter being the call to the "real-time data analysis tool" to analyze the robot's recent vibration spectrum and temperature curve.
[0137] Action execution and evidence reinjection: The system calls the data analysis service and returns the following results: Evidence 3: {Type: "Analysis Result", Source: "Vibration Spectrum Analysis Service", Content: "The spectrum shows a peak at a specific frequency, which matches the fault characteristics of the harmonic reducer", Reliability: 0.85, Conflict: None}.
[0138] State update and rollback revision (confidence update in this example): New evidence, evidence 3, strongly supports claim A. The system triggers belief_update_rollback, but not a complete rollback; instead, it performs a differential update on the claim set: The confidence level of claim A was increased from 0.7 to 0.85.
[0139] The confidence level for claim B was reduced from 0.6 to 0.4.
[0140] With the uncertainty vector U updated, u_answer and u_evidence decrease significantly.
[0141] Step 5: Convergence and Output.
[0142] After possible multiple rounds of iteration (such as further retrieval of lubrication records), the evidence-gated decision asserts that A is PASS, and the maximum uncertainty max(U) has fallen below the threshold, and the budget has not yet been exhausted.
[0143] The decision-maker stops when convergence is achieved.
[0144] Final output: The system outputs structured conclusions, including: Diagnostic conclusion: "The abnormal shaking and overheating of the RB-01 robot are highly likely caused by wear of the harmonic reducer." Chain of evidence: clearly points to evidence 1 and evidence 3.
[0145] Repair recommendation: "It is recommended to check and replace the harmonic reducer." Residual uncertainty: "Lubrication conditions need to be checked during maintenance." (This indicates claim B, which has not been completely ruled out).
[0146] Audit log index: Allows for subsequent queries of the complete reasoning process.
[0147] During the fault diagnosis process, evidence pool E may contain the following evidence objects: 1. E[0]: {id: 0, type: “User report”, content: “Robot RB-01 arm shaking, overheating”, provenance: {source: “Operator HMI input”}, reliability: {score: 0.7, method: “Preset”}}.
[0148] 2. E[1]: {id: 1, type:“historical record”, content:“the harmonic reducer was replaced last year”,provenance: {source:“work order system DB”, record_id: “WO-2023-075”}, reliability:{score: 0.8, method:“system reliability”}}.
[0149] 3、E[2]: {id: 2, type:“Sensor Analysis”, content:“Vibration Spectrum Peak Value Matches Gear Wear Characteristics”, provenance: {source: “Real-time Analysis API”, timestamp: “2024-...”,parameters: “...”}, reliability: {score: 0.85, method: “Algorithm Confidence”},conflicts: []}.
[0150] 4. E[3]: {id: 3, type:“Knowledge Base”, content:“Bearing damage can also lead to overheating”,provenance: {source:“Equipment Knowledge Graph”}, reliability: {score: 0.9, method:“Expert Annotation”}, conflicts: [{evidence_id: 2, relation: "alternative", score: 0.3}]}` / / This evidence has a slight conflict with evidence 2 (alternative interpretation).
[0151] The evidence pool in this embodiment has the following functions: 1. Supporting Decisions: The claims generated by the model (such as “harmonic reducer failure”) must be clearly linked to specific evidence in the evidence pool (such as E[1], E[2]). This avoids “illusions” and makes the conclusions verifiable.
[0152] 2. Conflict Management and Adjudication: The evidence pool records the conflict relationships between evidence (such as the conflict fields of E[3] and E[2]). The evidence gating module uses this information to adjudicate. When a conflict remains unresolved, the gating may determine it as HOLD, requiring further evidence collection, rather than blindly choosing one side.
[0153] 3. Driven Revision: When new, stronger evidence is added to the pool (such as E[2]), or when conflicting evidence is found, a rollback revision mechanism is triggered. The system does not regenerate the entire answer, but rather makes minimal and precise adjustments to the confidence or content of the claim based on incremental changes in the evidence.
[0154] 4. Ensuring Auditability: All evidence throughout the reasoning process is structured and recorded in a pool, and associated with a circular log L. This allows any final conclusion to be traceable and verified, meeting the high requirements of industrial sectors for the reliability and security of decision-making processes.
[0155] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, several equivalent substitutions or obvious modifications can be made without departing from the concept of the present invention, and all such modifications, achieving the same performance or purpose, should be considered within the scope of protection of the present invention.
Claims
1. A closed-loop fine-tuning method for training evidence-driven large language models, characterized in that, Includes the following steps: S1. Obtain training samples, which include closed-loop inference trajectory data based on the state-action-evidence gating-rollback revision closed-loop control architecture; S2. Based on the closed-loop inference trajectory data, supervised fine-tuning is performed on the pre-trained large language model base to train the large language model base to learn and output structured action decisions and atomic claims that are compatible with the state-action-evidence gating-rollback revision closed-loop control architecture. S3. After the supervised fine-tuning, perform preference convergence training based on closed-loop behavior indicators; S4. During or after the preference convergence training, when the large language model base is upgraded from the first computing architecture to the second computing architecture, a trajectory preservation constraint is applied by minimizing the loss function to minimize the difference in action distribution and uncertainty vector distribution generated by the large language model base under the same input before and after the upgrade.
2. The closed loop trimming method of claim 1, wherein, In step S1, the closed-loop reasoning trajectory data includes at least a serialized central state, action sequence labels, evidence object encapsulation information, and differential rollback records. The central state includes the problem objective, structured uncertainty vector, budget ledger, evidence pool, atomic claim set, and immutable circular log.
3. The closed-loop fine-tuning method as described in claim 2, characterized in that, The structured uncertainty vector includes at least one of the following dimensions: answer uncertainty, evidence sufficiency uncertainty, execution verification necessity uncertainty, tool specification consistency risk uncertainty, and high-risk assertion exposure uncertainty; the budget ledger is used to uniformly record and manage at least one of the following resources: lexical consumption, tool call cost, execution time consumption, and loop step consumption.
4. The closed-loop fine-tuning method as described in claim 1, characterized in that, Step S3 specifically includes: Reasoning trajectories that follow the discipline of the state-action-evidence gating-rollback revision closed-loop control architecture will be used as positive samples, while reasoning trajectories that violate the discipline of the state-action-evidence gating-rollback revision closed-loop control architecture will be used as negative samples. At least one of the evidence gating pass rate, execution trigger accuracy, and rollback revision accuracy will be used as a reward signal to optimize the behavior distribution of the large language model base.
5. The closed-loop fine-tuning method as described in claim 1, characterized in that, In step S4, the optimization calculation of minimizing the loss function adopts the trajectory-preserving cortical upgrade algorithm.
6. An application of an evidence-driven large language model trained by the closed-loop fine-tuning method according to any one of claims 1 to 5 in an intelligent reasoning system, wherein the intelligent reasoning system includes the evidence-driven large language model and a state-action-evidence gating-rollback revision closed-loop controller, characterized in that, The applications include: F1. The state-action-evidence gating-rollback revision closed-loop controller maintains a serialized central state, which includes the current problem objective, a structured uncertainty vector estimated by the evidence-driven large language model, a budget ledger, an evidence pool, an atomic claim set, and an immutable circular log. F2. The state-action-evidence gating-rollback revision closed-loop controller, based on the central state, calls the evidence-driven large language model to perform reasoning in order to obtain structured action decisions or atomic claims. F3. The state-action-evidence gating-rollback revision closed-loop controller performs corresponding operations based on the structured action decision, or performs evidence gating adjudication on the atomic claim; F4. Based on the execution result or decision result of step F3, update the central state and repeat steps F1 to F3 until the termination condition is met.
7. A method for constructing trajectory-based data for training evidence-driven large language models, characterized in that, include: The reasoning process of the simulated state-action-evidence gating-rollback revision closed-loop control architecture generates a complete reasoning trajectory for an input problem; In the reasoning trajectory, a serialized snapshot of the central state is recorded, and the central state includes at least the problem objective, the structured uncertainty vector, the budget ledger, the evidence pool, and the atomic claim set; Label each decision step in the reasoning trajectory with a gold standard action label; All supporting information involved in the reasoning process is encapsulated into a structured evidence object, which at least includes a source pointer and reliability information; For steps in the reasoning process that require revision, record the location where the rollback occurred, the changes in the set of claims before and after the rollback, and the increase in evidence that triggered the rollback.
8. An intelligent reasoning method for fault diagnosis of industrial equipment, characterized in that, The intelligent reasoning method is executed by an evidence-driven large language model trained based on a state-action-evidence gating-rollback revision closed-loop control architecture, and includes the following steps: Receive fault description information about the target device and initialize the central state, which includes the fault description information as the problem target, a structured uncertainty vector initially estimated by the evidence-driven large language model, a preset budget ledger, an initial evidence pool, an empty atomic claim set, and an immutable circular log. Repeat the following steps until the termination condition is met: Based on the current central state, the evidence-driven large language model is invoked to perform reasoning in order to obtain the next structured action decision or new atomic claims; If a structured action decision is obtained, the structured action decision is executed. The structured action decision includes at least one of the following: retrieving external evidence from a device database or knowledge base, calling data analysis tools to analyze device sensor data to obtain execution evidence, or conducting internal thinking to generate candidate claims. The information obtained from executing structured action decisions is encapsulated into evidence objects with source and reliability information, and then updated to the evidence pool. If an atomic claim is obtained, the evidence gating module will adjudicate the atomic claim based on the current evidence pool. The adjudication result may include approval, suspension, or failure. Based on the action execution result or claim adjudication result, the atomic claim set and the structured uncertainty vector are differentially updated, and the budget ledger and immutable circular log are updated; When the termination condition is met, a diagnostic conclusion is output, which includes the finalized atomic claim, an index of the chain of evidence supporting the atomic claim, and a description of the residual uncertainty.
9. The intelligent reasoning method as described in claim 8, characterized in that, When the evidence gating module adjudicates an atomic claim, if the reliability of the evidence associated with the atomic claim is lower than a preset threshold, or there are unresolved conflicts among the evidence, or the atomic claim is rejected by the enforcement evidence, the adjudication fails and a rollback revision is triggered; if the atomic claim is supported by evidence but the evidence is insufficient or there is a path that can be further verified, the adjudication is suspended.
10. The intelligent reasoning method as described in claim 8, characterized in that, The termination condition is one of the following: the evidence gating module decides that all atomic claims are passed and the maximum value of the structured uncertainty vector is lower than a preset threshold; or any resource in the budget ledger is exhausted.