Big language model credible reasoning system and method based on double-flow cognitive disorder and solution synthesis
By employing a large language model credible reasoning system based on dual-stream cognitive dissonance and reconciliation synthesis, the 'obedience illusion' problem of large language models when integrating external authoritative data is solved, achieving reliability and trustworthiness of the model in high-risk applications and ensuring the accuracy and transparency of the output.
Patent Information
- Application Number
- CN202511029473.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing large language models, when integrating external authoritative data, cannot effectively identify and handle conflicts between their internal knowledge and external facts, resulting in a highly deceptive 'illusion of conformity' and thus being unreliable in critical applications.
A reliable reasoning system based on a large language model using dual-stream cognitive dissonance and reconciliation synthesis is adopted. Through parallel computation of the 'id' stream and the 'superego' stream, the free association and fact-following of the model are simulated respectively. Combined with a cognitive dissonance detector and decoding path selection, it is ensured that the model can actively recognize and deal with the conflict between internal knowledge and external facts at each step.
It effectively eliminates the deceptive behavior of the model silently stitching together internal and external knowledge, ensures the highest fidelity to external facts, provides auditability and interpretability, and enhances the reliability and trustworthiness of the model in high-risk applications.
Smart Images

Figure CN120930784A_ABST
Abstract
Description
Technical Field
[0001] This invention specifically relates to the field of artificial intelligence technology, and more specifically, to an information processing system and method for fundamentally improving the real-time accuracy, logical consistency, source traceability, and overall credibility of Large Language Models (LLMs) when handling complex reasoning tasks involving external, authoritative, real-time, or domain-specific data sources. This invention introduces a parallel, opposite-purpose dual-computation-flow architecture during the model's decoding process, enabling the proactive detection, quantification, and resolution of cognitive conflicts between internal model knowledge and external facts through a structured reconciliation mechanism. This transforms the Large Language Model from a probabilistic text generator into a reasoning engine with inherent critical thinking and high reliability. The technical solution described in this invention can be widely applied to critical industries with stringent requirements for information accuracy, decision interpretability, and risk control, including but not limited to financial risk assessment and compliance review, legal document drafting and case analysis, medical diagnostic assistance and bioinformatics research, operational monitoring and fault diagnosis of critical infrastructure, and enterprise-level knowledge management and automated decision support systems. Background Technology
[0002] In recent years, large language models based on the Transformer architecture have become one of the most revolutionary technological breakthroughs in the field of artificial intelligence due to their powerful language understanding and generation capabilities gained from pre-training on massive amounts of unlabeled text data. These models can demonstrate near-human or even superior performance in various natural language processing tasks, bringing unprecedented opportunities for the automation and intelligent transformation of various industries. However, when these powerful tools move from the laboratory to real-world, high-value commercial applications, their inherent and deep-seated shortcomings become fully apparent, becoming the core bottleneck hindering their large-scale, reliable deployment.
[0003] This core flaw is broadly and generally referred to as "illusion," meaning that the content generated by the model appears fluent and grammatically logical, but actually contains information that is inconsistent with the facts, contradicts the context, or is purely fabricated. The existence of illusion makes directly applying large language models to high-risk decision-making scenarios tantamount to a high-stakes gamble. In the financial field, erroneous data generated by illusion can lead to flawed trading strategies and huge economic losses; in the legal field, citing an outdated law or erroneous precedent may invalidate a contract or result in a loss in court; in the medical field, a diagnostic recommendation based on erroneous information may endanger a patient's life.
[0004] To suppress illusions and improve the reliability of LLM (Language Model), existing technologies have explored various paths, among which "Retrieval-Augmented Generation (RAG)" is currently the most mainstream and widely accepted technical paradigm in the industry. The core idea of RAG is to retrieve the most relevant text fragments to the user's query from an external, trusted knowledge base (such as an internal corporate database, the latest industry reports, or a legal and regulatory database) before the model generates an answer. These fragments are then used as additional, authoritative contextual information and fed into the large language model, hoping that the model can answer the question based on the given material, like a student taking an open-book exam.
[0005] In theory, RAG effectively alleviates the problems of knowledge obsolescence (knowledge deadline problem) and limited knowledge scope inherent in LLM. However, in in-depth practical applications, the inventors have discovered that the RAG framework itself has a deeper and more deceptive failure mode, which the present invention rigorously defines as "the illusion of compliance".
[0006] The "illusion of conformity" specifically refers to the phenomenon that even when an LLM is provided with accurate and authoritative external documents, it does not, and cannot, guarantee complete fidelity to those documents when generating its final output. Instead, due to its powerful pattern matching and semantic smoothing capabilities developed during pre-training, the model unconsciously and silently stitches together its inherent, potentially outdated, or context-incompatible internal knowledge with the information provided by the external document. When the model's internal knowledge conflicts with external authoritative facts—a scenario extremely common in real-world applications—the model almost never actively exposes or reports this conflict. It tends to generate a carefully crafted, seemingly logically consistent, and deceptive text that blends internal and external information and cites authoritative facts.
[0007] A typical example of the "conformity illusion" is as follows: Suppose a financial analyst queries an LLM configured with RAG: "Analyze the profitability of Company A based on its recently released second-quarter financial report." The system retrieves the original financial report, which clearly states that "net profit for this quarter was ten million US dollars, a decrease of 80% compared to fifty million US dollars in the same period last year, mainly due to increased market competition." The LLM's internal knowledge base stores a large amount of old news about Company A being a "high-growth star stock" for the past few years. At this point, a model exhibiting the "conformity illusion" might generate the following response: "According to the latest second-quarter financial report, Company A achieved a substantial net profit of ten million US dollars. As an industry leader, the company continues to demonstrate its strong profitability, maintaining its consistent growth momentum." The insidious aspect of this response is that it correctly cites the external fact of "ten million US dollars," making it appear authoritative (i.e., "conformity"), but by seamlessly splicing it with outdated concepts such as "strong profitability" and "growth momentum" from internal knowledge, it completely distorts the core fact revealed by the financial report—namely, a precipitous drop in profitability. This illusion is more dangerous than directly fabricating a false profit figure because it is harder for non-professional customers to detect and is more likely to lead to wrong decisions.
[0008] The fundamental reason why existing technologies have failed to address the "obedience illusion" is that they all operate "outside" of LLM. Neither Prompt Engineering nor the information provided by RAG can interfere with the "black box" computational process of the model's hundreds of billions of parameters undergoing forward propagation after receiving all the information. They cannot force the model to differentiate and decide between the two cognitive modes of "free association" (based on internal knowledge) and "fact-following" (based on external documents). Therefore, LLM is essentially still a single-channel system seeking the path of maximum probability, with its ultimate goal being to generate the most semantically fluent sequence, rather than the most accurate statement of facts.
[0009] In conclusion, to truly enable large language models to become reliable "digital experts" or "decision agents" in high-risk, high-value scenarios, it is essential to start with their core decoding mechanism, opening the "black box" of their reasoning and endowing them with a new, intrinsic, and auditable critical thinking ability. A technological solution is needed that allows the model to proactively recognize and address potential conflicts between its internal knowledge and external authoritative facts at every step of reasoning, rather than silently stitching them together into a misleading "perfect lie." This invention is proposed precisely to address this fundamental technological gap. Summary of the Invention
[0010] The core technical problem this invention aims to solve is that existing large language models, when integrating authoritative external data, cannot effectively identify and handle conflicts between their internal knowledge and external facts, thus creating a highly deceptive "illusion of conformity" and leading to their fundamental flaw of being unreliable in critical applications. To address this, this invention provides a novel, reliable reasoning system and corresponding method for large language models with inherent critical thinking capabilities.
[0011] To address the aforementioned technical problems, this invention provides a reliable reasoning system for a large language model based on dual-stream cognitive dissonance and reconciliation-based synthesis. The system includes at least one input processing and context building unit, configured to receive user queries and one or more external authoritative documents, and responsible for preprocessing multi-source, potentially conflicting, external documents to ultimately construct a structured, unified input context containing all necessary information. The system also includes a dual-stream cognitive engine, serving as the core computational unit and tightly integrated with the core parameters of the large language model. It is configured to execute two independent, oppositely purposeful computational streams in parallel, based on the unified input context, at a preset decoding granularity, to generate two distinct potential cognitive states. One of these computational streams, called the "IdStream," aims to simulate the model's unconstrained, free-associative thinking based on its vast internal knowledge, generating an "Id" state vector (H_id) representing the model's "free thinking" or "intrinsic intention." Another computational stream is called the "Superego Stream," which aims to simulate the model's deliberate thinking under strict adherence to external authoritative facts. It generates a "superego" state vector (H_superego) representing the "fact constraint" by applying a mandatory attention mask.
[0012] Furthermore, the system includes a cognitive dissonance detector connected to the dual-stream cognitive engine, configured to receive the "id" state vector and the "superego" state vector in real time, and calculate a semantic conflict score (D) between them using a configurable metric function. This score precisely quantifies the degree of discrepancy between the model's internal knowledge and external facts at the current reasoning step. The system further includes a conflict threshold determination unit configured to determine a conflict threshold (T) for judging whether cognitive dissonance has occurred using at least one predefined strategy, including empirical static setting, dynamic adaptive adjustment, or unsupervised automatic calibration.
[0013] The system also includes a decoding path selection and granularity control unit, which receives the semantic conflict score (D) and conflict threshold (T), and decides whether to perform conflict judgment based on a preset decoding granularity strategy. If executed, it selects either a "consistency path" or a "conflict and reconciliation path" by comparing the score with the threshold. A reconciliation synthesis module is activated only when the "conflict and reconciliation path" is selected. This module generates a structured "reconciliation instruction vector" (V_rec) through specific technical paths, such as rule mapping systems, lightweight sequence-to-sequence models, or cross-attention analysis systems. Finally, an output synthesis and assembly unit is responsible for performing the final text generation according to the selected decoding path. If the "consistency path" is selected, it decodes based on the "superego" state vector to ensure factual accuracy; if the "conflict and reconciliation path" is selected, it parses the "reconciliation instruction vector" and generates a text sequence that can clearly resolve conflicts, while seamlessly assembling the text fragments generated at different decoding granularities into a coherent output.
[0014] In another aspect, the present invention provides a corresponding method that elaborates on the steps for performing the above-mentioned system functions, including multi-source document preprocessing, dual-stream parallel computation based on decoding granularity, dynamic threshold determination, path decision, multi-path and solution generation, and final text synthesis and assembly.
[0015] Compared with the prior art, the beneficial effects of the present invention are revolutionary.
[0016] First, this invention transforms the implicit cognitive conflict within the model into an externalized, quantifiable signal through a mandatory dual-flow collision mechanism. This mechanism eliminates the possibility of the model silently and deceptively stitching together internal and external knowledge, ensuring the highest fidelity to external facts and thus fundamentally immunizing against the "illusion of conformity."
[0017] Second, the dual-flow design makes the model's "thinking" process—the contrast between free association and factual adherence, and the degree of conflict therein—transparent and traceable, providing unprecedented auditing capabilities and interpretability for high-risk applications, thereby introducing an auditable, white-box critical thinking process.
[0018] Third, this invention is not a conceptual framework, but rather a complete, robust, and highly engineering-feasible technical solution that provides multiple specific and operable technical paths for all key technical challenges, demonstrating the completeness and robustness of the technical solution.
[0019] Fourth, this invention acknowledges and rationalizes the performance overhead of dual-stream computing, positioning it as a necessary investment in exchange for ultimate reliability in high-value applications. At the same time, by introducing decoding granularity control and discussing different implementation paths, it allows system designers to make flexible trade-offs, thereby achieving a wise balance between risk, cost, and performance.
[0020] Fifth, by providing architecture-level trust assurance, this invention elevates the Large Language Model (LLM) from an uncertain auxiliary tool into a reliable decision-making agent that can be deeply integrated into core business processes and entrusted with important tasks, thereby significantly expanding the commercial application boundaries of LLM. Attached Figure Description
[0021] Figure 1 This is an enhanced functional architecture block diagram of a large language model-based reliable reasoning system based on dual-stream cognitive dissonance and reconciliation synthesis according to an embodiment of the present invention.
[0022] Figure 2 This is a detailed flowchart of an enhanced version of the credible reasoning method for a large language model based on dual-stream cognitive dissonance and reconciliation synthesis according to an embodiment of the present invention.
[0023] Figure 3 This is a schematic diagram illustrating in detail the core working principle of the cognitive dissonance detection, threshold comparison, path splitting, and reconciliation synthesis process in one embodiment of the present invention.
[0024] Figure 4 This is a schematic diagram of a typical computer system hardware environment that can be used to implement the system and method described in this invention.
[0025] Explanation of reference numerals in the attached figures:
[0026] 100: A Trustworthy Reasoning System Based on a Large Language Model of Dual-Stream Cognitive Dissonance and Reconciliation Synthesis
[0027] 101: Input Processing and Context Building Unit
[0028] 1011: Multi-source preprocessing submodule
[0029] 110: Core of Large Language Model
[0030] 102: Dual-Stream Cognitive Engine
[0031] 1021: "Essential" Stream Processing Unit
[0032] 1022: "Superego" Stream Processing Unit
[0033] 103: Cognitive Dissonance Detector
[0034] 107: Conflict Threshold Determination Unit
[0035] 104: Decoding Path Selection and Granularity Control Unit
[0036] 1041: Decoding Granularity Control Submodule
[0037] 1042: Path Selection Submodule
[0038] 105: Reconciliation Synthesis Module
[0039] 106: Output synthesis and assembly unit
[0040] 200: A Credible Reasoning Method for Large Language Models Based on Dual-Stream Cognitive Dissonance and Reconciliation Synthesis
[0041] S201: Receiving and Preprocessing Multi-Source Input Steps
[0042] S202: Steps for constructing a unified initial context
[0043] S203: Decoding Granularity Determination Steps
[0044] S204: Steps for Two-Stream Parallel Computation
[0045] S2041: Sub-step for calculating the "id" flow
[0046] S2042: Sub-step for calculating the "superego" flow
[0047] S205: Steps for calculating semantic conflict scores
[0048] S206: Step to determine the conflict threshold T
[0049] S207: Comparison and Path Selection Steps
[0050] S208: Consistency Generation Steps
[0051] S209: Reconciliation Synthesis Steps
[0052] S210: Perform the reconciliation generation steps
[0053] S211: Output Assembly and Context Update Steps
[0054] S212: Determine if the generation process is complete
[0055] S213: Output the complete result. Step 301: "Ego" state vector (H_id)
[0056] 302: "Superego" state vector (H_superego)
[0057] 303: Conflict Calculation
[0058] 304: Threshold Comparison and Decision Point
[0059] 305: Consistent Path
[0060] 306: Conflict and Reconciliation Paths
[0061] 307: Consistency Generation Module Steps 308: Reconciliation Generation Module Steps
[0062] V_rec: Reconciliation instruction vector
[0063] 400: Computer System Hardware Environment
[0064] 401: Central Processing Unit (CPU)
[0065] 402: RAM (Memory)
[0066] 403: Hardware Accelerator (GPU / TPU)
[0067] 404: Storage device (SSD / HDD)
[0068] 405: Operating System
[0069] 406: Application
[0070] 407: Network Interface
[0071] 408: System Bus Detailed Implementation
[0072] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. In this specification, the term "connection" should be interpreted broadly. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components.
[0073] Example 1: System Overall Architecture and Component Details
[0074] Please see Figure 1 , Figure 1 The functional architecture of a system 100 according to a preferred embodiment of the present invention is shown. This architecture has been refined in detail to address complex real-world challenges.
[0075] Input processing and context building unit (101)
[0076] This unit is the system's gateway, and its responsibilities go far beyond simply receiving input.
[0077] First, the unit performs input reception, receiving user queries, such as a natural language question, and at least one external authoritative document.
[0078] Secondly, this unit addresses the challenges and countermeasures of handling multi-source authoritative documents, representing a deeper exploration of a key practical problem. In real-world RAG scenarios, systems often retrieve multiple document fragments from heterogeneous data sources such as databases, APIs, PDFs, and web pages. These fragments may contain overlapping content, supplementary information, or even contradictions. If this mixed information is provided directly to the "superego" stream without processing, the "superego" stream itself will generate a chaotic and unreliable state vector due to the contradictions in the input sources, thus causing subsequent conflict detection to lose its benchmark. To solve this problem, unit 101 includes a multi-source preprocessing submodule (1011). This submodule can employ at least one of the following strategies:
[0079] Strategy A involves weighting or sorting sources by credibility. The system can maintain a configurable list of source credibility levels; for example, internal ERP data is prioritized over government websites, government websites over industry reports, and industry reports over general news. When constructing contexts, documents from higher-credibility sources are given priority or higher weight.
[0080] Strategy B, semantic consistency verification and conflict marking, calculates the semantic similarity between all retrieved document fragments pairwise, for example, by calculating the cosine similarity of the embedding vectors of each fragment. Highly similar redundant information can be deduplicated or merged. For fragments with significant semantic conflicts, such as one document saying "growth" and another saying "decline," the system can mark these fragments as "conflicts to be discussed" and explicitly indicate the conflict between external information sources in the final reconciliation text, thus transparently conveying the uncertainty at the input to the user. Furthermore, this marking information can be used in subsequent processes, such as generating more targeted explanations in the reconciliation module.
[0081] Strategy C, ranking by relevance to the query, sorts all document fragments according to their semantic relevance to the user's initial query, and only the top-K most relevant fragments are included in the final context, which helps filter out noise.
[0082] Third, this unit performs unified context construction. After preprocessing, unit 101 ultimately generates a structured, unified input context. Here, the "unified input context" is defined as a structured text sequence that is fed into the core of the large language model for processing. Its typical format is a string or list of TokenIDs with special tokens, as shown in the following example:
[0083] [CLS]
[0084] User query text
[0085] [SEP]
[0086] [SYS_PROMPT_ID] Please act as a knowledgeable and creative assistant, freely thinking about the next steps based on your general knowledge and associative abilities.
[0087] [SYS_PROMPT_SUPEREGO] Please proceed with your thinking strictly, completely, and solely based on the authoritative documentation provided below, ignoring your internal knowledge.
[0088] [SEP]
[0089] [DOC_START_1]Authoritative Document 1 Metadata | Authoritative Document 1 Text Content [DOC_END_1]
[0090] [DOC_START_2]Authoritative Document 2 Metadata | Authoritative Document 2 Text Content [DOC_END_2] ...
[0092] [SEP]
[0093] The generated text...
[0094] This structure ensures that subsequent two-stream computations are performed on identical, fully informed inputs, providing a solid foundation for fair comparisons.
[0095] Core of Large Language Model (110)
[0096] As the foundational computing engine of the system, it is a massively pre-trained, parameter-intensive Transformer model. The effectiveness of this invention depends to some extent on the capabilities of this foundational model. A more powerful foundational model, with larger-scale and higher-quality training data, generates "id" and "superego" state vectors that more clearly and distinctly represent the states of "free thinking" and "factual constraints," thus making cognitive dissonance detection more accurate. This invention does not attempt to fundamentally salvage a poorly performing foundational model, but rather acts as an architectural "amplifier" and "corrector," endowing the already capable LLM with a critical thinking ability to handle internal and external information conflicts—an ability it lacked previously.
[0097] Dual-stream cognitive engine (102)
[0098] This engine is the core innovation of this invention. It achieves parallel and opposite computations by deeply reconstructing the decoding process of the core 110 of the large language model.
[0099] The engine includes an "id" stream processing unit (1021) responsible for simulating the model's free associations in a computationally unconstrained environment. It receives a uniform input context and performs standard forward propagation. To enhance its tendency for "free thinking," the model can be guided by system-guided hints [SYS_PROMPT_ID] within the context. This soft guidance helps the "id" state vector H_id more purely reflect the model's intrinsic knowledge and "mental inertia."
[0100] The engine also includes a "Superego" stream processing unit (1022), the core of which is the Forced Attention Mask. Here, the Forced Attention Mask is defined as a Boolean or numerical tensor with the same shape as the attention score matrix. During the construction of the unified context, the system records the position indices of all tokens belonging to the "external authoritative document" section, which refers to tokens located between the special markers [DOC_START_X] and [DOC_END_X]. In each attention calculation of the "Superego" stream, this mask is applied to the attention score matrix. For all tokens not belonging to the authoritative document position indices, their corresponding attention scores are set to a very large negative number, such as -1e9, so that after normalization by the Softmax function, their attention weights approach zero infinitely. This mathematically guarantees that the "Superego" stream, when generating its state vector H_superego, is strictly limited to the external facts provided. This mask is generated and fixed at the beginning of each round of dialogue based on the latest unified context. During the decoding process, the mask does not need to be changed as new text is generated, because it only focuses on the static authoritative part of the input context.
[0101] Cognitive Dissonance Detector (103)
[0102] This unit receives the "id" state vector H_id and the "superego" state vector H_superego, and calculates a semantic conflict score D between them using a configurable metric function to quantify the degree of discrepancy between the model's internal knowledge and external facts. This metric function aims to capture the differences between the two high-dimensional vectors in the semantic space.
[0103] In a preferred embodiment of the invention, the semantic conflict score is determined by calculating the vector space distance between two state vectors. This distance metric is intuitive and computationally efficient.
[0104] Specifically, a particularly preferred vector space distance is the cosine distance. Cosine distance focuses on the direction of vectors rather than their magnitude, effectively measuring semantic similarity or opposition. In a specific implementation, the cosine distance D can be calculated using the following formula:
[0105] D=1-(H_id·H_superego) / (||H_id||*||H_superego||)
[0106] The calculation details are as follows: The formula calculates the cosine of the angle between two state vectors H_id and H_superego, and then subtracts this value from 1. The range of the result D is [0, 2]. D equals 0, indicating that the two vectors have the same direction (no conflict); D equals 1, indicating that the two vectors are orthogonal (semantically unrelated); D equals 2, indicating that the two vectors have completely opposite directions (direct conflict).
[0107] However, this invention is not limited to cosine distance. Those skilled in the art will understand that other metrics capable of measuring vector differences are equally applicable and fall within the scope of this invention. For example, in other embodiments, Euclidean distance or Manhattan distance can be used to calculate semantic conflict scores.
[0108] In another embodiment, the cognitive dissonance detector can employ a model-based approach. For example, it can be implemented as a trained lightweight discriminator network, such as a small multilayer perceptron. This network takes the concatenation or difference of two state vectors H_id and H_superego as input and outputs a scalar conflict score.
[0109] Conflict threshold determination unit (107)
[0110] This is a new and crucial module that provides the decision-making benchmark—the conflict threshold T—for the decoding path selector. The configurability and transparency of this module are key to distinguishing this invention from the fuzzy conceptual framework. It can determine the value of T through at least one of the following specific paths:
[0111] Path A, an empirical static setting, finds an empirical value that strikes the best balance between precision and recall in collision detection by performing grid search and performance evaluation, such as F1 score, on a large number of benchmark sets. This method is suitable for deployments with relatively fixed application scenarios. As a parameter example, in a typical financial text analysis scenario, by performing a grid search on a labeled dataset, an initial or typical value T of 0.35 might be found to be a good balance between precision and recall.
[0112] Path B involves dynamic adaptive adjustment based on task attributes. A function or a small regression model T = f(features) is designed, taking task metadata, such as whether the task type is 'legal review' or 'creative writing', the specificity of the query, and the authority level of external documents, as feature inputs. The most suitable T value for the current task is calculated in real time. This makes the system perform more intelligently and appropriately across different tasks.
[0113] Path C, based on unsupervised data distribution-based automatic calibration, continuously collects a large number of conflict scores D during system operation and statistically models their overall distribution, for example, using a Gaussian Mixture Model (GMM). The algorithm automatically finds the "troughs" or class boundaries in the distribution and uses them as a data-driven, adaptive threshold T. This method minimizes human intervention.
[0114] Decoding path selection and granularity control unit (104)
[0115] The functionality of this unit has been expanded, and it now includes two core responsibilities.
[0116] One key aspect is the decoding granularity control, implemented by submodule 1041, which addresses the issue of potentially excessively frequent and costly token-by-token decision-making. This submodule determines when to perform collision detection based on preset strategies. These strategies include:
[0117] Strategy A, Token-level, i.e., the original description, involves performing a complete two-stream inspection for each token generated. It has the highest computational cost but the most sensitive response.
[0118] Strategy B, phrase-level or block-level, divides the generation process into multiple blocks based on parsing or a fixed window size, such as every N tokens. Only after a block has been generated is a two-stream computation and conflict check performed on the entire block's semantics. This requires caching the generation result of one block in each of the "id" and "superego" streams, and then comparing the overall representation vectors of the two blocks. As a parameter example, a fixed window size can be set, and a two-stream computation and conflict check can be performed on the overall semantics of the block every 32 tokens generated.
[0119] Strategy C, sentence-level or delimiter-triggered, triggers a conflict detection only when the model generates a sentence-ending symbol, such as a period, question mark, or a specific delimiter. This strikes a good balance between computational efficiency and semantic integrity.
[0120] Secondly, path selection is implemented by submodule 1042. When the granularity control unit decides to perform a judgment, this submodule will perform path selection. To further improve the robustness of the decision, this invention can adopt a hysteresis threshold or decision fuzzy zone mechanism. The mechanism is defined as follows: define a low threshold T_low and a high threshold T_high, for example, T_low = 0.2, T_high = 0.4. The decision rule is as follows: if the conflict score D is less than T_low, then the "consistency path" is selected deterministically; if the conflict score D is greater than T_high, then the "conflict and reconciliation path" is selected deterministically; if T_low is less than or equal to D and D is less than or equal to T_high, then the system enters a "fuzzy decision state". In this state, a preset conservative strategy is executed, such as generating text indicating uncertainty ("Regarding this point, there is some inconsistent information..."), or marking the decision point for subsequent manual review or multi-step reasoning. If a hysteresis threshold is not used, a single threshold T is used for judgment: if D is less than T, the "consistency path" is selected; if D is greater than or equal to T, the "conflict and reconciliation path" is selected.
[0121] Reconciliation Synthesis Module (105)
[0122] The implementation details of this module are specified to address potential criticisms that its internal mechanisms are like a black box. It is designed to achieve its functionality through at least one specific path, each emphasizing different aspects of controllability, flexibility, and output quality:
[0123] Path A, a high-guarantee rule and template engine, is the most controllable and interpretable approach, suitable for the highest-risk applications. It includes a predefined, rigorously audited conflict template library and a deterministic rule engine. The rule engine selects and fills a template based on the conflict score D and the core conflict content extracted from H_id and H_superego using deterministic methods, such as finding the most relevant terms to the difference vector, ultimately generating a reconciliation instruction vector V_rec. The output of this path is completely predictable, with no risk of generating illusions.
[0124] Path B is a flexible and lightweight Seq2Seq model that trains a small, independent sequence-to-sequence model specifically for the "reconciliation" task. Its input consists of two conflicting state vectors and a conflict score, and its output is a more natural and diverse reconciliation instruction vector or simply the reconciliation text. While there is a slight risk of secondary illusions, its greater flexibility and higher generation quality make it suitable for scenarios requiring natural output. This risk can be controlled through high-quality training data and rigorous output validation.
[0125] Path C, the Dynamic Cross-Attention Analysis System, is a hybrid approach. It dynamically and without training identifies conflicting "focal" lexical units by calculating the cross-attention distributions of H_id and H_superego over a unified input context, and then comparing the differences between these two distributions. These focal lexical units are then used as core content and fed into a relatively simple template engine for combination, generating V_rec.
[0126] The system also features an intelligent switching mechanism that dynamically selects the most suitable path based on the range of conflict scores (D). For example, for severe conflicts with high D values, path A is forced to ensure safety; for moderate conflicts, path B is used to achieve a more natural expression.
[0127] Output synthesis and assembly unit (106)
[0128] This unit is responsible for seamlessly splicing together the various segments in the decoding process into the final coherent output.
[0129] Under the consistent path, it generates text based on the state vector of the "superego" flow. Prioritizing the "superego" flow is to consistently enforce the "fact-first" principle.
[0130] Under the reconciliation path, it parses V_rec and generates a reconciliation text accordingly. For example: "Although the general view is [a summary of the ego extracted from V_rec], according to the [document source] you provided, the specific case is [a summary of the superego extracted from V_rec]."
[0131] Regarding assembly, if phrase-level or sentence-level decoding granularity is adopted, this unit is also responsible for assembling these text fragments generated under different paths into a grammatically fluent and logically coherent complete paragraph through smooth transition conjunctions and other means.
[0132] Regarding context management, this unit is also responsible for appending newly generated text fragments back to the unified input context and maintaining the context according to preset context management strategies, such as sliding windows, preservation of authoritative information, and summary compression, to prevent performance degradation in long conversations.
[0133] Example 2: Detailed Explanation of the Overall Method Flow
[0134] Please see Figure 2 The figure describes in detail the complete method flow 200 of a preferred embodiment of the present invention.
[0135] Step S201: Receiving and preprocessing multi-source input. The system starts up and receives user queries and a set of external authoritative documents that may come from different sources. The multi-source preprocessing submodule 1011 of the input processing and context building unit 101 is activated, performing operations such as source sorting, consistency verification, and deduplication.
[0136] Step S202: Construct a unified initial context. Based on the preprocessed information, the system constructs a structured unified initial context containing all necessary information to prepare for subsequent two-stream computation.
[0137] Step S203, Decoding Granularity Judgment. At the beginning of each decoding time step, the granularity control submodule 1041 of the decoding path selection and granularity control unit 104 is first invoked. It determines whether conflict detection needs to be performed based on preset strategies, such as token-level, phrase-level, and sentence-level. If the judgment is "no," for example, in the middle of a phrase, the system will directly jump to a simplified generation step, for example, continue generating on the "consistency path," and then proceed to the next time step, returning to this step. If the judgment is "yes," the process continues.
[0138] Step S204, dual-stream parallel computation. Based on the current unified context, the dual-stream cognitive engine 102 performs "id" stream computation (S2041) and "superego" stream computation (S2042) in parallel to obtain H_id and H_superego, respectively.
[0139] Step S205: Calculate the semantic conflict score. The cognitive dissonance detector 103 calculates the semantic conflict score D between H_id and H_superego.
[0140] Step S206: Determine the conflict threshold T. The conflict threshold determination unit 107 is invoked to calculate the currently applicable threshold T according to its preset strategy, whether static, dynamic, or unsupervised.
[0141] Step S207, Comparison and Path Selection. The path selection submodule 1042 of the decoding path selection and granularity control unit 104 compares the score D with the threshold T. If D is less than T, the process proceeds to step S208, consistency generation; if D is greater than or equal to T, the process proceeds to step S209, reconciliation synthesis.
[0142] Step S208, Consistency Generation. In this path, the output synthesis and assembly unit 106 primarily generates the next text fragment based on H_superego. After generation, the process jumps to step S211.
[0143] Step S209, reconciliation synthesis. Under this path, the reconciliation synthesis module 105 is activated. It generates a structured reconciliation instruction vector V_rec based on a preset technical path, such as a rule engine or a small model.
[0144] Step S210: Perform reconciliation generation. Output the synthesis and assembly unit 106 to parse V_rec and generate a text fragment that explicitly resolves the conflict.
[0145] Step S211, Output Assembly and Context Update. The text fragments generated in either step S208 or S210 are assembled into the final output sequence in this step. Simultaneously, the fragment is also appended to the unified input context for computation in the next decoding cycle.
[0146] Step S212: Determine if generation is complete. The system checks if the termination conditions have been met, such as generating the termination flag [EOS] or reaching the preset maximum length. If "No", return to step S203 to begin processing the next decoding granularity. If "Yes", the process ends.
[0147] Step S213: Output the complete result. Present the final assembled, coherent, and highly reliable text sequence to the user.
[0148] Example 3: Analysis of Core Working Principle
[0149] Please see Figure 3 This diagram visually illustrates the core workflow of this invention: "conflict quantification - path diversion - conflict resolution".
[0150] The input (301, 302) is a parallel-generated state vector H_id representing the “id” and the state vector H_superego representing two opposing cognitive modes.
[0151] Conflict quantification (303) refers to the cognitive dissonance detector transforming a vague, intrinsic “cognitive conflict” into a clear, measurable scalar value by calculating the “distance” or “angle” between two things in a high-dimensional semantic space, such as the cosine distance D.
[0152] The path decision (304) step is like a "gating" system in a nervous system. It compares the quantified conflict signal D with a carefully determined benchmark, namely the threshold T. This benchmark T itself is dynamic and intelligent, provided by unit 107, to ensure the rationality of the decision.
[0153] The diversion process includes a consistency path (305), where the system adopts the principle of "trusting facts" and generates efficiently and accurately along the "superego" flow when the conflict is not significant (307); and a conflict and reconciliation path (306), where the system activates its most unique critical thinking ability when a significant conflict is detected. It is not a simple either-or choice, but rather initiates a dedicated "reconciliation" procedure, which generates a structured solution aimed at explaining and bridging the differences through a reconciliation synthesis module, namely a reconciliation instruction vector V_rec, and generates a reconciliation text based on it (308).
[0154] The final output synthesis refers to the final output being either a verified statement of fact or a well-thought-out explanation of conflict. This cycle ensures that each step of the model's output is either a verified fact or a clear explanation of the discrepancy between the fact and internal cognition, thereby fundamentally eliminating the space for the "illusion of conformity."
[0155] Example 4: Hardware Implementation Environment
[0156] Please see Figure 4 The figure illustrates a typical computer system hardware environment 400 that can be used to implement the system and method described in this invention. This environment can be a single high-performance workstation, a distributed server cluster, or a cloud computing infrastructure.
[0157] The environment includes a central processing unit (CPU) 401, which is responsible for executing the main logical control flow of the system, such as user interaction, task scheduling, and a large number of logical judgments and control flows involved in this invention, such as granularity judgment and path selection.
[0158] The environment includes memory (RAM) 402, which serves as a high-speed workspace for storing the running operating system, the application code of this invention, the massive parameters of the large language model core 110, and various intermediate data generated during the decoding process, such as unified context, state vectors H_id and H_superego.
[0159] This environment includes a hardware accelerator (GPU / TPU) 403, which is crucial for performing the core computational tasks of this invention. The forward propagation of the large language model, particularly the "two-stream parallel computation" in this invention, involves a large number of matrix multiplications and tensor operations, which will be performed efficiently and in parallel on the hardware accelerator, thereby keeping the latency increase caused by two-stream computation within an acceptable range.
[0160] The environment includes a storage device (SSD / HDD) 404, a long-term storage operating system 405, the software application of the present invention 406, the core weight file of the large language model, and user data and external knowledge bases that may need to be persisted.
[0161] This environment includes network interface 407, which is responsible for communication between the system and external networks, receiving user requests and external data, and returning processing results.
[0162] This environment includes a system bus 408, which connects all the above components and ensures the smooth flow of data and control signals.
[0163] The systems and methods of the present invention may be embodied as computer program instructions stored on a non-transitory computer-readable medium, such as storage device 404. During runtime, these instructions are loaded into memory 402 and executed collaboratively by processor 401 and hardware accelerator 403 to achieve all or part of the functions described herein.
[0164] Example 5: Core Algorithm Flow and Feasibility Analysis
[0165] To further illustrate the feasibility of this invention, this embodiment provides pseudocode for the core inference loop and analyzes its performance impact.
[0166] 1. Core reasoning loop pseudocode
[0167] The following pseudocode clearly demonstrates the complete closed loop described in this invention, from context construction to granularity judgment, two-stream computation, conflict quantification, path selection, and final text generation, proving its logical feasibility:
[0168] ---Auxiliary function definition (for clarity, it is assumed to be implemented)---
[0169] build_unified_context(query,documents,prompts): Builds a structured context and attention mask based on the input.
[0170] is_generation_complete(text): Checks whether the generation end condition is met (such as encountering EOS or reaching the maximum length).
[0171] should_perform_dissonance_check(text, granularity): Determines whether the current point is a conflict detection point based on the preset granularity.
[0172] model_get_hidden_state(context,attention_mask): The model is propagated forward, mainly to obtain the final layer hidden state for comparison.
[0173] model_generate_next_segment(context, attention_mask): The model generation process used to generate the next text segment.
[0174] calculate_cosine_distance(h1,h2): Calculates the cosine distance between two state vectors.
[0175] get_conflict_threshold(metadata): Dynamically determines the conflict threshold based on context metadata.
[0176] reconciliatory_synthesis(h_id,h_superego,D): Generates a structured reconciliation instruction vector V_rec based on the conflict information.
[0177] `generate_text_from_reconciliation(v_rec)`: Parses the reconciliation instructions and generates the reconciliation text.
[0178] def trustworthy_reasoning_loop(query,documents,system_prompts):
[0179] """
[0180] The pseudocode implementation of the core trusted reasoning loop of this invention.
[0181] """
[0182] #Steps S201, S202: Construct the initial context and mask
[0183] #context contains the token ID, and masks contain attention masks for the "id" and "superego" streams.
[0184] context,masks=build_unified_context(query,documents,system_prompts)
[0185] ID_ATTENTION_MASK=masks['id_mask']
[0186] SUPEREGO_ATTENTION_MASK=masks['superego_mask']
[0187] generated_text=""
[0188] #Initialize the decoding path; the default is the "consistent path".
[0189] current_path = 'CONSISTENCY'
[0190] #Step S212: Loop until the termination condition is met.
[0191] while not is_generation_complete(generated_text):
[0192] #Step S203: Decoding Granularity Determination
[0193] if should_perform_dissonance_check(generated_text,granularity="sentence"):
[0194] #---Cognitive Disorder Detection Process---
[0195] #Step S204: Obtain the dual-stream state vector in parallel
[0196] H_id=model_get_hidden_state(context, attention_mask=ID_ATTENTION_MASK)
[0197] H_superego=model_get_hidden_state(context, attention_mask=SUPEREGO_ATTENTION_MASK)
[0198] #Step S205: Calculate semantic conflict score
[0199] D=calculate_cosine_distance(H_id,H_superego)
[0200] #Step S206: Determine the conflict threshold
[0201] #context_metadata can be extracted from the context, such as document source, query type, etc.
[0202] T=get_conflict_threshold(context_metadata=context['meta data'])
[0203] #Step S207: Compare and select paths, update the current decoding path
[0204] if D>=T:
[0205] current_path='RECONCILIATION'
[0206] else:
[0207] current_path = 'CONSISTENCY'
[0208] #---Generate the next paragraph of text based on the selected path---
[0209] if current_path=='RECONCILIATION':
[0210] #Step S209: Generate reconciliation instructions (Note: H_id, H_superego, D come from the detection process above)
[0211] V_rec=reconciliatory_synthesis(H_id,H_superego,D)
[0212] #Step S210: Perform reconciliation generation
[0213] next_text_segment=generate_text_from_reconciliation(V_rec)
[0214] #Conflict resolved. The next granularity interval will revert to a consistent path by default, awaiting the next check.
[0215] current_path = 'CONSISTENCY'
[0216] else:#current_path=='CONSISTENCY'
[0217] #Step S208: Perform consistency generation
[0218] #Continue generating along the "superego" path (fact-following)
[0219] next_text_segment=model_generate_next_segment(context, attention_mask=SUPEREGO_ATTENTION_MASK)
[0220] #Step S211: Output Assembly and Context Update
[0221] generated_text+=next_text_segment
[0222] context.append_tokens(next_text_segment) # Updates the context with the newly generated tokens.
[0223] #Step S213: Return the complete result
[0224] return generated_text
[0225] 2. Feasibility and performance analysis of the method
[0226] Regarding dual-stream parallel scheduling, in practical engineering implementations, "parallel" computation in two streams usually refers to logical parallelism within the same decoding time step. In a single-GPU environment, this can be efficiently achieved through two consecutive forward passes: one using a standard attention mechanism (or soft guidance for the "ego" stream), and the other using a mandatory attention mask for the "superego" stream. Since the two computations share most of the model weights and inputs, modern deep learning frameworks can optimize this process well. In multi-GPU or distributed environments, the two forward passes can even be scheduled onto different computing units to achieve physical parallelism.
[0227] Regarding performance and resource requirements, the primary computational overhead of this invention stems from two-stream computation. At each step of conflict detection, the computational cost is approximately twice that of the standard generation model. However, the decoding granularity control mechanism of this invention is crucial for managing this overhead. For example, if a "sentence-level" granularity is used, the double overhead only occurs at the end of each sentence, while token generation within a sentence is comparable to the standard model's overhead. Therefore, the overall performance overhead is not simply doubled, but rather between 1x and 2x, depending on the chosen granularity. For instance, in a scenario with an average sentence length of 20 tokens, sentence-level detection results in an average computational cost of approximately (19 * 1x + 1 * 2x) / 20 = 1.05x, representing only a 5% increase in computation. For high-risk, high-value applications such as finance, law, and healthcare, this overhead is a perfectly reasonable and controllable cost necessary to achieve unprecedented reliability and trustworthiness.
[0228] In summary, this invention addresses the core deficiencies of existing technologies by disclosing a reliable reasoning system and method for a large language model based on dual-stream cognitive dissonance and reconciliation synthesis. Those skilled in the art should understand that the embodiments disclosed above are merely preferred examples of this invention and are not intended to limit the scope of protection of this invention. Obviously, those skilled in the art can make various modifications, equivalent substitutions, or improvements to the above embodiments without departing from the spirit and technical principles disclosed in this invention. For example, the state vector metric function, the conflict threshold determination strategy, the granularity control method of decoding, and the specific implementation path of reconciliation synthesis can all adopt other technical solutions that are not exhaustively described in this specification but are functionally equivalent. Therefore, any modifications or variations based on the core ideas of this invention without creative effort should fall within the protection scope of the appended claims.
Claims
1. A reliable reasoning system based on a large language model using dual-stream cognitive dissonance and reconciliation-based synthesis, characterized in that, include: An input processing and context building unit is configured to receive user queries and at least one external authoritative document, and build a unified, structured input context accordingly. A dual-stream cognitive engine is configured to execute, at a preset decoding granularity, in parallel a "self" stream for simulating unconstrained thinking of the model to generate a "self" state vector, and a "superego" stream for generating a "superego" state vector by imposing a mandatory attention mask to strictly follow the external authoritative document. A cognitive dissonance detector is configured to compute a semantic conflict score between the two state vectors; A decoding path selection and granularity control unit is configured to compare the semantic conflict score with a conflict threshold and select between a "consistent path" and a "conflict and reconciliation path" accordingly. A reconciliation synthesis module is configured to generate a structured reconciliation instruction vector when a "conflict and reconciliation path" is selected; and An output synthesis and assembly unit is configured to generate text based on the selected path, according to the "superego" state vector or the reconciliation instruction vector.
2. The system according to claim 1, characterized in that, The cognitive dissonance detector is configured to determine the semantic conflict score using a method selected from the group consisting of: Calculate the vector space distance between the two state vectors; or The two state vectors are processed by a trained discriminator model.
3. The system according to claim 2, characterized in that, When calculating the distance in the vector space, the distance is selected from the group consisting of: cosine distance, Euclidean distance, or Manhattan distance.
4. The system according to claim 1, characterized in that, The system also includes a conflict threshold determination unit configured to determine the conflict threshold using a strategy selected from the group consisting of: An empirical static value determined based on performance evaluation is adopted; Dynamic adaptive adjustment based on task metadata; or Unsupervised automatic calibration is performed based on the statistical distribution of semantic conflict scores.
5. The system according to claim 1, characterized in that, The decoding path selection and granularity control unit is configured to determine the timing of conflict detection based on decoding granularity selected from the group consisting of: token-by-token, phrase-by-phrase, or sentence-by-sentence.
6. The system according to claim 1, characterized in that, The input processing and context building unit also includes a multi-source preprocessing submodule, which is configured to process multiple external authoritative documents using a strategy selected from a group including: Weighting or sorting based on source credibility; Perform semantic consistency checks to identify and flag potential conflicts; or Filter or sort based on relevance to the user's query.
7. The system according to claim 1, characterized in that, The reconciliation synthesis module is configured to generate the reconciliation instruction vector using a technique path selected from a group including the following, the selection of which is determined by the range of the semantic conflict score: A mapping system based on deterministic rules and a pre-defined template library; A trained lightweight sequence-to-sequence model; or An analysis system based on the cross-attention mechanism.
8. The system according to claim 1, characterized in that, The decoding path selection and granularity control unit employs a hysteresis threshold mechanism, which defines a low threshold T_low and a high threshold T_high for selecting between the "consistency path", the "conflict and reconciliation path", and a preset conservative strategy.
9. A reliable reasoning method for a large language model based on dual-stream cognitive dissonance and reconciliation-based synthesis, characterized in that, Includes the following steps: a. Construct a unified context: Receive user queries and at least one external authoritative document, and construct a structured unified input context; b. Parallel execution of dual-stream computation: At a preset decoding granularity, based on the unified input context, a "self" computation stream is executed in parallel to generate a "self" state vector, and a "superego" computation stream is executed to generate a "superego" state vector; c. Calculate the conflict score: Calculate the semantic conflict score between the two state vectors; d. Comparison and Path Selection: The semantic conflict score is compared with a conflict threshold, and a "consistency path" or a "conflict and reconciliation path" is selected accordingly; and e. Generate text based on the path: If the "Consistency Path" is selected, text is generated based on the "Superego" state vector; if the "Conflict and Reconciliation Path" is selected, reconciliation text that explains and resolves the conflict is generated.
10. The method according to claim 9, characterized in that, The method further includes: The conflict threshold is determined using a strategy selected from the group consisting of static values, dynamic adjustments, or unsupervised calibration; and When the "Conflict and Reconciliation Path" is selected, the reconciliation text is generated using a technique path selected from a group including rule mapping, sequence-to-sequence modeling, or cross-attention analysis.
Citation Information
Cited By
Multi-modal geospatial data large model situation analysis method and system
CN121189460A
A multi-modal geospatial data large model situation analysis method and system
CN121189460B