Language model reinforcement learning training method and training apparatus

By constructing an inference dependency graph and identifying key dependency edges for validity determination, the problem of false positive reward signals in language model reinforcement learning training is solved, thereby improving training effectiveness and generalization performance.

CN123180403APending Publication Date: 2026-11-27SHANGHAI XIYU JIZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611413785.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, the overall scoring method during language model reinforcement learning training is prone to generating false positive reward signals with high confidence, leading to a decline in training effectiveness and generalization performance.

Method used

Construct a reasoning dependency graph for candidate reasoning processes, identify key dependency edges and determine their validity using a pre-set list of questions, and determine the reward score by combining the connectivity of the reasoning dependency graph and the matching of the reference dependency graph to avoid false positive reward signals.

Benefits of technology

It improves the effectiveness and generalization performance of reinforcement learning training, ensures that reward scores truly reflect the logical quality and effectiveness of candidate reasoning processes, and provides accurate optimization directions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180403A_ABST
    Figure CN123180403A_ABST
Patent Text Reader

Abstract

The application relates to a language model reinforcement learning training method and a training device. The method comprises the following steps: constructing a reasoning dependency graph of a candidate reasoning process; determining key dependency edges according to key degree evaluation indexes of each dependency edge; performing effectiveness determination on each key dependency edge based on a preset problem list matched with the key evaluation indexes; determining a reward score according to an effectiveness determination result, a connectivity of the reasoning dependency graph and a reference dependency graph corresponding to a reference answer; and training a to-be-trained language model based on the candidate reasoning process and the reward score. Therefore, logical defects in the reasoning process can be identified through the construction of the reasoning dependency graph and the accurate identification of the key dependency edges, false positive reward signals such as semantic shortcuts, length bias, format hackers and judge preference can be effectively inhibited, the accuracy of the reward score can be improved, and the reinforcement learning training effect and the generalization performance can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of reinforcement learning technology, and in particular to a language model reinforcement learning training method and training device. Background Technology

[0002] With the rapid development of artificial intelligence technology, large language models have shown significant potential in logical reasoning tasks, and reinforcement learning is widely used to improve the reasoning ability of language models under training. In this type of training process, the quality of reasoning is evaluated by a reward signal generated by a validator.

[0003] In related technologies, generative validators are typically used to score the complete text of the candidate reasoning process holistically, and then output a total score as a reward signal to guide the policy update of the language model to be trained.

[0004] However, this overall scoring method may generate high-confidence false positive reward signals in actual long-term training. These false positive reward signals can mislead the optimization direction of the language model to be trained, thereby affecting the training effect and generalization performance of reinforcement learning. Summary of the Invention

[0005] Therefore, it is necessary to provide a language model reinforcement learning training method and training device to address the above-mentioned technical problems.

[0006] Firstly, this application provides a language model reinforcement learning training method, including:

[0007] For the candidate inference process output during the reinforcement learning training phase of the language model to be trained, an inference dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process.

[0008] Based on the criticality evaluation index of each dependency edge in the inference dependency graph, the critical dependency edges are determined from multiple dependency edges;

[0009] Based on a pre-defined list of questions that match the criticality evaluation indicators corresponding to each critical dependency edge, the validity of each critical dependency edge is determined, and the validity determination results of each critical dependency edge are obtained.

[0010] Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, the reward score corresponding to the candidate reasoning process is determined; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges in which each key dependency edge is valid;

[0011] The language model to be trained is trained based on the candidate reasoning process and the corresponding reward score.

[0012] In one embodiment, the reward score corresponding to the candidate reasoning process is determined based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, including:

[0013] The inference dependency graph is matched with the reference dependency graph to determine the proportion of the target node in the reference dependency graph; the target node is the node in the reference dependency graph that matches the inference dependency graph.

[0014] Based on the validity determination results, connectivity, and proportion, the reward score corresponding to the candidate reasoning process is determined.

[0015] In one embodiment, based on a preset list of questions matching the criticality evaluation index corresponding to each critical dependency edge, the validity of each critical dependency edge is determined, and the validity determination result of each critical dependency edge is obtained, including:

[0016] Based on the criticality evaluation index corresponding to the critical dependency edge, determine the list of preset questions that match the critical dependency edge from multiple preset question lists;

[0017] For each preset problem in the preset problem list, determine the evaluation result of the key dependency edge relative to the preset problem;

[0018] If there are no negative results among the multiple evaluation results corresponding to the critical dependency edge, the validity determination result of the critical dependency edge is that the critical dependency edge is valid.

[0019] In one embodiment, a reasoning dependency graph of the candidate reasoning process is constructed based on the standard reasoning content corresponding to the candidate reasoning process, including:

[0020] Break down standard reasoning into multiple atomic propositions;

[0021] Using each atomic proposition as a node and the dependencies between atomic propositions as dependency edges, construct a reasoning dependency graph for the candidate reasoning process.

[0022] In one embodiment, critical dependency edges are determined from multiple dependency edges based on the criticality evaluation index of each dependency edge in the inference dependency graph, including:

[0023] For each dependency edge, multiple criticality evaluation indicators corresponding to the dependency edge are weighted and aggregated based on preset weight coefficients to obtain the criticality of the dependency edge.

[0024] Dependency edges with a criticality greater than a preset criticality threshold among multiple dependency edges are identified as critical dependency edges.

[0025] In one embodiment, the method further includes:

[0026] Obtain multiple initial inference processes during the reinforcement learning training phase of the language model to be trained;

[0027] Based on the first preset filtering rule, multiple initial reasoning processes are filtered to obtain candidate reasoning processes.

[0028] In one embodiment, the method for obtaining the standard reasoning content corresponding to the candidate reasoning process includes:

[0029] For each candidate reasoning process, non-substantive content in the initial reasoning content corresponding to the candidate reasoning process is filtered out based on the second preset filtering rule to obtain the substantive reasoning content corresponding to the candidate reasoning process.

[0030] Substantive reasoning content is written into a preset standardized template to obtain standard reasoning content corresponding to the candidate reasoning process.

[0031] In one embodiment, the criticality assessment index includes at least one of the following: contribution to the final conclusion path, fuzzy phrase index, new concept or definition introduction index, and reference reasoning difference index; wherein...

[0032] The final path contribution is determined by the reciprocal of the number of parallel branches in the branch containing the corresponding dependent edge;

[0033] The fuzzy phrase index is determined by matching the text corresponding to the dependency edge with a preset fuzzy vocabulary, or by calculating the semantic similarity between the text and a preset fuzzy vocabulary and comparing it with a preset similarity threshold.

[0034] The introduction of new concepts or definitions is determined based on whether the concept or definition in the subsequent node of the dependent edge appears in the reasoning path before the dependent edge.

[0035] The reference inference difference index is determined based on the matching degree between the dependency edges and their connected atomic propositions and the reference dependency edges and reference atomic propositions in the reference dependency graph.

[0036] In one embodiment, the reward score corresponding to the candidate reasoning process is determined based on the validity determination result, connectivity, and proportion, including:

[0037] The reward score corresponding to the candidate reasoning process is determined based on the product of the preset reward adjustment coefficient, connectivity, ratio and invalid edge penalty parameter.

[0038] Wherein, when a valid inference path exists, the connectivity is a first preset value, and when no valid inference path exists, the connectivity is a second preset value; the invalid edge penalty parameter is a parameter that is attenuated based on the number of invalid key dependency edges in the validity determination result.

[0039] Secondly, this application also provides a language model reinforcement learning training device, comprising:

[0040] The dependency graph construction module is used to construct a reasoning dependency graph for the candidate reasoning process output during the reinforcement learning training phase of the language model to be trained, based on the standard reasoning content corresponding to the candidate reasoning process.

[0041] The first determination module is used to determine the key dependency edge from multiple dependency edges based on the criticality evaluation index of each dependency edge in the inference dependency graph.

[0042] The validity determination module is used to determine the validity of each key dependency edge based on a pre-set list of questions that match the criticality evaluation index corresponding to each key dependency edge, and obtain the validity determination result of each key dependency edge.

[0043] The second determination module is used to determine the reward score corresponding to the candidate reasoning process based on the validity judgment results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges in which each key dependency edge is valid;

[0044] The model training module is used to train the language model to be trained based on the candidate reasoning process and the corresponding reward score.

[0045] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0046] For the candidate inference process output during the reinforcement learning training phase of the language model to be trained, an inference dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process.

[0047] Based on the criticality evaluation index of each dependency edge in the inference dependency graph, the critical dependency edges are determined from multiple dependency edges;

[0048] Based on a pre-defined list of questions that match the criticality evaluation indicators corresponding to each critical dependency edge, the validity of each critical dependency edge is determined, and the validity determination results of each critical dependency edge are obtained.

[0049] Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, the reward score corresponding to the candidate reasoning process is determined; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges in which each key dependency edge is valid;

[0050] The language model to be trained is trained based on the candidate reasoning process and the corresponding reward score.

[0051] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0052] For the candidate inference process output during the reinforcement learning training phase of the language model to be trained, an inference dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process.

[0053] Based on the criticality evaluation index of each dependency edge in the inference dependency graph, the critical dependency edges are determined from multiple dependency edges;

[0054] Based on a pre-defined list of questions that match the criticality evaluation indicators corresponding to each critical dependency edge, the validity of each critical dependency edge is determined, and the validity determination results of each critical dependency edge are obtained.

[0055] Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, the reward score corresponding to the candidate reasoning process is determined; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges in which each key dependency edge is valid;

[0056] The language model to be trained is trained based on the candidate reasoning process and the corresponding reward score.

[0057] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0058] For the candidate inference process output during the reinforcement learning training phase of the language model to be trained, an inference dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process.

[0059] Based on the criticality evaluation index of each dependency edge in the inference dependency graph, the critical dependency edges are determined from multiple dependency edges;

[0060] Based on a pre-defined list of questions that match the criticality evaluation indicators corresponding to each critical dependency edge, the validity of each critical dependency edge is determined, and the validity determination results of each critical dependency edge are obtained.

[0061] Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, the reward score corresponding to the candidate reasoning process is determined; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges in which each key dependency edge is valid;

[0062] The language model to be trained is trained based on the candidate reasoning process and the corresponding reward score.

[0063] The aforementioned language model reinforcement learning training method and apparatus, for the candidate inference processes output during the reinforcement learning training phase of the language model to be trained, constructs an inference dependency graph of the candidate inference processes based on the standard inference content corresponding to the candidate inference processes; determines key dependency edges from multiple dependency edges according to the criticality evaluation index of each dependency edge in the inference dependency graph; performs validity judgment on each key dependency edge based on a pre-set question list that matches the criticality evaluation index corresponding to each key dependency edge, and obtains the validity judgment result of each key dependency edge; determines the reward score corresponding to the candidate inference process based on the validity judgment result of each key dependency edge, the connectivity of the inference dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate inference process; and trains the language model to be trained based on the candidate inference processes and the corresponding reward scores. In this embodiment, the verifier not only scores the candidate reasoning process holistically, but also first constructs a reasoning dependency graph based on the reasoning process, then identifies key dependency edges and performs validity judgment according to a preset problem list. This allows the verifier to accurately locate potential problems in the reasoning process and verify the existence of a valid reasoning path from known conditions to the final conclusion through the connectivity of the reasoning dependency graph. At the same time, it determines the reward score by combining the matching situation with the reference dependency graph. This effectively avoids false positive reward signals caused by length bias, format hacking, semantic shortcuts, and referee bias in traditional holistic scoring methods. As a result, the reward score can truly reflect the logical quality and validity of the candidate reasoning process, thereby providing an accurate optimization direction for the language model to be trained and significantly improving the effect and generalization performance of reinforcement learning training. Attached Figure Description

[0064] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0065] Figure 1 This is an internal structural diagram of a computer device provided in an embodiment of this application;

[0066] Figure 2 This is a flowchart illustrating a language model reinforcement learning training method provided in an embodiment of this application;

[0067] Figure 3 This is a flowchart illustrating a reward scoring method provided in an embodiment of this application;

[0068] Figure 4This is a flowchart illustrating a method for determining the validity assessment result provided in an embodiment of this application;

[0069] Figure 5 This is a flowchart illustrating a method for constructing a reasoning dependency graph provided in an embodiment of this application;

[0070] Figure 6 This is a flowchart illustrating a method for determining critical dependency edges provided in an embodiment of this application;

[0071] Figure 7 This is a flowchart illustrating a method for determining a candidate reasoning process provided in an embodiment of this application;

[0072] Figure 8 This is a flowchart illustrating a standard reasoning content acquisition method provided in an embodiment of this application;

[0073] Figure 9 This is a structural block diagram of a language model reinforcement learning training device provided in an embodiment of this application. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0075] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0076] With the rapid development of artificial intelligence technology, large language models have shown significant potential in logical reasoning tasks, and reinforcement learning is widely used to improve the reasoning ability of language models under training. In this type of training process, the quality of reasoning is evaluated by a reward signal generated by a validator.

[0077] In related technologies, generative validators are typically used to score the complete text of the candidate reasoning process holistically, and then output a total score as a reward signal to guide the policy update of the language model to be trained.

[0078] However, this overall scoring method may generate high-confidence false positive reward signals in actual long-term training. These false positive reward signals can mislead the optimization direction of the language model to be trained, thereby affecting the training effect and generalization performance of reinforcement learning.

[0079] The language model reinforcement learning training method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown. Figure 1 This is an internal structure diagram of a computer device provided in an embodiment of this application. The computer device may be a server, and its internal structure diagram may be as follows: Figure 1 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a language model reinforcement learning training method.

[0080] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0081] In one embodiment, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating a language model reinforcement learning training method provided in an embodiment of this application. This method can be applied to... Figure 1 The method, using a computer device, includes the following steps:

[0082] S201, for the candidate inference process output during the reinforcement learning training phase of the language model to be trained, construct the inference dependency graph of the candidate inference process based on the standard inference content corresponding to the candidate inference process.

[0083] In this embodiment, in a reinforcement learning training scenario oriented towards logical reasoning, the language model to be trained can output multiple candidate reasoning processes during the reinforcement learning training phase. For each candidate reasoning process, the standard reasoning content corresponding to that candidate reasoning process can be obtained first. The standard reasoning content is the normalized text content obtained after preprocessing the initial reasoning content corresponding to the candidate reasoning process.

[0084] For example, after obtaining the standard reasoning content, a reasoning dependency graph can be constructed based on the standard reasoning content, with each atomic proposition in the candidate reasoning process as a node and the dependency relationship between each atomic proposition as an edge.

[0085] S202, Based on the criticality evaluation index of each dependency edge in the inference dependency graph, determine the critical dependency edge from multiple dependency edges.

[0086] In this embodiment, after constructing the inference dependency graph, a criticality evaluation index can be calculated for each dependency edge in the graph. The criticality evaluation index measures the importance and risk level of each dependency edge in the overall inference process.

[0087] For example, for each dependency edge in the inference dependency graph, the criticality of the dependency edge can be calculated based on the criticality evaluation index of the dependency edge, thereby determining the critical dependency edge from multiple dependency edges based on the criticality of each dependency edge.

[0088] Optionally, the criticality assessment indicators may include at least one of the following: contribution to the final conclusion path, fuzzy phrase indicators, indicators of the introduction of new concepts or definitions, and indicators of differences in reference reasoning.

[0089] The contribution of the final conclusion path is determined by the reciprocal of the number of parallel branches of the branch containing the corresponding dependent edge. For example, the reciprocal of the number of parallel branches of the branch containing the dependent edge can be used to determine the contribution of the final conclusion path.

[0090] The fuzzy phrase index is determined by matching the text corresponding to the dependency edge with a preset fuzzy vocabulary, or by calculating the semantic similarity between the text and preset fuzzy words and comparing it with a preset similarity threshold. For example, the preset fuzzy vocabulary may contain preset fuzzy words such as "well-known," "obviously," "easily obtained," "in short," and "analogically," which are words that omissions, summaries, or analogies. In one embodiment, the similarity between the text corresponding to the dependency edge and each preset fuzzy word in the preset fuzzy vocabulary can be used as the fuzzy phrase index; or the fuzzy phrase index can be assigned a value of 1 when the semantic similarity between the text corresponding to the dependency edge and the preset fuzzy words is greater than the preset similarity threshold, and a value of 0 when the semantic similarity between the text corresponding to the dependency edge and the preset fuzzy words is not greater than the preset similarity threshold.

[0091] The new concept or definition introduction index is determined based on whether the concept or definition in the subsequent node of the dependent edge appears in the inference path before the dependent edge. For example, if the concept or definition in the subsequent node of the dependent edge appears in the inference path before the dependent edge, the new concept or definition introduction index is assigned a value of 0; if the concept or definition in the subsequent node of the dependent edge does not appear in the inference path before the dependent edge, the new concept or definition introduction index is assigned a value of 1.

[0092] The reference inference discrepancy index is determined based on the matching degree between the dependency edge and its connected atomic propositions and the reference dependency edges and reference atomic propositions in the reference dependency graph. For example, the matching degree between the dependency edge and its connected atomic propositions and the reference dependency edges and reference atomic propositions in the reference dependency graph can be determined as the reference inference discrepancy index.

[0093] S203, based on a pre-defined list of questions that match the criticality evaluation indicators corresponding to each critical dependency edge, determine the validity of each critical dependency edge and obtain the validity determination result of each critical dependency edge.

[0094] In this embodiment, for each identified critical dependency edge, a list of pre-defined questions matching that critical dependency edge can be determined from multiple pre-defined question lists based on the criticality evaluation index corresponding to that critical dependency edge. Then, based on each pre-defined question in the pre-defined question list, the evaluation result of the critical dependency edge relative to that pre-defined question is determined, thereby determining the validity judgment result of the critical dependency edge based on the evaluation results of the critical dependency edge relative to each pre-defined question.

[0095] S204. Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, determine the reward score corresponding to the candidate reasoning process.

[0096] Connectivity is used to characterize whether there is a valid reasoning path from the known conditions to the final conclusion in the reasoning dependency graph. That is, whether there is a complete path consisting of dependency edges in the reasoning dependency graph, which starts with the known conditions and ends with the final conclusion, and all key dependency edges on the path are determined to be valid.

[0097] Optionally, the coverage of the reference reasoning by the candidate reasoning process can be evaluated based on the matching relationship between the reasoning dependency graph of the candidate reasoning process and the reference dependency graph corresponding to the reference answer. Then, the reward score of the candidate reasoning process is determined comprehensively based on the validity judgment results of each key dependency edge, the connectivity of the reasoning dependency graph, and the above matching relationship.

[0098] S205, train the language model to be trained based on the candidate reasoning process and the corresponding reward score.

[0099] For example, after the language model to be trained outputs a candidate reasoning process during the reinforcement learning training phase, the reward score corresponding to the candidate reasoning process can be calculated, and the reward score can be used as a feedback signal to optimize the parameters of the language model to be trained.

[0100] In this embodiment, for the candidate inference process output during the reinforcement learning training phase of the language model to be trained, a reasoning dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process; according to the criticality evaluation index of each dependency edge in the reasoning dependency graph, key dependency edges are determined from multiple dependency edges; based on a preset question list that matches the criticality evaluation index corresponding to each key dependency edge, the validity of each key dependency edge is judged, and the validity judgment result of each key dependency edge is obtained; according to the validity judgment result of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate inference process, the reward score corresponding to the candidate inference process is determined; the language model to be trained is trained based on the candidate inference process and the corresponding reward score. In this embodiment, the verifier not only scores the candidate reasoning process holistically, but also first constructs a reasoning dependency graph based on the reasoning process, then identifies key dependency edges and performs validity judgment according to a preset problem list. This allows the verifier to accurately locate potential problems in the reasoning process and verify the existence of a valid reasoning path from known conditions to the final conclusion through the connectivity of the reasoning dependency graph. At the same time, it determines the reward score by combining the matching situation with the reference dependency graph. This effectively avoids false positive reward signals caused by length bias, format hacking, semantic shortcuts, and referee bias in traditional holistic scoring methods. As a result, the reward score can truly reflect the logical quality and validity of the candidate reasoning process, thereby providing an accurate optimization direction for the language model to be trained and significantly improving the effect and generalization performance of reinforcement learning training.

[0101] Reference Figure 3 , Figure 3 This is a flowchart illustrating a reward score determination method provided in an embodiment of this application. This embodiment relates to a possible implementation of determining the reward score corresponding to a candidate inference process based on the validity determination results of each key dependency edge, the connectivity of the inference dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate inference process. Based on the above embodiment, S204 includes the following steps:

[0102] S301, Match the inference dependency graph with the reference dependency graph to determine the proportion of the target node in the reference dependency graph; the target node is the node in the reference dependency graph that matches the inference dependency graph.

[0103] In this embodiment, similar to the process of constructing the inference dependency graph described above, a reference dependency graph can be constructed based on the reference answers of the candidate inference process. Then, each node in the reference dependency graph is compared with a reference node in the inference dependency graph to identify the target node in the reference dependency graph that matches the inference dependency graph. After identifying the target node, the CoverageScore, representing the proportion of the target node among all nodes in the reference dependency graph, is calculated.

[0104] S302. Based on the validity determination results, connectivity, and proportion, determine the reward score corresponding to the candidate reasoning process.

[0105] Optionally, the number of invalid key dependencies can be counted based on the validity determination results of each key dependency edge corresponding to the candidate inference process, and then the invalid edge penalty parameter GapPenalty can be calculated based on the number of invalid key dependencies. The invalid edge penalty parameter GapPenalty decays according to the number of invalid key dependencies.

[0106] For example, the invalid edge penalty parameter GapPenalty can be calculated as 1 / (number of invalid critical dependencies + 1). The more invalid critical dependencies there are, the stronger the penalty.

[0107] In this embodiment, the connectivity of the inference dependency graph, ValidPathScore, can also be determined. If there is an inference path from the known conditions to the final conclusion in the inference dependency graph, and all key dependency edges on the path are determined to be valid, then ValidPathScore takes a first preset value (e.g., 1); if there is no such valid inference path, then ValidPathScore takes a second preset value (e.g., 0).

[0108] Optionally, the product of the preset reward adjustment coefficient ε, connectivity ValidPathScore, coverage ratio CoverageScore, and invalid edge penalty parameter GapPenalty can be determined as the reward score corresponding to the candidate inference process, i.e.: reward score R(c) = ε × ValidPathScore × CoverageScore × GapPenalty.

[0109] In this embodiment of the application, the determination of the reward score not only considers the validity judgment result of the key dependency edge and the connectivity of the reasoning path, but also comprehensively considers the coverage ratio of the candidate reasoning process to the reference reasoning, so that the reward score can comprehensively reflect the overall quality of the candidate reasoning process in multiple dimensions, avoiding the one-sidedness and inaccuracy caused by relying on only a single dimension for evaluation, and further improving the credibility and distinguishability of the reward score.

[0110] Reference Figure 4, Figure 4 This is a flowchart illustrating a method for determining validity results provided in an embodiment of this application. This embodiment relates to a possible implementation of how to determine the validity of each key dependency edge based on a preset list of questions matching the criticality evaluation indicators corresponding to each key dependency edge, thereby obtaining the validity determination results of each key dependency edge. Based on the above embodiment, S203 includes the following steps:

[0111] S401, Based on the criticality evaluation index corresponding to the critical dependency edge, determine the list of preset issues that match the critical dependency edge from multiple preset issue lists.

[0112] In this embodiment, the risk factors of a key dependency edge can be analyzed based on the criticality evaluation index corresponding to the exemplary key dependency edge. These risk factors may include, for example, whether the text of the key dependency edge contains ambiguous phrases, or whether the key dependency edge introduces new concepts or definitions.

[0113] Optionally, the criticality assessment indicators may include at least one of the following: contribution to the final conclusion path, fuzzy phrase indicators, indicators of the introduction of new concepts or definitions, and indicators of differences in reference reasoning.

[0114] For example, if the fuzzy phrase indicator indicates that the text of the key dependency edge contains a fuzzy phrase, a first preset list of questions is matched for the key dependency edge containing the fuzzy phrase; if the new concept or new definition introduction indicator indicates that the key dependency edge introduces a new concept or new definition, a second preset list of questions is matched for the key dependency edge that introduces the new concept or new definition.

[0115] For example, the questions in the first preset question list mentioned above could be: "Please determine whether the candidate reasoning process clearly states the required basis?", "Please check whether the candidate reasoning process completely provides the inductive progression process?", "Please check whether the conditions and conclusions of this edge are easy to derive?", "Please check whether the conditions and conclusions of this edge are publicly known?", "Based on the conditions preceding the key edge, are there any counterexamples that differ from the conclusion?", etc.

[0116] The questions in the second pre-set question list mentioned above could be: "Please check each candidate reasoning process to see if the constructed object satisfies all the constraints required by the problem." or "Is the definition of the constructed object used in subsequent reasoning?"

[0117] It should be noted that if a critical dependency edge has multiple risk factors, the pre-defined question list that matches the critical dependency edge is a combination of the pre-defined question lists corresponding to each risk factor.

[0118] S402, for each preset problem in the preset problem list, determine the evaluation result of the key dependency edge relative to the preset problem.

[0119] In this embodiment, after determining the list of preset issues that match the key dependency edges, the key dependency edges can be checked item by item for each preset issue in the list of preset issues, and the evaluation result corresponding to each preset issue can be output.

[0120] For example, if the fuzzy phrase index corresponding to the key dependency edge indicates that the text of the key dependency edge contains a fuzzy phrase, then the verifier can answer each preset question in the first preset question list in sequence according to the key dependency edge of the candidate reasoning process to determine the evaluation result corresponding to each preset question.

[0121] The evaluation results can be categorized as positive (the reasoning is correct), negative (the reasoning has problems), or neutral (the problem is not involved).

[0122] S403, if there are no negative results among the multiple evaluation results corresponding to the critical dependency edge, the validity determination result of the critical dependency edge is determined to be that the critical dependency edge is valid.

[0123] In this embodiment, the evaluation results corresponding to the critical dependency edge are subject to a veto system. That is, if there are no negative results among the multiple evaluation results corresponding to the critical dependency edge, the validity determination result of the critical dependency edge is determined to be valid; if there is at least one negative result among the multiple evaluation results, the validity determination result of the critical dependency edge is determined to be invalid.

[0124] In this embodiment, different types of key dependency edges are matched with different problem lists for targeted review, and a veto system is adopted, that is, if the evaluation result of any problem in the problem list is negative, the key dependency edge is determined to be invalid, thereby accurately identifying invalid inference edges and reducing the probability of false positive reward signals.

[0125] Reference Figure 5 , Figure 5 This is a flowchart illustrating a method for constructing a reasoning dependency graph according to an embodiment of this application. This embodiment relates to a possible implementation of how to construct a reasoning dependency graph for a candidate reasoning process based on the standard reasoning content corresponding to that process. Based on the above embodiment, step S201 includes the following steps:

[0126] S501 breaks down standard reasoning into multiple atomic propositions.

[0127] In this embodiment, an atomic proposition is the smallest logical unit in the reasoning process, and each atomic proposition expresses an independent logical statement.

[0128] For example, suppose a candidate standard inference includes the derivation process of "because a+b+c=0, we can get a³+b³+c³=3abc". This candidate standard inference can then be broken down into two atomic propositions: N1 "a+b+c=0" is the known condition, and N2 "a³+b³+c³=3abc" is the conclusion. Similarly, if the candidate standard inference contains a chain of "because a, therefore b; because b, therefore c; because c, therefore d", then a, b, c, and d are all atomic propositions.

[0129] S502, using each atomic proposition as a node and the dependencies between atomic propositions as dependency edges, constructs a reasoning dependency graph for the candidate reasoning process.

[0130] In this embodiment, all atomic propositions can be used as nodes in a directed graph, and the dependencies between atomic propositions can be used as edges in a directed graph to construct a reasoning dependency graph Gc corresponding to the candidate reasoning process. That is, in the reasoning dependency graph Gc, each node represents an atomic proposition, and each directed dependency edge represents a reasoning step, with the direction pointing from the premise node to the conclusion node.

[0131] For example, the edge from atomic proposition N1 “a+b+c=0” to atomic proposition N2 “a³+b³+c³=3abc” represents the reasoning steps from N1 to N2.

[0132] In this embodiment of the application, the construction of the reasoning dependency graph transforms the candidate reasoning process from continuous text paragraphs into a structured graph representation composed of atomic proposition nodes and logical dependency edges, providing a structured data foundation for subsequent identification of key dependency edges, validity judgment, and connectivity verification.

[0133] Reference Figure 6 , Figure 6 This is a flowchart illustrating a method for determining critical dependency edges according to an embodiment of this application. This embodiment relates to a possible implementation of determining critical dependency edges from multiple dependency edges based on the criticality evaluation index of each dependency edge in the inference dependency graph. Based on the above embodiment, step S202 includes the following steps:

[0134] S601, for each dependent edge, weighted aggregation of multiple criticality evaluation indicators corresponding to the dependent edge is performed based on preset weight coefficients to obtain the criticality corresponding to the dependent edge.

[0135] In this embodiment, the specific values ​​of multiple keyness evaluation indicators corresponding to each dependency edge can be obtained, and then the specific values ​​of multiple keyness evaluation indicators can be weighted and aggregated based on preset weight coefficients to obtain the keyness corresponding to the dependency edge.

[0136] For example, when the criticality evaluation metrics include the contribution of the final conclusion path, fuzzy phrase metrics, new concept or definition introduction metrics, and reference reasoning difference metrics, the calculation process of the criticality corresponding to dependency edge E can be expressed as follows:

[0137] Criticality(E) = α × Contribution of the final conclusion path + β × Fuzzy phrase index + γ × New concept or definition introduction index + δ × Reference reasoning difference index.

[0138] Wherein, α is the preset weight coefficient corresponding to the contribution of the final conclusion path, β is the preset weight coefficient corresponding to the fuzzy phrase index, γ is the preset weight coefficient corresponding to the index introduced by the new concept or definition, and δ is the preset weight coefficient corresponding to the reference reasoning difference index.

[0139] S602, among multiple dependent edges, the dependent edges whose criticality is greater than a preset criticality threshold are identified as critical dependent edges.

[0140] In this embodiment, the criticality of each dependent edge can be compared with a preset criticality threshold. If the criticality of the dependent edge is greater than the preset criticality threshold, the dependent edge is a high-risk dependent edge and can be identified as a critical dependent edge. If the criticality of the dependent edge is not greater than the preset criticality threshold, the dependent edge is considered a low-risk dependent edge.

[0141] In this embodiment, the criticality of each dependency edge is obtained by weighting and aggregating multiple criticality evaluation indicators based on a preset weight coefficient. Dependency edges with a criticality greater than a preset criticality threshold are identified as critical dependency edges. This approach integrates multiple evaluation indicators such as the final conclusion path contribution, whether it contains fuzzy phrases, whether it introduces new concepts or definitions, and reference reasoning coverage, thereby improving the accuracy of identifying critical dependency edges.

[0142] Reference Figure 7 , Figure 7 This is a flowchart illustrating a method for determining a candidate reasoning process according to an embodiment of this application. Based on the above embodiment, the method further includes the following steps:

[0143] S701, obtain multiple initial inference processes during the reinforcement learning training phase of the language model to be trained.

[0144] In this embodiment, during reinforcement learning training, the language model to be trained can generate multiple initial reasoning processes for a given reasoning problem under the current policy parameters.

[0145] S702, based on the first preset filtering rule, filter multiple initial reasoning processes to obtain candidate reasoning processes.

[0146] For example, the first preset filtering rule is a set of rules used to filter out unacceptable initial reasoning processes, including but not limited to: outputs without reasoning processes, inference processes that are not closed, reasoning processes with loop outputs, and reasoning processes that exceed the length budget.

[0147] In this embodiment, the initial reasoning process that is not hit by the first preset filtering rule is the aforementioned candidate reasoning process.

[0148] Optionally, if an initial reasoning process is hit by any of the first preset filtering rules, a reward score of 0 is directly returned for that initial reasoning process, and the initial reasoning process will not enter the subsequent verification process; an initial reasoning process that is not hit by the first preset filtering rules is determined as a candidate reasoning process.

[0149] In this embodiment of the application, before the candidate inference process enters the inference dependency graph construction and verification scoring process, obviously unacceptable outputs are directly filtered out by the first preset filtering rule, so that these low-quality initial inference processes will no longer enter the subsequent dependency graph construction and verification scoring process, which greatly saves the verification computation and improves the overall efficiency and resource utilization of the verification link in the reinforcement learning training process.

[0150] Reference Figure 8 , Figure 8 This is a flowchart illustrating a standard reasoning content acquisition method provided in an embodiment of this application. Based on the above embodiment, acquiring the standard reasoning content corresponding to a candidate reasoning process can be achieved through the following steps:

[0151] S801, for each candidate reasoning process, the non-substantive content in the initial reasoning content corresponding to the candidate reasoning process is filtered based on the second preset filtering rule to obtain the substantive reasoning content corresponding to the candidate reasoning process.

[0152] In this embodiment, for each candidate reasoning process, the initial reasoning content corresponding to the candidate reasoning process, i.e. the original reasoning text, can be obtained. Then, the initial reasoning content is filtered for non-substantive content based on the second preset filtering rule to obtain the substantive reasoning content corresponding to the candidate reasoning process.

[0153] For example, non-substantive content may include fixed opening statements in the candidate reasoning process (such as "We are given..."), question restates, step titles (such as "Step N"), verification paragraphs ("Verification"), etc.

[0154] S802, write the substantive reasoning content into a preset standardized template to obtain the standard reasoning content corresponding to the candidate reasoning process.

[0155] For example, a pre-defined standardized template, i.e., a unified format for reasoning content structure, is used to standardize the expression of different candidate reasoning processes. In this embodiment, by writing the substantive reasoning content into the standardized template, the reasoning content corresponding to different candidate reasoning processes can have a unified format.

[0156] In this embodiment, the second preset filtering rule removes surface template information such as fixed opening remarks, question restates, step titles, and verification sections from the candidate reasoning process, retaining only the plain text of the substantive reasoning content and writing it into a preset standardized template. This ensures that different candidate reasoning processes have a unified format and structure when entering the generative validator, effectively suppressing the behavior of candidate reasoning processes learning and imitating the fixed output templates preferred by the generative validator, avoiding false score increases caused by judge preferences. At the same time, the standardized reasoning content is more convenient for subsequent atomic proposition decomposition and dependency extraction, improving the accuracy and consistency of reasoning dependency graph construction.

[0157] The following will explain the overall implementation logic and beneficial effects of the language model reinforcement learning training method proposed in this application through a complete embodiment:

[0158] In a complete embodiment, suppose the language model to be trained is faced with an algebraic proof problem: "Given a+b+c=0, prove a³+b³+c³=3abc". The language model to be trained outputs a candidate reasoning process during the reinforcement learning training phase.

[0159] The verifier first obtains the initial reasoning content of the candidate reasoning process and checks it using a first preset filtering rule. If the candidate reasoning process contains complete reasoning steps and has no loops or excessive length issues, it passes the initial filtering and proceeds to the next stage. The verifier then applies a second preset filtering rule to remove fixed opening statements and step titles such as "We are given...", "Step 1", and "Verification" from the initial reasoning content, retaining only the plain text of the substantive reasoning content, and writes it into a preset standardized template to generate standard reasoning content.

[0160] The validator uses a structured extraction model to break down the standard reasoning content into multiple atomic propositions. For example, N1 "a+b+c=0" is a known condition, and N2 "a³+b³+c³=3abc" is a conclusion. It then identifies the dependency relationship N1→N2 between the two, constructing a reasoning dependency graph Gc for the candidate reasoning process, with each atomic proposition as a node and the dependency relationship as an edge. Simultaneously, the validator extracts a reference reasoning dependency graph Gr from the reference answer.

[0161] The validator calculates a criticality evaluation metric for each dependency edge in the reasoning dependency graph. For edge N1→N2, its contribution to the final conclusion is 1; the fuzzy phrase metric detects the presence of the word "obviously" in the reasoning step corresponding to the edge, classifying it as containing a fuzzy phrase; the new concept introduction metric detects that the concept in the subsequent node N2 does not appear in the preceding path, classifying it as introducing a new concept; the reference reasoning difference metric detects that the candidate reasoning does not completely match the reference answer, indicating a high difference. The validator weights and aggregates the four metrics based on preset weight coefficients α, β, γ, and δ to obtain the comprehensive criticality of the edge. After comparing it with a preset criticality threshold, N1→N2 is determined to be a critical dependency edge.

[0162] The validator identified two risk factors in this critical dependency edge: "containing ambiguous phrases" and "introducing new concepts." It matched the edge with a pre-defined list of questions, including "Does the candidate reasoning process clearly state the required basis?", "Are the conditions and conclusions of this edge easily derived?", and "Does the candidate reasoning process prove that the constructed object satisfies all the constraints required by the problem?". The generative validator answered each question in the list. Upon review, it was found that the reasoning edge only provided the conclusion without demonstrating the complete algebraic expansion from a+b+c=0 to a³+b³+c³=3abc. The question evaluation result was negative, and the validator, using a veto mechanism, determined the critical dependency edge to be invalid.

[0163] The validator matches the inference dependency graph Gc with the reference dependency graph Gr, calculating that the proportion of the target node in the reference dependency graph is 80%. The validator checks the connectivity of the inference dependency graph and finds that although there is a path from the known conditions to the final conclusion consisting of dependency edges, the critical dependency edge N1→N2 is judged as invalid. Therefore, this path is not a valid inference path where all critical dependency edges are valid, and the ValidPathScore is set to the second preset value of 0. Simultaneously, the number of invalid critical dependency edges is 1, and GapPenalty = 1 / (1+1) = 0.5.

[0164] The final reward score R(c) = ε × ValidPathScore × CoverageScore × GapPenalty = ε × 0 × 0.8 × 0.5 = 0, meaning that the candidate reasoning process receives zero reward due to the lack of a complete and valid logical reasoning path. After receiving this reward score, the language model to be trained updates its parameters using the policy gradient algorithm.

[0165] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0166] Based on the same inventive concept, this application also provides a language model reinforcement learning training device for implementing the language model reinforcement learning training method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more language model reinforcement learning training device embodiments provided below can be found in the limitations of the language model reinforcement learning training method described above, and will not be repeated here.

[0167] In one embodiment, such as Figure 9 As shown, Figure 9 This is a structural block diagram of a language model reinforcement learning training device provided in an embodiment of this application. The device 900 includes:

[0168] The dependency graph construction module 901 is used to construct a reasoning dependency graph of the candidate reasoning process based on the standard reasoning content corresponding to the candidate reasoning process, for the candidate reasoning process output during the reinforcement learning training phase of the language model to be trained.

[0169] The first determining module 902 is used to determine the key dependency edge from multiple dependency edges based on the criticality evaluation index of each dependency edge in the inference dependency graph.

[0170] The validity determination module 903 is used to determine the validity of each key dependency edge based on a preset list of questions that match the criticality evaluation index corresponding to each key dependency edge, and obtain the validity determination result of each key dependency edge.

[0171] The second determining module 904 is used to determine the reward score corresponding to the candidate reasoning process based on the validity judgment results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges and in which each key dependency edge is valid.

[0172] Model training module 905 is used to train the language model to be trained based on the candidate reasoning process and the corresponding reward score.

[0173] In one embodiment, the second determining module 904 includes:

[0174] The matching unit is used to match the inference dependency graph with the reference dependency graph to determine the proportion of the target node in the reference dependency graph; the target node is the node in the reference dependency graph that matches the inference dependency graph.

[0175] The first determining unit is used to determine the reward score corresponding to the candidate reasoning process based on the validity judgment result, connectivity, and proportion.

[0176] In one embodiment, the validity determination module 903 includes:

[0177] The second determining unit is used to determine a list of preset questions that match the critical dependency edge from multiple preset question lists based on the criticality evaluation index corresponding to the critical dependency edge.

[0178] The third determining unit is used to determine the evaluation result of the key dependency edge relative to the preset problem for each preset problem in the preset problem list;

[0179] The fourth determining unit is used to determine the validity of a critical dependency edge as valid when there are no negative results among the multiple evaluation results corresponding to the critical dependency edge.

[0180] In one embodiment, the dependency graph construction module 901 includes:

[0181] The splitting unit is used to break down standard reasoning content into multiple atomic propositions;

[0182] The dependency graph construction unit is used to construct the inference dependency graph of the candidate inference process, with each atomic proposition as a node and the dependency relationship between each atomic proposition as a dependency edge.

[0183] In one embodiment, the first determining module 902 includes:

[0184] The aggregation unit is used to perform weighted aggregation of multiple criticality evaluation indicators corresponding to each dependency edge based on preset weight coefficients to obtain the criticality of the dependency edge.

[0185] The fifth determining unit is used to determine the critical dependency edges among multiple dependency edges whose criticality is greater than a preset criticality threshold as critical dependency edges.

[0186] In one embodiment, the device 900 further includes:

[0187] The acquisition module is used to acquire multiple initial inference processes during the reinforcement learning training phase of the language model to be trained;

[0188] The first filtering module is used to filter multiple initial reasoning processes based on a first preset filtering rule to obtain candidate reasoning processes.

[0189] In one embodiment, the device 900 further includes:

[0190] The second filtering module is used to filter the non-substantive content in the initial reasoning content corresponding to each candidate reasoning process based on the second preset filtering rules, so as to obtain the substantive reasoning content corresponding to the candidate reasoning process.

[0191] The standardization module is used to write the substantive reasoning content into a preset standardization template to obtain the standard reasoning content corresponding to the candidate reasoning process.

[0192] In one embodiment, the criticality assessment index includes at least one of the following: contribution to the final conclusion path, fuzzy phrase index, new concept or definition introduction index, and reference reasoning difference index; wherein...

[0193] The final path contribution is determined by the reciprocal of the number of parallel branches in the branch containing the corresponding dependent edge;

[0194] The fuzzy phrase index is determined by matching the text corresponding to the dependency edge with a preset fuzzy vocabulary, or by calculating the semantic similarity between the text and a preset fuzzy vocabulary and comparing it with a preset similarity threshold.

[0195] The introduction of new concepts or definitions is determined based on whether the concept or definition in the subsequent node of the dependent edge appears in the reasoning path before that dependent edge.

[0196] The reference inference difference index is determined based on the matching degree between the dependency edges and their connected atomic propositions and the reference dependency edges and reference atomic propositions in the reference dependency graph.

[0197] In one embodiment, the first determining unit specifically includes determining the reward score corresponding to the candidate reasoning process based on the product of a preset reward adjustment coefficient, connectivity, ratio, and invalid edge penalty parameter;

[0198] Wherein, when a valid inference path exists, the connectivity is a first preset value, and when no valid inference path exists, the connectivity is a second preset value; the invalid edge penalty parameter is a parameter that is attenuated based on the number of invalid key dependency edges in the validity determination result.

[0199] Each module in the aforementioned language model reinforcement learning training device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0200] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0201] For the candidate inference process output during the reinforcement learning training phase of the language model to be trained, an inference dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process.

[0202] Based on the criticality evaluation index of each dependency edge in the inference dependency graph, the critical dependency edges are determined from multiple dependency edges;

[0203] Based on a pre-defined list of questions that match the criticality evaluation indicators corresponding to each critical dependency edge, the validity of each critical dependency edge is determined, and the validity determination results of each critical dependency edge are obtained.

[0204] Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, the reward score corresponding to the candidate reasoning process is determined; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges in which each key dependency edge is valid;

[0205] The language model to be trained is trained based on the candidate reasoning process and the corresponding reward score.

[0206] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0207] The inference dependency graph is matched with the reference dependency graph to determine the proportion of the target node in the reference dependency graph; the target node is the node in the reference dependency graph that matches the inference dependency graph.

[0208] Based on the validity determination results, connectivity, and proportion, the reward score corresponding to the candidate reasoning process is determined.

[0209] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0210] Based on the criticality evaluation index corresponding to the critical dependency edge, determine the list of preset questions that match the critical dependency edge from multiple preset question lists;

[0211] For each preset problem in the preset problem list, determine the evaluation result of the key dependency edge relative to the preset problem;

[0212] If there are no negative results among the multiple evaluation results corresponding to the critical dependency edge, the validity determination result of the critical dependency edge is that the critical dependency edge is valid.

[0213] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0214] Break down standard reasoning into multiple atomic propositions;

[0215] Using each atomic proposition as a node and the dependencies between atomic propositions as dependency edges, construct a reasoning dependency graph for the candidate reasoning process.

[0216] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0217] For each dependency edge, multiple criticality evaluation indicators corresponding to the dependency edge are weighted and aggregated based on preset weight coefficients to obtain the criticality of the dependency edge.

[0218] Dependency edges with a criticality greater than a preset criticality threshold among multiple dependency edges are identified as critical dependency edges.

[0219] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0220] Obtain multiple initial inference processes during the reinforcement learning training phase of the language model to be trained;

[0221] Based on the first preset filtering rule, multiple initial reasoning processes are filtered to obtain candidate reasoning processes.

[0222] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0223] For each candidate reasoning process, non-substantive content in the initial reasoning content corresponding to the candidate reasoning process is filtered out based on the second preset filtering rule to obtain the substantive reasoning content corresponding to the candidate reasoning process.

[0224] Substantive reasoning content is written into a preset standardized template to obtain standard reasoning content corresponding to the candidate reasoning process.

[0225] In one embodiment, the criticality assessment index includes at least one of the following: contribution to the final conclusion path, fuzzy phrase index, new concept or definition introduction index, and reference reasoning difference index; wherein...

[0226] The final path contribution is determined by the reciprocal of the number of parallel branches in the branch containing the corresponding dependent edge;

[0227] The fuzzy phrase index is determined by matching the text corresponding to the dependency edge with a preset fuzzy vocabulary, or by calculating the semantic similarity between the text and a preset fuzzy vocabulary and comparing it with a preset similarity threshold.

[0228] The introduction of new concepts or definitions is determined based on whether the concept or definition in the subsequent node of the dependent edge appears in the reasoning path before that dependent edge.

[0229] The reference inference difference index is determined based on the matching degree between the dependency edges and the atomic propositions they connect and the reference dependency edges and reference atomic propositions in the reference dependency graph.

[0230] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0231] The reward score corresponding to the candidate reasoning process is determined based on the product of the preset reward adjustment coefficient, connectivity, ratio and invalid edge penalty parameter.

[0232] Specifically, when a valid inference path exists, the connectivity is a first preset value; when no valid inference path exists, the connectivity is a second preset value. The invalid edge penalty parameter is a parameter that is attenuated based on the number of invalid key dependency edges in the validity determination result.

[0233] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0234] For the candidate inference process output during the reinforcement learning training phase of the language model to be trained, an inference dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process.

[0235] Based on the criticality evaluation index of each dependency edge in the inference dependency graph, the critical dependency edges are determined from multiple dependency edges;

[0236] Based on a pre-defined list of questions that match the criticality evaluation indicators corresponding to each critical dependency edge, the validity of each critical dependency edge is determined, and the validity determination results of each critical dependency edge are obtained.

[0237] Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, the reward score corresponding to the candidate reasoning process is determined; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges in which each key dependency edge is valid;

[0238] The language model to be trained is trained based on the candidate reasoning process and the corresponding reward score.

[0239] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0240] The inference dependency graph is matched with the reference dependency graph to determine the proportion of the target node in the reference dependency graph; the target node is the node in the reference dependency graph that matches the inference dependency graph.

[0241] Based on the validity determination results, connectivity, and proportion, the reward score corresponding to the candidate reasoning process is determined.

[0242] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0243] Based on the criticality evaluation index corresponding to the critical dependency edge, determine the list of preset questions that match the critical dependency edge from multiple preset question lists;

[0244] For each preset problem in the preset problem list, determine the evaluation result of the key dependency edge relative to the preset problem;

[0245] If there are no negative results among the multiple evaluation results corresponding to the critical dependency edge, the validity determination result of the critical dependency edge is that the critical dependency edge is valid.

[0246] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0247] Break down standard reasoning into multiple atomic propositions;

[0248] Using each atomic proposition as a node and the dependencies between atomic propositions as dependency edges, construct a reasoning dependency graph for the candidate reasoning process.

[0249] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0250] For each dependency edge, multiple criticality evaluation indicators corresponding to the dependency edge are weighted and aggregated based on preset weight coefficients to obtain the criticality of the dependency edge.

[0251] Dependency edges with a criticality greater than a preset criticality threshold among multiple dependency edges are identified as critical dependency edges.

[0252] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0253] Obtain multiple initial inference processes during the reinforcement learning training phase of the language model to be trained;

[0254] Based on the first preset filtering rule, multiple initial reasoning processes are filtered to obtain candidate reasoning processes.

[0255] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0256] For each candidate reasoning process, non-substantive content in the initial reasoning content corresponding to the candidate reasoning process is filtered out based on the second preset filtering rule to obtain the substantive reasoning content corresponding to the candidate reasoning process.

[0257] Substantive reasoning content is written into a preset standardized template to obtain standard reasoning content corresponding to the candidate reasoning process.

[0258] In one embodiment, the criticality assessment index includes at least one of the following: contribution to the final conclusion path, fuzzy phrase index, new concept or definition introduction index, and reference reasoning difference index; wherein...

[0259] The final path contribution is determined by the reciprocal of the number of parallel branches in the branch containing the corresponding dependent edge;

[0260] The fuzzy phrase index is determined by matching the text corresponding to the dependency edge with a preset fuzzy vocabulary, or by calculating the semantic similarity between the text and a preset fuzzy vocabulary and comparing it with a preset similarity threshold.

[0261] The introduction of new concepts or definitions is determined based on whether the concept or definition in the subsequent node of the dependent edge appears in the reasoning path before that dependent edge.

[0262] The reference inference difference index is determined based on the matching degree between the dependency edges and their connected atomic propositions and the reference dependency edges and reference atomic propositions in the reference dependency graph.

[0263] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0264] The reward score corresponding to the candidate reasoning process is determined based on the product of the preset reward adjustment coefficient, connectivity, ratio and invalid edge penalty parameter.

[0265] Wherein, when a valid inference path exists, the connectivity is a first preset value, and when no valid inference path exists, the connectivity is a second preset value; the invalid edge penalty parameter is a parameter that is attenuated based on the number of invalid key dependency edges in the validity determination result.

[0266] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0267] For the candidate inference process output during the reinforcement learning training phase of the language model to be trained, an inference dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process.

[0268] Based on the criticality evaluation index of each dependency edge in the inference dependency graph, the critical dependency edges are determined from multiple dependency edges;

[0269] Based on a pre-defined list of questions that match the criticality evaluation indicators corresponding to each critical dependency edge, the validity of each critical dependency edge is determined, and the validity determination results of each critical dependency edge are obtained.

[0270] Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, the reward score corresponding to the candidate reasoning process is determined; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges in which each key dependency edge is valid;

[0271] The language model to be trained is trained based on the candidate reasoning process and the corresponding reward score.

[0272] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0273] The inference dependency graph is matched with the reference dependency graph to determine the proportion of the target node in the reference dependency graph; the target node is the node in the reference dependency graph that matches the inference dependency graph.

[0274] Based on the validity determination results, connectivity, and proportion, the reward score corresponding to the candidate reasoning process is determined.

[0275] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0276] Based on the criticality evaluation index corresponding to the critical dependency edge, determine the list of preset questions that match the critical dependency edge from multiple preset question lists;

[0277] For each preset problem in the preset problem list, determine the evaluation result of the key dependency edge relative to the preset problem;

[0278] If there are no negative results among the multiple evaluation results corresponding to the critical dependency edge, the validity determination result of the critical dependency edge is that the critical dependency edge is valid.

[0279] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0280] Break down standard reasoning into multiple atomic propositions;

[0281] Using each atomic proposition as a node and the dependencies between atomic propositions as dependency edges, construct a reasoning dependency graph for the candidate reasoning process.

[0282] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0283] For each dependency edge, multiple criticality evaluation indicators corresponding to the dependency edge are weighted and aggregated based on preset weight coefficients to obtain the criticality of the dependency edge.

[0284] Dependency edges with a criticality greater than a preset criticality threshold among multiple dependency edges are identified as critical dependency edges.

[0285] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0286] Obtain multiple initial inference processes during the reinforcement learning training phase of the language model to be trained;

[0287] Based on the first preset filtering rule, multiple initial reasoning processes are filtered to obtain candidate reasoning processes.

[0288] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0289] For each candidate reasoning process, non-substantive content in the initial reasoning content corresponding to the candidate reasoning process is filtered out based on the second preset filtering rule to obtain the substantive reasoning content corresponding to the candidate reasoning process.

[0290] Substantive reasoning content is written into a preset standardized template to obtain standard reasoning content corresponding to the candidate reasoning process.

[0291] In one embodiment, the criticality assessment index includes at least one of the following: contribution to the final conclusion path, fuzzy phrase index, new concept or definition introduction index, and reference reasoning difference index; wherein...

[0292] The final path contribution is determined by the reciprocal of the number of parallel branches in the branch containing the corresponding dependent edge;

[0293] The fuzzy phrase index is determined by matching the text corresponding to the dependency edge with a preset fuzzy vocabulary, or by calculating the semantic similarity between the text and a preset fuzzy vocabulary and comparing it with a preset similarity threshold.

[0294] The introduction of new concepts or definitions is determined based on whether the concept or definition in the subsequent node of the dependent edge appears in the reasoning path before that dependent edge.

[0295] The reference inference difference index is determined based on the matching degree between the dependency edges and their connected atomic propositions and the reference dependency edges and reference atomic propositions in the reference dependency graph.

[0296] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0297] The reward score corresponding to the candidate reasoning process is determined based on the product of the preset reward adjustment coefficient, connectivity, ratio and invalid edge penalty parameter.

[0298] Wherein, when a valid inference path exists, the connectivity is a first preset value, and when no valid inference path exists, the connectivity is a second preset value; the invalid edge penalty parameter is a parameter that is attenuated based on the number of invalid key dependency edges in the validity determination result.

[0299] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0300] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0301] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A language model reinforcement learning training method, characterized in that, The method includes: For the candidate inference process output during the reinforcement learning training phase of the language model to be trained, an inference dependency graph of the candidate inference process is constructed based on the standard inference content corresponding to the candidate inference process. Based on the criticality evaluation index of each dependency edge in the inference dependency graph, the critical dependency edge is determined from the multiple dependency edges; Based on a pre-defined list of questions that match the criticality evaluation index corresponding to each of the key dependency edges, the validity of each of the key dependency edges is determined, and the validity determination result of each of the key dependency edges is obtained. Based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process, the reward score corresponding to the candidate reasoning process is determined; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges, wherein each key dependency edge is valid; The language model to be trained is trained based on the candidate reasoning process and the corresponding reward score.

2. The method according to claim 1, characterized in that, The step of determining the reward score corresponding to the candidate reasoning process based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process includes: The inference dependency graph is matched with the reference dependency graph to determine the proportion of the target node in the reference dependency graph; the target node is the node in the reference dependency graph that matches the inference dependency graph. Based on the validity determination result, the connectivity, and the ratio, the reward score corresponding to the candidate reasoning process is determined.

3. The method according to claim 1, characterized in that, The validity determination of each key dependency edge is performed based on a preset list of questions that match the criticality evaluation index corresponding to each key dependency edge, and the validity determination result of each key dependency edge is obtained, including: Based on the criticality evaluation index corresponding to the critical dependency edge, a list of preset questions that match the critical dependency edge is determined from multiple preset question lists; For each preset problem in the preset problem list, determine the evaluation result of the key dependency edge relative to the preset problem; If there are no negative results among the multiple evaluation results corresponding to the key dependency edge, the validity determination result of the key dependency edge is determined to be that the key dependency edge is valid.

4. The method according to claim 1, characterized in that, The construction of the reasoning dependency graph of the candidate reasoning process based on the standard reasoning content corresponding to the candidate reasoning process includes: The standard reasoning content is broken down into multiple atomic propositions; Using each of the atomic propositions as nodes and the dependencies between the atomic propositions as dependency edges, a reasoning dependency graph for the candidate reasoning process is constructed.

5. The method according to claim 1, characterized in that, The step of determining key dependency edges from multiple dependency edges based on the criticality evaluation index of each dependency edge in the inference dependency graph includes: For each of the aforementioned dependency edges, multiple criticality evaluation indicators corresponding to the dependency edge are weighted and aggregated based on preset weight coefficients to obtain the criticality corresponding to the dependency edge. Among the multiple dependent edges, those with a criticality greater than a preset criticality threshold are identified as critical dependent edges.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: Obtain multiple initial inference processes during the reinforcement learning training phase of the language model to be trained; The candidate inference processes are obtained by filtering multiple initial inference processes based on a first preset filtering rule.

7. The method according to any one of claims 1-5, characterized in that, The method for obtaining the standard reasoning content corresponding to the candidate reasoning process includes: For each candidate reasoning process, non-substantive content in the initial reasoning content corresponding to the candidate reasoning process is filtered out based on the second preset filtering rule to obtain the substantive reasoning content corresponding to the candidate reasoning process. The substantive reasoning content is written into a preset standardized template to obtain the standard reasoning content corresponding to the candidate reasoning process.

8. The method according to any one of claims 1-5, characterized in that, The criticality assessment indicators include at least one of the following: contribution to the final conclusion path, fuzzy phrase indicator, new concept or definition introduction indicator, and reference reasoning difference indicator; wherein... The final path contribution is determined by the reciprocal of the number of parallel branches of the branch containing the corresponding dependent edge; The fuzzy phrase index is determined by matching the text corresponding to the dependency edge with a preset fuzzy vocabulary, or by calculating the semantic similarity between the text and a preset fuzzy vocabulary and comparing it with a preset similarity threshold. The new concept or definition introduction index is determined based on whether the concept or definition in the subsequent node of the dependent edge appears in the reasoning path before the dependent edge; The reference inference difference index is determined based on the matching degree between the dependency edge and the atomic proposition connected to it and the reference dependency edge and reference atomic proposition in the reference dependency graph.

9. The method according to claim 2, characterized in that, The step of determining the reward score corresponding to the candidate reasoning process based on the validity determination result, the connectivity, and the proportion includes: The reward score corresponding to the candidate reasoning process is determined based on the product of the preset reward adjustment coefficient, the connectivity, the ratio, and the invalid edge penalty parameter. Wherein, when a valid inference path exists, the connectivity is a first preset value, and when no valid inference path exists, the connectivity is a second preset value; the invalid edge penalty parameter is a parameter that is attenuated based on the number of invalid key dependency edges in the validity determination result.

10. A language model reinforcement learning training device, characterized in that, The device includes: The dependency graph construction module is used to construct a reasoning dependency graph of the candidate reasoning process based on the standard reasoning content corresponding to the candidate reasoning process output during the reinforcement learning training phase of the language model to be trained. The first determining module is used to determine the critical dependency edge from the multiple dependency edges according to the criticality evaluation index of each dependency edge in the inference dependency graph. The validity determination module is used to determine the validity of each key dependency edge based on a preset list of questions that match the criticality evaluation index corresponding to each key dependency edge, and to obtain the validity determination result of each key dependency edge. The second determining module is used to determine the reward score corresponding to the candidate reasoning process based on the validity determination results of each key dependency edge, the connectivity of the reasoning dependency graph, and the reference dependency graph corresponding to the reference answer of the candidate reasoning process; the connectivity is used to characterize whether there is a valid reasoning path in the reasoning dependency graph consisting of dependency edges and in which each key dependency edge is valid; The model training module is used to train the language model to be trained based on the candidate inference process and the corresponding reward score.