Agent reasoning training method based on exploration perception strategy optimization
By constructing an exploration and memory interaction pattern and combining variational agent model and reinforcement learning training, the agent can adaptively judge the timing and value of exploration, solving the problems of insufficient exploration accuracy and generalization ability in complex long-range interaction tasks, and improving task completion efficiency and decision stability.
Patent Information
- Application Number
- CN202611310212.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-27
AI Technical Summary
Existing agent training methods have low exploration accuracy and insufficient cross-environment generalization ability in complex long-term interaction tasks. They cannot effectively distinguish between exploration and execution behaviors, resulting in redundant exploration or insufficient information acquisition.
We construct an exploration and memory interaction model, estimate the value of exploration actions through a variational agent model, combine supervised fine-tuning and reinforcement learning to train the strategy model, and use structured cue words to guide the agent's interaction tasks.
It achieves adaptive exploration, accurately evaluates the value of exploration actions, improves cross-environment generalization ability, reduces redundant exploration, and enhances task completion efficiency and decision stability.
Smart Images

Figure CN123180341A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of large language model agent reinforcement learning, and in particular to an agent reasoning training method based on exploration and perception strategy optimization. Background Technology
[0002] With the development of large language models and multimodal models, intelligent agent systems are now able to observe environmental states, generate action commands, and engage in multi-turn interactions with the environment in scenarios such as web pages, mobile applications, desktop systems, embodied environments, and online shopping, based on natural language task objectives. Unlike single-turn question answering or static reasoning, intelligent agent tasks typically feature complex state transitions, delayed action consequences, long task paths, incomplete environmental information, and frequent changes in interface distribution. Intelligent agents need to gradually obtain environmental feedback during task execution through actions such as clicking, inputting, swiping, returning, opening pages, or invoking tools, and then adjust subsequent strategies based on this feedback.
[0003] Existing methods for scaling up intelligent agent testing typically improve task completion rates by generating multiple candidate inference paths, sampling multiple candidate actions, performing tree searches, or attempting additional actions during the inference phase. While these methods increase the amount of available information, they mostly employ a uniform or fixed exploration strategy, using the same exploration budget, sampling method, or branching mechanism across different states. This approach cannot distinguish whether the current state truly requires exploration, nor can it determine whether a particular exploration will provide valuable information for subsequent decisions. Therefore, redundant exploration may still occur in already defined states, while insufficient information may be lacking in critically uncertain states.
[0004] Furthermore, existing reinforcement learning training methods also suffer from similar problems. Sparse rewards based on success or failure can encourage models to complete tasks, but it is difficult to accurately attribute intermediate exploration actions. An exploration action itself may not immediately complete the task, but it may provide key environmental information for subsequent correct actions; if training is based solely on the final success signal, the value of exploration actions is often underestimated. Some methods attempt to balance exploration and exploitation using entropy, sampling diversity, or probability truncation, but high entropy does not necessarily indicate high information gain, and highly uncertain actions may lead to invalid or repetitive state transitions, making it difficult to form a stable and interpretable exploration strategy.
[0005] Therefore, there is an urgent need for a training method for a large language model agent that can explicitly model exploration and memory, estimate the value of exploration action information, distinguish and optimize exploration behavior from target execution behavior, and adaptively determine the timing of exploration during testing. Summary of the Invention
[0006] The present invention aims to at least partially solve one of the technical problems in the related art.
[0007] The main objective of this invention is to provide an agent reasoning training method based on exploration and perception strategy optimization, which addresses the problems of low exploration accuracy and insufficient cross-environment generalization ability of existing agents in complex long-range interactive tasks.
[0008] To achieve the above objectives, embodiments of the present invention propose an agent reasoning training method based on exploration-aware strategy optimization, comprising: S1. Construct an exploration and memory interaction mode. During the process of the agent performing the interaction task, the task objective, the current environment state, the historical exploration strategy and the accumulated memory are used as model input. The strategy model generates the current exploration strategy, the updated accumulated memory and the execution action according to the model input, and continuously updates the accumulated memory according to the feedback of the environment on the execution action. S2. Construct an exploration action reward estimation mechanism, taking exploration strategy and accumulated memory as variables related to task success, estimating the information value corresponding to different combinations of exploration strategies and accumulated memory through a variational surrogate model, and determining the exploration reward based on the memory state before and after performing the exploration action, and combining the exploration reward with the task success reward and format reward to form the total reward; S3. The policy model is trained in two stages based on supervised fine-tuning and reinforcement learning. In the supervised fine-tuning stage, the policy model is trained using expert rollback data containing deviation states, corresponding previous decision states, and rollback actions, so that the policy model can roll back after exploration failure. In the reinforcement learning stage, interaction trajectories are collected based on the policy model with the rollback capability, and the policy model is optimized using the total reward to obtain the exploration perception policy model. S4. Construct structured prompt words for the exploration and perception strategy model. The structured prompt words include system prompt words for limiting the agent's behavior rules and output format, and task integration prompt words for injecting the current environment state, task objective, exploration context and accumulated memory. The exploration and perception strategy model is driven to perform agent interaction tasks based on the structured prompt words.
[0009] Optionally, in step S1, during the first... During step-by-step interaction, the task objective will be... Current environmental status Previous exploration strategy and the accumulated memory from the previous round Combined as input for the current model; The accumulated memory is used to record at least the confirmed state transition relationships, valid paths, invalid paths, key control semantics, and erroneous action results.
[0010] Optionally, the strategy model generates the current exploration strategy based on the current model input. Updated cumulative memory and the execution of actions The current exploration strategy is used to determine the problem to be verified and candidate exploration actions, the updated cumulative memory is used to record the environmental information obtained after the action is executed, and the action is used to submit to the environment for execution.
[0011] Optionally, in step S2, a variational proxy model is established. Furthermore, the variational agent model is trained by reducing the KL divergence between the variational agent model and the posterior distribution of the exploration strategy and cumulative memory under the condition of task success, so as to obtain the information value estimate of the exploration strategy and cumulative memory under the current environmental state.
[0012] Optionally, the exploration reward in step S2 is determined according to the following formula:
[0013] in, This represents an estimate of the information value of exploration strategies and accumulated memory under the current environmental conditions. This indicates the posterior probability after performing the exploration action and updating the accumulated memory, assuming the task is successful. Indicates the current environmental state. This represents the subsequent environmental state obtained after performing an exploration action. This represents the accumulated memory based on subsequent environmental updates. This represents the discount factor.
[0014] Optionally, the total reward is determined according to the following formula:
[0015] in, This indicates a reward for successful task completion. This represents the format reward used to constrain structured output. Indicates exploration rewards, and This represents the weight parameter for the corresponding reward item.
[0016] Optionally, the supervised fine-tuning stage in step S3 includes: After obtaining the deviation state formed by the agent's exploration, the previous decision state and the rollback action corresponding to the deviation state are determined. After verifying through actual environmental interaction that the rollback action can enable the agent to return to the previous decision state, an expert rollback dataset is constructed based on the deviation state, the previous decision state and the rollback action. The policy model is then supervised and fine-tuned using the expert rollback dataset.
[0017] Optionally, the reinforcement learning phase in step S3 includes: Based on the strategy model that has completed supervised fine-tuning, multiple interaction trajectories are collected, and the environmental state, exploration strategy, accumulated memory, execution action and subsequent environmental state corresponding to each interaction step are recorded. The state transitions in the interaction trajectory are grouped locally based on the environmental state and access depth, and the relative advantage of the action to be performed is determined based on the total reward within the same local transition group in order to update the policy model parameters.
[0018] Optionally, in step S4, the system prompt words are used to limit the agent's task execution rules, executable action space, exploration rules, memory update rules, and structured output format; The task integration prompts are used to organize the current environmental state, task objectives, historical exploration strategies, attempted actions, state transition results, and accumulated memories, and then input the organized information into the exploration perception strategy model.
[0019] The embodiments of the present invention have the following beneficial effects: (1) Adaptive exploration: The agent no longer conducts unified exploration for all states, but judges whether the exploration is valuable based on the current state, historical memory and exploration reward, thereby actively acquiring information in uncertain states and directly executing tasks in certain states. (2) More accurate credit allocation for exploration actions: By using exploration and memory as latent variables and training the exploration reward model, the present invention can provide positive rewards for actions that do not produce successful results temporarily but provide key information, thereby alleviating the underestimation of intermediate exploration behavior by sparse success rewards. (3) Strong cross-environment generalization ability: The present invention explicitly learns when to explore, how to record states and how to utilize memory, rather than just memorizing specific interfaces or task paths, and can transfer to unseen web pages, mobile applications, desktop operations and embodied task scenarios. Attached Figure Description
[0020] The above-described and additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which: Figure 1 A flowchart illustrating an agent reasoning training method based on exploration and perception strategy optimization, provided as an embodiment of the present invention; Figure 2 This is an example diagram of system prompts provided in an embodiment of the present invention; Figure 3 This is an example diagram of model prompt words provided in an embodiment of the present invention; Figure 4 This is an example diagram of action guidance prompts provided in an embodiment of the present invention; Figure 5 These are comparative experimental performance graphs for different environments provided in embodiments of the present invention; Figure 6 These are training curves for different environments provided in the embodiments of the present invention; Figure 7 This is a graph showing the impact of the discount factor on experimental results provided in an embodiment of the present invention; Figure 8 This is a graph showing the effect of the number of samples on the experimental results provided in an embodiment of the present invention; Figure 9 This is a graph showing the impact of constraint factors on experimental results provided in an embodiment of the present invention; Figure 10 This is a graph showing the change in exploration degree during the training process, provided in an embodiment of the present invention. Figure 11 This is an ablation experiment performance diagram for action grouping provided in an embodiment of the present invention; Figure 12 This is a graph showing the change in the degree of exploration in ablation experiments for action groups, provided in an embodiment of the present invention. Figure 13 This is a comparative experimental diagram of training time under different environments provided in the embodiments of the present invention; Figure 14 This is a training time distribution diagram of different modules provided in the embodiments of the present invention. Detailed Implementation
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0023] The following describes, with reference to the accompanying drawings, an agent reasoning training method based on exploration and perception strategy optimization proposed according to an embodiment of the present invention.
[0024] Example 1 This embodiment provides an agent reasoning training method based on exploration perception strategy optimization. The technical solution adopted in this invention is divided into the following three parts: (1) Exploration and memory mode: The agent interaction process is modeled as a decision-making process driven by "task goal, current state, previous exploration strategy, and accumulated memory", and the thinking, exploration, memory and action fields are explicitly set in the model output. The exploration field is used to describe the information to be obtained in the current state, the candidate trial actions and their exploration purpose; the memory field is used to compress the visited state, action consequences, error paths and task-related clues into a reusable summary. (2) Exploration action reward estimation: Exploration and memory are regarded as potential variables affecting task success. A learnable exploration-memory distribution model is trained based on variational inference to estimate the contribution of a certain exploration strategy and memory state to task success in the current environment. This part further combines task success reward, format reward and exploration reward into a total reward, so that the model pursues task completion and maintains structured output, and obtains exploration incentives when the current memory is insufficient or the environment is uncertain. (3) Two-stage training of supervised fine-tuning and reinforcement learning: First, supervised fine-tuning (SFT) is used to train the agent's rollback ability so that it can return to the previous decision point after exploring the wrong path; then reinforcement learning (RL) is used to optimize the exploration perception policy. In the RL stage, multiple interaction trajectories are sampled, the reward model is trained or called to calculate the reward, and local transition groups are constructed according to the environmental state and access depth. The relative advantage is estimated in the same information stage, and finally the policy model is updated.
[0025] like Figure 1 As shown, the method includes the following steps: S1. Construct an exploration and memory interaction mode. During the process of the agent performing the interaction task, the task objective, the current environment state, the historical exploration strategy and the accumulated memory are input into the model. The strategy model generates the current exploration strategy, the updated accumulated memory and the execution action according to the model input, and continuously updates the accumulated memory according to the feedback of the environment on the execution action.
[0026] In complex agent tasks, models often need to gradually understand the environment through multiple rounds of interaction. Unlike ordinary single-step decision-making, when an agent performs tasks in a webpage, mobile application, desktop system, or embodied environment, the current state usually only exposes partial information. Many key clues need to be obtained through actions such as clicking, inputting, returning, opening menus, or switching pages. If the model directly outputs an action based solely on the current state, it is prone to making incorrect decisions when information is insufficient, or repeatedly trying between similar interfaces, leading to redundant exploration and task failure.
[0027] To address this issue, this invention designs an exploration and memory model, explicitly dividing the agent's reasoning process into three parts: exploration, memory, and action execution. The core idea of this application's embodiments is that before executing the final action, the agent should be able to determine whether there is uncertainty in the current environment; if the current information is insufficient, candidate exploration actions are generated to obtain additional environmental feedback; after the exploration action is executed, the model needs to summarize the newly observed state information into memory and reuse this memory to guide decision-making in subsequent steps.
[0028] Specifically, in the In the interactive process, the system no longer only inputs the task objective and the current state into the model, but also inputs the previous round's exploration strategy and accumulated memories. Let the task objective be... The current state is The previous exploration strategy was The cumulative memory from the previous round was Then the input of the model can be represented as: Among them, exploration strategies Used to describe the problem that needs to be verified, the possible candidate actions to be tried, and the information expected to be obtained from each action; cumulative memory. These fields are used to store confirmed state transition relationships, valid paths, invalid paths, the meaning of key controls, and the consequences of erroneous actions in historical interactions. By introducing these two additional fields, the model can utilize information gained from past explorations beyond the current state, thereby avoiding rediscovering the same path from scratch.
[0029] Correspondingly, the model outputs the current exploration strategy at each step. Updated memories and the final executable action : .in, This represents the candidate directions that the model deems worth exploring in the current state. This represents the updated memory summary obtained by combining current observations. This represents the action ultimately submitted to the environment for execution. This design allows the agent to clearly distinguish in form what it "wants to explore," what it "already knows," and what it "will now execute."
[0030] To implement the above mechanism, the system further specifies a structured output format. In one implementation, the model output includes... <think> 、 <explore> 、 <memory>and <action>Four types of fields. Among them, <think>The field is used to record the model's reasoning about the current task and state; <explore>This field is used to list candidate exploration actions and exploration objectives; <memory>This field is used to summarize the pages visited, the actions attempted, and their results; <action>This field is used to specify the final executable action. An example of a prompt word that can generate this format is shown below. Figure 2-4 As shown.
[0031] This structured format does not restrict the specific semantic content of exploration and memory, but rather assigns different functions to independent fields. This facilitates reward modeling for exploration behavior, memory updates, and final actions separately during the training phase; it also allows for continuous reading and updating of memory during the inference phase, enabling the model to use past exploration experience to guide subsequent actions. For example, when an agent needs to complete a setup task in a desktop application, but there are multiple possible entry points on the current interface, the model can first... <explore>The field lists candidate actions such as "Click the menu bar to view settings options" and "Open the right panel to confirm if the target control is included." After executing one of these actions, if the path is found to be irrelevant, the model will... <memory>The field records that the path is invalid, and avoids repeated attempts in the next step; if a target-related page is found, the information is written into memory, and the path is used directly to complete the task in subsequent steps.
[0032] Through exploration and memory patterns, agents can transition from simple reactive action generation to an interactive decision-making process involving information acquisition and experience accumulation. This pattern enables models to proactively explore under uncertain conditions, update their memory upon acquiring new information, and reduce redundant exploration when information is sufficient, thereby improving decision-making stability and task completion efficiency in long-term tasks.
[0033] S2. Construct an exploration action reward estimation mechanism, taking exploration strategy and accumulated memory as variables related to task success, estimating the information value corresponding to different combinations of exploration strategies and accumulated memory through a variational surrogate model, and determining the exploration reward based on the memory state before and after performing the exploration action, and combining the exploration reward with the task success reward and format reward to form the total reward.
[0034] In agent interaction tasks, the value of an action is not always directly reflected by immediate feedback. For actions that complete routine tasks, the effect might be a page transition, achievement of a target state, or a task success signal. However, for exploratory actions, the benefits are usually delayed: the action might simply lead the agent into a new state, providing the model with additional information that helps it make more accurate decisions in subsequent steps. Therefore, evaluating actions solely based on final success or failure signals can easily underestimate the true value of exploratory actions, causing the model to tend towards conservative execution rather than proactive exploration.
[0035] To address this issue, this application designs an action reward estimation mechanism based on variational inference to provide finer-grained reward signals for different types of actions during training. The core idea of this mechanism is that action rewards should not only reflect whether the action immediately completes the task, but also whether the action provides information helpful for subsequent decision-making. Specifically, the system treats exploration strategies and memory states as latent variables affecting task success, and learns their relationship with task success through variational inference, thereby estimating the informational value of exploration actions.
[0036] Let the current state be Exploration strategy is The cumulative memory is Ideally, we would like to obtain the posterior distribution. That is, in the state Under the condition of task success, which exploration strategies and memory states are more likely to lead to a successful trajectory? If a certain combination of exploration strategy and memory has a high probability under the posterior distribution, it indicates that the combination can provide strong information gain, which is helpful for subsequent decision-making and task completion. However, the true posterior distribution is difficult to calculate directly, especially in long-range interactive tasks, where state transitions are complex and success signals are sparse. Directly estimating this distribution requires a large amount of online sampling, which is costly and has a large variance.
[0037] Therefore, this invention introduces a learnable variational surrogate model. This approximates the aforementioned posterior distribution. The model takes the current state as input and outputs probability estimates of the exploration strategy and the memory state, used to measure the effectiveness of the exploration-memory combination in the current state. During training, the system minimizes... Compared with the true posterior distribution The KL divergence between the two values allows the variational surrogate model to progressively approximate the exploration and memory distributions that generate successful trajectories. This process can be transformed into an optimizable objective through variational inference, enabling the reward model to learn the informational value of actions without explicitly calculating the true posterior.
[0038] In one implementation, the system defines the exploration reward as the larger of the benefit of using the current memory directly for decision-making and the benefit of updating the memory after performing the exploration:
[0039] in, This represents the new state observed after an action is performed. This indicates that the new state information is written into the updated memory after the original memory has been updated. This is a discount factor. The first term represents the utilization value of directly completing the task under existing exploration strategies and memories; the second term represents the potential information gain resulting from performing the exploration action, observing the new state, and adding it to memory. Since exploration gains are not immediate, it is usually necessary to first enter the new state and utilize the information in subsequent steps; therefore, the system uses a discount factor. Discounting exploration rewards can discourage pointless overexploration.
[0040] Based on this, the system will combine exploration rewards, task success rewards, and format rewards to form the total reward:
[0041] in, This represents the reward for successful task completion, used to constrain the model to ultimately complete the target task. The format reward is used to ensure that the model outputs exploration, memory, and action fields according to a preset structure. This represents the exploration reward estimated based on variational inference. and The weighting parameter is used. Through this combined reward system, the system retains the ultimate goal of task completion while also providing positive incentives for intermediate exploration actions and memory update behaviors.
[0042] Compared to online sampling methods for estimating action value, the variational inference mechanism of this invention does not require executing a large number of environmental trajectories for each candidate action. Instead, it estimates action value by learning an exploration-memory distribution. This reduces both the cost of environmental interaction and the variance in reward estimation due to policy randomness. Through this mechanism, the agent can learn which actions, while not immediately completing the task, can provide valuable information; it can also reduce further exploration when information is sufficient, thus achieving a more stable balance between exploration and utilization.
[0043] S3. The policy model is trained in two stages based on supervised fine-tuning and reinforcement learning. In the supervised fine-tuning stage, the policy model is trained using expert rollback data containing deviation states, corresponding previous decision states, and rollback actions, so that the policy model can roll back after exploration failure. In the reinforcement learning stage, interaction trajectories are collected based on the policy model with the rollback capability, and the policy model is optimized using the total reward to obtain the exploration perception policy model.
[0044] Exploratory behavior in agent tasks is inherently sparse and context-dependent. Its value typically only becomes apparent after a specific state, a specific sequence of actions, or the accumulation of historical information. Unlike conventional single-step decision-making, exploratory actions do not immediately complete the task but rather provide information for subsequent decisions by entering a new state, observing environmental feedback, and updating memory. Without a dedicated training mechanism, existing agents may easily perceive exploratory actions as low-return actions, leading the model to tend to directly execute conservative strategies. Furthermore, when exploration enters an incorrect path, the model may lack the ability to return to a previous state, introducing irreversible risks into the exploration process.
[0045] It is important to note that effective exploration requires two capabilities: First, the agent should be able to return to its previous decision point after exploring erroneous or irrelevant paths, making exploration a reversible trial-and-error behavior; second, the agent should be able to correctly evaluate the long-term value of exploration actions during reinforcement learning, rather than optimizing solely based on the final action or immediate success signal. Inspired by this, this application designs a supervised fine-tuning-reinforcement learning two-stage training framework to first establish the basic capabilities for safe exploration, and then further learn when and how to explore.
[0046] The first stage is the supervised fine-tuning stage, mainly used to train the agent's rollback capability. The system first constructs an expert rollback dataset, each data point consisting of three parts: (1) the deviated or erroneous state entered after exploration; (2) the previous decision state corresponding to this state; and (3) the rollback action that enables the agent to return from the deviated state to the previous state. This rollback action can be generated by the teacher model, expert rules, or environment interface, and its effectiveness is verified through actual execution. Subsequently, the system uses the above data to supervise the fine-tuning of the policy model, enabling the model to learn to perform return, close, undo, or other scenario-related operations when it finds that the exploration path is invalid, thereby restoring to a state where decision-making can continue.
[0047] The second stage is the reinforcement learning stage, primarily used to train the agent's exploration and perception strategies. In this stage, the system samples multiple interaction trajectories based on a model already equipped with rollback capabilities, recording the current state, exploration field, memory field, executed action, and subsequent state for each step. Subsequently, the system uses an exploration reward model to evaluate the contribution of exploration actions and memory updates to task success, combining task success rewards, format rewards, and exploration rewards into a total reward. To avoid unfairly grouping exploration actions and final task actions in the same category for comparison, the system further constructs local transition groupings based on environmental state and access depth, allowing actions at the same information stage to be compared and their relative advantages estimated.
[0048] Through the two-stage training described above, the agent first acquires the basic ability to "return after exploration," and then learns "when it is worthwhile to explore and how to utilize new information after exploration" through reinforcement learning. The supervised fine-tuning stage reduces exploration risk, while the reinforcement learning stage enhances the ability to estimate the value of exploration actions and select strategies. Combined, the model can proactively access states with informational value during testing, write exploration results into memory, and switch to target execution when sufficient information is available, thereby achieving more stable and efficient decision-making in complex long-term tasks.
[0049] S4. Construct structured prompt words for the exploration and perception strategy model. The structured prompt words include system prompt words for limiting the agent's behavior rules and output format, and task integration prompt words for injecting the current environment state, task objective, exploration context and accumulated memory. The exploration and perception strategy model is driven to perform agent interaction tasks based on the structured prompt words.
[0050] To incorporate exploration, memory, and task execution processes into a large model, this application designs a structured cue word that transforms multi-stage information generated by the agent during interaction into a unified input that can be used for reasoning. This structured cue word comprises two layers: system cue words and task integration cue words.
[0051] System prompts are used to provide stable behavioral constraints, clarifying the agent's overall goals, executable action space, exploration principles, memory update methods, and output format, such as... Figure 2 As shown. For example, system prompts require the agent to first provide candidate exploration actions when faced with an uncertain state, update its memory after observing a new state, and finally output an executable action in a specified format. Simultaneously, the system prompts specify that the model output should include... <think> 、 <explore> 、 <memory>and <action>Fields such as these allow reasoning, exploration, memory, and action execution to be formally separated, facilitating subsequent parsing, reward calculation, and strategy optimization.
[0052] Task integration prompts inject runtime context information into system prompts. For example... Figure 2 and 3 As shown, it mainly includes four parts: (1) Current environment state, which describes the visible text, control attributes, screenshot information and executable action candidates of the current page, screen or interactive interface; (2) Task objective, which gives the user request, current task constraints, available tools and success judgment conditions; (3) Exploration context, including the exploration strategy generated in the previous round or multiple rounds, the actions tried, the state transition results, invalid paths and whether rollback is needed; (4) Cumulative memory, which records the effective paths, erroneous paths, key page semantics, control functions and experience related to task completion summarized by the agent in previous interactions.
[0053] Through the two-layered cue word design described above, this invention enables large models to simultaneously receive stable execution specifications and dynamically changing interaction evidence. System cue words ensure that the model always performs reasoning, exploration, memorization, and action output according to a unified format; task integration cue words organize the current state, task objective, exploration history, and accumulated memory into a structured context. Therefore, the agent can not only determine which action should be performed now, but also reason whether exploration is needed first, which candidate paths should be explored first, how exploration results should be written into memory, and how to transfer existing memories to the current state, thereby improving decision-making quality and execution stability in complex interactive tasks.
[0054] Example 2 This embodiment is used to verify the method proposed in Embodiment 1.
[0055] Test Environment: This embodiment evaluates the method shown in Example 1 in four environments across two domains, environments that have been widely used in previous studies. Specific details are as follows: (1) ALFWorld: A text-based embodied environment containing family tasks where the agent navigates and interacts with objects via natural language commands. (2) WebShop: A complex, web-based interactive environment used to test large language model agents in real-world online shopping scenarios, requiring the agent to explore and plan under uncertainty to complete tasks. (3) AndroidWorld: An environment containing 20 real Android applications and 116 dynamic tasks, used to evaluate the mobile agent's capabilities in application navigation and system-level control. (4) OSWorld: A large-scale web benchmark containing 369 tasks covering real web pages and desktop applications, requiring the agent to have long-term planning and multi-window tool collaboration capabilities.
[0056] Experimental Environment: Experiments were conducted at different model sizes suitable for real-world deployment: for text-based environments, three model sizes of Qwen3 (1.7B, 4B, and 8B) were used; for GUI-based environments, three model sizes of Qwen3-VL (2B, 4B, and 8B) were used. Model deployment used vLLM as the rollout service, with a sampling temperature of 1 and a maximum generation length of 4096 tokens. All experiments were run on an Ubuntu 22.04.4 LTS system using eight NVIDIA H800 GPUs.
[0057] Comparison Methods: Comparisons were made with six representative dynamic exploration baseline methods. (1) Min-p: A dynamic truncation method that adjusts the sampling threshold based on model confidence and uses the probability of the highest probability word as a scaling factor. (2) OverRIDE: A decoding method that dynamically adjusts the probability distribution of the next word during the inference phase to encourage the model to explore new, low-probability generation paths. (3) GRPO: A group-based, commenter-free reinforcement learning method that provides stable optimization for training large language models for inference through trajectory group estimation advantages. (4) DAPO: A group-based, commenter-free reinforcement learning method that improves training efficiency and stability in long-chain thinking scenarios through higher pruning thresholds and dynamic sampling. (5) GiGPO: A group-based reinforcement learning algorithm that introduces credit allocation in both step and trajectory dimensions, suitable for multi-round optimization of large language model agents. (6) LAMER: A meta-reinforcement learning framework that allows large language model agents to sample multiple trajectories and adjust their behavior by interacting with these sampling experiences within the context.
[0058] Overall Performance: This application's embodiments evaluated the invention on all datasets and compared it using base models of different sizes. For example... Figure 5 and 6 As shown, the complete results include comparisons with current strong general models, agent models, and various baseline methods. Experimental results show that the present invention consistently outperforms existing baseline methods in all four test environments, and typically exhibits significant advantages in task success rate and training convergence speed. Particularly noteworthy is that a 2B-scale model trained using the present invention can outperform several general models and agent models with significantly larger parameter scales, demonstrating that the present invention effectively enables the agent to learn "when to explore" and "how to explore," thereby significantly improving its understanding of the environment and decision-making quality during execution. Existing runtime extension methods perform explicit exploration during testing by branching multiple inference paths and performing self-evaluation. However, this exploration mainly relies on heuristic unfolding during the inference phase, lacking learning signals from the training phase, and is prone to producing uniform and inefficient exploration under different states. The LAMER method samples multiple trajectories and uses contextual meta-learning to adjust behavior, enabling the agent to possess a certain exploration capability; however, its exploration is also relatively uniform and conservative, failing to explicitly learn which states require exploration. In contrast, this invention explicitly learns exploration and perception strategies through reward modeling and grouping mechanisms, enabling the agent to determine the timing and method of exploration, thereby achieving more efficient and adaptive exploration during the execution phase.
[0059] Impact of Key Parameters: To verify the impact of key hyperparameters on training performance in this invention, the discount factors were varied in the embodiments of this invention. Sampling group size and KL coefficient The experiment was conducted, and the results are as follows: Figures 7 to 9 As shown. Among them, The value ranges from 0.5 to 1.0, and the sampling group size is... The value range of λ is 4 to 32, and the value range of the KL coefficient λ is 0.005 to 1.0. All other data settings and training parameters remain consistent. Experimental results show that increasing the discount factor... Typically, more of the rewards from information-acquiring actions are retained, thus encouraging the agent to explore; however, when If the sample size is too large, the model may tend to over-explore, introducing information irrelevant to the task, which could actually reduce the quality of the final decision. Sample group size Increasing the value within a certain range can provide a more reliable estimate of relative advantage, thereby improving the effectiveness of strategy optimization; however, when... When the value is too large, it will reduce the parameter update frequency and increase the variance between different trajectories, causing performance improvements to gradually saturate. KL coefficients The training effect exhibits a single-peak trend. Moderate. This can limit the magnitude of policy updates, preventing overly aggressive model updates, thereby stabilizing training and improving performance; while excessively small... This can easily lead to unstable optimization and excessive size. This would impose excessive constraints on the strategy, hindering effective exploration. Therefore, in actual deployment, the aforementioned hyperparameters should be set reasonably based on task complexity, interaction costs, and model size to balance exploration and utilization, thereby achieving a stable optimization process and better task execution results.
[0060] Exploration Level Analysis: To observe the impact of this invention on exploration behavior during training, embodiments of this invention statistically analyzed the changes in the agent's exploration level, such as... Figure 10 As shown in the diagram, experimental results indicate that in the early stages of training, as the agent gradually learns to actively access states with informational value and obtain additional environmental feedback, its exploration level increases. This suggests that the model begins to develop effective exploratory behavior, rather than simply executing conservative actions based on the current state. As training continues, the exploration level gradually converges, indicating that the agent has learned to selectively explore when necessary, rather than indiscriminately exploring all states. In other words, the model can actively explore when current information is insufficient and reduce redundant exploration when existing memory is sufficient to support decision-making. These results demonstrate that the present invention can effectively overcome the agent's tendency to be overly conservative or blindly execute, enabling it to form a more adaptive exploration strategy, thereby improving its generalization ability in unseen scenarios and complex interactive tasks.
[0061] Ablation Experiment: To verify the function of each key module of the present invention, an ablation experiment was conducted on the entire dataset under the same experimental settings. The experiment primarily examined the effects of exploration reward, exploration-aware grouping, and format reward. The results are as follows: Figure 11 and 12 As shown in the figure. Experimental results indicate that after removing exploration rewards, the agent cannot effectively evaluate the usefulness of each exploration action, easily generating ineffective explorations and prematurely converging to suboptimal behavior, resulting in a significant decrease in task performance across all test environments. After removing the exploration-aware grouping, exploration actions and task execution actions are mixed into the same optimization group. As training progresses, the value of exploration actions is continuously underestimated, causing the exploration level and task performance to show a trend of first increasing and then decreasing, indicating that the model's exploration behavior is unstable and the long-term optimization effect is weakened. In addition, after removing format rewards, the agent struggles to consistently follow the preset structured output format and cannot continuously generate clear exploration signals and memory update content. Consequently, the information obtained during the exploration process is difficult to effectively organize, store, and reuse, limiting the agent's ability to use exploration behavior to improve subsequent decisions and complete tasks. The above results demonstrate that exploration rewards, exploration-aware grouping, and format rewards all play important roles in this invention, and the three together ensure the effectiveness of exploration behavior, the stability of the training process, and the quality of decisions during testing.
[0062] Runtime Analysis: To verify the computational overhead of this invention, the training time and the time consumption of each component module were statistically analyzed in all test environments. For example... Figure 13 and 14 As shown, compared to existing methods, the training time of this invention increases by no more than 15%. This additional overhead mainly comes from the training of the variational distribution model, i.e., the reward modeling process used to estimate the combined value of exploration and memory. It should be noted that compared to methods requiring extensive online trajectory sampling to estimate exploration rewards, the additional training cost introduced by this invention is relatively small. Online sampling typically requires repeated interaction with the environment and execution of multiple candidate trajectories, resulting in high overhead; while this invention estimates exploration value through a learnable variational agent model, enabling the acquisition of stable reward signals at a lower cost. Therefore, this increase in training time is reasonable and acceptable given the significant improvement in task performance and training convergence speed. Regarding the inference phase, since this invention allows the agent to perform exploration actions when information is insufficient, the average number of interaction steps will increase to some extent. To avoid meaningless exploration, this invention introduces a discount factor into the exploration reward. Since exploration gains are not immediate, typically requiring an initial action to observe the new state before integrating that information in subsequent steps, the system discounts exploration gains. This design ensures that the agent will only perform an exploration action when the expected gain outweighs the time cost of additional interaction; when existing information is sufficient to support a decision, the model reduces further exploration. Experimental results show that this invention results in a relatively small increase in the average number of steps, at most about 10 steps, and can improve decision-making quality in complex tasks while controlling inference overhead.
[0063] Case Study: To illustrate the adaptive exploration capabilities of this invention during the testing phase, an embodiment of this invention uses a task in the OSWorld environment for demonstration. During inference, the agent first determines whether uncertainty exists based on the current state. When the current information is insufficient to directly determine the target action, the model will... <explore>The field outputs candidate exploration actions, such as attempting to enter a page, clicking potentially related controls, or verifying the feasibility of a path. After the system executes the corresponding exploration action, the agent observes the new state generated by the action and summarizes the key information of the state, whether the path is valid, and its impact on subsequent decisions. <memory>Further observation revealed that the agent does not merely attempt single steps, but rather explores multiple steps along a possible direction. During this exploration, the model continuously accumulates knowledge about state transition relationships, such as where a button will lead, whether a path is relevant to the task objective, and whether an operation needs to be rolled back. With this structured memory, the agent can avoid repeating invalid paths in subsequent steps and choose more informed actions, thereby improving decision-making efficiency and task completion rate in complex tasks.
[0064] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0065] In the description of this specification, the references to "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0066] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.< / memory> < / explore> < / action> < / memory> < / explore> < / think> < / memory> < / explore> < / action> < / memory> < / explore> < / think> < / action> < / memory> < / explore> < / think>
Claims
1. A method for training intelligent agent reasoning based on exploration-perception strategy optimization, characterized in that, Includes the following steps: S1. Construct an exploration and memory interaction mode. During the process of the agent performing the interaction task, the task objective, the current environment state, the historical exploration strategy and the accumulated memory are used as model input. The strategy model generates the current exploration strategy, the updated accumulated memory and the execution action according to the model input, and continuously updates the accumulated memory according to the feedback of the environment on the execution action. S2. Construct an exploration action reward estimation mechanism, taking exploration strategy and accumulated memory as variables related to task success, estimating the information value corresponding to different combinations of exploration strategies and accumulated memory through a variational surrogate model, and determining the exploration reward based on the memory state before and after performing the exploration action, and combining the exploration reward with the task success reward and format reward to form the total reward; S3. The policy model is trained in two stages based on supervised fine-tuning and reinforcement learning. In the supervised fine-tuning stage, the policy model is trained using expert rollback data containing deviation states, corresponding previous decision states, and rollback actions, so that the policy model can gain the ability to rollback after exploration failure. During the reinforcement learning phase, interaction trajectories are collected based on the policy model with the rollback capability, and the total reward is used to optimize the policy model to obtain the exploration perception policy model. S4. Construct structured prompt words for the exploration and perception strategy model. The structured prompt words include system prompt words for limiting the agent's behavior rules and output format, and task integration prompt words for injecting the current environment state, task objective, exploration context and accumulated memory. The exploration and perception strategy model is driven to perform agent interaction tasks based on the structured prompt words.
2. The agent reasoning training method based on exploration and perception strategy optimization according to claim 1, characterized in that, In step S1, at the... During step-by-step interaction, the task objective will be... Current environmental status Previous exploration strategy and the accumulated memory from the previous round Combined as input for the current model; The accumulated memory is used to record at least the confirmed state transition relationships, valid paths, invalid paths, key control semantics, and erroneous action results.
3. The agent reasoning training method based on exploration and perception strategy optimization according to claim 2, characterized in that, The strategy model generates the current exploration strategy based on the current model input. Updated cumulative memory and the execution of actions The current exploration strategy is used to determine the problem to be verified and candidate exploration actions, the updated cumulative memory is used to record the environmental information obtained after the action is executed, and the action is used to submit to the environment for execution.
4. The agent reasoning training method based on exploration and perception strategy optimization according to claim 1, characterized in that, In step S2, a variational proxy model is established. Furthermore, the variational agent model is trained by reducing the KL divergence between the variational agent model and the posterior distribution of the exploration strategy and cumulative memory under the condition of task success, so as to obtain the information value estimate of the exploration strategy and cumulative memory under the current environmental state.
5. The agent reasoning training method based on exploration and perception strategy optimization according to claim 4, characterized in that, The exploration reward in step S2 is determined according to the following formula: in, This represents an estimate of the information value of exploration strategies and accumulated memory under the current environmental conditions. This indicates the posterior probability after performing the exploration action and updating the accumulated memory, assuming the task is successful. Indicates the current environmental state. This represents the subsequent environmental state obtained after performing an exploration action. This represents the accumulated memory based on subsequent environmental updates. This represents the discount factor.
6. The agent reasoning training method based on exploration and perception strategy optimization according to claim 5, characterized in that, The total reward is determined according to the following formula: in, This indicates a reward for successful task completion. This represents the format reward used to constrain structured output. Indicates exploration rewards, and This represents the weight parameter for the corresponding reward item.
7. The agent reasoning training method based on exploration and perception strategy optimization according to claim 1, characterized in that, The supervised fine-tuning phase in step S3 includes: After obtaining the deviation state formed by the agent's exploration, the previous decision state and the rollback action corresponding to the deviation state are determined. After verifying through actual environmental interaction that the rollback action can enable the agent to return to the previous decision state, an expert rollback dataset is constructed based on the deviation state, the previous decision state and the rollback action. The policy model is then supervised and fine-tuned using the expert rollback dataset.
8. The agent reasoning training method based on exploration and perception strategy optimization according to claim 7, characterized in that, The reinforcement learning phase in step S3 includes: Based on the strategy model that has completed supervised fine-tuning, multiple interaction trajectories are collected, and the environmental state, exploration strategy, accumulated memory, execution action and subsequent environmental state corresponding to each interaction step are recorded. The state transitions in the interaction trajectory are grouped locally based on the environmental state and access depth, and the relative advantage of the action to be performed is determined based on the total reward within the same local transition group in order to update the policy model parameters.
9. The agent reasoning training method based on exploration and perception strategy optimization according to claim 1, characterized in that, In step S4, the system prompt words are used to limit the agent's task execution rules, executable action space, exploration rules, memory update rules, and structured output format; The task integration prompts are used to organize the current environmental state, task objectives, historical exploration strategies, attempted actions, state transition results, and accumulated memories, and then input the organized information into the exploration perception strategy model.
