Large-scale inference model optimization control method and device based on stage-momentum alignment

By monitoring the reasoning process of large-scale inference models in real time and using look-ahead entropy and net inference momentum to identify cognitive stages and thinking patterns, this technology solves the problems of unreliable intervention decisions and real-time intervention in existing technologies, achieving efficient utilization of computing resources and improved accuracy.

CN122472191BActive Publication Date: 2026-11-06UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610464854.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-09
Publication Date
2026-11-06
Estimated Expiration
2046-04-09

AI Technical Summary

Technical Problem

When optimizing large-scale inference models, existing technologies suffer from unreliable intervention decisions due to reliance on fuzzy entropy signals by information theory-based methods, while methods based on latent representation analysis cannot achieve real-time intervention due to posterior analysis patterns, resulting in wasted computational resources and inference delays.

Method used

By acquiring the reasoning context in real time, calculating the prospective entropy and net reasoning momentum, and combining a lightweight assessment model and hidden layer representation, the cognitive reasoning stage and thinking pattern of the model can be identified, triggering corresponding reasoning intervention strategies and forming a real-time monitoring-diagnosis-intervention closed loop.

Benefits of technology

Significantly reduce computational overhead, improve inference efficiency, maintain or enhance task accuracy, and achieve synergistic optimization of efficiency and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122472191B_ABST
    Figure CN122472191B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of artificial intelligence, and particularly relates to a large-scale reasoning model optimization control method and device based on stage-momentum alignment. The method comprises the following steps: acquiring a reasoning context in real time in a model reasoning generation process, calculating a forward entropy value through a lightweight evaluation model to determine a cognitive reasoning stage; responding to a stable conversion event in the stage, extracting a hidden layer representation and calculating a net reasoning momentum; comparing the reasoning stage and the net reasoning momentum to identify a thinking mode; triggering a corresponding reasoning intervention strategy according to the mode to control subsequent generation behaviors of the model. The application adopts an event triggering mechanism to realize lightweight real-time monitoring and dynamic intervention, can significantly reduce reasoning calculation overhead, and realizes the synergistic optimization of efficiency and performance while improving intervention accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence technology, specifically relating to a method and apparatus for optimizing control of large-scale inference models based on stage-momentum alignment. Background Technology

[0002] In the field of artificial intelligence, performance optimization of large-scale reasoning models (i.e., large language models that excel at complex multi-step reasoning tasks) is crucial. Currently, mainstream test-time scaling strategies improve answer accuracy by guiding the model to generate detailed thought chains, but this also leads to the technical problem of "overthinking," which generates a large amount of redundant or circular reasoning, significantly increasing computational overhead, inference latency, and wasting hardware computing resources.

[0003] To optimize this process, existing technologies mainly fall into two categories. One category is information theory-based methods, which use a lightweight surrogate model for real-time evaluation: based on the generated thought chain, it predicts the probability distribution of all possible final answers and calculates the entropy of this distribution to measure uncertainty, thus deciding whether to stop generation. However, the criterion (entropy) for this type of method has inherent ambiguity: low entropy may correspond to the model's high confidence in its generated incorrect answers ("deceptive convergence"), while high entropy may reflect beneficial exploration, leading to inaccurate stopping decisions and the inability to terminate ineffective computations in a timely manner. The other category is latent representation analysis-based methods, which evaluate inference quality by analyzing changes in the features of the hidden layers within the model. This type of method provides deeper insights, but its analysis is usually a posteriori, requiring long, already generated inference chains, thus lacking real-time capability and unable to implement dynamic intervention during the inference process, leaving the problem of wasted computational resources unresolved.

[0004] In summary, existing optimization schemes have clear technical shortcomings: information theory-based methods rely on fuzzy entropy signals, leading to unreliable intervention decisions; and representation analysis-based methods, due to their posterior analysis model, cannot meet the needs of real-time intervention. This application aims to address the aforementioned technical problems of large-scale inference models by providing a real-time and accurate inference optimization solution. Summary of the Invention

[0005] This application proposes an optimization control scheme for large-scale inference models based on stage-momentum alignment, aiming to solve the technical problems in existing optimization techniques where intervention decisions are unreliable due to reliance on fuzzy entropy signals, and where real-time intervention in the inference process cannot be achieved due to the use of posterior representation analysis.

[0006] The first aspect of this application provides an optimization control method for large-scale inference models based on stage-momentum alignment, which includes: During the reasoning generation process of the large-scale reasoning model, the reasoning context of the current reasoning step is obtained in real time; Based on the reasoning context, a forward entropy value describing the cognitive uncertainty of the model is calculated using a lightweight evaluation model, and the cognitive reasoning stage of the model is determined based on the forward entropy value. In response to the stable transition event of the cognitive reasoning stage, the representation of the reasoning context in the model hidden layer space is analyzed, and the net reasoning momentum of the semantic advancement effort within the representation is calculated. The cognitive reasoning stage is jointly compared with the net reasoning momentum to identify the current thinking mode of the model; Based on the identified thought patterns, a reasoning intervention strategy corresponding to the thought patterns is triggered to control the subsequent generation behavior of the model.

[0007] In some embodiments of this application, the lightweight evaluation model includes a small inference model obtained through knowledge distillation.

[0008] In some embodiments of this application, the look-ahead entropy value Calculated using the following formula: , in, Represents the set of candidate final answers One of the elements; Indicates from the beginning to the number The reasoning context of the steps, The parameters of the lightweight evaluation model are represented. This indicates that the lightweight evaluation model and the inference context are used as a basis. Generate candidate answers The normalized probability.

[0009] In some embodiments of this application, determining the current cognitive reasoning stage of the model based on the prospective entropy value includes: Based on the prospective entropy value, the cognitive reasoning stage is determined by an entropy finite state machine. The entropy finite state machine is configured as follows: In the current time window Within this range, if all look-ahead entropy values ​​are less than the threshold... If so, it is determined to be in the thinking convergence stage; If all forward entropy values ​​are greater than the initial uncertainty If so, it is determined to be the divergent thinking stage; If any of the above conditions are not met, the state is determined to be uncertain; in, For the theoretical maximum entropy, This represents the average of the look-ahead entropy values ​​over the initial time period. It is a hyperparameter in the interval (0,1).

[0010] In some embodiments of this application, the stable transition event includes the output of the entropy finite state machine transitioning from an uncertain state to a stable convergent state or divergent state.

[0011] In some embodiments of this application, the analysis of the representation of the inference context in the model hidden layer space includes: Extracting the inference context at the end of the large inference model The hidden layer vector representation of the layer is used for analysis, where It is an integer greater than 1.

[0012] In some embodiments of this application, the net inference momentum Calculated using the following formula: , in, For local semantic gain, For the intensity of global thinking, These are the weighting coefficients. Indicates the global thinking intensity The absolute value of the second-order difference is used to approximate its curvature; The local semantic gain The calculation formula is: , in For the first The semantic center of the step is calculated as the mean of the selected hidden layer vector representation. Represents a geometric distance metric. This represents the step index of the large-scale inference model in the inference generation process; The intensity of global thinking The calculation formula is: , in, Defined as the first in the model The Transformer module represents the complete context sequence as a mean-pooled representation vector. This represents the total number of layers in the model. This indicates the number of hidden layers used to calculate net inference momentum, counted backwards from the last layer of the large inference model.

[0013] In some embodiments of this application, the step of jointly comparing the cognitive reasoning stage with the net reasoning momentum to identify the current thinking mode of the model includes: If the current stage is divergent thinking and the net inference momentum is below the relaxation threshold If so, it is identified as a stagnant pattern of misalignment; If the current thought convergence phase is in place and the net inference momentum is below the relaxation threshold. If so, it is identified as a synchronized and aligned healthy mode; If, after the healthy pattern of synchronization alignment has been identified, the cognitive reasoning stage re-enters the divergent thinking stage, it is identified as a convergent repetitive pattern.

[0014] In some embodiments of this application, triggering a reasoning intervention strategy corresponding to the identified thought pattern includes: If the stated thought pattern is a synchronized and aligned healthy pattern, then a successful truncation will be performed; If the thought pattern is a stagnant pattern of misalignment, then failure truncation will be performed; If the thought pattern is a convergent repetition pattern, then the reasoning process is maintained.

[0015] A second aspect of this application provides a large-scale inference model optimization control device based on stage-momentum alignment, comprising: The context acquisition module is used to acquire the reasoning context of the current reasoning step in real time during the reasoning generation process of the large reasoning model. The cognitive reasoning stage determination module is used to calculate a prospective entropy value describing the cognitive uncertainty of the model based on the reasoning context and a lightweight evaluation model, and to determine the current cognitive reasoning stage of the model based on the prospective entropy value. The net inference momentum determination module is used to analyze the representation of the inference context in the model hidden layer space in response to the stable transition event of the cognitive inference stage, and calculate the net inference momentum of the semantic advancement effort within the representation. The thinking pattern recognition module is used to jointly compare the cognitive reasoning stage with the net reasoning momentum in order to identify the current thinking pattern of the model. The reasoning intervention strategy triggering module is used to trigger the reasoning intervention strategy corresponding to the identified thinking pattern, so as to control the subsequent generation behavior of the model.

[0016] In summary, the large-scale inference model optimization control method and apparatus based on stage-momentum alignment proposed in this application firstly quantifies the internal semantic advancement effort by calculating the net inference momentum represented by the hidden layer of the model, providing an internal observation dimension that complements the entropy signal (cognitive stage). Joint comparison of the two can effectively distinguish between "deceptive convergence" and healthy convergence, thus solving the defect of unreliable intervention decisions due to reliance on fuzzy entropy signals. Secondly, by designing an event-triggered mechanism, momentum calculation is triggered only when entropy monitoring determines a stable transition in the cognitive stage. This on-demand deep analysis mode avoids continuous high overhead, enabling high-frequency, real-time diagnosis and dynamic intervention based on internal states, thus solving the defect of being unable to achieve real-time intervention in the inference process due to the use of posterior representation analysis. Finally, the above features are tightly coupled based on the "stage-momentum alignment" assumption, forming a complete real-time monitoring-diagnosis-intervention closed loop. This scheme can significantly reduce the computational overhead of the inference process (such as the number of tokens) while maintaining or improving task accuracy, achieving synergistic optimization of efficiency and performance. Attached Figure Description

[0017] The features and advantages of this application will become clearer with reference to the accompanying drawings, which are illustrative and should not be construed as limiting the application in any way. In the drawings: Figure 1 This is a schematic diagram comparing the cognitive stage and the evolution of reasoning momentum in a large-scale reasoning model, where: Figure 1 a represents an active exploration model; Figure 1 b represents a passive stagnation mode; Figure 2 This is a schematic diagram of the overall framework of an inference optimization method for a large inference model based on stage-momentum alignment, as shown in some embodiments of this application. Figure 3 This is an exemplary computer system architecture diagram to which the inference optimization method based on the stage-momentum alignment large inference model of this application applies; Figure 4 This is a flowchart illustrating an inference optimization method for a large inference model based on stage-momentum alignment, according to some embodiments of this application; Figure 5 This is a comparison of the accuracy and token consumption of the method described in this application with the baseline method; Figure 6 This is a schematic diagram of a large-scale inference model optimization control device based on stage-momentum alignment, according to some embodiments of this application. Detailed Implementation

[0018] In the following detailed description, numerous specific details of this application are illustrated by example to provide a thorough understanding of the relevant disclosure. However, it will be apparent to those skilled in the art that this application can be practiced without these details. It should be understood that the terms “system,” “apparatus,” “unit,” and / or “module” used in this application are one way of distinguishing different parts, elements, sections, or components at different levels in a sequential arrangement. However, these terms may be replaced with other expressions if other expressions can achieve the same purpose.

[0019] It should be understood that when a device, unit, or module is referred to as being "on," "connected to," or "coupled to" another device, unit, or module, it may be directly connected to or coupled to or communicate with other devices, units, or modules, or there may be intermediate devices, units, or modules present, unless the context explicitly indicates otherwise. For example, the term "and / or" as used herein includes any one and all combinations of one or more of the relevant listed items.

[0020] The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates otherwise, words such as "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate that explicitly identified features, integrals, steps, operations, elements, and / or components are included, and such expressions do not constitute an exclusive list, and other features, integrals, steps, operations, elements, and / or components may also be included.

[0021] Referring to the following description and accompanying drawings, these and other features and characteristics, operating methods, functions of related structural elements, combinations of parts, and economics of manufacture of this application can be better understood, wherein the description and drawings form part of the specification. However, it is clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. It is understood that the drawings are not drawn to scale.

[0022] Various structural diagrams are used in this application to illustrate various variations of the embodiments according to this application. It should be understood that the preceding or following structures are not intended to limit this application. The scope of protection of this application is determined by the claims.

[0023] In the engineering practice of artificial intelligence reasoning systems, large-scale reasoning models (usually referring to models specifically designed or optimized for handling complex, multi-step reasoning tasks based on large-scale language models, such as OpenAI o1 and DeepSeek) are used. R1 typically requires extended computation to generate answers, meaning the output includes a "thought chain" containing intermediate reasoning steps. However, this process is highly susceptible to "overthinking": the model may get stuck in circular reasoning or generate a large amount of redundant content. This inefficient cognitive state directly leads to the unnecessary consumption of computing resources, a significant increase in inference latency, and a decrease in hardware energy efficiency at the system level, becoming a key technical bottleneck restricting its deployment in high-load or real-time scenarios.

[0024] Existing optimization schemes mainly fall into two categories, but both suffer from clear technical shortcomings. First, information-theoretic methods (such as monitoring the entropy of the model's probability distribution of the final answer) rely on fuzzy entropy signals, making it difficult to distinguish between the model's "confident convergence" (i.e., "deceptive convergence") to incorrect answers and genuinely beneficial explorations, thus leading to unreliable intervention decisions. Second, methods based on latent representation analysis require analysis of the entire generated inference chain due to their posterior representation analysis, lacking dynamic sensitivity and therefore unable to achieve real-time intervention in the reasoning process. Therefore, current technologies lack a means to perform real-time, accurate state diagnosis of the reasoning process and implement effective computational control.

[0025] To address the aforementioned systemic efficiency and real-time control issues, this application proposes a phase-based approach. A method for optimizing inference in large-scale inference models based on momentum alignment awareness. This application's method is based on a key finding: Figure 1 (A schematic diagram comparing the cognitive stages and the evolution of reasoning momentum in a large-scale reasoning model) shows that successful reasoning and failed reasoning differ fundamentally in their internal signal evolution. Among these differences, Figure 1 a demonstrates an active exploration mode, characterized by a sharp decrease in entropy (cognitive uncertainty) and a high value of potential momentum (semantic propulsion effort) that is tightly coupled. Figure 1 b shows a negative stagnation pattern, characterized by a persistent high-entropy state and gradually disappearing potential momentum, indicating that the model has stopped thinking effectively and has fallen into "cognitive stagnation".

[0026] Based on the above "stages" Based on the "momentum alignment hypothesis," this application designs a lightweight optimization framework that can be embedded in inference loops. For example... Figure 2(A schematic diagram of the overall framework of the reasoning optimization method based on stage-momentum alignment for large-scale reasoning models is shown.) This framework uses an entropy-based finite state machine to determine the cognitive stage in real time, and initiates a geometric momentum quantization module to calculate the net reasoning momentum through an event-triggered mechanism. Finally, a thought pattern recognition and adaptive intervention module jointly analyzes the two to accurately identify thought patterns such as "Healthy" and "Stagnant," and adaptively triggers intervention strategies (such as truncation) accordingly. This method achieves low-overhead, real-time state monitoring and resource control of the reasoning process, thereby effectively optimizing the trade-off between computational efficiency and reliability. The implementation of the method described in this application will be described in detail below with reference to the accompanying drawings.

[0027] Figure 3 This is an exemplary computer system architecture diagram to which the inference optimization method based on the stage-momentum alignment of large-scale inference models in this application applies. Figure 3 As shown, the system mainly includes an interaction and input unit, an optimization and calculation unit, and a control and execution unit. Each unit interacts with other units via a communication link. Specifically: Interaction and Input Units: This unit serves as the system's front-end interactive hardware and consists of interactive clients. These can manifest as client devices such as personal computers, workstations, and mobile terminals.

[0028] It is used to receive natural language task requests initiated by users, convert the requests into standard data formats, and send them to the optimization and computing unit through the communication link, serving as the physical source of task input for the entire system.

[0029] Optimization and computation unit: This unit, serving as the core computing platform of the system, consists of inference servers. These are typically inference servers deploying large language models, and their computing cores include neural network acceleration hardware such as CPUs, GPUs, or NPUs.

[0030] Used to execute two types of core operations in parallel: Perform forward propagation computation on a large language model to generate tokens and thought chain sequences one by one; The system calculates forward entropy values ​​in real time to determine the cognitive stage. When the stage stabilizes, it triggers momentum calculation, combines entropy signals with inference momentum to identify the thinking pattern, and generates corresponding intervention decision instructions, which are then sent to the control and execution unit.

[0031] Control and Execution Unit: This unit, as a control module with high scheduling priority, consists of an inference controller. The inference controller can be an independent hardware control chip, an embedded controller, or a BMC subsystem, achieving strong real-time control through hardware interrupts; or it can be a system service, daemon process, or software scheduling module running in the optimization and computing unit, implementing intervention through software instructions.

[0032] It is used to receive intervention decisions from the optimization and computation unit. When it identifies inefficient states such as passive stagnation or deceptive convergence, it sends a termination or truncation command to the model inference process and stops redundant computation through hardware signals or software calls, thereby achieving closed-loop control of the inference process and computational resources.

[0033] User tasks are input into the system via the interaction and input unit, and the optimization and computation unit simultaneously executes model inference and phases. Momentum monitoring: After the monitoring module identifies an inefficient inference state, the control and execution unit will trigger intervention in a hardware or software manner to terminate invalid inference in a timely manner, thereby reducing computational overhead and inference latency.

[0034] The optimization and computing unit can be flexibly deployed on local terminals, edge nodes, or cloud servers according to computing power and latency requirements; the interaction and input unit and the control and execution unit can be integrated with the optimization and computing unit on the same physical device, or they can be deployed in a distributed manner to achieve collaborative work through the network.

[0035] Figure 4 This is a flowchart illustrating a large-scale inference model optimization control method based on stage-momentum alignment, according to some embodiments of this application. In some embodiments, the large-scale inference model optimization control method based on stage-momentum alignment can be... Figure 3 The inference server in the system shown executes this. Specifically, it includes the following steps: S410, during the reasoning generation process of the large-scale reasoning model, the reasoning context of the current reasoning step is obtained in real time.

[0036] S420, based on the reasoning context, calculate the prospective entropy value used to describe the cognitive uncertainty of the model through a lightweight evaluation model, and determine the cognitive reasoning stage that the model is currently in based on the prospective entropy value.

[0037] First, S410 and S420 obtain the reasoning context of the large reasoning model in the current reasoning step, calculate the probability distribution of candidate answers generated in this context through a lightweight proxy model, and calculate the look-ahead entropy value accordingly.

[0038] Specifically, to quantify the cognitive uncertainty in the reasoning process, this application defines the look-ahead entropy calculation based on a small model agent as follows: , in, Represents the set of candidate final answers One of the elements; Indicates from the beginning to the number The reasoning context of the steps, The parameters of the lightweight evaluation model are represented. This indicates that the lightweight evaluation model and the inference context are used as a basis. Generate candidate answers The normalized probability.

[0039] Then, S420 determines the current cognitive reasoning stage of the model based on the prospective entropy value.

[0040] To ensure the rigor of the judgment, the boundary conditions for this uncertainty measure are first established. Its theoretical upper bound is... From discrete output space The maximum entropy (i.e., uniform) distribution on the surface is defined as follows:

[0041] Subsequently, the initial uncertainty is defined. , (in This is done to capture the model's "intuitive prior" understanding of the problem's initial state. Based on boundary conditions, uncertainty patterns are monitored within a time window. The persistence within will affect the reasoning steps. Mapped to different stages of reasoning: , in, This indicates the convergence phase of the thought process. This indicates the divergent thinking stage; These are hyperparameters for boundary control.

[0042] Finally, the entropy-based finite state machine is formalized into a ternary state space: Any interval that fails to meet the strict convergence or divergence thresholds is classified as an uncertain state. .

[0043] S430, in response to the stable transition event of the cognitive reasoning stage, analyze the representation of the reasoning context in the model hidden layer space and calculate the net reasoning momentum of the semantic advancement effort within the representation.

[0044] To balance diagnostic accuracy and operational efficiency, this application adopts an event-triggered mechanism, which means that subsequent geometric momentum calculations are only triggered when a critical state of convergence or divergence is detected stably.

[0045] To quantify the semantic dynamics of the reasoning process, this application first extracts the reasoning steps from the beginning to the current step. The full context is at the end of the model. The hidden layer vector representation serves as the basis for subsequent analysis, as deeper layers encode rich abstract semantic information. This application then introduces two complementary metrics to characterize the geometric properties of the latent space, and finally constructs a unified geometric momentum metric based on these.

[0046] Global thinking strength

[0047] First, we will consider the intensity of our overall thinking. Defined as the ratio of cumulative interlayer transformation to net semantic displacement, it serves as a surrogate indicator of the geometric complexity of the inference process.

[0048] in, Defined as the first in the model The Transformer module performs mean pooling on the representation vector of the complete context sequence. This represents the total number of layers in the model. The function represents the number of hidden layers used to calculate net inference momentum, counted backwards from the last layer of the large inference model. This represents a geometric distance metric. This application instantiates this metric to capture angular (cosine distance) features in the latent space:

[0049] In a physical sense, ratio It quantifies the "torsion" of the path a signal takes as it propagates on a semantic manifold. A higher [torsion]... The value indicates that the model undergoes extensive internal processing, specifically by refining the latent representations through a circuitous path rather than using a direct mapping approach.

[0050] Local semantic gain

[0051] This application further introduces local semantic gain. To measure the degree of semantic transformation between reasoning steps, as the rate of semantic change of the geometric trajectory: , Here, It represents the semantic center of the current reasoning context. The changes indicate that the reasoning chain gradually stops generating new semantic content.

[0052] Net inference momentum

[0053] The two complementary indicators mentioned above can be summarized as follows: , The second term approximates the intensity curvature. This represents the acceleration of the change in the intensity of thought. Since both of these depend on angular measurements, therefore... It can be used as a robust and consistent energy function.

[0054] When the model's reasoning converges to a fixed answer, the latent representation tends to stabilize, making... From a geometric perspective, this would create a steady state on the manifold: semantic shifts disappear. The internal processing path has also become more stable. ), thus having This mathematically describes the shift from active reasoning to cognitive stagnation.

[0055] S440, The cognitive reasoning stage is jointly compared with the net reasoning momentum to identify the current thinking mode of the model.

[0056] Based on the above-established entropy uncertainty The reasoning phase and net reasoning momentum of the judgment Subsequently, this application comprehensively utilizes these indicators to characterize the "stage-momentum alignment hypothesis," focusing on the temporal synchronization between the "reasoning stage" and "momentum change," and based on their joint dynamics, it characterizes the thinking pattern. They are divided into the following three categories:

[0057] middle, This represents the relaxation threshold. To facilitate this analysis, we introduce two key timestamps: Used to mark the transition from the "divergent phase" Towards the "convergence phase" The critical point of transformation; and Used to mark when "net inference momentum" falls to a relaxation threshold. The following times (i.e.) ).

[0058] Mode I: Synchronous Alignment

[0059] In this ideal state, the model maintains high cognitive momentum throughout the entire divergent thinking phase; and the relaxation moment of net inference momentum coincides with or is slightly delayed by the moment of uncertainty resolution (i.e., From a physical perspective, this indicates that the model is actively traversing the semantic manifold. The final decrease is the result of the model successfully converging to a specific answer.

[0060] Mode II: Alignment Misalignment

[0061] In this model, cognitive momentum drops below a threshold before uncertainty is resolved. (i.e.) Although the model remains in a high-entropy state, it has stopped updating its semantic representation. This pattern embodies a kind of "abandonment" behavior: the model only generates empty labels without doing any substantial geometric work, thus inevitably veering off course and sliding into hallucinations or erroneous conclusions.

[0062] Mode III: Repetition after convergence

[0063] This pattern is defined as follows: after successfully establishing Pattern I, the generation process continues redundantly. This pattern signifies the failure of the internal termination mechanism; in this case, although the model has solved the problem, it re-exhibits a false "uncertainty," leading to a cycle of repeated verification.

[0064] S450, based on the identified thought pattern, trigger the reasoning intervention strategy corresponding to the thought pattern to control the subsequent generation behavior of the model.

[0065] Based on the identified thinking patterns This application defines a mapping function. This is used to adaptively determine executable reasoning intervention strategies.

[0066] in, It is aimed at The early cutoff measure is implemented at the exact moment when the model satisfies the healthy convergence condition (i.e., a combination of low entropy and momentum relaxation). This operation ensures that the model has converged to a definite solution. Furthermore, by eliminating the time window required for the model to drift to redundant states, this measure implicitly controls "post-convergence repetition." This phenomenon maximizes reasoning efficiency. It is aimed at The proposed early-stage intervention measures prevent the model from falling into an invalid reasoning state (i.e., losing momentum) and continuing to generate meaningless terms when faced with problems beyond its capabilities. This aims to ensure that computational resources are not wasted on logically invalid content and to effectively curb the spread of errors in the early stages. Furthermore, the intervention mechanism proposed in this application has high scalability, meaning it can be extended to intervention measures for error problems, such as "knowledge augmentation."

[0067] One embodiment of this application compares the accuracy and token consumption of the method described herein with other baseline methods on multiple datasets and models of different sizes.

[0068] Experimental setup: The embodiment uses DeepSeek-R1-Distill-Qwen-1.5B as the default proxy model. To calculate entropy uncertainty, the embodiment defines the inference step granularity as every three newline characters (...). Regarding hyperparameters, the embodiments described are set as follows: and momentum threshold and using sliding windows For geometric feature computation, the embodiments described herein extract hidden layer features from the last 25% of the model's layers. All reported results are averaged from three independent runs to reduce the impact of generation randomness. All experiments were performed on an NVIDIA A100 (80GB) GPU. The datasets selected for the embodiments include five benchmarks across three domains: GSM8k, MATH-500, and AIME 2025 for mathematical reasoning; GPQA-Diamond for scientific reasoning; and the MMLU-Pro dataset for general complex reasoning tasks. Validated models include the DeepSeek-R1-Distill series models 7B, 14B, and Qwen-QWQ-32B. Comparison benchmarks selected include the original Vanilla thinking pattern of the model itself, the state-of-the-art "ThinkorNot" method based on information theory, the state-of-the-art LT method based on hidden layer feature analysis, and the training-based AdaptThink method.

[0069] Experimental results: The comparative experiments focused on balancing inference accuracy and cost in large inference models, and used inference accuracy and token consumption as two metrics to measure the effectiveness of the method. Figure 5As shown, the embodiments illustrate a comparison of inference accuracy and token consumption between each baseline method and the method described in this application on each dataset. Overall, the method described in this application achieves significant computational cost savings across all datasets and model sizes while maintaining and even improving competitive accuracy. In particular, on the GPQA-D scientific inference dataset with a 7B-scale model, the method described in this application achieves an accuracy improvement of up to 52.95% compared to the original pedestal model (Vanilla), while simultaneously achieving a 46.38% computational cost saving, demonstrating excellent optimization performance. On the basic mathematical inference (GSM8K) task, the method described in this application achieves significant cost savings of 53.57%, 44.41%, and 34.49% on 7B, 14B, and 32B models, respectively, and in most cases achieves a positive gain in accuracy. Secondly, on the more challenging Complex Mathematical Reasoning (MATH-500) task, the method described in this application achieved accuracy improvements of 3.07%, 3.46%, and 4.10% on models of three different scales, respectively, and consistently saved more than 20% of computational overhead.

[0070] Furthermore, compared to the baseline methods of the three existing paradigms, the method described in this application achieves the optimal accuracy-efficiency tradeoff. For example, while existing latent representation-based methods (such as LT) can maintain a certain level of accuracy, they incur extremely high computational costs (e.g., an average of 6126.10 tokens on the MATH-500 7B model), the method described in this application achieves higher accuracy (87.40%) while significantly reducing the cost to 1847.71 tokens. Figure 5 The experimental data fully demonstrate that when all test models are treated as plug-and-play new ensemble objects, the method described in this application effectively addresses the "overthinking" problem without retraining. These results highlight the extremely high cost-efficiency, scalability, and strong cross-domain generalization ability of our method in adaptive optimization tasks of large inference models.

[0071] Figure 6 This is a schematic diagram of a large-scale inference model optimization control device based on stage-momentum alignment, according to some embodiments of this application. Figure 6 As shown, the large-scale inference model optimization control device 600 based on stage-momentum alignment includes a context acquisition module 610, a cognitive reasoning stage determination module 620, a net reasoning momentum determination module 630, a thinking pattern recognition module 640, and a reasoning intervention strategy triggering module 650. The large-scale inference model optimization function based on stage-momentum alignment can be achieved by... Figure 3 The inference server in the system shown executes. Wherein: The context acquisition module 610 is used to acquire the reasoning context of the current reasoning step in real time during the reasoning generation process of the large reasoning model. The cognitive reasoning stage determination module 620 is used to calculate a prospective entropy value describing the cognitive uncertainty of the model based on the reasoning context and through a lightweight evaluation model, and to determine the current cognitive reasoning stage of the model based on the prospective entropy value. The net inference momentum determination module 630 is used to analyze the representation of the inference context in the model hidden layer space in response to the stable transition event of the cognitive inference stage, and calculate the net inference momentum of the semantic advancement effort within the representation. The thinking pattern recognition module 640 is used to jointly compare the cognitive reasoning stage with the net reasoning momentum in order to identify the current thinking pattern of the model. The reasoning intervention strategy triggering module 650 is used to trigger a reasoning intervention strategy corresponding to the identified thinking pattern in order to control the subsequent generation behavior of the model.

[0072] In summary, the large-scale inference model optimization control method and apparatus based on stage-momentum alignment proposed in this application firstly quantifies the internal semantic advancement effort by calculating the net inference momentum represented by the hidden layer of the model, providing an internal observation dimension that complements the entropy signal (cognitive stage). Joint comparison of the two can effectively distinguish between "deceptive convergence" and healthy convergence, thus solving the defect of unreliable intervention decisions due to reliance on fuzzy entropy signals. Secondly, by designing an event-triggered mechanism, momentum calculation is triggered only when entropy monitoring determines a stable transition in the cognitive stage. This on-demand deep analysis mode avoids continuous high overhead, enabling high-frequency, real-time diagnosis and dynamic intervention based on internal states, thus solving the defect of being unable to achieve real-time intervention in the inference process due to the use of posterior representation analysis. Finally, the above features are tightly coupled based on the "stage-momentum alignment" assumption, forming a complete real-time monitoring-diagnosis-intervention closed loop. This scheme can significantly reduce the computational overhead of the inference process (such as the number of tokens) while maintaining or improving task accuracy, achieving synergistic optimization of efficiency and performance.

[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding descriptions in the foregoing device embodiments, and will not be repeated here.

[0074] Although the foregoing embodiments are described within the general context of computer systems running in conjunction with operating systems and applications, those skilled in the art will recognize that other implementations can also be performed by incorporating other types of program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform specific tasks or implement specific abstract data types. Those skilled in the art will understand that the subject matter described herein can be practiced using other computer system configurations, including handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframes, etc., and can also be used in distributed computing environments where tasks are performed by remote processing devices connected via communication networks. In a distributed computing environment, program modules may reside on both local and remote memory storage devices.

[0075] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0076] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of this application and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of this application should be included within the protection scope of this application. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.

Claims

1. A method for optimizing and controlling large-scale inference models based on stage-momentum alignment, characterized in that, include: During the reasoning generation process of the large-scale reasoning model, the reasoning context of the current reasoning step is obtained in real time; Based on the reasoning context, a forward entropy value describing the cognitive uncertainty of the model is calculated using a lightweight evaluation model, and the cognitive reasoning stage of the model is determined based on the forward entropy value. In response to the stable transition event of the cognitive reasoning stage, the representation of the reasoning context in the model hidden layer space is analyzed, and the net reasoning momentum of the semantic advancement effort within the representation is calculated. The cognitive reasoning stage is jointly compared with the net reasoning momentum to identify the current thinking mode of the model; Based on the identified thought patterns, a reasoning intervention strategy corresponding to the thought patterns is triggered to control the subsequent generation behavior of the model; Wherein, the net inference momentum Calculated using the following formula: , in, For local semantic gain, For the intensity of global thinking, These are the weighting coefficients. Indicates the global thinking intensity The absolute value of the second-order difference is used to approximate its curvature; The local semantic gain The calculation formula is: , in For the first The semantic center of the step is calculated as the mean of the selected hidden layer vector representation. Represents a geometric distance metric. This represents the step index of the large-scale inference model in the inference generation process; The intensity of global thinking The calculation formula is: , in, Defined as the first in the model The Transformer module represents the complete context sequence as a mean-pooled representation vector. This represents the total number of layers in the model. This indicates the number of hidden layers used to calculate net inference momentum, counted backwards from the last layer of the large inference model.

2. The method according to claim 1, characterized in that: The lightweight evaluation model includes a small inference model obtained through knowledge distillation.

3. The method according to claim 1, characterized in that, The forward entropy value Calculated using the following formula: , in, Represents the set of candidate final answers One of the elements; Indicates from the beginning to the number The reasoning context of the steps, The parameters of the lightweight evaluation model are represented. This indicates that the lightweight evaluation model and the inference context are used as a basis. Generate candidate answers The normalized probability.

4. The method according to claim 1, characterized in that, The step of determining the current cognitive reasoning stage of the model based on the prospective entropy value includes: Based on the prospective entropy value, the cognitive reasoning stage is determined by an entropy finite state machine. The entropy finite state machine is configured as follows: In the current time window Within this range, if all look-ahead entropy values ​​are less than the threshold... If so, it is determined to be in the thinking convergence stage; If all forward entropy values ​​are greater than the initial uncertainty If so, it is determined to be the divergent thinking stage; If any of the above conditions are not met, the state is determined to be uncertain; in, For the theoretical maximum entropy, This represents the average of the look-ahead entropy values ​​over the initial time period. It is a hyperparameter in the interval (0,1).

5. The method according to claim 4, characterized in that: The stable transition event includes the output of the entropy finite state machine transitioning from an uncertain state to a stable convergent state or divergent state.

6. The method according to claim 1, characterized in that, The analysis of the representation of the inference context in the model's hidden layer space includes: Extracting the inference context at the end of the large inference model The hidden layer vector representation of the layer is used for analysis, where It is an integer greater than 1.

7. The method according to claim 1, characterized in that, The step of jointly comparing the cognitive reasoning stage with the net reasoning momentum to identify the current thinking mode of the model includes: If the current stage is divergent thinking and the net inference momentum is below the relaxation threshold If so, it is identified as a stagnant pattern of misalignment; If the current thought convergence phase is in place and the net inference momentum is below the relaxation threshold. If so, it is identified as a synchronized and aligned healthy mode; If, after the healthy pattern of synchronization alignment has been identified, the cognitive reasoning stage re-enters the divergent thinking stage, it is identified as a convergent repetitive pattern.

8. The method according to claim 1, characterized in that, The step of triggering a reasoning intervention strategy corresponding to the identified thought pattern includes: If the stated thought pattern is a synchronized and aligned healthy pattern, then a successful truncation will be performed; If the thought pattern is a stagnant pattern of misalignment, then failure truncation will be performed; If the thought pattern is a convergent repetition pattern, then the reasoning process is maintained.

9. A large-scale inference model optimization control device based on stage-momentum alignment, characterized in that, include: The context acquisition module is used to acquire the reasoning context of the current reasoning step in real time during the reasoning generation process of the large reasoning model. The cognitive reasoning stage determination module is used to calculate a prospective entropy value describing the cognitive uncertainty of the model based on the reasoning context and a lightweight evaluation model, and to determine the current cognitive reasoning stage of the model based on the prospective entropy value. The net inference momentum determination module is used to analyze the representation of the inference context in the model hidden layer space in response to the stable transition event of the cognitive inference stage, and calculate the net inference momentum of the semantic advancement effort within the representation. The thinking pattern recognition module is used to jointly compare the cognitive reasoning stage with the net reasoning momentum in order to identify the current thinking pattern of the model. The reasoning intervention strategy triggering module is used to trigger the reasoning intervention strategy corresponding to the identified thinking pattern, so as to control the subsequent generation behavior of the model. Wherein, the net inference momentum Calculated using the following formula: , in, For local semantic gain, For the intensity of global thinking, These are the weighting coefficients. Indicates the global thinking intensity The absolute value of the second-order difference is used to approximate its curvature; The local semantic gain The calculation formula is: , in For the first The semantic center of the step is calculated as the mean of the selected hidden layer vector representation. Represents a geometric distance metric. This represents the step index of the large-scale inference model in the inference generation process; The intensity of global thinking The calculation formula is: , in, Defined as the first in the model The Transformer module represents the complete context sequence as a mean-pooled representation vector. This represents the total number of layers in the model. This indicates the number of hidden layers used to calculate net inference momentum, counted backwards from the last layer of the large inference model.