Model output result correction method, device and equipment

By employing counterfactual intervention and adaptive adjustment algorithms on the embodied intelligent model, the problem of excessive dependence on the ontological state in the embodied intelligent action model is solved, achieving efficient and low-cost action prediction and correction, and improving the accuracy of embodied robot actions.

CN123140248APending Publication Date: 2026-11-20INNOVATION QIZHI TECH GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611475761.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Embodied intelligent action models tend to become overly reliant on the ontology's state in the early stages of training, resulting in low accuracy in action prediction. Existing solutions are costly, time-consuming, and unfriendly, making it difficult to directly correct deviations in the deployment environment.

Method used

By intervening in the inference data through a pre-set counterfactual intervention method, counterfactual input data is generated, and the modal effect value is calculated using an adaptive adjustment algorithm. The model output is then corrected directly during the deployment period, avoiding retraining.

Benefits of technology

It improves the accuracy and efficiency of motion prediction for embodied models, enables real-time correction without changing model parameters, and reduces costs and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123140248A_ABST
    Figure CN123140248A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a model output result correction method, device and equipment, comprising: obtaining to-be-reasoned data; determining a basic predicted action corresponding to the to-be-reasoned data according to a body control model that has been trained; intervening in the to-be-reasoned data by using a preset counterfactual intervention mode to determine counterfactual input data, and determining a counterfactual predicted action corresponding to the counterfactual input data according to the body control model; determining a modal effect value according to the basic predicted action and the counterfactual predicted action; and determining a target correction action according to the modal effect value, the basic predicted action and the counterfactual predicted action by using a preset adaptive adjustment algorithm, explicitly quantifying the contribution of each mode to the action output through counterfactual intervention, and correcting the basic predicted action in the reasoning stage accordingly, without retraining the model, thereby improving the accuracy and efficiency of body model correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of embodied intelligence technology, and more specifically, to a method, apparatus, and device for correcting model output results. Background Technology

[0002] With the continuous development of intelligent technology, embodied robots have emerged. These robots are trained using supervised imitation learning or behavior cloning to obtain embodied intelligent action models. This means that the main inputs are language commands and the robot's state, and the output is a block of actions for the next few steps. The actual taught actions are used as supervisory signals to calculate the action loss. However, the body state typically has characteristics such as low dimensionality, continuity, low noise, and strong correlation with historical actions. In the early stages of training, embodied intelligent action models tend to use this as a shortcut feature. Thus, during training, the robot's actions are mainly controlled by following historical inertia or the continuation of the current joint state, leading to an over-reliance on the body trajectory and low accuracy in predicting the robot's actions, resulting in errors. When errors occur, modal imbalance can be mitigated by continuing training, resampling data, modifying the loss function, or adding attention constraints. However, retraining or fine-tuning the model is costly, time-consuming, and unfriendly to deployment environments. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, and device for correcting model output results, so as to improve the accuracy and efficiency of correction of embodied models.

[0004] In a first aspect, embodiments of this application provide a method for correcting model output results, including: Obtain the data to be inferred; Based on the embodied control model that has been trained, determine the basic predicted action corresponding to the data to be inferred; The data to be inferred is intervened using a preset counterfactual intervention method to determine the counterfactual input data. The preset counterfactual intervention method includes all-zero permutation, mean filling, random occlusion, masking, local region suppression, or channel attenuation. The preset counterfactual intervention method is used to process the missing modal information in the data to be inferred. Based on the embodied control model, determine the counterfactual prediction action corresponding to the counterfactual input data; The modal effect value is determined based on the basic prediction action and the counterfactual prediction action; A preset adaptive adjustment algorithm is used to determine a target correction action based on the modal effect value, the basic predicted action, and the counterfactual predicted action. The preset adaptive adjustment algorithm includes a fusion algorithm, a piecewise function, an exponential function, normalized weights, or a gating network. The target correction action is obtained by correcting the basic predicted action and is used to control the robot to perform actions.

[0005] In this embodiment, counterfactual intervention is applied to different parameters in the data to be inferred to obtain counterfactual input data. Based on the data to be inferred and the embodied control model, a basic predicted action is generated, and a counterfactual predicted action is also generated based on the counterfactual input data and the embodied control model. A modal effect value is generated based on the basic predicted action and the counterfactual predicted action. The basic predicted action is corrected based on the modal effect value. In this way, the sample-level contribution of visual and ontological state modalities can be explicitly quantified by the difference between the basic predicted action and the counterfactual action. It is possible to directly discover whether the model has modal imbalance and "blind walking" tendency. There is no need to retrain the model. The correction during the inference stage can be achieved simply by turning on the counterfactual evaluation switch in the deployment executor, which improves the accuracy of action prediction.

[0006] Optionally, determining the modal effect value based on the basic prediction action and the counterfactual prediction action includes: The basic prediction actions are concatenated to obtain the first vector of the basic prediction actions; The counterfactual prediction actions are concatenated to obtain a second vector of the counterfactual prediction actions; The modal effect value is determined based on the first vector and the second vector.

[0007] In the embodiments of this application, when there are multiple basic prediction actions and counterfactual prediction actions, the multiple actions can be concatenated to obtain a first vector and a second vector, and modal effect values ​​can be generated based on the first vector and the second vector.

[0008] Optionally, determining the modal effect value based on the first vector and the second vector includes: The modal effect values ​​of the first vector and the second vector are calculated using a metric algorithm, wherein the metric algorithm includes L2 distance, L1 distance, weighted mean square error, cosine distance, end-effector pose difference or critical joint difference.

[0009] In the embodiments of this application, any measurement algorithm is used to calculate the modal effect value according to different needs, thereby improving the robustness of the calculation.

[0010] Optionally, the method further includes: If the modal effect value is greater than a first preset threshold or less than a second preset threshold, the basic prediction action is determined as the target correction action, wherein the second preset threshold is less than the first preset threshold.

[0011] In this embodiment of the application, when the modal effect value is greater than the first preset threshold or the modal effect value is less than the second preset threshold, in order to prevent the counterfactual action from being too strong and causing action distortion, the basic prediction action is directly reverted to be used.

[0012] Optionally, the step of intervening in the data to be reasoned using a preset counterfactual intervention method to determine counterfactual input data includes: Set the ontology state in the data to be reasoned to zero to obtain the first counterfactual input data in which the ontology state is interfered with. By setting the image data and language commands in the data to be reasoned to zero, a second counterfactual input data of visual interference is obtained; Correspondingly, determining the counterfactual prediction action corresponding to the counterfactual input data based on the embodied control model includes: The first counterfactual input data is input into the embodied control model to obtain the first counterfactual predicted action; The second counterfactual input data is input into the embodied control model to obtain the second counterfactual predicted action.

[0013] In the embodiments of this application, the sample-level contribution of visual and ontological state modalities is explicitly quantified by the difference between factual and counterfactual actions, which can directly reveal whether the model has modal imbalance and a tendency to "blindly walk".

[0014] Optionally, determining the target correction action based on the modal effect value, the basic prediction action, and the counterfactual prediction action includes: Calculate the first distance between the base prediction action and the first counterfactual prediction action; The first distance is determined as the body modal effect value; Calculate the second distance between the base prediction action and the second counterfactual prediction action; The second distance is determined as the visual modal effect value; The correction coefficient is determined based on the ontological modal effect value and the visual modal effect value; The target correction action is determined based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action.

[0015] In this embodiment, a correction weight is generated based on the visual effect value and the ontology effect value. In addition to the conventional inference chain, four processing steps are added: ontology zeroing counterfactual inference, image zeroing counterfactual inference, modal effect quantification, and action reweighting, thereby forming a complete inference-period correction closed loop.

[0016] Optionally, determining the correction coefficient based on the ontological modal effect value and the visual modal effect value includes: The sum of the ontological modal effect value and the visual modal effect value is determined as the total effect value; The ratio of the ontological modal effect value to the total effect value is determined as the ontological correction coefficient; The ratio of the visual modal effect value to the total effect value is determined as the visual correction coefficient.

[0017] In the embodiments of this application, the ontology correction coefficient and the visual correction coefficient are calculated respectively to achieve adaptive adjustment of the correction weight.

[0018] Optionally, determining the target correction action based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action includes: Based on the first counterfactual prediction action and the basic prediction action, determine the ontological counterfactual difference; The visual counterfactual difference is determined based on the second counterfactual prediction action and the basic prediction action; The target correction action is determined based on the basic prediction action, the ontological counterfactual difference and the ontological correction coefficient corresponding to the ontological counterfactual difference, the visual counterfactual difference and the visual correction coefficient corresponding to the visual counterfactual difference, wherein the ontological counterfactual difference is obtained by limiting the amplitude of the ontological counterfactual difference.

[0019] In the embodiments of this application, by comparing the differences between factual actions and counterfactual actions, the contributions of visual modality and ontological state modality to action output are quantified, and then the contributions are used to guide the reweighting of the inference period of the final action, thereby weakening the model's biased dependence on a single modality and realizing inference correction.

[0020] Secondly, embodiments of this application provide a correction device for model output results, including: The acquisition module is used to acquire the data to be inferred. The first prediction module is used to determine the basic prediction action corresponding to the data to be inferred based on the embodied control model that has been trained. An intervention module is used to intervene in the data to be inferred using a preset counterfactual intervention method to determine counterfactual input data. The preset counterfactual intervention method includes zero permutation, mean filling, random occlusion, masking, local region suppression, or channel attenuation. The preset counterfactual intervention method is used to process the missing modal information in the data to be inferred. The second prediction module is used to determine the counterfactual prediction action corresponding to the counterfactual input data based on the embodied control model. The calculation module is used to determine the modal effect value based on the basic prediction action and the counterfactual prediction action; The correction module is used to determine a target correction action based on the modal effect value, the basic predicted action, and the counterfactual predicted action using a preset adaptive adjustment algorithm. The preset adaptive adjustment algorithm includes a fusion algorithm, a piecewise function, an exponential function, normalized weights, or a gating network. The target correction action is obtained by correcting the basic predicted action and is used to control the robot to perform actions.

[0021] In this embodiment, counterfactual intervention is applied to different parameters in the data to be inferred to obtain counterfactual input data. Based on the data to be inferred and the embodied control model, a basic predicted action is generated, and a counterfactual predicted action is also generated based on the counterfactual input data and the embodied control model. A modal effect value is generated based on the basic predicted action and the counterfactual predicted action. The basic predicted action is corrected based on the modal effect value. In this way, the sample-level contribution of visual and ontological state modalities can be explicitly quantified by the difference between the basic predicted action and the counterfactual action. It is possible to directly discover whether the model has modal imbalance and "blind walking" tendency. There is no need to retrain the model. The correction during the inference stage can be achieved simply by turning on the counterfactual evaluation switch in the deployment executor, which improves the accuracy of action prediction.

[0022] Optionally, the computing module is used for: The basic prediction actions are concatenated to obtain the first vector of the basic prediction actions; The counterfactual prediction actions are concatenated to obtain a second vector of the counterfactual prediction actions; The modal effect value is determined based on the first vector and the second vector.

[0023] In the embodiments of this application, when there are multiple basic prediction actions and counterfactual prediction actions, the multiple actions can be concatenated to obtain a first vector and a second vector, and modal effect values ​​can be generated based on the first vector and the second vector.

[0024] Optionally, the computing module is used for: The modal effect values ​​of the first vector and the second vector are calculated using a metric algorithm, wherein the metric algorithm includes L2 distance, L1 distance, weighted mean square error, cosine distance, end-effector pose difference or critical joint difference.

[0025] In the embodiments of this application, any measurement algorithm is used to calculate the modal effect value according to different needs, thereby improving the robustness of the calculation.

[0026] Optionally, the computing module is used for: If the modal effect value is greater than a first preset threshold or less than a second preset threshold, the basic prediction action is determined as the target correction action, wherein the second preset threshold is less than the first preset threshold.

[0027] In this embodiment of the application, when the modal effect value is greater than the first preset threshold or the modal effect value is less than the second preset threshold, in order to prevent the counterfactual action from being too strong and causing action distortion, the basic prediction action is directly reverted to be used.

[0028] Optionally, the intervention module is used to: Set the ontology state in the data to be reasoned to zero to obtain the first counterfactual input data in which the ontology state is interfered with. By setting the image data and language commands in the data to be reasoned to zero, a second counterfactual input data of visual interference is obtained; Correspondingly, the second prediction module is used for: The first counterfactual input data is input into the embodied control model to obtain the first counterfactual predicted action; The second counterfactual input data is input into the embodied control model to obtain the second counterfactual predicted action.

[0029] In the embodiments of this application, the sample-level contribution of visual and ontological state modalities is explicitly quantified by the difference between factual and counterfactual actions, which can directly reveal whether the model has modal imbalance and a tendency to "blindly walk".

[0030] Optionally, the correction module is used to: Calculate the first distance between the base prediction action and the first counterfactual prediction action; The first distance is determined as the body modal effect value; Calculate the second distance between the base prediction action and the second counterfactual prediction action; The second distance is determined as the visual modal effect value; The correction coefficient is determined based on the ontological modal effect value and the visual modal effect value; The target correction action is determined based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action.

[0031] In this embodiment, a correction weight is generated based on the visual effect value and the ontology effect value. In addition to the conventional inference chain, four processing steps are added: ontology zeroing counterfactual inference, image zeroing counterfactual inference, modal effect quantification, and action reweighting, thereby forming a complete inference-period correction closed loop.

[0032] Optionally, the correction module is used to: The sum of the ontological modal effect value and the visual modal effect value is determined as the total effect value; The ratio of the ontological modal effect value to the total effect value is determined as the ontological correction coefficient; The ratio of the visual modal effect value to the total effect value is determined as the visual correction coefficient.

[0033] In the embodiments of this application, the ontology correction coefficient and the visual correction coefficient are calculated respectively to achieve adaptive adjustment of the correction weight.

[0034] Optionally, the correction module is used to: Based on the first counterfactual prediction action and the basic prediction action, determine the ontological counterfactual difference; The visual counterfactual difference is determined based on the second counterfactual prediction action and the basic prediction action; The target correction action is determined based on the basic prediction action, the ontological counterfactual difference and the ontological correction coefficient corresponding to the ontological counterfactual difference, the visual counterfactual difference and the visual correction coefficient corresponding to the visual counterfactual difference, wherein the ontological counterfactual difference is obtained by limiting the amplitude of the ontological counterfactual difference.

[0035] In the embodiments of this application, by comparing the differences between factual actions and counterfactual actions, the contributions of visual modality and ontological state modality to action output are quantified, and then the contributions are used to guide the reweighting of the inference period of the final action, thereby weakening the model's biased dependence on a single modality and realizing inference correction.

[0036] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, can implement the method described in any embodiment of the first aspect.

[0037] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.

[0038] Fifthly, embodiments of this application provide a computer program product, the computer program product including a computer program, wherein when the computer program is executed by a processor, it can implement the method described in any embodiment of the first aspect. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 A flowchart illustrating a method for correcting model output results provided in an embodiment of this application; Figure 2 A flowchart illustrating another method for correcting model output results provided in an embodiment of this application; Figure 3 A schematic diagram of a model output correction device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0041] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0042] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0043] Current embodied intelligence models typically learn action prediction in a multimodal end-to-end manner, simultaneously inputting images, verbal commands, and ontology states, and outputting future action blocks through a unified network. Because ontology states are characterized by low dimensionality, low noise, and temporal continuity, models can easily become overly reliant on them during training. When visual modality learning is insufficient or the task scene deviates, the model may still output actions along an inertial trajectory, exhibiting a greater reliance on joint history or current position rather than using current visual feedback for correction, resulting in the so-called "blind walking" problem.

[0044] Existing solutions typically mitigate modality imbalance by continuing training, resampling data, modifying loss functions, or adding attention constraints. However, these methods have significant drawbacks. First, they require retraining or fine-tuning the model, which is costly, time-consuming, and unfriendly to deployment environments. Second, even with improved offline validation metrics, it's difficult to explain whether the current action relies more on vision or ontology during a single online inference iteration. Third, there's a lack of a mechanism that can directly insert into the existing inference chain during deployment, evaluate modal contributions on a sample-by-sample basis, and dynamically correct action results.

[0045] Therefore, this application provides a plug-and-play correction algorithm for the inference stage, which can utilize the counterfactual causal reasoning idea to quantify the contribution of visual information and ontological state information to the prediction of the current action without changing the parameters of the trained model, and make stable corrections to the output action accordingly.

[0046] like Figure 1 As shown in the figure, this application embodiment provides a method for correcting model output results, which may include the following steps: S101. Obtain the data to be reasoned; Specifically, the embodiments of this application are applied to a terminal device that is connected to an embodied robot. An embodied control model is pre-trained on the terminal device. The embodied control model is used to generate a target action and control the embodied robot to execute the action. In other words, the trained embodied control model is applied during the testing process.

[0047] During testing, the terminal device acquires data to be inferred, including image data, ontology state, language commands, historical images, depth, force sensing, tactile sensing, and voice or task prompts. Image data refers to images captured by cameras; when the system is configured with multiple cameras, the image data is a collection of image tensors from each camera. Ontology state is a vectorized representation of the embodied robot's current ontology state, which may include at least one of joint angles, joint angular velocities, end-effector position, and end-effector pose. Language commands are natural language sequences describing the current task.

[0048] S102. Based on the embodied control model that has been trained, determine the basic prediction action corresponding to the data to be inferred; Specifically, the terminal device pre-trains an embodied control model, converts the acquired data to be reasoned into feature vectors, inputs the feature vectors into the embodied control model, and outputs a basic predicted action corresponding to the data to be reasoned. The basic predicted action can be a multi-dimensional action sequence output in the form of action blocks. In other words, the basic predicted action can be multiple future actions, for example, 50 future steps of action.

[0049] S103. Intervene the data to be inferred using a preset counterfactual intervention method to determine counterfactual input data. The preset counterfactual intervention method includes zero permutation, mean filling, random occlusion, masking, local region suppression, or channel attenuation. The preset counterfactual intervention method is used to process the missing modal information in the data to be inferred. Specifically, the terminal device uses a preset counterfactual intervention method to process one or more items in the data to be inferred, thereby obtaining counterfactual input data corresponding to the data to be inferred. For example, it can use zero-permutation, mean filling, random occlusion, mask token, local region suppression, or channel attenuation to process any one or more items in the data to be inferred, thereby obtaining counterfactual input data.

[0050] For example, the image data in the data to be inferred can be set to 0, or the ontology state can be set to 0.

[0051] S104. Based on the embodied control model, determine the counterfactual prediction action corresponding to the counterfactual input data; Specifically, the terminal device uses a pre-trained embodied control model, inputs the feature vector of the counterfactual input data into the embodied control model, and outputs the counterfactual predicted action corresponding to the counterfactual input data. The model parameters of this embodied control model are the same as those of the aforementioned embodied control model. S105. Determine the modal effect value based on the basic predicted action and the counterfactual predicted action; Specifically, the terminal device uses the difference between the base predicted action and each counterfactual predicted action to quantify the marginal contribution of the intervened mode to the action output and determine the modal effect value corresponding to each intervened mode. The larger the modal effect value, the greater the contribution of the intervened mode to the current action prediction. The modal effect value can be the L2 distance, or it can be replaced by the L1 distance, weighted mean square error, cosine distance, or end-effector pose difference. In this embodiment, no specific limitation is made.

[0052] S106. Using a preset adaptive adjustment algorithm, a target correction action is determined based on the modal effect value, the basic predicted action, and the counterfactual predicted action. The preset adaptive adjustment algorithm includes a fusion algorithm, a piecewise function, an exponential function, normalized weights, or a gating network. The target correction action is obtained by correcting the basic predicted action and is used to control the robot to perform actions.

[0053] Specifically, the terminal device is equipped with a preset adaptive adjustment algorithm: such as a fusion algorithm, piecewise function, exponential function, normalized weight or gating network, which is used to adaptively determine the correction action based on the modal effect value, correct the basic predicted action, and obtain the target correction action. This target correction action is used to control the action executed by the robot.

[0054] The terminal device calculates the difference between the basic predicted action and the counterfactual predicted action based on the basic predicted action and the counterfactual predicted action. It then calculates the product of the difference and the modal effect value, and sums the product with the basic predicted action. This sum is then determined as the target correction action. The target correction action is obtained by correcting the basic predicted action and is used to control the robot to perform actions.

[0055] This application's embodiments quantify the contribution of each modality to the current action prediction at the sample level through factual reasoning, counterfactual reasoning, effect quantification, and action correction, and use the quantification results to correct the basic predicted action online. Compared to training-side modality balancing schemes, this application's embodiments do not require retraining the model and can be directly inserted into the existing inference chain during deployment. Compared to schemes that unconditionally trust the feedback of a certain modality, this application's embodiments, through modality effect differentiation correction, can avoid over-correction and ensure the stability of action output.

[0056] In this embodiment, counterfactual intervention essentially involves constructing a contrast input with "missing modal information": Zero-filling sets the entire data of the modality to be intervened to zero; mean filling fills the modality with the feature mean; random occlusion sets random regions of the modal data to zero; mask tokens replace the modal input with dedicated mask tokens; local region suppression suppresses only certain regions of the modal data; and channel-based attenuation proportionally reduces each channel of the modal data to zero. All of these methods are used to handle missing modal information in the data to be inferred, thereby allowing the contribution of the modality to the action output to be measured by comparing the model output under "factual input" and "counterfactual input" without changing the model parameters.

[0057] In this embodiment, counterfactual intervention is applied to different parameters in the data to be inferred to obtain counterfactual input data. Based on the data to be inferred and the embodied control model, a basic predicted action is generated, and a counterfactual predicted action is also generated based on the counterfactual input data and the embodied control model. A modal effect value is generated based on the basic predicted action and the counterfactual predicted action. The basic predicted action is corrected based on the modal effect value. In this way, the sample-level contribution of visual and ontological state modalities can be explicitly quantified by the difference between the basic predicted action and the counterfactual action. It is possible to directly discover whether the model has modal imbalance and "blind walking" tendency. There is no need to retrain the model. The correction during the inference stage can be achieved simply by turning on the counterfactual evaluation switch in the deployment executor, which improves the accuracy of action prediction.

[0058] Another embodiment of this application further explains the method for correcting the model output results provided in the above embodiments.

[0059] Optionally, determining the modal effect value based on the basic prediction action and the counterfactual prediction action includes: The basic prediction actions are concatenated to obtain the first vector of the basic prediction actions; The counterfactual prediction actions are concatenated to obtain a second vector of the counterfactual prediction actions; The modal effect value is determined based on the first vector and the second vector.

[0060] Specifically, the terminal device performs action decoding and normalization on the basic predicted action and the two counterfactual actions respectively, and then concatenates each action dimension n×m in the basic predicted action and the counterfactual predicted action into a vector 1×q to obtain the first vector and the second vector. Based on the first vector and the second vector, the modal effect value is determined.

[0061] When the base prediction action and the counterfactual prediction action are output as action blocks, their various dimensions (joint dimension, time step dimension, etc.) can be concatenated into a unified one-dimensional vector for overall comparison. By concatenating these isomorphic action vectors, action differences can be measured in a unified space, avoiding the dimensional misalignment problem in dimension-by-dimensional comparisons.

[0062] In the embodiments of this application, when there are multiple basic prediction actions and counterfactual prediction actions, the multiple actions can be concatenated to obtain a first vector and a second vector, and modal effect values ​​can be generated based on the first vector and the second vector.

[0063] Optionally, determining the modal effect value based on the first vector and the second vector includes: The modal effect values ​​of the first vector and the second vector are calculated using a metric algorithm, wherein the metric algorithm includes L2 distance, L1 distance, weighted mean square error, cosine distance, end-effector pose difference or critical joint difference.

[0064] Specifically, in this embodiment, the terminal device employs a metric algorithm to calculate the modal effect values ​​of the first vector and the second vector. The L2 distance is used to take the square root of the sum of the squared differences, making it more sensitive to larger differences; the L1 distance is used to sum the absolute values ​​of the differences, making it more robust to outliers; the weighted mean square error allows for assigning different weights to different dimensions; the cosine distance is used to determine the consistency of the measurement direction; and the end effector pose difference and critical joint difference measure motion differences based on physical quantities such as the end effector pose and critical joint angles, respectively. The appropriate algorithm can be selected based on the task's sensitivity to these differences.

[0065] Multiple measurement algorithms provide suitable options for different tasks, all of which can characterize the degree of difference between factual and counterfactual actions; for example, the grasping task focuses on the end pose, so the end pose difference can be used, which is closer to the task success index.

[0066] In the embodiments of this application, any measurement algorithm is used to calculate the modal effect value according to different needs, thereby improving the robustness of the calculation.

[0067] Optionally, the method further includes: If the modal effect value is greater than a first preset threshold or less than a second preset threshold, the basic prediction action is determined as the target correction action, wherein the second preset threshold is less than the first preset threshold.

[0068] Specifically, the terminal device determines the basic prediction action as the target correction action if it determines that the modal effect value is greater than a first preset threshold or the modal effect value is less than a second preset threshold.

[0069] In this embodiment, the aforementioned backoff conditions are used to identify abnormal situations: a modal effect value greater than a first preset threshold indicates that a certain modality has an abnormally strong influence on the current action, possibly due to visual noise or detection jitter; a modal effect value less than a second preset threshold indicates that the modal effect is too weak, and the correction of the counterfactual difference has limited significance in this case. Retaining the basic predicted action in these situations avoids action distortion caused by over-correction. The first and second preset thresholds are used as thresholds to determine whether to execute a backoff correction action. The specific values ​​of the first and second preset thresholds can be configured by those skilled in the art based on model characteristics, task type, and execution stability requirements.

[0070] In this embodiment of the application, when the modal effect value is greater than the first preset threshold or the modal effect value is less than the second preset threshold, in order to prevent the counterfactual action from being too strong and causing action distortion, the basic prediction action is directly reverted to be used.

[0071] Optionally, the step of intervening in the data to be reasoned using a preset counterfactual intervention method to determine counterfactual input data includes: Set the ontology state in the data to be reasoned to zero to obtain the first counterfactual input data in which the ontology state is interfered with. By setting the image data and language commands in the data to be reasoned to zero, a second counterfactual input data of visual interference is obtained; Correspondingly, determining the counterfactual prediction action corresponding to the counterfactual input data based on the embodied control model includes: The first counterfactual input data is input into the embodied control model to obtain the first counterfactual predicted action; The second counterfactual input data is input into the embodied control model to obtain the second counterfactual predicted action.

[0072] Specifically, the terminal device sets the ontology state in the data to be inferred to zero to obtain the first counterfactual input data in which the ontology state has been interfered with; it sets the image data and language commands in the data to be inferred to zero to obtain the second counterfactual input data in which the vision has been interfered with; wherein, setting the ontology state to zero means setting the ontology state tensor as a whole to a zero tensor (keeping the shape unchanged); setting the image data to zero means setting the image tensor as a whole to zero, and if there are multiple cameras, setting each camera to zero; at the same time, the language commands are set to zero to avoid the text prompts from leaking scene information in the visually missing scene, and to ensure the purity of the "visually missing" comparison scene.

[0073] Two types of counterfactual interventions were used to measure the ontological modality and the visual modality respectively. Setting the ontology data to zero resulted in minimal changes in action, indicating that the model relies more on vision or language. Similarly, setting the image data to zero resulted in minimal changes in action, indicating that the model relies more on the ontological state. This provides input for the subsequent adaptive allocation of correction coefficients. When only image data was zeroed while language instructions were retained, the scene descriptions in the language instructions might leak scene information that should have been provided by vision to the model. Therefore, zeroing out the language instructions also makes the visually missing comparison scene purer, thus more accurately measuring the true contribution of the visual modality.

[0074] In the embodiments of this application, the sample-level contribution of visual and ontological state modalities is explicitly quantified by the difference between factual and counterfactual actions, which can directly reveal whether the model has modal imbalance and a tendency to "blindly walk".

[0075] Optionally, determining the target correction action based on the modal effect value, the basic prediction action, and the counterfactual prediction action includes: Calculate the first distance between the base prediction action and the first counterfactual prediction action; The first distance is determined as the body modal effect value; Calculate the second distance between the base prediction action and the second counterfactual prediction action; The second distance is determined as the visual modal effect value; The correction coefficient is determined based on the ontological modal effect value and the visual modal effect value; The target correction action is determined based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action.

[0076] Specifically, the terminal device calculates the L2 distance, i.e., the first distance, between the first vector of the basic predicted action and the second vector of the first counterfactual predicted action, as the ontological modal effect value; and calculates the L2 distance, i.e., the second distance, between the first vector of the basic predicted action and the third vector of the second counterfactual predicted action, as the visual modal effect value.

[0077] The basic prediction action includes multiple future actions, such as m actions, and each step includes n dimensions, that is, the dimensions of the basic prediction action are n×m. Then, these n×m dimensions are concatenated into a 1×q vector, which is the first vector, where q=m×n; m can be 50. The first counterfactual prediction action includes multiple future actions, such as m actions, and each step includes n dimensions, that is, the dimension of the basic prediction action is n×m. Then, the n×m dimensions are concatenated into a 1×q vector, which is the second vector, where q=m×n; m can be 50. The second counterfactual prediction action includes multiple future actions, such as m actions, and each step includes n dimensions, that is, the dimension of the basic prediction action is n×m. Then, these n×m dimensions are concatenated into a 1×q vector, which is the third vector, where q=m×n; m can be 50. Based on the ontological modal effect value and the visual modal effect value, a correction coefficient is determined; based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action, the target correction action is determined.

[0078] In this embodiment, a correction weight is generated based on the visual effect value and the ontology effect value. In addition to the conventional inference chain, four processing steps are added: ontology zeroing counterfactual inference, image zeroing counterfactual inference, modal effect quantification, and action reweighting, thereby forming a complete inference-period correction closed loop.

[0079] Optionally, determining the correction coefficient based on the ontological modal effect value and the visual modal effect value includes: The sum of the ontological modal effect value and the visual modal effect value is determined as the total effect value; The ratio of the ontological modal effect value to the total effect value is determined as the ontological correction coefficient; The ratio of the visual modal effect value to the total effect value is determined as the visual correction coefficient.

[0080] In the embodiments of this application, the ontology correction coefficient and the visual correction coefficient are calculated respectively to achieve adaptive adjustment of the correction weight.

[0081] Specifically, the terminal device determines the total effect value as the sum of the ontological modal effect value and the visual modal effect value; it determines the ontological correction coefficient as the ratio of the ontological modal effect value to the total effect value; and it determines the visual correction coefficient as the ratio of the visual modal effect value to the total effect value. Both the ontological correction coefficient and the visual correction coefficient range from 0 to 1, and their sum is 1. When the visual modal effect value is larger than the ontological modal effect value, the visual correction coefficient is larger, and the correction action is more biased towards visual information; conversely, the correction action is more biased towards ontological information.

[0082] The ratio-based correction coefficients naturally satisfy the normalization constraint, ensuring that the correction action is always continuously weighted between ontological and visual information, and that there will be no action divergence caused by weight overshooting; at the same time, it is simple to implement, highly interpretable, and easy to deploy and debug.

[0083] Optionally, determining the target correction action based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action includes: Based on the first counterfactual prediction action and the basic prediction action, determine the ontological counterfactual difference; The visual counterfactual difference is determined based on the second counterfactual prediction action and the basic prediction action; The target correction action is determined based on the basic prediction action, the ontological counterfactual difference and the ontological correction coefficient corresponding to the ontological counterfactual difference, the visual counterfactual difference and the visual correction coefficient corresponding to the visual counterfactual difference, wherein the ontological counterfactual difference is obtained by limiting the amplitude of the ontological counterfactual difference.

[0084] Specifically, the terminal device uses the difference between the first counterfactual prediction action and the basic prediction action as the ontological counterfactual difference, and the difference between the second counterfactual prediction action and the basic prediction action as the visual counterfactual difference. It calculates the first product of the visual correction coefficient and the visual counterfactual difference, and the second product of the ontological counterfactual difference and the ontological correction coefficient. The sum of the basic prediction action, the first product, and the second product is used as the target correction action.

[0085] Furthermore, to obtain a more accurate target correction action, the following formula can be used for correction: The target correction action = basic predicted action + visual correction coefficient × visual counterfactual difference + ontological correction coefficient × restricted ontological counterfactual difference. The restricted ontological counterfactual difference is determined in the following ways: a restriction coefficient can be used to correct the ontological counterfactual difference as a whole, scaling each joint as a whole; or the action of only one joint can be restricted. Based on a safety strategy, the maximum adjustment range of each joint is used as the restricted ontological counterfactual difference, while other joints are not restricted.

[0086] In the embodiments of this application, by comparing the differences between factual actions and counterfactual actions, the contributions of visual modality and ontological state modality to action output are quantified, and then the contributions are used to guide the reweighting of the inference period of the final action, thereby weakening the model's biased dependence on a single modality and realizing inference correction.

[0087] This application proposes a reasoning-time embodied intelligent model correction algorithm based on counterfactual causal reasoning. Building upon the original action prediction, it constructs at least two counterfactual input scenarios: first, keeping the image and language unchanged while setting the ontology state tensor to zero, resulting in a counterfactual action of "ontology being interfered with"; second, keeping the ontology state unchanged while setting the image tensor to zero and clearing the language instructions to avoid information leakage, resulting in a counterfactual action of "visual interference". By comparing the differences between factual and counterfactual actions, the contributions of the visual modality and ontology state modality to the action output are quantified. These contributions are then used to guide the final action reasoning time reweighting, thereby reducing the model's biased dependence on a single modality and achieving reasoning correction.

[0088] like Figure 2 As shown in the embodiments of this application, the method for correcting the model output results includes: Input phase: Collect the current image, ontology state, language commands and other reasoning contexts, and construct factual and counterfactual scenarios for the same observation sample during the reasoning phase without changing the parameters of the trained model; Step 1: Factual scenario reasoning, using complete multimodal input to obtain basic action prediction; The data to be inferred at the current moment is acquired, including multi-camera images, ontology state tensors, and language commands. The raw data to be inferred is fed into the trained embodied intelligence model for the first forward inference to obtain basic action predictions in the real-world scenario.

[0089] Step 2A: Ontology counterfactual intervention. Set the ontology state tensor to zero while keeping the visual and linguistic inputs unchanged. That is, copy the data to be reasoned, construct the first counterfactual input, set the ontology state tensor in it to zero tensor, and obtain the counterfactual input that "the ontology state is intervened". Feed this input into the same model to obtain the first counterfactual action prediction.

[0090] Step 2B: Image counterfactual intervention. The image input is zeroed out and the language instructions are cleared to avoid information leakage. That is, the data to be inferred is copied to construct a second counterfactual input, and the image input tensor in it is zeroed out. If the image input is a multi-camera dictionary, the corresponding tensor is zeroed out for each camera. At the same time, the language instructions are cleared out to avoid the text prompts from leaking additional scene information in visually missing scenes. The input is fed into the same model to obtain the second counterfactual action prediction.

[0091] Step 2C: Reason again to obtain two counterfactual action predictions and form a comparison with the actual actions; Step 3: Calculate the visual modality and ontological modality effects, and compare the differences between the factual action and the two counterfactual actions; that is, perform action decoding (normalization) and post-processing on the basic action prediction and the two counterfactual actions respectively, and then calculate the differences between each action dimension n. m is concatenated into vector 1 q, calculate the average L2 distance between the fact action and the ontology zeroing action, as the ontology modal effect value; calculate the average L2 distance between the fact action and the image zeroing action, as the visual modal effect value.

[0092] Step 4: Does the visual modal effect exceed the preset upper threshold? If so, directly revert to using the basic action. When the visual effect value exceeds the preset upper threshold, in order to prevent excessive visual guidance from causing motion distortion, directly revert to using the basic action. If not, then corrective weights are generated based on the visual effect value and the ontological effect value. The ontological correction weights are calculated adaptively based on the effect ratio (visual modal effect value / (ontological modal effect value + visual modal effect value)) and the final action is constructed.

[0093] For each action component, the final action is obtained in the following form: Final action = basic action + visual correction coefficient × visual counterfactual difference + ontological correction coefficient × constrained ontological counterfactual difference.

[0094] Among them, the visual correction coefficient is used to control the intensity of visual correction, the ontological correction coefficient is adaptively determined based on the relative magnitude of the visual modal effect and the ontological modal effect, and the amplitude limit of the ontological counterfactual difference is to avoid the trajectory distortion caused by excessive ontological correction.

[0095] The final action is processed and offset is captured, then sent to the robot execution side to complete control.

[0096] In the corresponding implementation, the deployment executor activates the algorithm via a counterfactual evaluation switch. Once activated, the system adds four processing steps to the regular inference chain: ontology zeroing counterfactual inference, image zeroing counterfactual inference, modal effect quantification, and action reweighting, thus forming a complete inference-era correction process.

[0097] For robot observation samples at the same moment, the base prediction represents the action result given by the model under the combined action of multiple modalities in the factual world. If the ontology state is reset to zero and reasoning is repeated, the result represents how the model would act if "there is currently no ontology state information". If the image information is reset to zero and reasoning is repeated, the result represents how the model would act if "there is currently no visual information". The difference between the factual action and the two counterfactual actions reflects the marginal contribution of the corresponding modality to the current action output.

[0098] When the visual state is set to zero, the action changes very little, indicating that the model currently relies more on the ontology state; when the ontology state is set to zero, the action changes very little, indicating that the model relies more on vision or language. Using this sample-level contribution quantification, this application can determine whether the model has a bias of "ignoring vision and blindly following the ontology" during each inference without retraining the model, and correct the action results towards a vision-dominated or balanced modality through difference reweighting.

[0099] From an engineering perspective, the embodiments of this application also consider the stability requirements of embodied action output. Directly superimposing ontology counterfactual differences may cause trajectory distortion. Therefore, in the preferred embodiment, an interpolation pruning and small-weight adaptive fusion mechanism is introduced. At the same time, when the visual effect is abnormally large, a thresholding mechanism is used to directly revert to the basic action to avoid overfitting to visual noise in a certain frame and causing excessive correction, thus balancing causal interpretability and execution stability.

[0100] This application provides a reasoning-time embodied intelligent model correction system based on counterfactual causal reasoning, comprising: an original reasoning unit: receiving conventional model input and calling a trained embodied intelligent model to generate basic action predictions; an input cloning unit: copying the original model input to ensure that counterfactual intervention does not contaminate the original reasoning batch; an ontology counterfactual construction unit: locating the ontology state tensor and performing shape-based nulling to generate ontology-deficient scene input; a visual counterfactual construction unit: locating the image tensor or multi-camera image dictionary and performing nulling item by item; simultaneously clearing language instructions to avoid textual transmission of environmental cues when images are nulled; an effect quantification unit: concatenating factual and counterfactual actions dimensionally, calculating the average L2 difference, and outputting the visual modal effect and ontology modal effect; an action fusion correction unit: generating the final action based on the visual effect threshold, visual difference, ontology difference, and adaptive ontology weights; and an execution output unit: sending the corrected action to the action post-processing and robot execution end.

[0101] The specific correction process is as follows: the input signals include image tensor, ontology state tensor, language instructions and time steps; the intermediate signals include basic action prediction, ontology zeroing counterfactual action, image zeroing counterfactual action, visual modality effect value, ontology modality effect value, visual correction coefficient and visual threshold; the output signal is the final correction action, which does not require modification of the underlying trained action model parameters.

[0102] The embodiments of this application can be applied to, but are not limited to, the following robot operation scenarios.

[0103] Scenario 1: Dual-arm desktop operation: The robot performs operations such as grasping, placing, and stacking based on the desktop scene image and verbal commands. When the target object is moved or the desktop lighting changes, if the model relies too much on the body state, it will move along the old trajectory; after adopting the correction method of this application embodiment, the visual modal effect value increases, and the action is corrected in the direction of visual feedback.

[0104] Scenario 2, Clothing Sorting: The robot folds and unfolds flexible clothing. Clothing deformation causes a discrepancy between the robot's physical state and its visual state; visual information is crucial for perceiving the current shape of the clothing. This application's embodiment measures visual contribution through visual counterfactual reasoning, which can promptly detect and correct the tendency to blindly navigate without visual input.

[0105] Scenario 3, Grabbing and Placement: The robot grabs a workpiece from a conveyor belt or bin and places it in a designated position. The workpiece's pose changes frequently, requiring real-time visual closed-loop control; the visual correction item in this embodiment can compensate for the insufficient use of vision in the basic predicted action.

[0106] During the inference phase, counterfactual inputs with "missing information in a certain modality" are constructed from the data input to the model at the same time. By comparing the differences in the actions output by the model under the factual input and the counterfactual input, the contribution of the intervened modality to the current action prediction is quantified. Then, based on the quantified modal effect value, the basic predicted action is corrected using a correction coefficient to obtain the target corrected action. The entire process does not modify any parameters of the trained model; it only adds a processing step of "counterfactual construction—counterfactual inference—effect quantification—action correction" outside the model. No model retraining is required; simply enabling the counterfactual evaluation switch in the deployment executor achieves correction during the inference phase, making it a plug-and-play enhancement solution.

[0107] By explicitly quantifying the sample-level contributions of visual and ontological state modalities through the difference between factual and counterfactual actions, the model can directly identify modal imbalances and "blind walking" tendencies. A fusion approach of "visual-driven and ontologically constrained compensation" is employed to suppress trajectory distortion caused by excessive ontological differences while utilizing visual correction, balancing accuracy and stability. Threshold backoff, difference pruning, and adaptive weighting mechanisms reduce execution risks caused by abnormal visual states, noisy states, or excessive counterfactual differences in a single frame. It is applicable to pre-trained multimodal action models, does not rely on a specific training loss design, and can be extended to more modal input scenarios.

[0108] It should be noted that each of the implementable methods in this embodiment can be implemented individually or in any combination without conflict. This application does not limit this.

[0109] Please refer to Figure 3 , Figure 3 The diagram illustrates a block diagram of a model output correction device provided in some embodiments of this application. It should be understood that this model output correction device is similar to the one described above. Figure 1 Corresponding to the method embodiments, it is able to execute the various steps involved in the above method embodiments. The specific functions of the correction device for the output results of the model can be found in the description above. To avoid repetition, detailed descriptions are appropriately omitted here.

[0110] Figure 3 The model output correction device includes at least one software function module that can be stored in memory or embedded in the model output correction device in the form of software or firmware. The model output correction device includes: The acquisition module 301 is used to acquire the data to be inferred; The first prediction module 302 is used to determine the basic prediction action corresponding to the data to be inferred based on the embodied control model that has been trained. The intervention module 303 is used to intervene in the data to be inferred using a preset counterfactual intervention method to determine counterfactual input data. The preset counterfactual intervention method includes all-zero permutation, mean filling, random occlusion, mask marking, local region suppression, or channel attenuation. The preset counterfactual intervention method is used to process the missing modal information in the data to be inferred. The second prediction module 304 is used to determine the counterfactual prediction action corresponding to the counterfactual input data based on the embodied control model. The calculation module 305 is used to determine the modal effect value based on the basic prediction action and the counterfactual prediction action; The correction module 306 is used to determine a target correction action based on the modal effect value, the basic predicted action, and the counterfactual predicted action using a preset adaptive adjustment algorithm. The preset adaptive adjustment algorithm includes a fusion algorithm, a piecewise function, an exponential function, a normalized weight, or a gating network. The target correction action is obtained by correcting the basic predicted action and is used to control the robot to perform actions.

[0111] In this embodiment, counterfactual intervention is applied to different parameters in the data to be inferred to obtain counterfactual input data. Based on the data to be inferred and the embodied control model, a basic predicted action is generated, and a counterfactual predicted action is also generated based on the counterfactual input data and the embodied control model. A modal effect value is generated based on the basic predicted action and the counterfactual predicted action. The basic predicted action is corrected based on the modal effect value. In this way, the sample-level contribution of visual and ontological state modalities can be explicitly quantified by the difference between the basic predicted action and the counterfactual action. It is possible to directly discover whether the model has modal imbalance and "blind walking" tendency. There is no need to retrain the model. The correction during the inference stage can be achieved simply by turning on the counterfactual evaluation switch in the deployment executor, which improves the accuracy of action prediction.

[0112] Optionally, the computing module is used for: The basic prediction actions are concatenated to obtain the first vector of the basic prediction actions; The counterfactual prediction actions are concatenated to obtain a second vector of the counterfactual prediction actions; The modal effect value is determined based on the first vector and the second vector.

[0113] In the embodiments of this application, when there are multiple basic prediction actions and counterfactual prediction actions, the multiple actions can be concatenated to obtain a first vector and a second vector, and modal effect values ​​can be generated based on the first vector and the second vector.

[0114] Optionally, the computing module is used for: The modal effect values ​​of the first vector and the second vector are calculated using a metric algorithm, wherein the metric algorithm includes L2 distance, L1 distance, weighted mean square error, cosine distance, end-effector pose difference or critical joint difference.

[0115] In the embodiments of this application, any measurement algorithm is used to calculate the modal effect value according to different needs, thereby improving the robustness of the calculation.

[0116] Optionally, the computing module is used for: If the modal effect value is greater than a first preset threshold or less than a second preset threshold, the basic prediction action is determined as the target correction action, wherein the second preset threshold is less than the first preset threshold.

[0117] In this embodiment of the application, when the modal effect value is greater than the first preset threshold or the modal effect value is less than the second preset threshold, in order to prevent the counterfactual action from being too strong and causing action distortion, the basic prediction action is directly reverted to be used.

[0118] Optionally, the intervention module is used to: Set the ontology state in the data to be reasoned to zero to obtain the first counterfactual input data in which the ontology state is interfered with. By setting the image data and language commands in the data to be reasoned to zero, a second counterfactual input data of visual interference is obtained; Correspondingly, the second prediction module is used for: The first counterfactual input data is input into the embodied control model to obtain the first counterfactual predicted action; The second counterfactual input data is input into the embodied control model to obtain the second counterfactual predicted action.

[0119] In the embodiments of this application, the sample-level contribution of visual and ontological state modalities is explicitly quantified by the difference between factual and counterfactual actions, which can directly reveal whether the model has modal imbalance and a tendency to "blindly walk".

[0120] Optionally, the correction module is used to: Calculate the first distance between the base prediction action and the first counterfactual prediction action; The first distance is determined as the body modal effect value; Calculate the second distance between the base prediction action and the second counterfactual prediction action; The second distance is determined as the visual modal effect value; The correction coefficient is determined based on the ontological modal effect value and the visual modal effect value; The target correction action is determined based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action.

[0121] In this embodiment, a correction weight is generated based on the visual effect value and the ontology effect value. In addition to the conventional inference chain, four processing steps are added: ontology zeroing counterfactual inference, image zeroing counterfactual inference, modal effect quantification, and action reweighting, thereby forming a complete inference-period correction closed loop.

[0122] Optionally, the correction module is used to: The sum of the ontological modal effect value and the visual modal effect value is determined as the total effect value; The ratio of the ontological modal effect value to the total effect value is determined as the ontological correction coefficient; The ratio of the visual modal effect value to the total effect value is determined as the visual correction coefficient.

[0123] In the embodiments of this application, the ontology correction coefficient and the visual correction coefficient are calculated respectively to achieve adaptive adjustment of the correction weight.

[0124] Optionally, the correction module is used to: Based on the first counterfactual prediction action and the basic prediction action, determine the ontological counterfactual difference; The visual counterfactual difference is determined based on the second counterfactual prediction action and the basic prediction action; The target correction action is determined based on the basic prediction action, the ontological counterfactual difference and the ontological correction coefficient corresponding to the ontological counterfactual difference, the visual counterfactual difference and the visual correction coefficient corresponding to the visual counterfactual difference, wherein the ontological counterfactual difference is obtained by limiting the amplitude of the ontological counterfactual difference.

[0125] In the embodiments of this application, by comparing the differences between factual actions and counterfactual actions, the contributions of visual modality and ontological state modality to action output are quantified, and then the contributions are used to guide the reweighting of the inference period of the final action, thereby weakening the model's biased dependence on a single modality and realizing inference correction.

[0126] It is understood that the above-described device embodiments correspond to the method embodiments of this application. The model output result correction device provided by the embodiments of this application can implement the model output result correction method provided by any one of the method embodiments of this application.

[0127] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.

[0128] like Figure 4 As shown, some embodiments of this application provide an electronic device 400, which includes: a memory 410, a processor 420, and a computer program stored in the memory 410 and executable on the processor 420. When the processor 420 reads the program from the memory 410 via a bus 430 and executes the program, it can implement any of the methods included in the above-described model output correction method.

[0129] Processor 420 can process digital signals and may include various computing architectures. For example, it may be a complex instruction set computer architecture, a reduced instruction set computer architecture, or an architecture that implements multiple instruction set combinations. In some examples, processor 420 may be a microprocessor.

[0130] Memory 410 can be used to store instructions executed by processor 420 or data related to the execution of instructions. These instructions and / or data may include code used to implement some or all of the functions of one or more modules described in the embodiments of this application. The processor 420 of this disclosure embodiment can be used to execute instructions in memory 410 to implement the correction method for the model output results shown above. Memory 410 includes dynamic random access memory, static random access memory, flash memory, optical memory, or other memories well known to those skilled in the art.

[0131] Some embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs a method for correcting the model output results described in the method embodiments.

[0132] Some embodiments of this application also provide a computer program product that, when run on a computer, causes the computer to execute the method for correcting the model output results described in the method embodiments.

[0133] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0134] It should be understood, in the several embodiments provided in this application, that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, 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 marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive 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 a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0135] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0136] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0138] 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.

[0139] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for correcting the output of a model, characterized in that, The method includes: Obtain the data to be inferred; Based on the embodied control model that has been trained, determine the basic predicted action corresponding to the data to be inferred; The data to be inferred is intervened using a preset counterfactual intervention method to determine the counterfactual input data. The preset counterfactual intervention method includes all-zero permutation, mean filling, random occlusion, masking, local region suppression, or channel attenuation. The preset counterfactual intervention method is used to process the missing modal information in the data to be inferred. Based on the embodied control model, determine the counterfactual prediction action corresponding to the counterfactual input data; The modal effect value is determined based on the basic prediction action and the counterfactual prediction action; A preset adaptive adjustment algorithm is used to determine a target correction action based on the modal effect value, the basic predicted action, and the counterfactual predicted action. The preset adaptive adjustment algorithm includes a fusion algorithm, a piecewise function, an exponential function, normalized weights, or a gating network. The target correction action is obtained by correcting the basic predicted action and is used to control the robot to perform actions.

2. The method for correcting the model output results according to claim 1, characterized in that, The step of determining the modal effect value based on the basic prediction action and the counterfactual prediction action includes: The basic prediction actions are concatenated to obtain the first vector of the basic prediction actions; The counterfactual prediction actions are concatenated to obtain a second vector of the counterfactual prediction actions; The modal effect value is determined based on the first vector and the second vector.

3. The method for correcting the model output results according to claim 2, characterized in that, Determining the modal effect value based on the first vector and the second vector includes: The modal effect values ​​of the first vector and the second vector are calculated using a metric algorithm, wherein the metric algorithm includes L2 distance, L1 distance, weighted mean square error, cosine distance, end-effector pose difference or critical joint difference.

4. The method for correcting the model output results according to claim 1, characterized in that, The method further includes: If the modal effect value is greater than a first preset threshold or less than a second preset threshold, the basic prediction action is determined as the target correction action, wherein the second preset threshold is less than the first preset threshold.

5. The method for correcting the model output results according to claim 1, characterized in that, The step of intervening in the data to be reasoned using a preset counterfactual intervention method to determine counterfactual input data includes: Set the ontology state in the data to be reasoned to zero to obtain the first counterfactual input data in which the ontology state is interfered with. By setting the image data and language commands in the data to be reasoned to zero, a second counterfactual input data of visual interference is obtained; Correspondingly, determining the counterfactual prediction action corresponding to the counterfactual input data based on the embodied control model includes: The first counterfactual input data is input into the embodied control model to obtain the first counterfactual predicted action; The second counterfactual input data is input into the embodied control model to obtain the second counterfactual predicted action.

6. The method for correcting the model output results according to claim 5, characterized in that, The step of determining the target correction action based on the modal effect value, the basic prediction action, and the counterfactual prediction action includes: Calculate the first distance between the base prediction action and the first counterfactual prediction action; The first distance is determined as the body modal effect value; Calculate the second distance between the base prediction action and the second counterfactual prediction action; The second distance is determined as the visual modal effect value; The correction coefficient is determined based on the ontological modal effect value and the visual modal effect value; The target correction action is determined based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action.

7. The method for correcting the model output results according to claim 6, characterized in that, The step of determining the correction coefficient based on the ontological modal effect value and the visual modal effect value includes: The sum of the ontological modal effect value and the visual modal effect value is determined as the total effect value; The ratio of the ontological modal effect value to the total effect value is determined as the ontological correction coefficient; The ratio of the visual modal effect value to the total effect value is determined as the visual correction coefficient.

8. The method for correcting the model output results according to claim 7, characterized in that, Determining the target correction action based on the correction coefficient, the basic prediction action, the first counterfactual prediction action, and the second counterfactual prediction action includes: Based on the first counterfactual prediction action and the basic prediction action, determine the ontological counterfactual difference; The visual counterfactual difference is determined based on the second counterfactual prediction action and the basic prediction action; The target correction action is determined based on the basic prediction action, the ontological counterfactual difference and the ontological correction coefficient corresponding to the ontological counterfactual difference, the visual counterfactual difference and the visual correction coefficient corresponding to the visual counterfactual difference, wherein the ontological counterfactual difference is obtained by limiting the amplitude of the ontological counterfactual difference.

9. A device for correcting model output results, characterized in that, The device includes: The acquisition module is used to acquire the data to be inferred. The first prediction module is used to determine the basic prediction action corresponding to the data to be inferred based on the embodied control model that has been trained. An intervention module is used to intervene in the data to be inferred using a preset counterfactual intervention method to determine counterfactual input data. The preset counterfactual intervention method includes zero permutation, mean filling, random occlusion, masking, local region suppression, or channel attenuation. The preset counterfactual intervention method is used to process the missing modal information in the data to be inferred. The second prediction module is used to determine the counterfactual prediction action corresponding to the counterfactual input data based on the embodied control model. The calculation module is used to determine the modal effect value based on the basic prediction action and the counterfactual prediction action; The correction module is used to determine a target correction action based on the modal effect value, the basic predicted action, and the counterfactual predicted action using a preset adaptive adjustment algorithm. The preset adaptive adjustment algorithm includes a fusion algorithm, a piecewise function, an exponential function, normalized weights, or a gating network. The target correction action is obtained by correcting the basic predicted action and is used to control the robot to perform actions.

10. An electronic device, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method for correcting the model output results as described in any one of claims 1-8.