An explanation method and system of a bottom visual model based on a causal effect diagram
By using the causal effect graph method, the problem of the difficulty in interpreting causal relationships in low-level visual tasks of deep learning models is solved, and the visualization and quantification of causal relationships are realized, thereby improving the interpretability and optimization ability of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
- Filing Date
- 2024-07-26
- Publication Date
- 2026-07-14
AI Technical Summary
Existing deep learning models cannot fully understand the internal mechanisms in low-level vision tasks. Traditional interpretability methods ignore causal relationships, leading to biased conclusions. Furthermore, the interpretability of general models on different tasks is too complex to meet the requirements.
By constructing a causal effect diagram, we can obtain input images for intervention, calculate reconstruction differences and outcome differences, locate sensitive areas, generate a causal effect diagram, display causal relationships, and quantify positive and negative causal effects.
It enables visualization of causal relationships in underlying visual models, improves the understanding and optimization accuracy of model decision-making processes, and is applicable to a variety of underlying visual tasks without relying on specific model architectures or prior knowledge.
Smart Images

Figure CN119047587B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method and system for interpreting a low-level visual model based on a causal effect graph. Background Technology
[0002] With the rapid development of deep learning technology, deep neural networks have demonstrated outstanding performance in low-level vision tasks. These networks, through the integration of diverse and meticulously designed modules, have achieved the transformation from low-quality to high-quality images, significantly improving image processing efficiency. However, despite the significant performance advancements of deep models, understanding their internal mechanisms remains a major challenge. In particular, we cannot be certain that these networks are truly functioning as expected, nor can we fully comprehend the effects of individual modules on different tasks and their interactions.
[0003] To address this challenge, researchers have increasingly focused on the interpretability of underlying visual models. Traditional interpretability methods often emphasize correlation analysis, which infers the model's decision-making basis by observing the statistical association between inputs and outputs. However, this approach ignores the potential causal relationships between variables, potentially leading to biased conclusions and failing to deeply reveal the model's internal mechanisms and decision-making processes.
[0004] More importantly, with the rise of general-purpose models in the low-level vision domain, these models employ a unified architecture to handle a variety of different tasks. While this design improves the model's flexibility and generalization ability, it also makes its interpretability more complex and difficult. General-purpose models require a method that can explain their internal mechanisms across tasks, and traditional correlation analysis methods clearly cannot meet this requirement.
[0005] To overcome these shortcomings, this application proposes an interpretation method and system based on a low-level visual model of causal effect diagrams. Summary of the Invention
[0006] The purpose of this application is to provide a method and system for interpreting a low-level visual model based on a causal effect diagram, in order to solve the above-mentioned problems.
[0007] To achieve the above objectives, this application provides the following technical solution:
[0008] This application provides a method for interpreting a low-level visual model based on a causal effect diagram, including:
[0009] Obtain an input image, and generate a first intervention image after intervening in the input image;
[0010] The input image and the first intervention image are respectively input into the network model for processing to obtain the first result and the second result;
[0011] By calculating the reconstruction difference of the input image in the region of interest before and after the intervention, the sensitive region is located based on the reconstruction difference, the first result, and the second result.
[0012] After intervention is performed in the sensitive area, a second intervention image is generated. The second intervention image is then input into the network model to obtain a third result.
[0013] The third result is compared with the first result to obtain the causal effect value, and a causal effect diagram is output based on the causal effect value.
[0014] Furthermore, the step of locating the sensitive region by calculating the reconstruction difference of the input image in the region of interest before and after intervention, and based on the reconstruction difference, the first result, and the second result, specifically includes the following steps:
[0015] If the input image is intervened C times, and the difference in the reconstruction of the region of interest in several pre-C times is less than a preset threshold τ, then the input image is determined to be an insensitive region; otherwise, it is determined to be a sensitive region.
[0016] Furthermore, the step of comparing the third result with the first result to obtain a causal effect value, and outputting a causal effect diagram based on the causal effect value, specifically includes the following steps:
[0017] The difference between the input image output result O through the network model and the second intervention image after intervention output result O' through the network model is calculated to obtain the causal effect value;
[0018] The formula is expressed as:
[0019]
[0020]
[0021] in, A metric function for evaluating the reconstruction quality of ROI regions in an image; This is the output causal effect diagram.
[0022] Furthermore, the network model is a low-level visual network, including but not limited to: SRCNN, SRResNet, and SwinIR.
[0023] This application provides an interpretation system for a low-level visual model based on a causal effect diagram, including:
[0024] Acquisition module: Acquires the input image, performs intervention on the input image, and generates a first intervention image;
[0025] Processing module: Inputs the input image and the first intervention image into the network model for processing to obtain a first result and a second result;
[0026] The calculation module calculates the difference in reconstruction of the region of interest in the input image before and after intervention. Based on the difference in reconstruction, the first result, and the second result, it locates the sensitive region. After intervention in the sensitive region, it generates a second intervention image. The second intervention image is then input into the network model to obtain a third result.
[0027] Output module: Compares the third result with the first result to obtain the causal effect value, and outputs a causal effect diagram based on the causal effect value.
[0028] This application provides an apparatus comprising a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing an interpretation method for a low-level visual model based on a causal effect graph; the processor is configured to execute the program instructions stored in the memory to implement an interpretation of a low-level visual model based on a causal effect graph.
[0029] This application provides a storage medium storing processor-executable program instructions for executing an interpretation method of a low-level visual model based on a causal effect graph.
[0030] This application provides a method and system for interpreting a low-level visual model based on a causal effect diagram, which has the following beneficial effects:
[0031] (1) By constructing a causal effect diagram, the causal relationship between visual features can be displayed intuitively, thereby helping users to better understand the decision-making process of the underlying visual model;
[0032] (2) Based on causal analysis, we can better understand the sensitivity of the model in different input regions, and thus make more accurate optimization. By analyzing the causal relationship between the input image and the output region of interest (ROI) through low-level vision (LV) intervention, the causal effect map obtained can provide quantitative positive and negative causal effects, which has extremely high practical value in the analysis and optimization of low-level vision models.
[0033] (3) This application does not rely on a specific model architecture or prior knowledge, so that it can play a role in various application scenarios; at the same time, the Causal Effect Map (CEM) is a general framework that can perform cross-task interpretation in a variety of underlying visual tasks. Attached Figure Description
[0034] Figure 1 This is a flowchart illustrating an interpretation method for a low-level visual model based on a causal effect diagram, according to Embodiment 1 of this application.
[0035] Figure 2 This is a schematic diagram comparing the heatmaps of the traditional LAM method and CEM in Embodiment 1 of this application;
[0036] Figure 3 This is a schematic diagram of the structure of an interpretation system based on a causal effect diagram of a low-level visual model according to Embodiment 2 of this application;
[0037] Figure 4 This is a schematic diagram of the device structure in Embodiment 3 of this application;
[0038] Figure 5 This is a schematic diagram of the storage medium structure in Embodiment 4 of this application. Detailed Implementation
[0039] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0041] Example 1
[0042] Please see Figure 1 This is a flowchart illustrating a method for interpreting a low-level visual model based on a causal effect diagram, according to Embodiment 1 of this application; the steps include:
[0043] S1: Obtain the input image, and generate the first intervention image after intervening in the input image.
[0044] In this embodiment, the input image is divided into non-overlapping image blocks on an even basis.
[0045] The input image is then subjected to further intervention. Based on the specific underlying visual task being analyzed, degradation processing is performed to obtain low-quality image patches such as blurry, noisy, and low-resolution images, which are the intervention images.
[0046] S2: Input the input image and the first intervention image into the network model for processing to obtain the first result and the second result.
[0047] In this embodiment, the input image I is intervened a small number of times, with the default setting being 3; the input image I and the intervened image I' are input into the network model M for processing, and the corresponding first result and second result are output.
[0048] During the intervention process:
[0049]
[0050] in, Intervention images from the intervention image library L; The location to be intervened in is the input image I; Total number of interventions for each location.
[0051] Furthermore, the network model is a low-level visual network. A suitable low-level visual network is selected based on the task requirements, such as SRCNN, SRResNet, or SwinIR. Then, the parameters of the low-level visual network are set, such as the number of convolutional layers, the size of the convolutional kernels, the stride, and the padding method.
[0052] S3: By calculating the reconstruction difference of the input image in the region of interest before and after the intervention, the sensitive region is located based on the reconstruction difference, the first result, and the second result.
[0053] In this embodiment, the input image is intervened C times. If the difference in the reconstruction of the region of interest in several pre-C times is less than a preset threshold τ, the input image is determined to be an insensitive region; otherwise, it is determined to be a sensitive region.
[0054] It's understandable that, building upon the localization phase, further fine-grained intervention is applied to the identified areas of significant influence. This allows for more accurate localization and quantification of the specific impact of the input image on the output results in different regions.
[0055] S4: After intervention in the sensitive area, a second intervention image is generated. The second intervention image is then input into the network model to obtain a third result.
[0056] S5: Compare the third result with the first result to obtain the causal effect value, and output the causal effect diagram based on the causal effect value.
[0057] In this embodiment, the difference between the input image output result O through the network model and the second intervention image after intervention output result O' through the network model is calculated to obtain the causal effect value;
[0058] The formula is expressed as:
[0059]
[0060]
[0061] in, A metric function for evaluating the reconstruction quality of ROI regions in an image; This is the output causal effect diagram.
[0062] Please see Figure 2 This is a schematic diagram comparing the heatmaps of the traditional LAM method and CEM in Embodiment 1 of this application. The traditional LAM method can only find input regions related to the reconstruction of the region of interest R, while the method proposed in this application demonstrates a deeper level of causality. LAM assumes that region a is strongly correlated with the reconstruction of R, but CEM can indicate that a is only correlated but not causally related. LAM assumes that b and c are both related to the reconstruction of R, but it does not know whether they contribute positively or negatively. The CEM proposed in this application can indicate that b makes a negative contribution and c makes a positive contribution. In addition, the LAM method is only applicable to image super-resolution tasks, while CEM can be applied to other low-level vision tasks.
[0063] In summary, Embodiment 1 of this application divides the input image into regions and selects intervention images from an intervention image library to generate an interventional image. The input image and the interventional image are then input into a low-level visual network for processing, and the corresponding results are output. Sensitive regions are obtained based on the reconstruction differences of the regions of interest before and after intervention in the input image using the network model. Finally, causal effect values are calculated within these sensitive regions, and a causal effect diagram is output. A visual diagram is used to illustrate causal relationships and quantify positive and negative causal effects. Furthermore, the causal effect diagram (CEM) is suitable for situations where the low-level visual network is considered a black box, requiring no prior knowledge of the network architecture, and thus possesses strong versatility.
[0064] Example 2
[0065] Please see Figure 3 This is a schematic diagram of the structure of an interpretation system for a low-level visual model based on a causal effect diagram, according to Embodiment 2 of this application; the specific content includes:
[0066] Acquisition module: Acquires the input image, performs intervention on the input image, and generates a first intervention image;
[0067] Processing module: Inputs the input image and the first intervention image into the network model for processing to obtain a first result and a second result;
[0068] The calculation module calculates the difference in reconstruction of the region of interest in the input image before and after intervention. Based on the difference in reconstruction, the first result, and the second result, it locates the sensitive region. After intervention in the sensitive region, it generates a second intervention image. The second intervention image is then input into the network model to obtain a third result.
[0069] Output module: Compares the third result with the first result to obtain the causal effect value, and outputs a causal effect diagram based on the causal effect value.
[0070] In this embodiment, the technical solution proposed in this application is used to explain the SwinIR model for image super-resolution tasks, specifically as follows:
[0071] First, select the region of interest R to be analyzed, input it into the SwinIR model to obtain the result O; then select the intervention image from the intervention image L (e.g., using DIV2K). Intervention maps were obtained by sequentially intervening in image patches other than R. Then, the C intervention diagrams Inputting the SwinIR model yields the output results O'_1,…,O'_C.
[0072] Compare the PSNR values of the reconstructed R region in C second results O' with those in the first result O, where the PSNR function can be replaced as needed; if the numerical difference is less than the set 0.01dB, the location is recorded as an insensitive region U, otherwise it is recorded as a sensitive region S; intervene in the image blocks within the sensitive region S, with an intervention image library of L, and each image block is intervened F times; compare the PSNR values of the reconstructed R region in F third results O'' with those in the first result O, and average the results of F interventions to obtain a more accurate causal effect value and a visualized image.
[0073] Example 3
[0074] Please see Figure 4 This is a schematic diagram of the device structure in Embodiment 3 of this application. The device 50 includes a processor 51 and a memory 52 coupled to the processor 51.
[0075] The memory 52 stores program instructions for implementing the above-described interpretation method of a low-level visual model based on a causal effect diagram.
[0076] The processor 51 is used to execute program instructions stored in the memory 52 to implement an interpretation of a low-level visual model based on a causal effect graph.
[0077] The processor 51 can also be referred to as a CPU (Central Processing Unit).
[0078] Processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0079] Example 4
[0080] Please see Figure 5 This is a schematic diagram of the storage medium in Embodiment 4 of this application. The storage medium in this embodiment stores a program file 61 capable of implementing all the above methods. This program file 61 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of the present invention. 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, or devices such as computers, servers, mobile phones, and tablets.
[0081] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0082] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0083] Although embodiments of this application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the appended claims and their equivalents.
[0084] Of course, the present invention may have many other embodiments. Based on this embodiment, other embodiments obtained by those skilled in the art without any creative effort are all within the scope of protection of the present invention.
Claims
1. A method for interpreting a low-level visual model based on a causal effect diagram, characterized in that, include: An input image is acquired, and a first intervention image is generated after intervention is applied to the input image; wherein, the input image is divided into non-overlapping image blocks on an average basis; The input image and the first intervention image are respectively input into the network model for processing to obtain the first result and the second result; By calculating the reconstruction difference of the input image in the region of interest before and after the intervention, the sensitive region is located based on the reconstruction difference, the first result, and the second result. After intervention is performed in the sensitive area, a second intervention image is generated. The second intervention image is then input into the network model to obtain a third result. The third result is compared with the first result to obtain the causal effect value, and a causal effect diagram is output based on the causal effect value. The step of locating the sensitive region by calculating the reconstruction difference of the input image in the region of interest before and after intervention, and based on the reconstruction difference, the first result, and the second result, specifically includes the following steps: If the input image is intervened C times, and the difference in the reconstruction of the region of interest in several pre-C times is less than a preset threshold τ, then the input image is determined to be an insensitive region; otherwise, it is determined to be a sensitive region. The step of comparing the third result with the first result to obtain a causal effect value, and outputting a causal effect diagram based on the causal effect value, specifically includes the following steps: The difference between the input image output result O through the network model and the second intervention image after intervention output result O' through the network model is calculated to obtain the causal effect value; The formula is expressed as: in, A metric function for evaluating the reconstruction quality of ROI regions in an image; This is the output causal effect diagram; Input image The location to be intervened in; Total number of interventions for each location.
2. The method for interpreting a low-level visual model based on a causal effect graph according to claim 1, characterized in that, The network model is a low-level visual network, including but not limited to: SRCNN, SRResNet, and SwinIR.
3. A system for interpreting a low-level visual model based on a causal effect diagram according to claim 1, characterized in that, include: Acquisition module: Acquires the input image, performs intervention on the input image, and generates a first intervention image; Processing module: Inputs the input image and the first intervention image into the network model for processing to obtain a first result and a second result; The calculation module calculates the difference in reconstruction of the region of interest in the input image before and after intervention. Based on the difference in reconstruction, the first result, and the second result, it locates the sensitive region. After intervention in the sensitive region, it generates a second intervention image. The second intervention image is then input into the network model to obtain a third result. Output module: Compares the third result with the first result to obtain the causal effect value, and outputs a causal effect diagram based on the causal effect value.
4. A device, characterized in that, The device includes a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing an interpretation method of a low-level visual model based on a causal effect graph as described in any one of claims 1-2; the processor is used to execute the program instructions stored in the memory to implement an interpretation of a low-level visual model based on a causal effect graph.
5. A storage medium, characterized in that, The system stores processor-executable program instructions for performing an interpretation method of a low-level visual model based on a causal effect graph as described in any one of claims 1-2.