Protein binding site design method based on agent large model, agent large model training method, device, storage medium and computer program product

CN123017136APending Publication Date: 2026-10-30GUANGDONG-HONG KONG-MACAO GREATER BAY AREA DIGITAL ECONOMY RESEARCH INSTITUTE (INTERNATIONAL ADVANCED TECHNOLOGY APPLICATION PROMOTION CENTER (SHENZHEN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611255473.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]本申请的主要目的在于提供一种基于智能体大模型的结合蛋白设计方法、智能体大模型的训练方法、设备、存储介质及计算机程序产品,旨在解决智能大模型的结合蛋白设计的效率低下的技术问题

Benefits of technology

智能体大模型通过输出目标候选决策与工作流决策的双层结构化决策机制,将结合蛋白设计的宏观方向选择与具体执行路径规划相分离,使智能体大模型能够在统一框架下兼顾设计目标的合理性评估与执行动作的可操作性。同时,借助有根有向的内部记忆树结构对候选状态、剩余预算及执行动作进行系统化存储与关联管理,不仅实现了设计过程的完整回溯与状态追踪,还能基于预算约束动态调控搜索空间,避免无效探索。此外,通过调用外部执行器逐步执行并反馈结果,将真实的执行结果更新至内部记忆树,利用外部执行器构建智能体大模型的运行承载环境。最后,基于触发终止条件的子节点生成多条终止路径,从而在保证设计质量可控的前提下,提升了结合蛋白设计的质量和效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123017136A_ABST
    Figure CN123017136A_ABST
Patent Text Reader

Abstract

The application discloses a binding protein design method based on an agent large model, a training method of the agent large model, equipment, a storage medium and a computer program product, relates to the technical field of machine learning, and the method comprises the following steps: obtaining a model context; outputting a double-layer structured decision of a current candidate node based on the model context by using a trained agent large model, wherein the double-layer structured decision comprises a target candidate decision and a workflow decision; calling at least one external executor based on the workflow decision to gradually execute the target candidate decision, and obtaining an execution result and at least one candidate fed back by the external executor; gradually adding child nodes of the current candidate node in an internal memory tree based on the execution result and the at least one candidate, and updating a directed edge between the current candidate node and the child nodes; and taking the child node triggering a termination condition as a termination node, and generating a plurality of termination paths. The application improves the quality and efficiency of binding protein design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, and in particular to a method for designing binding proteins based on a large agent model, a method for training the large agent model, an apparatus, a storage medium, and a computer program product. Background Technology

[0002] The goal of target-based binding protein design is to design candidate binding proteins that can specifically bind to a particular target protein. The binding protein design process typically includes multiple steps such as target epitope identification, binding backbone or binding posture generation, amino acid sequence design, complex structure prediction, interface quality evaluation, and candidate screening.

[0003] Existing solutions utilize large agent models to automatically select and invoke external tools to complete the aforementioned protein design tasks. During the inference phase, the model dynamically selects appropriate tools based on current prompts and parses their returned results. However, large agent models only treat tool invocation as an immediate inference behavior. Each time a new target is encountered, the model needs to start from scratch to explore effective sequence modification strategies, tool invocation order, and stopping conditions, resulting in low efficiency and a lack of continuous learning ability in protein design using large agent models. Summary of the Invention

[0004] The main objective of this application is to provide a method for designing binding proteins based on a large agent model, a method for training the large agent model, an apparatus, a storage medium, and a computer program product, aiming to solve the technical problem of low efficiency in the design of binding proteins for large agent models.

[0005] To achieve the above objectives, this application proposes a binding protein design method based on a large agent model, the method comprising: Obtain the model context, wherein the model context includes at least: the protein design task, the current candidate node state, the summary of the internal memory tree, the summary of the external candidate memory, and the available budget; the internal memory tree is a rooted directed tree, including nodes and directed edges; the node information includes the candidate state and remaining budget, and the directed edges store the execution actions of adjacent nodes; The trained agent model outputs a two-layer structured decision for the current candidate node based on the model context. The two-layer structured decision includes target candidate decision and workflow decision. Based on the workflow decision, at least one external executor is invoked to execute the target candidate decision step by step, and the execution results and at least one candidate are obtained from the feedback of the external executor; Based on the execution result and the at least one candidate node, the child node of the current candidate node is gradually added to the internal memory tree, and the directed edge between the current candidate node and the child node is updated. Multiple termination paths are generated by using the child node that triggers the termination condition as the termination node; The workflow decision includes at least one execution action to complete the binding protein design task.

[0006] In one embodiment, the step of using the trained agent model to output a two-layer structured decision for the current candidate node based on the model context includes: If the binding protein design task includes initial candidates, then the state of root node candidates is formed based on the initial candidates, and the remaining budget of the root node is equal to the available budget in the model context; If the binding protein design task does not contain an initial candidate, the external executor is invoked to perform a reverse fold to generate an initial candidate. The state of the root node candidate is formed based on the generated initial candidate. The remaining budget of the root node is the available budget minus the cost of invoking the external executor to generate the initial candidate. Using the root node as the current candidate node, the trained agent model outputs a two-layer structured decision for the current candidate node based on the model context.

[0007] In one embodiment, the step of invoking at least one external executor to progressively execute the target candidate decision based on the workflow decision, and obtaining the execution results and at least one candidate from the external executor, includes: Based on the binding protein, the task is designed to verify the validity of the workflow decision; After the verification is passed, the corresponding external executors are called step by step according to the order of the execution actions; Obtain the execution result and at least one candidate after the external executor performs the execution action.

[0008] In one embodiment, the external actuator includes a reverse folding actuator, an editing actuator, and an evaluation actuator, and the step of sequentially calling the corresponding external actuators based on the order of the execution actions includes: When the execution action is a reverse fold, the reverse fold executor is invoked, and the reverse fold executor generates at least one candidate protein based on the protein design task. When the execution action is editing, the editing executor is invoked. The editing executor performs local mutation or restricted sequence redesign on the current candidate based on the editable residues, maximum number of mutations, and local feedback of the target candidate decision to generate at least one candidate. The protein design task includes at least target information, design conditions, and structural requirements.

[0009] In one embodiment, the protein design task further includes hard constraints, and the step of sequentially invoking the corresponding external executors based on the order of the execution actions includes: When the execution action is evaluation, it is determined whether the candidate is generated by the reverse folding executor or the editing executor; If the candidate is not generated by the inversion executor or the editing executor, the evaluation executor is invoked to perform a rapid evaluation of the current candidate to generate a binding protein evaluation. If the candidate is generated by the reverse folding executor or the editing executor, the hard constraint checker is first called to determine whether the execution result fed back by the reverse folding executor or the editing executor satisfies the hard constraint; If the hard constraints are met, the evaluation executor is invoked to perform a rapid evaluation of the current candidate to generate a binding protein evaluation.

[0010] In one embodiment, the step of progressively adding child nodes of the current candidate node to the internal memory tree based on the execution result and the at least one candidate node, and updating the directed edges between the current candidate node and the child nodes, includes: For each candidate node, add a child node to the current candidate node in the internal memory tree and establish a branch from the child node to the current candidate node; Update the state of the candidate child nodes; The remaining budget of the child node is updated based on the standardized cost of performing the execution action once by the external actuator; Update the directed edges between the current candidate node and its child nodes based on the execution result.

[0011] In one embodiment, the candidate state includes at least the candidate sequence of the binding protein of the current candidate node and the evaluation of the binding protein. The step of generating multiple termination paths by using the child node that triggers the termination condition as the termination node includes: If the termination condition is triggered, the execution action is a termination action. The large model of the intelligent agent executes the termination action, takes the child node that triggered the termination condition as the termination node, and updates the information of the termination node. Multiple termination paths are generated by progressively adding child nodes from the root node until the termination node is reached.

[0012] In one embodiment, the termination condition includes at least one of an active termination condition and a forced termination condition; The active termination condition includes a termination action in the two-layer structured decision output by the agent's large model. The forced termination condition includes at least one of the following: the remaining budget of the current node is less than the execution cost required to call the corresponding external executor in the next step; the gain of the binding protein evaluation of the child node is less than or equal to the preset benefit convergence threshold; or the workflow decision fails to pass the task verification based on the binding protein.

[0013] In one embodiment, the hard constraint is a preset deterministic rule or a condition that verifies the implementation of the procedure. After the step of generating multiple termination paths using the child node that triggers the termination condition as the termination node, the method further includes: If the execution result of each node in the termination path satisfies the hard constraint, the termination path is regarded as a successful path. Write the successful path and a summary of the successful path into the external candidate memory; The summary of the successful path includes at least: the candidate binding protein sequence corresponding to the successful path, the key execution actions of the two-layer structured decision, the comprehensive evaluation of the path, and the path cost; The comprehensive evaluation of the pathway is confirmed based on the evaluation of binding proteins at each node in the successful pathway; The path cost is determined based on the remaining budget of the root node and the remaining budget of the terminating node.

[0014] To achieve the above objectives, this application proposes a training method for a large agent model, wherein the large agent model is used in conjunction with protein design, and the method includes: Construct a model context, wherein the model context includes at least: a protein design task, the current candidate node state, a summary of the internal memory tree, a summary of the external candidate memory, and an available budget; the internal memory tree is a rooted directed tree including nodes and directed edges; the node information includes the candidate state and remaining budget, and the directed edges store the execution actions of adjacent nodes; The large agent model to be trained is used to output a two-layer structured decision for the current candidate node based on the model context. The two-layer structured decision includes target candidate decision and workflow decision. The large agent model to be trained is a policy model that has completed supervised fine-tuning training. Based on the workflow decision, at least one external executor is invoked to execute the target candidate decision step by step, and the execution results and at least one candidate are obtained from the feedback of the external executor; Based on the execution result and the at least one candidate node, the child node of the current candidate node is gradually added to the internal memory tree, and the directed edge between the current candidate node and the child node is updated. Using the child node that triggers the termination condition as the termination node, generate multiple termination paths and confirm the comprehensive evaluation of each termination path. The step reward for each directed edge in each terminating path is determined based on the comprehensive evaluation of the path. The discounted reward for each directed edge is determined based on the steps described above, and the training signal is determined based on the discounted reward. Online reinforcement learning is performed on the large-scale agent model to be trained based on the training signal to update the parameters of the large-scale agent model to be trained.

[0015] In one embodiment, the training method includes: The execution result fed back by the external actuator is used as conditional information and input into the large-scale intelligent agent model to be trained; The training signal is applied only to the two-layer structured decision output by the large agent model to be trained, and the parameters of the large agent model to be trained are updated by backpropagation using a proximal strategy. The external actuator serves as the environment for the training method. During the training process, the parameters of the external actuator remain frozen and do not participate in the backpropagation.

[0016] In one embodiment, the step of rewarding the step of confirming each directed edge in each terminating path based on the path comprehensive evaluation includes: Step rewards are determined based on changes in protein evaluation. The step reward corresponding to the directed edge between adjacent nodes is determined based on the change in the binding protein evaluation between adjacent nodes in the termination path. The step of determining the training signal based on the discount reward includes: The advantage value is calculated based on the discount return and the preset value function, and the training signal is determined based on the advantage value.

[0017] In one embodiment, the step of using the large agent model to be trained to output the two-layer structured decision of the current candidate node based on the model context includes: If the binding protein design task includes initial candidates, then the state of root node candidates is formed based on the initial candidates, and the remaining budget of the root node is equal to the available budget in the model context; If the binding protein design task does not contain an initial candidate, the external executor is invoked to perform a reverse fold to generate an initial candidate. The state of the root node candidate is formed based on the generated initial candidate. The remaining budget of the root node is the available budget minus the cost of invoking the external executor to generate the initial candidate. Using the root node as the current candidate node, the large agent model to be trained outputs a two-layer structured decision of the current candidate node based on the model context.

[0018] In one embodiment, the step of invoking at least one external executor to progressively execute the target candidate decision based on the workflow decision, and obtaining the execution results and at least one candidate from the external executor, includes: Based on the binding protein, the task is designed to verify the validity of the workflow decision; After the verification is passed, the corresponding external executors are called step by step according to the order of the execution actions; Obtain the execution result and at least one candidate after the external executor performs the execution action.

[0019] In one embodiment, the external actuator includes a reverse folding actuator, an editing actuator, and an evaluation actuator, and the step of sequentially calling the corresponding external actuators based on the order of the execution actions includes: When the execution action is a reverse fold, the reverse fold executor is invoked, and the reverse fold executor generates at least one candidate protein based on the protein design task. When the execution action is editing, the editing executor is invoked. The editing executor performs local mutation or restricted sequence redesign on the current candidate based on the editable residues, maximum number of mutations, and local feedback of the target candidate decision to generate at least one candidate. The protein design task includes at least target information, design conditions, and structural requirements.

[0020] In one embodiment, the protein design task further includes hard constraints, and the step of sequentially invoking the corresponding external executors based on the order of the execution actions includes: When the execution action is evaluation, it is determined whether the candidate is generated by the reverse folding executor or the editing executor; If the candidate is not generated by the inversion executor or the editing executor, the evaluation executor is invoked to perform a rapid evaluation of the current candidate to generate a binding protein evaluation. If the candidate is generated by the reverse folding executor or the editing executor, the hard constraint checker is first called to determine whether the execution result fed back by the reverse folding executor or the editing executor satisfies the hard constraint; If the hard constraints are met, the evaluation executor is invoked to perform a rapid evaluation of the current candidate to generate a binding protein evaluation.

[0021] In one embodiment, the step of progressively adding child nodes of the current candidate node to the internal memory tree based on the execution result and the at least one candidate node, and updating the directed edges between the current candidate node and the child nodes, includes: For each candidate node, add a child node to the current candidate node in the internal memory tree and establish a branch from the child node to the current candidate node; Update the state of the candidate child nodes; The remaining budget of the child node is updated based on the standardized cost of performing the execution action once by the external actuator; Update the directed edges between the current candidate node and its child nodes based on the execution result.

[0022] In one embodiment, the candidate state includes at least the candidate sequence of the binding protein of the current candidate node and the evaluation of the binding protein. The step of generating multiple termination paths by using the child node that triggers the termination condition as the termination node includes: If the termination condition is triggered, the execution action is a termination action. The large model of the intelligent agent executes the termination action, takes the child node that triggered the termination condition as the termination node, and updates the information of the termination node. Multiple termination paths are generated by progressively adding child nodes from the root node until the termination node is reached.

[0023] In one embodiment, the termination condition includes at least one of an active termination condition and a forced termination condition; The active termination condition includes a termination action in the two-layer structured decision output by the agent's large model. The forced termination condition includes at least one of the following: the remaining budget of the current node is less than the execution cost required to call the corresponding external executor in the next step; the gain of the binding protein evaluation of the child node is less than or equal to the preset benefit convergence threshold; or the workflow decision fails to pass the task verification based on the binding protein.

[0024] In one embodiment, the hard constraint is a preset deterministic rule or a condition that verifies the implementation of the procedure. After the step of generating multiple termination paths using the child node that triggers the termination condition as the termination node, the method further includes: If the execution result of each node in the termination path satisfies the hard constraint, the termination path is regarded as a successful path. Write the successful path and a summary of the successful path into the external candidate memory; The summary of the successful path includes at least: the candidate binding protein sequence corresponding to the successful path, the key execution actions of the two-layer structured decision, the comprehensive evaluation of the path, and the path cost; The comprehensive evaluation of the pathway is confirmed based on the evaluation of binding proteins at each node in the successful pathway; The path cost is determined based on the remaining budget of the root node and the remaining budget of the terminating node.

[0025] In addition, to achieve the above objectives, this application also proposes an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the binding protein design method and / or the training method of the agent-based large model as described above.

[0026] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the binding protein design method and / or the training method of the agent-based large model described above.

[0027] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the binding protein design method and / or the training method of the agent-based large model described above.

[0028] One or more technical solutions proposed in this application have at least the following technical effects: The agent-based large-scale model separates the macro-level direction selection of protein design from the specific execution path planning through a two-layer structured decision-making mechanism that outputs target candidate decisions and workflow decisions. This allows the agent-based large-scale model to balance the rationality assessment of design objectives with the operability of execution actions within a unified framework. Simultaneously, it utilizes a rooted and directed internal memory tree structure to systematically store and manage candidate states, remaining budgets, and execution actions. This not only enables complete backtracking and state tracking of the design process but also allows for dynamic adjustment of the search space based on budget constraints, avoiding ineffective exploration. Furthermore, by calling external executors to execute step-by-step and provide feedback, the actual execution results are updated in the internal memory tree, using external executors to construct the runtime environment for the agent-based large-scale model. Finally, multiple termination paths are generated based on child nodes that trigger termination conditions, thereby improving the quality and efficiency of protein-based design while ensuring controllable design quality. Attached Figure Description

[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0030] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 This is a flowchart illustrating an embodiment of the binding protein design method based on a large agent model in this application. Figure 2 This is a flowchart illustrating Example 2 of the binding protein design method based on the large-scale intelligent agent model of this application. Figure 3 This is a flowchart illustrating Example 3 of the binding protein design method based on the large-scale intelligent agent model of this application. Figure 4 This is a flowchart illustrating the training method for the large intelligent agent model in Embodiment 4 of this application. Figure 5 This is a flowchart illustrating the training method for the large intelligent agent model in this application, as shown in Implementation Example 5. Figure 6 This is a flowchart illustrating the training method for the large intelligent agent model in this application, as shown in Implementation Example 5. Figure 7 This is a flowchart illustrating the training method for the large intelligent agent model of this application, as provided in Embodiment Six. Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the protein design method and / or training method of the large agent model based on the agent model in the embodiments of this application.

[0032] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0033] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0034] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0035] The main solution of this application embodiment is as follows: Obtaining the model context, wherein the model context includes at least: a protein design task, the current candidate node state, a summary of the internal memory tree, a summary of the external candidate memory, and available budget; the internal memory tree is a rooted directed tree, including nodes and directed edges; the node information includes the candidate state and remaining budget, and the directed edges store the execution actions of adjacent nodes; using the trained agent large model, outputting a two-layer structured decision for the current candidate node based on the model context, the two-layer structured decision includes a target candidate decision and a workflow decision; based on the workflow decision, calling at least one external executor to progressively execute the target candidate decision, obtaining the execution results and at least one candidate from the external executor feedback; based on the execution results and at least one candidate, progressively adding child nodes of the current candidate node in the internal memory tree, and updating the directed edges between the current candidate node and its child nodes; using the child node that triggers the termination condition as the termination node, generating multiple termination paths; wherein the workflow decision includes at least one execution action to complete the protein design task.

[0036] In this embodiment, for ease of description, the following description uses an electronic device as the execution subject.

[0037] This application provides a solution where a large-scale agent model separates the macro-level direction selection of protein design from the specific execution path planning through a two-layer structured decision-making mechanism that outputs target candidate decisions and workflow decisions. This allows the large-scale agent model to balance the rationality assessment of design goals and the operability of execution actions within a unified framework. Simultaneously, a rooted and directed internal memory tree structure is used to systematically store and manage candidate states, remaining budgets, and execution actions. This not only enables complete backtracking and state tracking of the design process but also allows for dynamic adjustment of the search space based on budget constraints, avoiding ineffective exploration. Furthermore, by calling external executors to execute step-by-step and provide feedback, the actual execution results are updated in the internal memory tree, utilizing external executors to construct the runtime environment for the large-scale agent model. Finally, multiple termination paths are generated based on child nodes that trigger termination conditions, thereby improving the quality and efficiency of protein design while ensuring controllable design quality.

[0038] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions. The following description uses an electronic device as an example to illustrate this embodiment and the subsequent embodiments.

[0039] Based on this, embodiments of this application provide a method for designing binding proteins based on a large-scale agent model, referring to... Figure 1 , Figure 1This is a flowchart illustrating the first embodiment of the binding protein design method based on the large-scale intelligent agent model of this application.

[0040] In this embodiment, the binding protein design method based on the agent-based large model includes steps S10-S40: Step S10: Obtain the model context, wherein the model context includes at least: the protein design task, the current candidate node state, the summary of the internal memory tree, the summary of the external candidate memory, and the available budget; the internal memory tree is a rooted directed tree, including nodes and directed edges; the information of the nodes includes the candidate state and the remaining budget, and the directed edges store the execution actions of adjacent nodes.

[0041] Optionally, the information incorporated into protein design task I includes at least: target information. Design conditions and structural requirements Constraints and Thresholds Resource budget .

[0042] It should be noted that the target information This includes: the amino acid sequence, three-dimensional structure, target chain identifier, target epitope, hotspot residues, and forbidden contact regions of the target protein. Among these, target epitopes, hotspot residues, and forbidden contact regions can be specified using chain identifiers and residue numbers, such as residues 45, 47, and 51 of chain A. The target protein is the target protein that serves as the binding target during the design process; candidate binding proteins are proteins or polypeptide chains to be generated, edited, evaluated, or exported. The target-binding protein complex is a complex formed jointly by the target protein and candidate binding proteins, or a complex obtained through structural prediction. Design conditions and structural requirements. This includes: the length range of the binding protein, allowed backbone types, allowed secondary structure types, acceptable binding postures or proximity directions, editable locations, frozen locations, maximum number of mutations per step, allowed amino acid sets, and initial candidates, etc. The initial candidates are any selectable data, including existing binding protein sequences, backbones, binding postures, or complex structures. Constraints and thresholds. This includes: hard constraint rules, minimum threshold for rapid evaluation, trigger threshold for high-precision evaluation, weight of comprehensive evaluation, and success gain threshold. and the return convergence threshold Resource budget This includes the call execution cost cap, total cost cap, maximum rollout steps, and concurrency for each of the inverse folding executor, edit executor, fast evaluation executor, and high-precision evaluation executor. This information is uniformly encoded into state fields and action preconditions that the agent's large model can accept. Available budget. It represents the executor resources still available at step t, which can be expressed as scalar computational cost or as a budget vector consisting of the number of refolds, edits, quick evaluations, and high-precision evaluations.

[0043] The current candidate node state at step t Represented as This indicates the current candidate sequences for binding proteins, along with the available backbone and binding posture; Represents the evaluation vector; Indicates a hard constraint condition; This represents the local feedback mapped to binding protein residue numbers (i.e., residue-level local feedback), used to map low-confidence regions, conflicting residues, unsatisfied hotspots, and interface biases to binding protein residue numbers. Evaluation vector This can include protein folding quality, target-binding protein interface quality, hotspot satisfaction, spatial conflict, exploitation metrics, constraint status, and evaluation uncertainty, used to indicate whether a candidate is close to the final success criteria. If the current candidate does not exist or has not yet been evaluated, the value of the corresponding field is empty.

[0044] The internal memory tree Mt is a rooted directed tree associated with the agent's large model and maintained within the current rollout. It is a rooted directed tree, and its internal memory tree consists of nodes and directed edges. Tree nodes store <state s, remaining budget b>, and tree edges store the current action a; each state transition can also be serialized into a triple << state s, remaining budget b>. , , For example, the root node of the internal memory tree. storage ,in, This represents the remaining budget allowed under the initial conditions, assuming the protein design task includes initial candidates. This is equivalent to combining the resource budget in protein design tasks. If the protein design task does not include initial candidates, To incorporate resource budgets into protein design tasks The remaining budget after deducting the cost of generating the initial candidate from the first inverse fold.

[0045] The external candidate memory E is a candidate storage unit located outside the current rollout and model context. The external candidate memory is empty during the first rollout of each task. After generating the terminating path, the paths that meet the success criteria, the candidate terminating nodes, and their evaluation summaries are written to the external candidate memory.

[0046] Optionally, the agent's large model receives the model context at step t. As shown below: (I, ,summary( Abstract (E), , ); Where I represents the design task for binding proteins; This represents the current candidate node state. Indicates the remaining budget allowed under the current candidate node state; set of executable actions. It is the set of actions (including action types and their parameter ranges) that the large agent model is allowed to output in the current node state, rather than the fixed execution order of multiple executors; Summary ( ) is the internal memory tree The compressed representation is formed by extracting the state, execution actions, and remaining budget information from the current candidate node to the root node, and retaining several branch nodes that can continue execution; Summary ( ) is an external candidate memory The compressed representation is formed by selecting historical successful candidates and their key execution actions based on their similarity to the current task or current candidate node. The above summary only retains preset fields and does not include the complete memory tree or the complete historical trajectory of external candidate memories.

[0047] Step S20: Using the trained agent model, output the two-layer structured decision of the current candidate node based on the model context. The two-layer structured decision includes target candidate decision and workflow decision.

[0048] When generating child nodes for the first time, the candidates for the current candidate node come from the initial candidates in the protein binding design task, or from the candidates generated by previous defolding or editing actions. The current candidate node can always be determined by the currently active node in the internal memory tree.

[0049] The two-layer structured decision is uniformly encapsulated into data containing action type and parameter fields. The parameter fields include: target candidate decision parameters and workflow decision control parameters.

[0050] Optionally, workflow decisions include: at least one action to complete the protein design task. This includes its execution parameters, the number of candidate outputs, and the execution budget ceiling. The set of execution action types is defined as follows: .in, This is a reverse folding action. To edit actions, To evaluate the action, To terminate the action.

[0051] Optionally, the target candidate decision includes: selecting the current candidate from the internal memory tree, specifying the range of editable residues and the maximum number of mutations, providing a local mutation set, invoking defolding, preserving hotspot residues, or restoring historical candidates.

[0052] Step S30: Based on the workflow decision, call at least one external executor to execute the target candidate decision step by step, and obtain the execution results and at least one candidate fed back by the external executor.

[0053] In this embodiment, external actuators are deployed on local devices, servers, cloud platforms, or high-performance computing clusters. They can be located on the same device as the large-scale agent model or provide remote services to the large-scale agent model. The actuator identifiers, input fields, output fields, parameter ranges, preconditions, single-cycle costs, and accuracy levels of each actuator are uniformly encapsulated into structured input executable action interfaces and registered. This constructs a controlled closed-loop interactive environment, enabling the actual execution of candidate generation, sequence editing, searching, constraint verification, and complex evaluation, and providing feedback on the actual execution results. The external actuators actually execute the two-layer structured decision-making, constructing a runnable environment for the large-scale agent model around the protein binding design task to form a multi-round complete execution trajectory (rollout). The external actuators, including inversion actuators, editing actuators, and evaluation actuators, are invoked based on the two-layer structured decision output by the large-scale agent model. External actuators may also include hard constraint checkers, which can serve as independent rule programs or pre-gating gates for evaluation actuators. There is no fixed overall calling order among external actuators. Their calling order is determined by the actions output by the large model of the agent. However, the candidates after defolding or editing need to undergo hard constraint gating and fast evaluation first, so that each candidate of the newly added sub-node forms a sub-state containing the binding protein sequence and the binding protein evaluation.

[0054] Optionally, external actuators are deployed on local devices, servers, cloud platforms, or high-performance computing clusters. The actuator identifier, input fields, output fields, parameter ranges, preconditions, single-time cost, and accuracy levels of each external actuator are uniformly encapsulated into a structured input executable action interface and registered. This creates a controlled closed-loop interactive environment where the external actuators actually execute the two-layer structured decision-making and provide feedback on the actual execution results.

[0055] Optionally, the execution results include the execution cost required to call the corresponding external executor, whether the hard constraints are passed, the evaluation vector, residue-level local feedback, etc.

[0056] In this embodiment, when the workflow decision includes an edit action type, the action type is parsed, and the edit executor identifier and execution parameters in the decision are confirmed. Then, it is verified whether the remaining budget of the current candidate node is sufficient to cover the cost of the edit executor completing the edit action. If the verification passes, the edit executor is invoked to execute the target candidate decision step by step. After the edit executor completes its execution, at least one candidate and its execution result are generated.

[0057] When a workflow decision includes an action type of inversion, the action type is parsed, and the inversion executor identifier and execution parameters in the decision are confirmed. Then, it is verified whether the total remaining budget for the current target task is sufficient to cover the cost of the inversion executor completing the inversion action, and whether the inversion executor is available in the current state. If the verification passes, the inversion executor is invoked to execute the target candidate decision step by step. After the inversion executor completes its execution, at least one candidate and its execution result are generated.

[0058] When a workflow decision includes an action type for evaluation, the action type is parsed, and the evaluation executor identifier and execution parameters in the decision are confirmed. Then, it is verified whether the candidate corresponding to the current candidate node has passed the hard constraint gating, and whether the remaining high-precision evaluation budget is sufficient to cover the cost of this evaluation action. After passing the verification, the evaluation executor is invoked to execute the target candidate decision step by step. After the evaluation executor completes its run, the evaluation results and execution results of the candidate are generated. It should be noted that evaluation actions differ from de-folding or editing actions; the evaluation executor does not modify the candidate, but only evaluates the generated candidate individually, and converts the evaluation results into a unified binding protein evaluation, including evaluation vectors, via an adapter. and local feedback at the residue level To address potential surrogate index biases that may arise from a single evaluator, the final candidate can be verified by calling independent structure prediction or energy evaluation executors.

[0059] Step S40: Based on the execution result and the at least one candidate node, gradually add child nodes of the current candidate node to the internal memory tree, and update the directed edges between the current candidate node and the child nodes.

[0060] After receiving the execution result and at least one candidate node, a new child node is added to the current candidate node. This child node stores the updated state of the candidate. A directed edge is established between the current candidate node and each new child node, and the two-layer structured decision that triggered this execution action is stored on this edge.

[0061] In an optional embodiment, step S40 includes: adding a child node of the current candidate node in the internal memory tree for each candidate node, and establishing a branch from the child node to the current candidate node; updating the state of the child node candidate; updating the remaining budget of the child node according to the standardized cost of the external executor performing one execution action; and updating the directed edge between the current candidate node and the child node according to the execution result.

[0062] If the external actuator performs the action The required execution cost is The remaining budget is then updated to The actuator feedback generates new candidate states. Then, child nodes are added to the internal memory tree. And add from the current candidate node To child nodes Marked as The directed edges. Tree nodes store the <state> Remaining budget > And directed edges store <current action> The 〉 corresponds to the triple representation.

[0063] By adding child nodes and establishing branches for each candidate in the internal memory tree with the current candidate node as the parent node, a structured and dynamic expansion of the design search space is achieved. This ensures that each exploration path is fully recorded in the tree topology, guaranteeing the global traceability and path reproducibility of the design process. Updating the state of the candidate child nodes ensures that the binding protein candidate information carried by each node in the memory tree is synchronized in real time with the execution process. The remaining budget of the child node is precisely deducted based on the standardized cost of one execution action by the external executor, achieving transparent accounting of resource consumption and rigid implementation of budget constraints, preventing the search process from exceeding the preset resource limit. Simultaneously, the execution results are embedded in the directed edges between the current candidate node and its child nodes, creating an explicit association between actions and execution results. This provides structured prior knowledge for subsequent large-scale agent models to make decisions based on historical execution experience, perform path evaluation, and determine termination conditions, improving the efficiency and interpretability of iterative searches.

[0064] Step S50: Using the child node that triggers the termination condition as the termination node, generate multiple termination paths.

[0065] In the internal memory tree, a terminating path refers to a complete sequence that starts from the root node, proceeds along directed edges through one or more node states and actions, and finally reaches a child node marked as terminated. The terminating path records the entire two-layer structured decision-making and execution process from the start of the task until a candidate branch is terminated.

[0066] The generation of termination paths enables the back-attribution of success or failure at termination along the parent-child node relationship to each step in the path, thereby calculating the discounted reward for each action. In multi-branch parallel search, the length and termination time of termination paths may differ between branches, but each termination path fully records the candidate states and execution results of all decisions from the root node to the branch endpoint, forming the decision attribution for each step. This enhances the interpretability of the termination path and provides a structured data foundation for subsequent protein design.

[0067] Optionally, suppose the internal memory tree contains K paths from the root node to the terminal node, and the k-th path can be represented as a sequence of alternating nodes and actions: τ k =(v0 k a0 k v1 k a1 k ,…,a_{T k 1} k ,v_{T k} k ); Among them, v0 k The root node stores the initial candidate state and the initial remaining budget; a0 k The first action starting from the root node; v1 k For the child nodes corresponding to the new candidates generated after the first action is executed, store the state and remaining budget of the child node candidates; and so on, v_{T k} k The terminator is the terminal node, i.e., the end point of the path. Each directed edge stores the execution action of the two-layer structured decision that triggers the state transition. .

[0068] In a single rollout, the internal memory tree may have multiple branches explored in parallel, each branch terminating and forming multiple independent termination paths. All termination paths are categorized into two types based on the quality of the termination node: successful paths and failed paths. A successful path is one that has terminated, satisfies all hard constraints, and whose protein-binding evaluation of the candidate state of the termination node has a gain relative to the protein-binding evaluation of the initial candidate state of the root node of the path that is not less than a preset threshold δ. The candidate and key execution action summaries of the termination nodes in successful paths are written to the external candidate memory for retrieval and reference in subsequent task decisions. A failed path is one that has terminated but does not meet the success criteria, including situations such as budget exhaustion without reaching the success criteria, convergence of gains but insufficient quality, premature termination, violation of hard constraints, generation of repetitive sequences, or continuous invalid searches. Failed paths are not written to the external candidate memory but are retained in the trajectory storage of the current rollout.

[0069] In one embodiment, the termination condition includes at least one of an active termination condition and a forced termination condition; the active termination condition includes a termination action in the two-layer structured decision output by the agent's large model; the forced termination condition includes at least one of the following: the remaining budget of the current node is less than the execution cost required to call the corresponding external executor in the next step, and the gain of the binding protein evaluation of the child node is less than or equal to a preset revenue convergence threshold. The workflow decision based on the task design based on the binding protein failed.

[0070] A child node that triggers a termination condition is determined to be a termination node, thus forming a termination path. This requires triggering at least one of two termination conditions: active termination or forced termination. Active termination is a structured decision where the agent's large model directly outputs the termination type, marking the current candidate node as the termination node. Forced termination includes the following situations: the remaining budget is lower than the execution cost required for any subsequent legal action, i.e., resources are insufficient to pay for any effective operation; the maximum binding protein evaluation gain of the most recent m effective design actions is not greater than the benefit convergence threshold ε, indicating that continuing the search on this branch will not yield meaningful improvement; the current path has reached the system-set maximum step limit; or the current node has no legally executable actions.

[0071] In this embodiment, the agent-based large model separates the macro-level direction selection of protein design from the specific execution path planning through a two-layer structured decision-making mechanism that outputs target candidate decisions and workflow decisions. This allows the agent-based large model to balance the rationality assessment of design goals and the operability of execution actions within a unified framework. Simultaneously, a rooted and directed internal memory tree structure is used to systematically store and manage candidate states, remaining budgets, and execution actions. This not only enables complete backtracking and state tracking of the design process but also allows for dynamic adjustment of the search space based on budget constraints, avoiding ineffective exploration. Furthermore, by calling external executors to execute step-by-step and provide feedback, the actual execution results are updated to the internal memory tree, utilizing external executors to construct the runtime environment for the agent-based large model. Finally, multiple termination paths are generated based on child nodes that trigger termination conditions, thereby improving the quality and efficiency of protein design while ensuring controllable design quality.

[0072] Based on the first embodiment of this application, in the second embodiment of this application, the same or similar content as the above embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S20 includes: Step S21: If the binding protein design task includes initial candidates, then the state of root node candidates is formed according to the initial candidates, and the remaining budget of the root node is equal to the available budget in the model context. Step S22: If the binding protein design task does not include an initial candidate, the external executor is invoked to perform a reverse folding to generate an initial candidate. The state of the root node candidate is formed based on the generated initial candidate. The remaining budget of the root node is the available budget minus the cost of invoking the external executor to generate the initial candidate. Step S23: Using the root node as the current candidate node, the trained agent model outputs the two-layer structured decision of the current candidate node based on the model context.

[0073] If the protein design task includes initial candidates, then the root node candidate state is formed based on the initial candidates. If the protein design task does not include initial candidates, the agent's large model first calls the reverse folding executor to perform a reverse fold, generating an initial candidate to form the root node candidate state. .

[0074] In an optional embodiment, the candidate state includes at least the candidate sequence of the binding protein of the current candidate node and the evaluation of the binding protein. Step S50 includes: if a termination condition is triggered, the action is a termination action, the agent large model executes the termination action, the child node that triggered the termination condition is taken as the termination node, and the information of the termination node is updated; multiple termination paths are generated according to the process of gradually adding child nodes from the root node until the termination node; wherein, the information of the termination node includes the status of the termination node candidate and the remaining budget.

[0075] Optionally, the candidate state includes the sequence of the candidate binding protein and the binding protein evaluation. It may also include an optional backbone and binding posture, and the execution result. The binding protein evaluation includes an evaluation vector and local feedback mapped to the binding protein residue number.

[0076] In reinforcement learning rollout, the summaries of the internal memory tree and the summaries of the external candidate memories are used as the model context. A portion of the input agent's large model is used to make it based on the updated model. Output the next two-layer structured decision. When the executor returns multiple candidates at once by reversing or editing, each candidate becomes a child node of the current candidate node, thus naturally forming multiple candidate paths. The currently active node can be selected from nodes that have not yet terminated and still have executable actions, according to model decisions or preset scheduling rules.

[0077] Suppose the internal memory tree contains The path from the root node to the terminal node, the first... The path is represented as: ; in, , This refers to the action of connecting adjacent nodes.

[0078] set up For the state-binding protein evaluation function, This indicates that all hard constraints are satisfied. This represents the initial evaluable state in the path. When the path has terminated and... The path is considered a successful path if it satisfies the following condition: ; When the protein design task already includes initial candidates that have completed basic evaluation. This is equal to the state of the root node candidate; when there are no initial candidates in the protein design task. This represents the state where the path has undergone its first inverse fold and completed a rapid evaluation. This is a preset threshold. All paths that have terminated but do not meet the success criteria are considered failed paths.

[0079] For asynchronous execution, each call request to an external executor carries a task identifier, rollout identifier, current node identifier, parent node identifier, path or branch identifier, decision event identifier, executor identifier, and model version identifier. A branch refers to a candidate path in the internal memory tree formed by different inversion outputs, different editing results, or different evaluation routes. A runnable branch is a path that has not yet terminated, has sufficient budget, and contains a valid action. Even if multiple executor results are returned out of order, the requesting node is written back based on the above identifiers, preventing incorrect association with other paths.

[0080] When the termination condition is triggered, the corresponding child node is marked as the termination node and its information is updated by the termination action, realizing the orderly convergence of the search process and avoiding meaningless path extension. Then, based on the complete topological relationship extending from the root node to the termination node, multiple termination paths are generated. This not only fully traces the evolution trajectory and decision chain of each candidate scheme, but also makes the design process globally interpretable. The termination node information also includes the candidate binding protein sequence, binding protein evaluation and remaining budget, allowing users to intuitively compare the comprehensive performance of different termination schemes in terms of structural quality, binding performance and resource consumption. This allows the optimal or most suitable binding protein design output to be selected from multiple termination paths, improving the evaluability and selectivity of the design results.

[0081] In an optional embodiment, the termination condition includes at least one of an active termination condition and a forced termination condition; the active termination condition includes a termination action in the two-layer structured decision output by the agent's large model; the forced termination condition includes at least one of the following: the remaining budget of the current node is less than the execution cost required to call the corresponding external executor in the next step, the gain of the binding protein evaluation of the child node is less than or equal to a preset benefit convergence threshold, and the workflow decision based on the binding protein design task fails.

[0082] Termination conditions are divided into two categories: active termination conditions and mandatory termination conditions. Active termination conditions empower the agent's large model with the ability to autonomously judge the task completion rate based on the design progress. When the model believes that the current candidate has met the design goal, it can actively output a termination action, reflecting the intelligence and flexibility of the large model in high-level strategies. Mandatory termination conditions set insurmountable rigid boundaries from three dimensions: resources, benefits, and legitimacy. When the remaining budget is insufficient to support the next step of execution, it automatically truncates to prevent resource exhaustion-induced loss of control. When the evaluation gain of a child node is lower than or equal to the preset benefit convergence threshold, it is forcibly stopped to avoid ineffective iterations and overfitting risks caused by diminishing marginal benefits. When a workflow decision fails the task validation, it is terminated immediately to prevent the continued execution of erroneous decisions. The two types of termination conditions complement each other, ensuring that the search process converges efficiently within reasonable boundaries, and improving the automation, computational economy, and reliability of the protein design method through diversified convergence mechanisms.

[0083] In an optional embodiment, the hard constraint is a preset deterministic rule or a condition for the verifiable implementation of the procedure. After step S50, the method further includes: if the execution result of each node in the termination path satisfies the hard constraint, the termination path is regarded as a successful path; the successful path and its summary are written into the external candidate memory; the summary of the successful path includes at least: the candidate sequence of the binding protein corresponding to the successful path, the key execution action of the two-layer structured decision, the comprehensive evaluation of the path, and the path cost; the comprehensive evaluation of the path is confirmed based on the binding protein evaluation of each node in the successful path; the path cost is confirmed based on the remaining budget of the root node and the remaining budget of the termination node.

[0084] In this embodiment, hard constraints are pre-defined deterministic rules or conditions for the implementation of verifiable procedures, including one of the following requirements: target chain cannot be modified, binding protein length, allowed amino acid set, frozen site, allowed number of mutations, repetitive fragments, chain correspondence, hotspot preservation, and basic geometric feasibility.

[0085] Optionally, protein evaluation can be combined with evaluation vectors and residue-level local feedback. Specifically, the evaluation vector... This can include protein folding quality, target-binding protein interface quality, hotspot satisfaction, spatial conflict, exploitation metrics, constraint status, and evaluation uncertainty, used to indicate whether a candidate is close to the final success criteria. Residue-level local feedback. This represents local feedback mapped to the number of binding protein residues.

[0086] The set of successful paths is represented as The set of failed paths is represented as At the start of the first rollout for each task, the external candidate memory is empty; after the path terminates, it will... The path, candidate termination nodes, key execution actions, comprehensive path evaluation, and cost summary are written into the external candidate memory E. The trajectory is retained in the current rollout's trajectory storage for training, but is not written to the external candidate memory as a preferred candidate. Subsequent rollouts can retrieve it from... Retrieve successful paths similar to the current task or current candidate, and prioritize them. A summary of candidate and key execution actions for each termination node is used as model input.

[0087] By defining hard constraints as pre-defined deterministic rules or conditions for the implementation of verifiable procedures, an objective and unambiguous rigid screening benchmark is provided for the protein design results. After generating the termination path, the execution results of each node in the path are enumerated one by one for hard constraint verification. Only when all nodes in the entire path satisfy the hard constraints is it marked as a successful path, thereby ensuring the global reliability of the output scheme in terms of structural rationality and task compliance, and avoiding false successes where intermediate process violations are ignored simply because the termination node meets the criteria. Furthermore, the successful paths and their summaries are written into external candidate memory, realizing the cross-task accumulation and reuse of high-quality design experience and positive decision-making patterns, and expanding the knowledge boundary of the large-scale agent model. The successful path summary includes candidate binding protein sequences, key execution actions of the two-layer structured decision-making process, comprehensive path evaluation, and path cost. It not only fully traces the structural features and decision-making logic of the solution, but also forms a comprehensive path evaluation by aggregating the binding protein evaluations of each node and accurately calculates the path cost by using the difference in remaining budget between the root node and the terminal node. This allows users to intuitively compare the advantages and disadvantages of different successful solutions from multiple dimensions, improving the interpretability and evaluability of the binding protein design results.

[0088] In this embodiment, when the protein binding design task already includes initial candidates, it is directly used as the root node and the available budget is fully retained, avoiding redundant computational overhead. When the protein binding design task does not include initial candidates, an external executor is automatically invoked to perform a reverse folding to generate initial candidates, and the generation cost is precisely deducted from the available budget to obtain the remaining budget for the root node. This ensures both the method's self-starting capability in scenarios without prior information and the accuracy of budget calculation and the rationality of subsequent resource allocation. Based on this, a two-layer structured decision-making process is initiated with the root node as the current candidate node, laying the initial state foundation for subsequent multi-path iterative optimization based on memory trees.

[0089] Based on any embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S30 includes: Step S31: Verify the validity of the workflow decision based on the task designed for the binding protein; Step S32: After the verification is passed, the corresponding external executors are called step by step according to the order of the execution actions; Step S33: Obtain the execution result and at least one candidate after the external executor performs the execution action.

[0090] Optionally, when the workflow decision includes at least one execution action and its execution parameters, the number of candidate outputs, and the execution budget limit for completing the binding protein design task, the validity of the execution action, its execution parameters, and the execution budget limit in the workflow decision is verified based on the binding protein design task. Valid execution actions are sent to the corresponding external executor. After the executor is folded back or edited to return one or more candidates, hard constraint gating and at least one fast evaluation are performed on each candidate, so that each newly added sub-node's candidate forms a sub-state containing the binding protein sequence and the binding protein evaluation. Evaluation actions can be used to improve evaluation accuracy, perform independent verification, or supplement residue-level feedback. Termination actions do not change the candidates but mark the current node as a termination node.

[0091] In an optional embodiment, if the minimum threshold for rapid evaluation is reached, the rapid evaluation executor should be invoked. If the rapid evaluation result is a low folding score but the interface score and hotspot contact meet the threshold, the edit executor is invoked to prioritize editing low-confidence residues that are not hotspots or frozen. If the folding score meets the threshold but the interface score is low or there are unmet hotspots, the edit executor is invoked to prioritize editing allowed positions around the interface. If the rapid evaluation reaches the high-precision trigger threshold and the high-precision budget is sufficient, the high-precision evaluation executor is invoked to output an evaluation action. The binding protein evaluation can be calculated based on the rapid evaluation result, the high-precision evaluation result, and the weight of the comprehensive evaluation. If the binding protein evaluation gain of the three most recent edits is less than ε, or the remaining budget is lower than the execution cost required for any subsequent legal action, a termination action is output. It should be noted that different precision evaluation executors require different costs. When the minimum threshold for rapid evaluation is met, low-cost rapid evaluation executors are used to estimate sequence naturalness, aggregation tendency, net charge or hydrophobicity, secondary structure tendency, binding protein monomer folding confidence, and obvious geometric conflicts. If the rapid evaluation reaches the high precision trigger threshold and the high precision budget is sufficient, the high precision evaluation executor is called to output high precision evaluation. High-cost high precision evaluation is used to predict the target-binding protein complex and obtain the overall structural confidence of the binding protein, the confidence and uncertainty of the complex interface, the binding protein backbone or binding posture deviation, hot spot residue contact, number of interface contacts, spatial conflicts, buried surface area or energy evaluation.

[0092] In an optional embodiment, step S32 includes: when the execution action is defolding, invoking a defolding executor, which generates at least one candidate based on the protein design task; when the execution action is editing, invoking an editing executor, which performs local mutation or restricted sequence redesign on the current candidate based on the editable residues, maximum number of mutations, and local feedback of the target candidate decision to generate at least one candidate; wherein, the protein design task includes at least target information, design conditions, and structural requirements.

[0093] Optionally, the reverse-folding actuator generates one or more candidate sequences based on the binding protein backbone, structural requirements, target epitopes, and sequence constraints in the protein design task.

[0094] The reverse-folding actuator is responsible for generating the initial structure from scratch based on the protein design task, which includes target information, design conditions, and structural requirements, providing a high-quality starting point for the design space. The editing actuator, on the other hand, performs local mutations or restricted sequence redesign on the current candidate based on the explicitly defined editable residues, maximum number of mutations, and local feedback in the target candidate decision, achieving targeted and refined improvement within the constraint boundaries and avoiding aimless global search.

[0095] In an optional embodiment, step S32 includes: when the execution action is evaluation, determining whether the candidate was generated by the inversion executor or the editing executor; if the candidate was not generated by the inversion executor or the editing executor, calling the evaluation executor to perform a fast evaluation on the current candidate to generate a binding protein evaluation; if the candidate was generated by the inversion executor or the editing executor, first calling the hard constraint checker to determine whether the execution result fed back by the inversion executor or the editing executor satisfies the hard constraints; if the hard constraints are satisfied, calling the evaluation executor to perform a fast evaluation on the current candidate to generate a binding protein evaluation, including an evaluation vector. and residue-level local feedback .

[0096] In this embodiment, the hard constraint checker is an independent rule procedure or a hard constraint gating pre-positioned in the evaluation executor. If the current candidate node is marked as a termination node, the termination reason, the evaluation at termination, and the remaining budget are recorded; if required by the task, the independent evaluation executor can be invoked for final review before writing to the external candidate memory.

[0097] Optionally, the reverse folding actuator generates one or more candidate sequences based on the binding protein backbone, structural requirements, target epitopes, and sequence constraints in the protein design task. Each candidate sequence is first subjected to hard constraint gating, followed by rapid folding and interface evaluation.

[0098] Optionally, the edit executor performs local mutations or restricted sequence redesign on the current candidate based on the editable residues, maximum number of mutations, and local feedback specified in the target candidate decision in the two-layer structured decision-making process, wherein each edit result is subject to hard constraint gating and rapid evaluation.

[0099] Optionally, the evaluation executor performs rapid evaluation, high-precision evaluation, target-binding protein complex structure prediction, docking, interface energy evaluation, or independent verification on the current candidate, and converts the evaluation results into a unified binding protein evaluation based on the weight of the comprehensive evaluation, including evaluation vectors and residue-level feedback. The evaluation action can achieve sub-nodes where the candidate sequence remains unchanged but the evaluation results are updated.

[0100] The output of the evaluation actuator is converted into local feedback that is uniformly mapped to the binding protein residue number through pre-registered fields. Each node in the internal memory tree reserves a residue-level local feedback field for its candidate states. However, if the evaluation is not yet complete or residue-level feedback results are unavailable, this field will be empty. Local feedback is used to locate the residues that need to be edited, limit the editable range, and assist in selecting the next action; the corresponding quality changes are also used to generate training signals. For example, if a high-precision evaluator returns low confidence for the interface at positions 31 to 35 of the binding protein, it can be converted into local feedback. For example, residues 31-35, with issue type = low confidence, severity = 0.72, and suggested action = restricted editing. If the 18th residue has a spatial conflict with the target, then residue 18 is recorded, with issue type = spatial conflict and severity = 0.91. The mapping result of this field is completed through an adapter program, which can be implemented using a function interface encapsulation, a Python wrapper, a REST or gRPC client, without requiring the use of a specific third-party adapter.

[0101] The three types of actuators work collaboratively, executing target candidate decisions step by step under workflow control. This enables the binding protein design process to possess both macroscopic generation capabilities and microscopic optimization precision, ensuring structural rationality and task compliance while improving the targeting and design efficiency of candidate improvements. By introducing hard constraints as a pre-filtering mechanism and designing evaluation processes with varying degrees of precision based on candidate sources, the computational efficiency and reliability of binding protein design are improved. For candidates newly generated by the folding or editing actuators, a hard constraint checker is first invoked to determine rigid conditions. Only when the execution result meets the hard constraints does the candidate enter the rapid evaluation stage of the evaluation actuator, thus concentrating computational resources on candidates that meet basic feasibility requirements. For candidates not generated from the source, the evaluation actuator is directly invoked to perform rapid evaluation and generate residue-level local feedback, ensuring the flexibility and coverage of the evaluation process.

[0102] In this embodiment, the legality verification of workflow decisions based on the protein design task can effectively intercept decisions that do not conform to task constraints or have logical errors before the execution action is triggered, preventing invalid or even harmful external calls, thereby improving system robustness and saving computing resources. After the verification is passed, the corresponding external executors are called step by step according to the order of execution actions to execute the target candidate decision, ensuring the atomicity and timing correctness of the multi-step workflow and avoiding inconsistencies in state or incorrect results due to disordered execution order. Finally, by obtaining the execution results and candidates fed back by the external executors, the execution process is made observable, verifiable and traceable, providing reliable input for the dynamic update of the memory tree and subsequent decision optimization.

[0103] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the binding protein design method based on the large-scale intelligent agent model of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0104] This application also provides a method for training a large model of an intelligent agent, referring to... Figure 4 , Figure 1 This is a flowchart illustrating the first embodiment of the training method for the large intelligent agent model of this application.

[0105] Step S60: Construct a model context, wherein the model context includes at least: a protein design task, the current state of candidate nodes, a summary of the internal memory tree, a summary of the external candidate memory, and an available budget; the internal memory tree is a rooted directed tree including nodes and directed edges; the information of the nodes includes the candidate state and remaining budget, and the directed edges store the execution actions of adjacent nodes.

[0106] Optionally, the information incorporated into protein design task I includes at least: target information. Design conditions and structural requirements Constraints and Thresholds Resource budget .

[0107] It should be noted that the target information This includes: the amino acid sequence, three-dimensional structure, target chain identifier, target epitope, hotspot residues, and forbidden contact regions of the target protein. Among these, target epitopes, hotspot residues, and forbidden contact regions can be specified using chain identifiers and residue numbers, such as residues 45, 47, and 51 of chain A. The target protein is the target protein that serves as the binding target during the design process; candidate binding proteins are proteins or polypeptide chains to be generated, edited, evaluated, or exported. The target-binding protein complex is a complex formed jointly by the target protein and candidate binding proteins, or a complex obtained through structural prediction. Design conditions and structural requirements. This includes: the length range of the binding protein, allowed backbone types, allowed secondary structure types, acceptable binding postures or proximity directions, editable locations, frozen locations, maximum number of mutations per step, allowed amino acid sets, and initial candidates, etc. The initial candidates are any selectable data, including existing binding protein sequences, backbones, binding postures, or complex structures. Constraints and thresholds. This includes: hard constraint rules, minimum threshold for rapid evaluation, trigger threshold for high-precision evaluation, weight of comprehensive evaluation, and success gain threshold. and the return convergence threshold Resource budget This includes the call execution cost cap, total cost cap, maximum rollout steps, and concurrency for each of the inverse folding executor, edit executor, fast evaluation executor, and high-precision evaluation executor. This information is uniformly encoded into state fields and action preconditions that the agent's large model can accept. Available budget. It represents the executor resources still available at step t, which can be expressed as scalar computational cost or as a budget vector consisting of the number of refolds, edits, quick evaluations, and high-precision evaluations.

[0108] The current candidate node state at step t Represented as This indicates the current candidate sequences for binding proteins, along with the available backbone and binding posture; Represents the evaluation vector; Indicates a hard constraint condition; This represents the local feedback mapped to binding protein residue numbers (i.e., residue-level local feedback), used to map low-confidence regions, conflicting residues, unsatisfied hotspots, and interface biases to binding protein residue numbers. Evaluation vector This can include protein folding quality, target-binding protein interface quality, hotspot satisfaction, spatial conflict, exploitation metrics, constraint status, and evaluation uncertainty, used to indicate whether a candidate is close to the final success criteria. If the current candidate does not exist or has not yet been evaluated, the value of the corresponding field is empty.

[0109] The internal memory tree Mt is a rooted directed tree associated with the agent's large model and maintained within the current rollout. It is a rooted directed tree, and its internal memory tree consists of nodes and directed edges. Tree nodes store <state s, remaining budget b>, and tree edges store the current action a; each state transition can also be serialized into a triple << state s, remaining budget b>. , , For example, the root node of the internal memory tree. storage ,in, This represents the remaining budget allowed under the initial conditions, assuming the protein design task includes initial candidates. This is equivalent to combining the resource budget in protein design tasks. If the protein design task does not include initial candidates, To incorporate resource budgets into protein design tasks The remaining budget after deducting the cost of generating the initial candidate from the first inverse fold.

[0110] The external candidate memory E is a candidate storage unit located outside the current rollout and model context. The external candidate memory is empty during the first rollout of each task. After generating the terminating path, the paths that meet the success criteria, the candidate terminating nodes, and their evaluation summaries are written to the external candidate memory.

[0111] Optionally, the agent's large model receives the model context at step t. As shown below: (I, ,summary( Abstract (E), , ); Where I represents the design task for binding proteins; This represents the current candidate node state. Indicates the remaining budget allowed under the current candidate node state; set of executable actions. It is the set of actions (including action types and their parameter ranges) that the large agent model is allowed to output in the current node state, rather than the fixed execution order of multiple executors; Summary ( ) is the internal memory tree The compressed representation is formed by extracting the state, execution actions, and remaining budget information from the current candidate node to the root node, and retaining several branch nodes that can continue execution; Summary ( ) is an external candidate memory The compressed representation is formed by selecting historical successful candidates and their key execution actions based on their similarity to the current task or current candidate node. The above summary only retains preset fields and does not include the complete memory tree or the complete historical trajectory of external candidate memories.

[0112] Step S70: Utilize the large agent model to be trained to output a two-layer structured decision for the current candidate node based on the model context. The two-layer structured decision includes target candidate decision and workflow decision. The large agent model to be trained is a policy model that has completed supervised fine-tuning training.

[0113] When generating child nodes for the first time, the candidates for the current candidate node come from the initial candidates in the protein binding design task, or from the candidates generated by previous defolding or editing actions. The current candidate node can always be determined by the currently active node in the internal memory tree.

[0114] The two-layer structured decision is uniformly encapsulated into data containing action type and parameter fields. The parameter fields include: target candidate decision parameters and workflow decision control parameters.

[0115] Optionally, workflow decisions include: at least one action to complete the protein binding design task and its execution parameters, the number of candidate outputs, and the execution budget ceiling. The set of action types is defined as follows: .in, This is a reverse folding action. To edit actions, To evaluate the action, To terminate the action.

[0116] Optionally, the target candidate decision includes: selecting the current candidate from the internal memory tree, specifying the range of editable residues and the maximum number of mutations, providing a local mutation set, invoking defolding, preserving hotspot residues, or restoring historical candidates.

[0117] Step S80: Based on the workflow decision, call at least one external executor to execute the target candidate decision step by step, and obtain the execution results and at least one candidate fed back by the external executor.

[0118] In this embodiment, external actuators are deployed on local devices, servers, cloud platforms, or high-performance computing clusters. They can be located on the same device as the large-scale agent model or provide remote services to the large-scale agent model. The actuator identifiers, input fields, output fields, parameter ranges, preconditions, single-cycle costs, and accuracy levels of each actuator are uniformly encapsulated into structured input executable action interfaces and registered. This constructs a controlled closed-loop interactive environment, enabling the actual execution of candidate generation, sequence editing, searching, constraint verification, and complex evaluation, and providing feedback on the actual execution results. The external actuators actually execute the two-layer structured decision-making, constructing a runnable environment for the large-scale agent model around the protein binding design task to form a multi-round complete execution trajectory (rollout). The external actuators, including inversion actuators, editing actuators, and evaluation actuators, are invoked based on the two-layer structured decision output by the large-scale agent model. External actuators may also include hard constraint checkers, which can serve as independent rule programs or pre-gating gates for evaluation actuators. There is no fixed overall calling order among external actuators. Their calling order is determined by the actions output by the large model of the agent. However, the candidates after defolding or editing need to undergo hard constraint gating and fast evaluation first, so that each candidate of the newly added sub-node forms a sub-state containing the binding protein sequence and the binding protein evaluation.

[0119] Optionally, external actuators are deployed on local devices, servers, cloud platforms, or high-performance computing clusters. The actuator identifier, input fields, output fields, parameter ranges, preconditions, single-execution cost, and accuracy level of each actuator are uniformly encapsulated into structured input executable action interfaces and registered. This constructs a controlled closed-loop interactive environment where the external actuators actually execute the two-layer structured decisions and provide feedback on the actual execution results. This environment serves as both the execution environment for the large-scale agent model to perform protein design inference and the training environment for the large-scale agent model to update model parameters through reinforcement learning. During training, the external actuator parameters are frozen, and the large-scale agent model interacts with the external actuators only by outputting structured decisions.

[0120] Optionally, the execution results include the execution cost required to call the corresponding external executor, whether the hard constraints are passed, the evaluation vector, residue-level local feedback, etc.

[0121] In this embodiment, when the workflow decision includes an edit action type, the action type is parsed, and the edit executor identifier and execution parameters in the decision are confirmed. Then, it is verified whether the remaining budget of the current candidate node is sufficient to cover the cost of the edit executor completing the edit action. If the verification passes, the edit executor is invoked to execute the target candidate decision step by step. After the edit executor completes its execution, at least one candidate and its execution result are generated.

[0122] When a workflow decision includes an action type of inversion, the action type is parsed, and the inversion executor identifier and execution parameters in the decision are confirmed. Then, it is verified whether the total remaining budget for the current target task is sufficient to cover the cost of the inversion executor completing the inversion action, and whether the inversion executor is available in the current state. If the verification passes, the inversion executor is invoked to execute the target candidate decision step by step. After the inversion executor completes its execution, at least one candidate and its execution result are generated.

[0123] When a workflow decision includes an action type for evaluation, the action type is parsed, and the evaluation executor identifier and execution parameters in the decision are confirmed. Then, it is verified whether the candidate corresponding to the current candidate node has passed the hard constraint gating, and whether the remaining high-precision evaluation budget is sufficient to cover the cost of this evaluation action. After passing the verification, the evaluation executor is invoked to execute the target candidate decision step by step. After the evaluation executor completes its run, the evaluation results and execution results of the candidate are generated. It should be noted that evaluation actions differ from de-folding or editing actions; the evaluation executor does not modify the candidate, but only evaluates the generated candidate individually, and converts the evaluation results into a unified binding protein evaluation, including evaluation vectors, via an adapter. and local feedback at the residue level To address potential surrogate index biases that may arise from a single evaluator, the final candidate can be verified by calling independent structure prediction or energy evaluation executors.

[0124] Step S90: Based on the execution result and the at least one candidate node, gradually add child nodes of the current candidate node in the internal memory tree, and update the directed edges between the current candidate node and the child nodes.

[0125] After receiving the execution result and at least one candidate node, a new child node is added to the current candidate node. This child node stores the updated state of the candidate. A directed edge is established between the current candidate node and each new child node, and the two-layer structured decision that triggered this execution action is stored on this edge.

[0126] In an optional embodiment, step S90 includes: adding a child node of the current candidate node in the internal memory tree for each candidate node, and establishing a branch from the child node to the current candidate node; updating the state of the child node candidate; updating the remaining budget of the child node according to the standardized cost of the external executor performing one execution action; and updating the directed edge between the current candidate node and the child node according to the execution result.

[0127] If the external actuator performs the action The required execution cost is The remaining budget is then updated to The actuator feedback generates new candidate states. Then, child nodes are added to the internal memory tree. And add from the current candidate node To child nodes Marked as The directed edges. Tree nodes store the <state> Remaining budget > And directed edges store <current action> The 〉 corresponds to the triple representation.

[0128] By adding child nodes and establishing branches for each candidate in the internal memory tree with the current candidate node as the parent node, a structured and dynamic expansion of the design search space is achieved. This ensures that each exploration path is fully recorded in the tree topology, guaranteeing the global traceability and path reproducibility of the design process. Updating the state of the candidate child nodes ensures that the binding protein candidate information carried by each node in the memory tree is synchronized in real time with the execution process. The remaining budget of the child node is precisely deducted based on the standardized cost of one execution action by the external executor, achieving transparent accounting of resource consumption and rigid implementation of budget constraints, preventing the search process from exceeding the preset resource limit. Simultaneously, the execution results are embedded in the directed edges between the current candidate node and its child nodes, creating an explicit association between actions and execution results. This provides structured prior knowledge for subsequent large-scale agent models to make decisions based on historical execution experience, perform path evaluation, and determine termination conditions, improving the efficiency and interpretability of iterative searches.

[0129] Step S100: Using the child node that triggers the termination condition as the termination node, generate multiple termination paths and confirm the comprehensive evaluation of each termination path.

[0130] In the internal memory tree, a terminating path refers to a complete sequence that starts from the root node, proceeds along directed edges through one or more node states and actions, and finally reaches a child node marked as terminated. The terminating path records the entire two-layer structured decision-making and execution process from the start of the task until a candidate branch is terminated.

[0131] The generation of termination paths enables the back-attribution of success or failure at termination along the parent-child node relationship to each step of the path, thereby calculating the discounted reward for each action. In multi-branch parallel search, the length and termination time of termination paths may differ between branches, but each termination path fully records the candidate states and execution results of all decisions from the root node to the branch endpoint, forming the decision attribution for each step. This enhances the interpretability of the termination path and provides a structured data foundation for subsequent training signal generation and parameter updates.

[0132] Optionally, suppose the internal memory tree contains K paths from the root node to the terminal node, and the k-th path can be represented as a sequence of alternating nodes and actions: τ k =(v0 k a0 k v1 k a1 k ,…,a_{T k 1} k ,v_{T k} k ); Among them, v0 k The root node stores the initial candidate state and the initial remaining budget; a0 k The first action starting from the root node; v1 k For the child nodes corresponding to the new candidates generated after the first action is executed, store the state and remaining budget of the child node candidates; and so on, v_{T k} k The terminator is the terminal node, i.e., the end point of the path. Each directed edge stores the execution action of the two-layer structured decision that triggers the state transition. .

[0133] During a rollout, the internal memory tree may have multiple branches explored in parallel, each branch terminating and forming multiple independent termination paths. All termination paths are divided into two categories based on the quality of the termination node: successful paths and failed paths. Both types of paths are used for model training. A successful path is one that has terminated, satisfies all hard constraints, and whose protein binding evaluation of the candidate state of the termination node has a gain relative to the protein binding evaluation of the initial candidate state of the root node of the path that is not less than a preset threshold δ. The candidate and key execution action summaries of the termination nodes in successful paths are written to the external candidate memory for retrieval and reference during subsequent task decisions. A failed path is one that has terminated but does not meet the success criteria, including situations such as budget exhaustion without reaching the success criteria, convergence of gains but insufficient quality, premature termination, violation of hard constraints, generation of repetitive sequences, or continuous invalid searches. Failed paths are not written to the external candidate memory but are retained in the trajectory storage of the current rollout and also participate in the calculation of training signals to reduce the probability of the model making invalid decisions again.

[0134] In one embodiment, the termination condition includes at least one of an active termination condition and a forced termination condition; the active termination condition includes a termination action in the two-layer structured decision output by the agent's large model; the forced termination condition includes at least one of the following: the remaining budget of the current node is less than the execution cost required to call the corresponding external executor in the next step, the gain of the binding protein evaluation of the child node is less than or equal to a preset benefit convergence threshold, and the workflow decision fails to pass the task verification based on the binding protein.

[0135] A child node that triggers a termination condition is determined to be a termination node, thus forming a termination path. This requires triggering at least one of two termination conditions: active termination or forced termination. Active termination is a structured decision where the agent's large model directly outputs the termination type, marking the current candidate node as the termination node. Forced termination includes the following situations: the remaining budget is lower than the execution cost required for any subsequent legal action, i.e., resources are insufficient to pay for any effective operation; the maximum binding protein evaluation gain of the most recent m effective design actions is not greater than the benefit convergence threshold ε, indicating that continuing the search on this branch will not yield meaningful improvement; the current path has reached the system-set maximum step limit; or the current node has no legally executable actions.

[0136] The set of paths from the root node to all terminating nodes. For training, instead of using only successful paths, failed paths are used as negative samples for learning. First, the overall path evaluation is determined based on the binding protein evaluation of each node in the terminating path, weighted according to the overall evaluation. In one embodiment, the overall path evaluation is calculated based on binding protein folding quality, target-binding protein interface quality, hotspot satisfaction, exploitability, and constraint status, as shown in the following formula: ; in, Weights are assigned to the overall evaluation criteria in protein design tasks. Indicates the folding mass of the binding protein itself. Indicates the quality of the target-binding protein interface. Indicates the degree of satisfaction with the target hotspot contact. These are development indicators. All of these indicators are normalized to a preset range, and the larger the value, the higher the quality. This represents the penalty for violating hard constraints. It is 0 when all hard constraints are met, and positive when a violation occurs, depending on the number or severity of the violation.

[0137] Step S110: Determine the step reward for each directed edge in each termination path based on the comprehensive evaluation of the path.

[0138] For each state transition in the terminating path, a step reward is generated, as shown in the following formula: ; in, This indicates whether the hard constraint passes or violates the rules. It can be quantified according to the degree of violation: 0 when all constraints pass, and negative values ​​when a violation occurs, based on the number and severity of the violations. For example, -1 for a general violation and -2 for a serious violation. Indicates the cost of the external actuator; This indicates that the parameter is invalid, the precondition is not met, or the action is invalid. The value is 1 when the action occurs and 0 when the action does not occur. This indicates that duplicate candidates were generated, with a value of 1 for duplicate candidates and 0 for no duplicate candidates. The quality gain of the de-folding and editing decisions is attributed to the action of directly generating sub-candidates; the cost and information gain of the evaluation decision are attributed to the action of initiating the corresponding evaluation request.

[0139] Step S120: Determine the discount reward for each directed edge based on the step reward, and determine the training signal based on the discount reward.

[0140] No. The discount reward corresponding to the step action is The termination result is assigned to previous reversal, editing, and evaluation actions based on the parent-child node relationships in the path. Actions further away from the termination node are discounted by a factor. Obtain a smaller weight.

[0141] In a multi-branch internal memory tree, the discounted reward for each step on the path from the root to the terminal node is summed to form the training signal for that path. Successful paths increase the training weight of effective actions, while failed paths decrease the training weight of illegal, repetitive, high-cost, or unprofitable actions. At the terminal node, successful paths add a positive termination reward. The failure path adds a negative termination reward based on the reason for failure. Reasons for failure include budget exhaustion without meeting success criteria, convergence of returns but insufficient quality, premature termination of the search, or continued ineffective search.

[0142] In an optional embodiment, step S120 includes: determining a step reward based on the change in the binding protein evaluation; determining a step reward corresponding to a directed edge between adjacent nodes based on the change in the binding protein evaluation between adjacent nodes in the termination path; and determining a training signal based on a discounted reward, which includes: calculating an advantage value based on a discounted reward and a preset value function, and determining a training signal based on the advantage value.

[0143] Optionally, the evaluation of binding proteins includes: binding protein folding quality, target-binding protein interface quality, hotspot satisfaction, exploitability indicators, constraint status, and hard constraint status.

[0144] Optionally, supervised fine-tuning can be performed first using rule-based processes or historical trajectories to enable the large model of the agent to master structured decision-making formats and basic action preconditions; then, online reinforcement learning can be performed using discounted rewards.

[0145] In one embodiment, based on discount reward and value function Calculate the advantage value And a proximal strategy is used to optimize and update the large model parameters θ of the agent. Let... The optimization objective can be expressed as: ; in, The strategy for the large model of the agent to be trained. To collect the model strategy during the current rollout, As a reference model, To cut off the range, KL represents divergence loss, used to limit the magnitude of model updates. Alternatively, REINFORCE, dominant actor-critic, group relative policy optimization, preference optimization, or combinations thereof can be used to update the model's action probabilities based on the path training signals formed by the actual feedback from the actuators.

[0146] The training loss applies only to the output labels corresponding to the structured decisions and updates the large model parameters of the agent through backpropagation. The inverse folding executor, editing executor, evaluation executor, and hard constraint procedure are all called from outside the model, keeping their parameters frozen or running independently throughout the training process, and do not participate in the backpropagation. The above steps are repeated for multiple target tasks until the preset success rate, budget efficiency, and constraint compliance rate are achieved on the unseen target validation set.

[0147] By using the change in protein-bound evaluation as the core quantification basis for step rewards, the reward of each directed edge reflects the marginal improvement of the design quality by the executed action, achieving fine-grained attribution of decision contribution and effectively solving the credit allocation problem in long sequence tasks. Determining step rewards based on the change in protein-bound evaluation between adjacent nodes ensures the locality and real-time nature of reward calculation, enabling the model to accurately identify which actions bring positive gains and which lead to quality degradation, thereby guiding the policy towards high-value actions. Furthermore, combining discounted rewards with a preset value function to calculate the advantage value not only reasonably discounts future rewards to the current decision point but also eliminates baseline bias in state value estimation through the advantage value, reducing the variance of the policy gradient and improving training stability and sample efficiency.

[0148] Step S130: Perform online reinforcement learning on the large-scale intelligent agent model to be trained based on the training signal, and update the parameters of the large-scale intelligent agent model to be trained.

[0149] In an optional embodiment, the training method includes: inputting the execution result fed back by the external actuator as conditional information into the large agent model to be trained; the training signal only acts on the two-layer structured decision output by the large agent model to be trained, and updating the parameters of the large agent model to be trained through backpropagation using a proximal strategy; wherein, the external actuator serves as the training environment for the training method, and the parameters of the external actuator remain frozen during the training process and do not participate in backpropagation.

[0150] When constructing training sequences, the protein design task, current state, internal memory summary, external candidate memory summary, set of legal actions, and execution results fed back by the executor are used as conditional information. Only the structured decision fields actually output by the agent's large model are marked as content to be optimized. Candidates (combined with protein sequences) or evaluation results generated by external executors are not considered as targets that the agent's large model must imitate, thus maintaining the authenticity of the decision source.

[0151] By inputting the execution results fed back from external actuators as conditional information into the large-scale agent model to be trained, the model can perceive the environmental state and execution feedback in real time during the decision-making process, thereby achieving conditional adaptive decision-making and enhancing the completeness of state perception and the contextual relevance of decisions. By explicitly constraining the training signals to act only on the two-layer structured decision output, the dispersion and interference of optimization objectives are avoided, allowing the model to focus on improving the collaborative quality of target candidate decisions and workflow decisions, thus improving training efficiency and the targeting of policy learning. Employing a proximal policy combined with backpropagation to update model parameters ensures the accuracy of gradient transfer while limiting the policy update magnitude, preventing policy collapse and training instability. By treating external actuators as the carrying environment and freezing their parameters, a clear boundary of responsibility is established between the large-scale model and specialized tools. External actuators maintain their preset professional capabilities and output stability, unaffected by training data distribution drift, while the large-scale agent model focuses on learning how to optimally call and combine these tools. This reduces the complexity and computational overhead of joint training while ensuring the reliability of external actuators, improving the modularity and engineering feasibility of the overall training framework.

[0152] Reference Figure 5 The large-scale agent model to be trained takes a task description in natural language as input and outputs structured action instructions to drive the execution of the downstream protein design workflow. The workflow calls external executors to execute structured decisions step by step. Candidate generation / editing is responsible for creating new protein variants at the sequence or structural level; the search operation conducts directed exploration in a vast design space; hard constraint gating filters candidates based on their physicochemical feasibility, eliminating invalid solutions that violate basic rules; and the evaluation executor performs multi-dimensional quantitative evaluations of candidates that pass the constraints, considering factors such as affinity, stability, and manufacturability. Based on the workflow execution results, training signals are calculated and attributed. On the one hand, gradient signals are generated and directly fed back to the large-scale agent model to be trained, achieving end-to-end optimization at the parameter level; on the other hand, the evaluation results and generation costs of the candidates are archived in an external candidate memory. This memory bank provides historical experience context to the large agent model to be trained in the form of compressed states, enabling the large agent model to avoid repeatedly exploring low-value areas during the iteration process, gradually learn efficient design strategies, and continuously evolve under the guidance of evaluation and attribution, ultimately achieving efficient, interpretable, and reproducible intelligent design of complex target binding proteins.

[0153] In this embodiment, the model that has completed supervised fine-tuning is used as the starting point for initializing the strategy, reducing the randomness and proportion of invalid actions in the early stages of exploration and accelerating strategy convergence. By executing two-layer structured decision-making in a real interactive environment, calling external executors, and generating a termination path with path comprehensive evaluation, the quality feedback of protein-integrated design is transformed into quantifiable training signals, realizing a leap from static knowledge to dynamic strategy. Furthermore, the path comprehensive evaluation is decomposed into step rewards for each directed edge, solving the credit allocation problem in long-sequence decision-making, enabling the model to accurately identify the marginal contribution of each execution action to the final design quality. Based on the step reward, a discounted return is calculated, guiding the model to make forward-looking decisions based on a trade-off between immediate execution costs and long-term design benefits. Finally, online reinforcement learning is used to continuously update the model parameters, enabling the large agent model to continuously adapt and evolve in the closed-loop interaction with external executors and memory trees, improving the generalization ability, decision rationality, and task success rate of the protein-integrated design strategy.

[0154] Based on the fourth embodiment of this application, in the fifth embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 Step S70 includes: Step S71: If the binding protein design task includes initial candidates, then the state of root node candidates is formed according to the initial candidates, and the remaining budget of the root node is equal to the available budget in the model context. Step S72: If the binding protein design task does not include an initial candidate, the external executor is invoked to perform a reverse folding to generate an initial candidate. The state of the root node candidate is formed based on the generated initial candidate. The remaining budget of the root node is the available budget minus the cost of invoking the external executor to generate the initial candidate. Step S73: Using the root node as the current candidate node, the two-layer structured decision of the current candidate node is output based on the model context using the large agent model to be trained.

[0155] If the protein design task includes initial candidates, then the root node candidate state is formed based on the initial candidates. If the protein design task does not include initial candidates, the agent's large model first calls the reverse folding executor to perform a reverse fold, generating an initial candidate to form the root node candidate state. .

[0156] In an optional embodiment, the candidate state includes at least the candidate sequence of the binding protein of the current candidate node and the evaluation of the binding protein. Step S100 includes: if a termination condition is triggered, the action is a termination action. The agent large model executes the termination action, takes the child node that triggered the termination condition as the termination node, and updates the information of the termination node; multiple termination paths are generated according to the process of gradually adding child nodes from the root node until the termination node; wherein, the information of the termination node includes the status of the termination node candidate and the remaining budget.

[0157] Optionally, the candidate state includes the sequence of the candidate binding protein and the binding protein evaluation. It may also include an optional backbone and binding posture, and the execution result. The binding protein evaluation includes an evaluation vector and local feedback mapped to the binding protein residue number.

[0158] In reinforcement learning rollout, the summaries of the internal memory tree and the summaries of the external candidate memories are used as the model context. A portion of the input agent's large model is used to make it based on the updated model. Output the next two-layer structured decision. When the executor returns multiple candidates at once by reversing or editing, each candidate becomes a child node of the current candidate node, thus naturally forming multiple candidate paths. The currently active node can be selected from nodes that have not yet terminated and still have executable actions, according to model decisions or preset scheduling rules.

[0159] Suppose the internal memory tree contains The path from the root node to the terminal node, the first... The path is represented as: ; in, , This refers to the action of connecting adjacent nodes.

[0160] set up For the state-binding protein evaluation function, This indicates that all hard constraints are satisfied. This represents the initial evaluable state in the path. When the path has terminated and... The path is considered a successful path if it satisfies the following condition: ; When the protein design task already includes initial candidates that have completed basic evaluation. The candidate state equals the root node; when there are no initial candidates in the protein design task, This represents the state where the path has undergone its first inverse fold and completed a rapid evaluation. This is a preset threshold. All paths that have terminated but do not meet the success criteria are considered failed paths.

[0161] For asynchronous execution, each call request to an external executor carries a task identifier, rollout identifier, current node identifier, parent node identifier, path or branch identifier, decision event identifier, executor identifier, and model version identifier. A branch refers to a candidate path in the internal memory tree formed by different inversion outputs, different editing results, or different evaluation routes. A runnable branch is a path that has not yet terminated, has sufficient budget, and contains a valid action. Even if multiple executor results are returned out of order, the requesting node is written back based on the above identifiers, preventing incorrect association with other paths.

[0162] When the termination condition is triggered, the corresponding child node is marked as the termination node and its information is updated by the termination action, realizing the orderly convergence of the search process and avoiding meaningless path extension. Then, based on the complete topological relationship extending from the root node to the termination node, multiple termination paths are generated. This not only fully traces the evolution trajectory and decision chain of each candidate scheme, but also makes the design process globally interpretable. The termination node information also includes the candidate binding protein sequence, binding protein evaluation and remaining budget, allowing users to intuitively compare the comprehensive performance of different termination schemes in terms of structural quality, binding performance and resource consumption. This allows the optimal or most suitable binding protein design output to be selected from multiple termination paths, improving the evaluability and selectivity of the design results.

[0163] In an optional embodiment, the termination condition includes at least one of an active termination condition and a forced termination condition; the active termination condition includes a termination action in the two-layer structured decision output by the agent's large model; the forced termination condition includes at least one of the following: the remaining budget of the current node is less than the execution cost required to call the corresponding external executor in the next step, the gain of the binding protein evaluation of the child node is less than or equal to a preset benefit convergence threshold, and the workflow decision based on the binding protein design task fails.

[0164] Termination conditions are divided into two categories: active termination conditions and mandatory termination conditions. Active termination conditions empower the agent's large model with the ability to autonomously judge the task completion rate based on the design progress. When the model believes that the current candidate has met the design goal, it can actively output a termination action, reflecting the intelligence and flexibility of the large model in high-level strategies. Mandatory termination conditions set insurmountable rigid boundaries from three dimensions: resources, benefits, and legitimacy. When the remaining budget is insufficient to support the next step of execution, it automatically truncates to prevent resource exhaustion-induced loss of control. When the evaluation gain of a child node is lower than or equal to the preset benefit convergence threshold, it is forcibly stopped to avoid ineffective iterations and overfitting risks caused by diminishing marginal benefits. When a workflow decision fails the task validation, it is terminated immediately to prevent the continued execution of erroneous decisions. The two types of termination conditions complement each other, ensuring that the search process converges efficiently within reasonable boundaries, and improving the automation, computational economy, and reliability of the protein design method through diversified convergence mechanisms.

[0165] In an optional embodiment, the hard constraint is a preset deterministic rule or a condition for the verifiable implementation of the procedure. After step S100, the method further includes: if the execution result of each node in the termination path satisfies the hard constraint, the termination path is regarded as a successful path; the successful path and its summary are written into an external candidate memory; the summary of the successful path includes at least: the candidate sequence of the binding protein corresponding to the successful path, the key execution action of the two-layer structured decision, the comprehensive evaluation of the path, and the path cost; the comprehensive evaluation of the path is confirmed based on the binding protein evaluation of each node in the successful path; the path cost is confirmed based on the remaining budget of the root node and the remaining budget of the termination node.

[0166] In this embodiment, hard constraints are pre-defined deterministic rules or conditions for the implementation of verifiable procedures, including one of the following requirements: target chain cannot be modified, binding protein length, allowed amino acid set, frozen site, allowed number of mutations, repetitive fragments, chain correspondence, hotspot preservation, and basic geometric feasibility.

[0167] Optionally, protein evaluation can be combined with evaluation vectors and residue-level local feedback. Specifically, the evaluation vector... This can include protein folding quality, target-binding protein interface quality, hotspot satisfaction, spatial conflict, exploitation metrics, constraint status, and evaluation uncertainty, used to indicate whether a candidate is close to the final success criteria. Residue-level local feedback. This represents local feedback mapped to the number of binding protein residues.

[0168] The set of successful paths is represented as The set of failed paths is represented as At the start of the first rollout for each task, the external candidate memory is empty; after the path terminates, it will... The path, candidate termination nodes, key execution actions, comprehensive path evaluation, and cost summary are written into the external candidate memory E. The trajectory is retained in the current rollout's trajectory storage for training, but is not written to the external candidate memory as a preferred candidate. Subsequent rollouts can retrieve it from... Retrieve successful paths similar to the current task or current candidate, and prioritize them. A summary of candidate and key execution actions for each termination node is used as model input.

[0169] By defining hard constraints as pre-defined deterministic rules or conditions for the implementation of verifiable procedures, an objective and unambiguous rigid screening benchmark is provided for the protein design results. After generating the termination path, the execution results of each node in the path are enumerated one by one for hard constraint verification. Only when all nodes in the entire path satisfy the hard constraints is it marked as a successful path, thereby ensuring the global reliability of the output scheme in terms of structural rationality and task compliance, and avoiding false successes where intermediate process violations are ignored simply because the termination node meets the criteria. Furthermore, the successful paths and their summaries are written into external candidate memory, realizing the cross-task accumulation and reuse of high-quality design experience and positive decision-making patterns, and expanding the knowledge boundary of the large-scale agent model. The successful path summary includes candidate binding protein sequences, key execution actions of the two-layer structured decision-making process, comprehensive path evaluation, and path cost. It not only fully traces the structural features and decision-making logic of the solution, but also forms a comprehensive path evaluation by aggregating the binding protein evaluations of each node and accurately calculates the path cost by using the difference in remaining budget between the root node and the terminal node. This allows users to intuitively compare the advantages and disadvantages of different successful solutions from multiple dimensions, improving the interpretability and evaluability of the binding protein design results.

[0170] In this embodiment, when the protein binding design task already includes initial candidates, it is directly used as the root node and the available budget is fully retained, avoiding redundant computational overhead. When the protein binding design task does not include initial candidates, an external executor is automatically invoked to perform a reverse folding to generate initial candidates, and the generation cost is precisely deducted from the available budget to obtain the remaining budget for the root node. This ensures both the method's self-starting capability in scenarios without prior information and the accuracy of budget calculation and the rationality of subsequent resource allocation. Based on this, a two-layer structured decision-making process is initiated with the root node as the current candidate node, laying the initial state foundation for subsequent multi-path iterative optimization based on memory trees.

[0171] Based on the fourth or fifth embodiment of this application, in the sixth embodiment of this application, the content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 7 Step S80 includes: Step S81: Verify the validity of the workflow decision based on the task designed for the binding protein; Step S82: After the verification is passed, the corresponding external executors are called step by step according to the order of the execution actions; Step S83: Obtain the execution result and at least one candidate after the external actuator performs the execution action.

[0172] Optionally, when the workflow decision includes at least one execution action and its execution parameters, the number of candidate outputs, and the execution budget limit for completing the binding protein design task, the validity of the execution action, its execution parameters, and the execution budget limit in the workflow decision is verified based on the binding protein design task. Valid execution actions are sent to the corresponding external executor. After the executor is folded back or edited to return one or more candidates, hard constraint gating and at least one fast evaluation are performed on each candidate, so that each newly added sub-node's candidate forms a sub-state containing the binding protein sequence and the binding protein evaluation. Evaluation actions can be used to improve evaluation accuracy, perform independent verification, or supplement residue-level feedback. Termination actions do not change the candidates but mark the current node as a termination node.

[0173] In an optional embodiment, if the minimum threshold for rapid evaluation is reached, the rapid evaluation executor should be invoked. If the rapid evaluation result is a low folding score but the interface score and hotspot contact meet the threshold, the edit executor is invoked to prioritize editing low-confidence residues that are not hotspots or frozen. If the folding score meets the threshold but the interface score is low or there are unmet hotspots, the edit executor is invoked to prioritize editing allowed positions around the interface. If the rapid evaluation reaches the high-precision trigger threshold and the high-precision budget is sufficient, the high-precision evaluation executor is invoked to output an evaluation action. The binding protein evaluation can be calculated based on the rapid evaluation result, the high-precision evaluation result, and the weight of the comprehensive evaluation. If the binding protein evaluation gain of the three most recent edits is less than ε, or the remaining budget is lower than the execution cost required for any subsequent legal action, a termination action is output. It should be noted that different precision evaluation executors require different costs. When the minimum threshold for rapid evaluation is met, low-cost rapid evaluation executors are used to estimate sequence naturalness, aggregation tendency, net charge or hydrophobicity, secondary structure tendency, binding protein monomer folding confidence, and obvious geometric conflicts. If the rapid evaluation reaches the high precision trigger threshold and the high precision budget is sufficient, the high precision evaluation executor is called to output high precision evaluation. High-cost high precision evaluation is used to predict the target-binding protein complex and obtain the overall structural confidence of the binding protein, the confidence and uncertainty of the complex interface, the binding protein backbone or binding posture deviation, hot spot residue contact, number of interface contacts, spatial conflicts, buried surface area or energy evaluation.

[0174] In an optional embodiment, step S82 includes: when the execution action is defolding, invoking a defolding executor, which generates at least one candidate based on the protein design task; when the execution action is editing, invoking an editing executor, which performs local mutation or restricted sequence redesign on the current candidate based on the editable residues, maximum number of mutations, and local feedback of the target candidate decision to generate at least one candidate; wherein, the protein design task includes at least target information, design conditions, and structural requirements.

[0175] Optionally, the reverse-folding actuator generates one or more candidate sequences based on the binding protein backbone, structural requirements, target epitopes, and sequence constraints in the protein design task.

[0176] The reverse-folding actuator is responsible for generating the initial structure from scratch based on the protein design task, which includes target information, design conditions, and structural requirements, providing a high-quality starting point for the design space. The editing actuator, on the other hand, performs local mutations or restricted sequence redesign on the current candidate based on the explicitly defined editable residues, maximum number of mutations, and local feedback in the target candidate decision, achieving targeted and refined improvement within the constraint boundaries and avoiding aimless global search.

[0177] In an optional embodiment, step S82 includes: when the execution action is evaluation, determining whether the candidate was generated by the inversion executor or the editing executor; if the candidate was not generated by the inversion executor or the editing executor, calling the evaluation executor to perform a fast evaluation on the current candidate to generate a binding protein evaluation; if the candidate was generated by the inversion executor or the editing executor, first calling the hard constraint checker to determine whether the execution result fed back by the inversion executor or the editing executor satisfies the hard constraints; if the hard constraints are satisfied, calling the evaluation executor to perform a fast evaluation on the current candidate to generate a binding protein evaluation, including an evaluation vector. and residue-level local feedback .

[0178] In this embodiment, the hard constraint checker is an independent rule procedure or a hard constraint gating pre-positioned in the evaluation executor. If the current candidate node is marked as a termination node, the termination reason, the evaluation at termination, and the remaining budget are recorded; if required by the task, the independent evaluation executor can be invoked for final review before writing to the external candidate memory.

[0179] Optionally, the reverse folding actuator generates one or more candidate sequences based on the binding protein backbone, structural requirements, target epitopes, and sequence constraints in the protein design task. Each candidate sequence is first subjected to hard constraint gating, followed by rapid folding and interface evaluation.

[0180] Optionally, the edit executor performs local mutations or restricted sequence redesign on the current candidate based on the editable residues, maximum number of mutations, and local feedback specified in the target candidate decision in the two-layer structured decision-making process, wherein each edit result is subject to hard constraint gating and rapid evaluation.

[0181] Optionally, the evaluation executor performs rapid evaluation, high-precision evaluation, target-binding protein complex structure prediction, docking, interface energy evaluation, or independent verification on the current candidate, and converts the weight of the comprehensive evaluation results into a unified binding protein evaluation, including evaluation vectors and residue-level feedback. The evaluation action can achieve sub-nodes where the candidate sequence remains unchanged but the evaluation results are updated.

[0182] The output of the evaluation actuator is converted into local feedback that is uniformly mapped to the binding protein residue number through pre-registered fields. Each node in the internal memory tree reserves a residue-level local feedback field for its candidate states. However, if the evaluation is not yet complete or residue-level feedback results are unavailable, this field will be empty. Local feedback is used to locate the residues that need to be edited, limit the editable range, and assist in selecting the next action; the corresponding quality changes are also used to generate training signals. For example, if a high-precision evaluator returns low confidence for the interface at positions 31 to 35 of the binding protein, it can be converted into local feedback. For example, residues 31-35, with issue type = low confidence, severity = 0.72, and suggested action = restricted editing. If the 18th position has a spatial conflict with the target, then residue 18 is recorded, with issue type = spatial conflict and severity = 0.91. The mapping result of this field is completed through an adapter program, which can be implemented using a function interface encapsulation, a Python wrapper program, a REST or gRPC client, without requiring the use of a specific third-party adapter.

[0183] The three types of actuators work collaboratively, executing target candidate decisions step by step under workflow control. This enables the binding protein design process to possess both macroscopic generation capabilities and microscopic optimization precision, ensuring structural rationality and task compliance while improving the targeting and design efficiency of candidate improvements. By introducing hard constraints as a pre-filtering mechanism and designing evaluation processes with varying degrees of precision based on candidate sources, the computational efficiency and reliability of binding protein design are improved. For candidates newly generated by the folding or editing actuators, a hard constraint checker is first invoked to determine rigid conditions. Only when the execution result meets the hard constraints does the candidate enter the rapid evaluation stage of the evaluation actuator, thus concentrating computational resources on candidates that meet basic feasibility requirements. For candidates not generated from the source, the evaluation actuator is directly invoked to perform rapid evaluation and generate residue-level local feedback, ensuring the flexibility and coverage of the evaluation process.

[0184] In this embodiment, the legality verification of workflow decisions based on the protein design task can effectively intercept decisions that do not conform to task constraints or have logical errors before the execution action is triggered, preventing invalid or even harmful external calls, thereby improving system robustness and saving computing resources. After the verification is passed, the corresponding external executors are called step by step according to the order of execution actions to execute the target candidate decision, ensuring the atomicity and timing correctness of the multi-step workflow and avoiding inconsistencies in state or incorrect results due to disordered execution order. Finally, by obtaining the execution results and candidates fed back by the external executors, the execution process is made observable, verifiable and traceable, providing reliable input for the dynamic update of the memory tree and subsequent decision optimization.

[0185] In one specific embodiment, the sequence of an existing target-binding protein complex candidate is improved. The model context includes the three-dimensional structure of the target protein A chain, the target epitope defined by residues 45, 47, and 51 of the A chain, the existing binding protein B chain backbone, and the initial sequence. All residues of the A chain are set as unmodifiable, hotspot residues 12, 16, and 28 of the B chain are set as frozen positions, and residues 20 to 35 of the B chain are set as restricted editing regions, allowing a maximum of 3 mutations per step; the rapid evaluation budget is set to 20 times, and the high-precision complex evaluation budget is set to 4 times.

[0186] The initial state data format is as follows: state_id:v0 candidate:{sequence:"...",binder_chain:"B",backbone_id:"bb_001",pose_id:"pose_01"} evaluation:{fold_score:0.76,interface_score:0.61,hotspot_ratio:0.67,clash_count:2} residue_feedback:[{position:18,type:"clash",severity:0.91}, {positions:[31,35],type:"low_interface_confidence",severity:0.72}] constraint_status:pass remaining_budget:{invfold:1,edit:8,fast_eval:19,high_eval:3} The agent's large-scale model employs a strategy for selecting actions based on state and budget, acquired through reinforcement learning rather than a fixed order. If the folding score is low but the interface score and hotspot contact meet the threshold, low-confidence residues that are not hotspots or frozen are prioritized for editing. If the folding score meets the threshold but the interface score is low or there are unmet hotspots, allowed positions around the interface are prioritized for editing. If the rapid evaluation reaches the high-precision trigger threshold and the high-precision budget is sufficient, an evaluation action is output. If the evaluation gain of the binding proteins edited in the last three iterations is less than ε, or the remaining high-precision budget is less than the cost of a single call, a termination action is output.

[0187] Assuming the model outputs sequentially "Edit B chain position 18—Evaluate—Edit B chain positions 31 to 33—Evaluate—Terminate", each action and the execution result from the executor generates nodes and edges in the internal memory tree. If the protein binding evaluation in the terminated state is improved by more than [percentage missing] compared to the initial state... If all hard constraints are met, the successful path is written into the external candidate memory; meanwhile, other paths that do not improve editing, break frozen sites, generate repetitive sequences, or terminate prematurely are still included in the training signal calculation as failed paths. The trajectory obtained in this way can improve the probability of actions that improve folding and interface with fewer high-precision calls, and reduce the probability of actions that are repeatedly evaluated and have no benefit in the long run.

[0188] In another specific embodiment, de novo binding protein design is performed targeting the epitope. The model context includes the target 3D structure, the target epitope, and hotspot residues, and provides a binding protein length of 60 to 90 residues, allowed secondary structure types, sequence character sets, interface approach directions, and an evaluation budget. No initial binding protein candidates are provided. The external candidate memory for the first rollout of this task is empty, and the initial candidate state field of the root node is empty, so the set of executable actions is limited to unfolding or termination.

[0189] The agent's large model first outputs a defolding action. The defolding actuator generates N initial sequences based on the binding protein structure requirements or a pre-defined framework. Each initial sequence serves as a different child node of the root node, undergoing configuration, hard constraint gating, and rapid evaluation. Different initial sequences are not merged. Each framework or pose combination with a sequence forms an independent candidate node in the internal memory tree. Nodes with high binding protein evaluations or significant differences in interface patterns can continue to expand, while nodes that are repetitive, severely conflicting, or do not meet the sequence rules are terminated.

[0190] For candidates that pass the gating, the model can output editing actions to improve the local interface, or output evaluation actions to invoke a high-precision evaluation executor to evaluate the target and binding protein complex. When an execution action returns multiple candidates, multiple sub-branches are formed; while one branch is waiting for high-precision evaluation, other branches with sufficient budget and valid actions can continue to execute. The evaluation results are written back to the corresponding node using the node identifier and decision event identifier in the request.

[0191] When a branch satisfies a hard constraint and the gain of the termination evaluation relative to the first fast evaluation of that branch is not less than δ, the successful path and the candidate termination node are written into the external candidate memory; the remaining termination paths are treated as failed paths. When initiating subsequent rollouts for the same task, the agent's large model receives a compressed summary of the preferred termination node candidates and key execution actions from the external candidate memory, thus enabling it to continue exploring near existing successful patterns while retaining new branches formed through other inverse folding outputs.

[0192] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the training method of the large-scale intelligent agent model of this application. Any simple transformations based on this technical concept are within the protection scope of this application.

[0193] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the binding protein design method and / or the training method of the agent-based large model in the above embodiments.

[0194] The following is for reference. Figure 8 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones and laptops, and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0195] like Figure 8As shown, the electronic device may include a processor 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processor 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0196] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processor 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0197] The electronic device provided in this application employs the agent-based large-scale model binding protein design method and / or agent-based large-scale model training method described in the above embodiments, which can solve the technical problem of low efficiency in the design of binding proteins for large-scale intelligent models. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the agent-based large-scale model binding protein design method and / or agent-based large-scale model training method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0198] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0199] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0200] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the binding protein design method and / or the training method of the agent-based large model in the above embodiments.

[0201] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.

[0202] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0203] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an electronic device, enable the electronic device to implement the binding protein design method based on the large-scale intelligent agent model, or the training method of the large-scale intelligent agent model, as described in the above embodiments.

[0204] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0205] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0206] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0207] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described binding protein design method and / or training method of the large agent model, thereby solving the technical problem of low efficiency in binding protein design of large agent models. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the binding protein design method and / or training method of the large agent model provided in the above embodiments, and will not be repeated here.

[0208] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described agent-based large model binding protein design method and / or agent-based large model training method.

[0209] The computer program product provided in this application can solve the technical problem of low efficiency in the design of binding proteins for intelligent large models. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the binding protein design method and / or training method for intelligent large models based on intelligent agent models provided in the above embodiments, and will not be repeated here.

[0210] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for designing binding proteins based on a large-scale agent model, characterized in that, The method includes: Obtain the model context, wherein the model context includes at least: the protein design task, the current candidate node state, the summary of the internal memory tree, the summary of the external candidate memory, and the available budget; the internal memory tree is a rooted directed tree, including nodes and directed edges; the node information includes the candidate state and remaining budget, and the directed edges store the execution actions of adjacent nodes; The trained agent model outputs a two-layer structured decision for the current candidate node based on the model context. The two-layer structured decision includes target candidate decision and workflow decision. Based on the workflow decision, at least one external executor is invoked to execute the target candidate decision step by step, and the execution results and at least one candidate are obtained from the external executor. Based on the execution result and the at least one candidate node, the child node of the current candidate node is gradually added to the internal memory tree, and the directed edge between the current candidate node and the child node is updated. Multiple termination paths are generated by using the child node that triggers the termination condition as the termination node; The workflow decision includes at least one execution action to complete the binding protein design task.

2. The binding protein design method based on a large agent model as described in claim 1, characterized in that, The steps of using the trained agent model to output a two-layer structured decision for the current candidate node based on the model context include: If the binding protein design task includes initial candidates, then the state of root node candidates is formed based on the initial candidates, and the remaining budget of the root node is equal to the available budget in the model context; If the binding protein design task does not contain an initial candidate, the external executor is invoked to perform a reverse folding to generate an initial candidate. The state of the root node candidate is formed based on the generated initial candidate. The remaining budget of the root node is the available budget minus the cost of invoking the external executor to generate the initial candidate. Using the root node as the current candidate node, the trained agent model outputs a two-layer structured decision for the current candidate node based on the model context.

3. The binding protein design method based on a large agent model as described in claim 1, characterized in that, The step of invoking at least one external executor to execute the target candidate decision step by step based on the workflow decision, and obtaining the execution results and at least one candidate from the external executor, includes: Based on the binding protein, the task is designed to verify the validity of the workflow decision; After the verification is passed, the corresponding external executors are called step by step according to the order of the execution actions; Obtain the execution result and at least one candidate after the external executor performs the execution action.

4. The binding protein design method based on a large agent model as described in claim 3, characterized in that, The external actuators include a reverse folding actuator, an editing actuator, and an evaluation actuator. The step of sequentially calling the corresponding external actuators based on the order of the execution actions includes: When the execution action is a reverse fold, the reverse fold executor is invoked, and the reverse fold executor generates at least one candidate protein based on the protein design task. When the execution action is editing, the editing executor is invoked. The editing executor performs local mutation or restricted sequence redesign on the current candidate based on the editable residues, maximum number of mutations, and local feedback of the target candidate decision to generate at least one candidate. The protein design task includes at least target information, design conditions, and structural requirements.

5. The binding protein design method based on a large agent model as described in claim 4, characterized in that, The protein design task also includes hard constraints, and the step of sequentially calling the corresponding external executors based on the order of the execution actions includes: When the execution action is evaluation, it is determined whether the candidate is generated by the reverse folding executor or the editing executor; If the candidate is not generated by the inversion executor or the editing executor, the evaluation executor is invoked to perform a rapid evaluation of the current candidate to generate a binding protein evaluation. If the candidate is generated by the reverse folding executor or the editing executor, the hard constraint checker is first called to determine whether the execution result fed back by the reverse folding executor or the editing executor satisfies the hard constraint; If the hard constraints are met, the evaluation executor is invoked to perform a rapid evaluation of the current candidate to generate a binding protein evaluation.

6. The binding protein design method based on a large agent model as described in claim 1, characterized in that, The step of progressively adding child nodes of the current candidate node to the internal memory tree based on the execution result and the at least one candidate node, and updating the directed edges between the current candidate node and the child nodes, includes: For each candidate node, add a child node to the current candidate node in the internal memory tree and establish a branch from the child node to the current candidate node; Update the state of the candidate child nodes; The remaining budget of the child node is updated based on the standardized cost of performing the execution action once by the external actuator; Update the directed edges between the current candidate node and its child nodes based on the execution result.

7. The binding protein design method based on a large agent model as described in claim 2, characterized in that, The candidate state includes at least the candidate binding protein sequence and the binding protein evaluation of the current candidate node. The step of generating multiple termination paths by using the child node that triggers the termination condition as the termination node includes: If the termination condition is triggered, the execution action is a termination action. The large model of the intelligent agent executes the termination action, takes the child node that triggered the termination condition as the termination node, and updates the information of the termination node. Multiple termination paths are generated by progressively adding child nodes from the root node until the termination node is reached.

8. The binding protein design method based on a large agent model as described in claim 7, characterized in that, The termination condition includes at least one of the active termination condition and the mandatory termination condition; The active termination condition includes a termination action in the two-layer structured decision output by the agent's large model. The forced termination conditions include at least one of the following: the remaining budget of the current node is less than the execution cost required to call the corresponding external executor in the next step; the gain of the binding protein evaluation of the child node is less than or equal to the preset benefit convergence threshold; or the workflow decision fails to pass the task verification based on the binding protein.

9. The binding protein design method based on a large agent model as described in claim 7, characterized in that, The hard constraints are preset deterministic rules or verifiable conditions for program implementation. After the step of generating multiple termination paths using the child node that triggers the termination condition as the termination node, the method further includes: If the execution result of each node in the termination path satisfies the hard constraint, the termination path is regarded as a successful path. Write the successful path and a summary of the successful path into the external candidate memory; The summary of the successful path includes at least: the candidate binding protein sequence corresponding to the successful path, the key execution actions of the two-layer structured decision, the comprehensive evaluation of the path, and the path cost; The comprehensive evaluation of the pathway is confirmed based on the evaluation of binding proteins at each node in the successful pathway; The path cost is determined based on the remaining budget of the root node and the remaining budget of the terminating node.

10. A method for training a large agent model, wherein the large agent model is used in conjunction with protein design, characterized in that, The method includes: Construct a model context, wherein the model context includes at least: a protein design task, the current state of candidate nodes, a summary of the internal memory tree, a summary of the external candidate memory, and an available budget; the internal memory tree is a rooted directed tree including nodes and directed edges; the information of the nodes includes the candidate state and remaining budget, and the directed edges store the execution actions of adjacent nodes; The large agent model to be trained is used to output a two-layer structured decision for the current candidate node based on the model context. The two-layer structured decision includes target candidate decision and workflow decision. The large agent model to be trained is a policy model that has completed supervised fine-tuning training. Based on the workflow decision, at least one external executor is invoked to execute the target candidate decision step by step, and the execution results and at least one candidate are obtained from the external executor. Based on the execution result and the at least one candidate node, the child node of the current candidate node is gradually added to the internal memory tree, and the directed edge between the current candidate node and the child node is updated. Using the child node that triggers the termination condition as the termination node, generate multiple termination paths and confirm the comprehensive evaluation of each termination path. The step reward for each directed edge in each terminating path is determined based on the comprehensive evaluation of the path. The discounted reward for each directed edge is determined based on the steps described above, and the training signal is determined based on the discounted reward. Online reinforcement learning is performed on the large-scale agent model to be trained based on the training signal to update the parameters of the large-scale agent model to be trained.

11. The training method for a large agent model as described in claim 10, characterized in that, The training method includes: The execution result fed back by the external actuator is used as conditional information and input into the large-scale intelligent agent model to be trained; The training signal is applied only to the two-layer structured decision output by the large agent model to be trained, and the parameters of the large agent model to be trained are updated by backpropagation using a proximal strategy. The external actuator serves as the environment for the training method. During the training process, the parameters of the external actuator remain frozen and do not participate in the backpropagation.

12. The training method for a large agent model as described in claim 10, characterized in that, The step of rewarding the process of confirming each directed edge in each terminating path based on the comprehensive evaluation of the path includes: Step rewards are determined based on changes in protein evaluation. The step reward corresponding to the directed edge between adjacent nodes is determined based on the change in the binding protein evaluation between adjacent nodes in the termination path. The step of determining the training signal based on the discount reward includes: The advantage value is calculated based on the discount return and the preset value function, and the training signal is determined based on the advantage value.

13. The training method for a large agent model as described in claim 10, characterized in that, The steps of using the large agent model to be trained to output the two-layer structured decision of the current candidate node based on the model context include: If the binding protein design task includes initial candidates, then the state of root node candidates is formed based on the initial candidates, and the remaining budget of the root node is equal to the available budget in the model context; If the binding protein design task does not contain an initial candidate, the external executor is invoked to perform a reverse folding to generate an initial candidate. The state of the root node candidate is formed based on the generated initial candidate. The remaining budget of the root node is the available budget minus the cost of invoking the external executor to generate the initial candidate. Using the root node as the current candidate node, the large agent model to be trained outputs a two-layer structured decision of the current candidate node based on the model context.

14. The training method for a large agent model as described in claim 10, characterized in that, The step of invoking at least one external executor to execute the target candidate decision step by step based on the workflow decision, and obtaining the execution results and at least one candidate from the external executor, includes: Based on the binding protein, the task is designed to verify the validity of the workflow decision; After the verification is passed, the corresponding external executors are called step by step according to the order of the execution actions; Obtain the execution result and at least one candidate after the external executor performs the execution action.

15. The training method for a large agent model as described in claim 14, characterized in that, The external actuators include a reverse folding actuator, an editing actuator, and an evaluation actuator. The step of sequentially calling the corresponding external actuators based on the order of the execution actions includes: When the execution action is a reverse fold, the reverse fold executor is invoked, and the reverse fold executor generates at least one candidate protein based on the protein design task. When the execution action is editing, the editing executor is invoked. The editing executor performs local mutation or restricted sequence redesign on the current candidate based on the editable residues, maximum number of mutations, and local feedback of the target candidate decision to generate at least one candidate. The protein design task includes at least target information, design conditions, and structural requirements.

16. The training method for a large agent model as described in claim 15, characterized in that, The protein design task also includes hard constraints, and the step of sequentially calling the corresponding external executors based on the order of the execution actions includes: When the execution action is evaluation, it is determined whether the candidate is generated by the reverse folding executor or the editing executor; If the candidate is not generated by the inversion executor or the editing executor, the evaluation executor is invoked to perform a rapid evaluation of the current candidate to generate a binding protein evaluation. If the candidate is generated by the reverse folding executor or the editing executor, the hard constraint checker is first called to determine whether the execution result fed back by the reverse folding executor or the editing executor satisfies the hard constraint; If the hard constraints are met, the evaluation executor is invoked to perform a rapid evaluation of the current candidate to generate a binding protein evaluation.

17. The training method for a large agent model as described in claim 10, characterized in that, The step of progressively adding child nodes of the current candidate node to the internal memory tree based on the execution result and the at least one candidate node, and updating the directed edges between the current candidate node and the child nodes, includes: For each candidate node, add a child node to the current candidate node in the internal memory tree and establish a branch from the child node to the current candidate node; Update the state of the candidate child nodes; The remaining budget of the child node is updated based on the standardized cost of performing the execution action once by the external actuator; Update the directed edges between the current candidate node and its child nodes based on the execution result.

18. The training method for a large agent model as described in claim 13, characterized in that, The candidate state includes at least the candidate binding protein sequence and the binding protein evaluation of the current candidate node. The step of generating multiple termination paths by using the child node that triggers the termination condition as the termination node includes: If the termination condition is triggered, the execution action is a termination action. The large model of the intelligent agent executes the termination action, takes the child node that triggered the termination condition as the termination node, and updates the information of the termination node. Multiple termination paths are generated by progressively adding child nodes from the root node until the termination node is reached.

19. The training method for a large agent model as described in claim 18, characterized in that, The termination condition includes at least one of the active termination condition and the mandatory termination condition; The active termination condition includes a termination action in the two-layer structured decision output by the agent's large model. The forced termination conditions include at least one of the following: the remaining budget of the current node is less than the execution cost required to call the corresponding external executor in the next step; the gain of the binding protein evaluation of the child node is less than or equal to the preset benefit convergence threshold; or the workflow decision fails to pass the task verification based on the binding protein.

20. The training method for a large agent model as described in claim 18, characterized in that, The hard constraints are preset deterministic rules or verifiable conditions for program implementation. After the step of generating multiple termination paths using the child node that triggers the termination condition as the termination node, the method further includes: If the execution result of each node in the termination path satisfies the hard constraint, the termination path is regarded as a successful path. Write the successful path and a summary of the successful path into the external candidate memory; The summary of the successful path includes at least: the candidate binding protein sequence corresponding to the successful path, the key execution actions of the two-layer structured decision, the comprehensive evaluation of the path, and the path cost; The comprehensive evaluation of the pathway is confirmed based on the evaluation of binding proteins at each node in the successful pathway; The path cost is determined based on the remaining budget of the root node and the remaining budget of the terminating node.

21. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the binding protein design method based on the agent-large model as described in any one of claims 1 to 9, or the computer program being configured to implement the steps of training the agent-large model as described in any one of claims 10 to 20.

22. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the binding protein design method based on the large agent model as described in any one of claims 1 to 9, or when the computer program is executed by a processor, it implements the steps of training the large agent model as described in any one of claims 10 to 20.

23. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the binding protein design method based on the agent-large model as described in any one of claims 1 to 9, or, when executed by a processor, implements the steps of training the agent-large model as described in any one of claims 10 to 20.