This disclosure relates generally to artificial intelligence and, more particularly, to methods, apparatus, and articles of manufacture to explain machine learning models.
Artificial intelligence models, such as neural networks, are useful tools that have demonstrated value solving complex problems regarding pattern recognition, natural language processing, automatic speech recognition, etc. Neural networks operate, for example, using artificial neurons arranged into layers that process data from an input layer to an output layer, applying weighting values to the data during the processing of the data. Such weighting values are determined during a training process.
In general, the same reference numbers will be used throughout the drawing(s) and accompanying written description to refer to the same or like parts. The figures are not necessarily to scale. As used herein, connection references (e.g., attached, coupled, connected, and joined) may include intermediate members between the elements referenced by the connection reference and/or relative movement between those elements unless otherwise indicated. As such, connection references do not necessarily infer that two elements are directly connected and/or in fixed relation to each other.
Unless specifically stated otherwise, descriptors such as “first,” “second,” “third,” etc., are used herein without imputing or otherwise indicating any meaning of priority, physical order, arrangement in a list, and/or ordering in any way, but are merely used as labels and/or arbitrary names to distinguish elements for ease of understanding the disclosed examples. In some examples, the descriptor “first” may be used to refer to an element in the detailed description, while the same element may be referred to in a claim with a different descriptor such as “second” or “third.” In such instances, it should be understood that such descriptors are used merely for identifying those elements distinctly within the context of the discussion (e.g., within a claim) in which the elements might, for example, otherwise share a same name.
As used herein, the phrase “in communication,” including variations thereof, encompasses direct communication and/or indirect communication through one or more intermediary components, and does not require direct physical (e.g., wired) communication and/or constant communication, but rather additionally includes selective communication at periodic intervals, scheduled intervals, aperiodic intervals, and/or one-time events.
As used herein, “programmable circuitry” is defined to include (i) one or more special purpose electrical circuits (e.g., an application specific circuit (ASIC)) structured to perform specific operation(s) and including one or more semiconductor-based logic devices (e.g., electrical hardware implemented by one or more transistors), and/or (ii) one or more general purpose semiconductor-based electrical circuits programmable with instructions to perform specific functions(s) and/or operation(s) and including one or more semiconductor-based logic devices (e.g., electrical hardware implemented by one or more transistors). Examples of programmable circuitry include programmable microprocessors such as Central Processor Units (CPUs) that may execute first instructions to perform one or more operations and/or functions, Field Programmable Gate Arrays (FPGAs) that may be programmed with second instructions to cause configuration and/or structuring of the FPGAs to instantiate one or more operations and/or functions corresponding to the first instructions, Graphics Processor Units (GPUs) that may execute first instructions to perform one or more operations and/or functions, Digital Signal Processors (DSPs) that may execute first instructions to perform one or more operations and/or functions, XPUs, Network Processing Units (NPUs) one or more microcontrollers that may execute first instructions to perform one or more operations and/or functions and/or integrated circuits such as Application Specific Integrated Circuits (ASICs). For example, an XPU may be implemented by a heterogeneous computing system including multiple types of programmable circuitry (e.g., one or more FPGAs, one or more CPUs, one or more GPUs, one or more NPUs, one or more DSPs, etc., and/or any combination(s) thereof), and orchestration technology (e.g., application programming interface(s) (API(s)) that may assign computing task(s) to whichever one(s) of the multiple types of programmable circuitry is/are suited and available to perform the computing task(s).
As used herein integrated circuit/circuitry is defined as one or more semiconductor packages containing one or more circuit elements such as transistors, capacitors, inductors, resistors, current paths, diodes, etc. For example, an integrated circuit may be implemented as one or more of an ASIC, an FPGA, a chip, a microchip, programmable circuitry, a semiconductor substrate coupling multiple circuit elements, a system on chip (SoC), etc.
Artificial intelligence (AI), including machine learning (ML), deep learning (DL), and/or other artificial machine-driven logic, enables machines (e.g., computers, logic circuits, etc.) to use a model to process input data to generate an output based on patterns and/or associations previously learned by the model via a training process. For instance, the model may be trained with data to recognize patterns and/or associations and follow such patterns and/or associations when processing input data such that other input(s) result in output(s) consistent with the recognized patterns and/or associations. Many different types of machine learning models and/or machine learning architectures exist.
In general, implementing a ML/AI system involves two phases, a learning/training phase and an inference phase. In the learning/training phase, a training algorithm is used to train a model to operate in accordance with patterns and/or associations based on, for example, training data. In general, the model includes internal parameters that guide how input data is transformed into output data, such as through a series of nodes and connections within the model to transform input data into output data. Additionally, hyperparameters are used as part of the training process to control how the learning is performed (e.g., a learning rate, a number of layers to be used in the machine learning model, etc.). Hyperparameters are defined to be training parameters that are determined prior to initiating the training process.
Different types of training may be performed based on the type of ML/AI model and/or the expected output. For example, supervised training uses inputs and corresponding expected (e.g., labeled) outputs to select parameters (e.g., by iterating over combinations of select parameters) for the ML/AI model that reduce model error. As used herein, labelling refers to an expected output of the machine learning model (e.g., a classification, an expected output value, etc.). Alternatively, unsupervised training (e.g., used in deep learning, a subset of machine learning, etc.) involves inferring patterns from inputs to select parameters for the ML/AI model (e.g., without the benefit of expected (e.g., labeled) outputs).
Training is performed using training data. Additionally, training is performed using hyperparameters that control how the learning is performed (e.g., a learning rate, a number of layers to be used in the machine learning model, etc.). Once training is complete, the model is deployed for use as an executable construct that processes an input and provides an output based on the network of nodes and connections defined in the model. Once trained, the deployed model may be operated in an inference phase to process data. In the inference phase, data to be analyzed (e.g., live data) is input to the model, and the model executes to create an output. This inference phase can be thought of as the AI “thinking” to generate the output based on what it learned from the training (e.g., by executing the model to apply the learned patterns and/or associations to the live data).
In some examples, input data undergoes pre-processing before being used as an input to the machine learning model. Moreover, in some examples, the output data may undergo post-processing after it is generated by the AI model to transform the output into a useful result (e.g., a display of data, an instruction to be executed by a machine, etc.). In some examples, output of the deployed model may be captured and provided as feedback. By analyzing the feedback, an accuracy of the deployed model can be determined. If the feedback indicates that the accuracy of the deployed model is less than a threshold or other criterion, training of an updated model can be triggered using the feedback and an updated training data set, hyperparameters, etc., to generate an updated, deployed model.
As described above, advances in AI allow machines to perform complex tasks that could previously only be performed by humans. As adoption of AI-powered systems increases, concerns about transparency and interpretability of AI models underlying the systems have grown. For example, the General Data Protection Regulation (GDPR) of the European Union (EU) and other guidelines for trustworthy AI have been introduced. Some such regulations and guidelines establish a right of explanation. A right of explanation requires that a user be able to be provided an explanation about decisions made based on their data. Consequently, there is a growing demand for explainable AI (XAI) systems that can provide a clear and understandable rationale for decisions made by underlying AI models.
The fundamental way of explaining an AI model is to determine which parts of an input contribute the most to the behavior of a model. For example, in the domain of computer vision, saliency maps have been widely used as a de facto standard of explanation. A saliency map is a measure of the spatial support of one or more features in an input image. In one example, a saliency map of an input image is an image that identifies a degree of importance of one or more pixels in the input image to an output generated by a machine learning model after processing the input image. For example, a saliency map indicates a feature of an input image that is relevant to the training of a machine learning model to classify the input image. While example saliency maps disclosed herein are described in the context of an image, any other type of data structure and/or data may additionally or alternatively be used. In such other examples, a saliency map may be represented by a data structure that identifies a degree of importance of one or more portions of a corresponding data structure to an output generated by a machine learning model.
Several white-box and black-box approaches have been proposed to generate saliency maps. White-box approaches are generally limited to specific neural network architectures and require the ability to compute gradients or access intermediate activations of a neural network. These limitations make white-box approaches unsuitable for post-deployment frameworks that exhibit optimized intermediate representations of trained models.
In contrast, black-box approaches do not suffer from such limitations. For example, black-box approaches treat a model as a complete black box and do not assume accessibility to parameters, features, or gradients of the model. To approximate a saliency map for a model, some black-box approaches utilize numerical methods, such as the Monte Carlo method, to perturb input images and analyze corresponding outputs to explain predictions generated by a model in a post-hoc manner. Additionally, some black-box approaches utilize gradient descent-based optimization to explain model behavior.
However, existing black-box approaches require hundreds or thousands of iterations to generate fine-grained saliency maps for models. As such, existing white-box and black-box approaches are not suitable for explaining AI models. For example, the hundreds or thousands of iterations can require several seconds of execution on specialized hardware (e.g., a graphics processing unit (GPU)) to generate a saliency map for a single input image. Such specialized hardware might not necessarily be available on devices where such saliency maps may be needed. Additionally, existing white-box and black-box approaches are too slow (e.g., existing white-box and black-box approaches can consume more than 10 seconds of execution on a GPU for a single image).
Examples disclosed herein include a fast and computationally efficient black-box approach to approximate saliency maps for input images to an AI model. Disclosed methods, apparatus, and articles of manufacture sample input images utilizing a bitmask to evaluate the contribution of pixels in an input image to the output of an AI model. Examples disclosed herein generate bitmasks based on an optimization objective. For example, methods, apparatus, and articles of manufacture disclosed herein include a derivative-free black-box XAI algorithm. Disclosed examples generate competitive saliency maps with a number of iterations that is an order of magnitude smaller as compared to the above-described black-box approaches. Thus, examples disclosed herein are suitable for building an efficient XAI application that is not limited to a specific model architecture and/or specific algorithm design.
In the illustrated example of
It should be understood that some or all of the circuitry of
In the illustrated example of
In the illustrated example of
In some examples, the XAI system 100 includes means for interfacing. For example, the means for interfacing may be implemented by the interface circuitry 102. In some examples, the interface circuitry 102 may be instantiated by programmable circuitry such as the example programmable circuitry 812 of
In the illustrated example of
In the illustrated example of
In the illustrated example of
In the illustrated example of
Conversely, the composite saliency map estimation function described in connection with Equation 2 is computed as a kernel density estimation (KDE) problem with gradient-free adaptive sampling of bitmasks as described below. As described below, in Equation 2, the composite saliency map estimation function implemented by the saliency computation circuitry 108 estimates the composite saliency map using KDE. To implemented KDE, the saliency computation circuitry 108 utilizes a representative set of saliency maps computed for masked input images utilizing a variety of bitmasks positioned at different areas (e.g., regions) of an input image.
In the illustrated example of
In example disclosed herein, the example global optimization of Lipschitz functions is a lightweight (e.g., less computationally intense as compared to other optimization functions) optimization function that is parameter-free (e.g., the global optimization of Lipschitz functions does not include hyperparameters). To implement the global optimization of Lipschitz functions, the adaptive sampling circuitry 104 approximates the objective function, S(p), with an upper bound function, U(p), such that U(p)>S(p) for p∈Ω. As such, the upper bound function, U(p), can be considered a candidate score corresponding to the objective function, S(p). Equation 1 illustrates the upper bound function, U(p).
U(p)=min(S(pi)+l∥p−pi∥2) Equation 1
An assumption of the example of Equation 1 is that evaluations of the objective function, S(p), for pixels p1, p2, . . . , pt are available. In the example of Equation 1, l is a Lipschitz constant for the objective function, S(p). In the example of Equation 1, the Lipschitz constant, l, can be estimated for every sample such that the Lipschitz constant, l, is equal to the largest slope between objective functions, S(p), for pixels that have already been evaluated.
When implementing the global optimization of Lipschitz functions, the adaptive sampling circuitry 104 (1) randomly selects a pixel, pj, to evaluate and (2) determines whether the upper bound, U(pj), is better than a current best value of the objective function, S(p). If the adaptive sampling circuitry 104 determines that the selected pixel generates an upper bound that is better than the current best value of the objective function, then the adaptive sampling circuitry 104 utilizes the coordinates of the selected pixel as the coordinates at which a kernel of a bitmask is to be centered. As such, the example adaptive sampling circuitry 104 of
In the illustrated example of
In additional or alternative examples, the adaptive sampling circuitry 104 may implement global optimization functions other than the global optimization of Lipschitz functions. For example, global optimization functions that are suitable for examples disclosed herein sample regions of low saliency with less frequency as compared to regions of high saliency. Additionally, for example, global optimization functions that are suitable for examples disclosed herein sample regions of high saliency more densely than regions of low saliency. Such global optimization functions (e.g., the global optimization of Lipschitz functions, among others) improves computational efficiency by utilizing more computing power to obtain fine-grained saliency maps of highly salient regions of an input image rather than other regions of the input image.
In examples disclosed herein, suitable global optimization functions balance local refinement and global exploration. As such, global optimization functions that are suitable for examples disclosed herein ensure that adaptive sampling will have enough samples within local optima regions while not being limited to the local optima regions. To operate on compute platforms having limited resources, global optimization functions that are suitable for examples disclosed herein should have reduced computational burden and reduced demand on memory. Additionally, to operate on compute platforms having limited resources, global optimization functions that are suitable for examples disclosed herein should not require significant tuning effort.
In the illustrated example of
In the illustrated example of
In the illustrated example of
In some examples, the XAI system 100 includes means for sampling. For example, the means for sampling may be implemented by the adaptive sampling circuitry 104. In some examples, the adaptive sampling circuitry 104 may be instantiated by programmable circuitry such as the example programmable circuitry 812 of
In the illustrated example of
In the illustrated example of
In some examples, the XAI system 100 includes means for executing. For example, the means for executing may be implemented by the model execution circuitry 106. In some examples, the model execution circuitry 106 may be instantiated by programmable circuitry such as the example programmable circuitry 812 of
In the illustrated example of
In the illustrated example of
In the illustrated example of
As described above, the adaptive sampling circuitry 104 simultaneously perturbs an input image with bitmasks including kernels of different sizes to capture objects of different scales in an input image and/or provide a machine learning model with features at different scales. In the example of
In the illustrated example of
By considering a saliency map as a probability distribution of important features, the saliency computation circuitry 108 can apply probability density estimation, given constraints of a finite number of samples (e.g., due to computationally expensive processing with a machine learning model), a nonparametric function, and lack of access to gradients of a machine learning model. Thus, the saliency computation circuitry 108 can generate a saliency map as a kernel density estimation (KDE). For example, the saliency computation circuitry 108 generates a saliency map for a kernel size according to Equation 2 below.
S=Σ
j=1
Knorm(Σi=1NsiKj(p−pi)) Equation 2
In the example of Equation 2, N represents a number of samples (e.g., number of bitmasks generated at a kernel size) generated by the adaptive sampling circuitry 104 for pixels p1, p2, . . . , pN. Additionally, in the example of Equation 2, K represents a number of different kernel widths utilized by the adaptive sampling circuitry 104 to generate bitmasks. In the example of
In some examples, the XAI system 100 includes means for computing. For example, the means for computing may be implemented by the saliency computation circuitry 108. In some examples, the saliency computation circuitry 108 may be instantiated by programmable circuitry such as the example programmable circuitry 812 of
In the illustrated example of
In example operation, the XAI system 100 utilizes global optimization to identify a pixel of an input image that maximizes an objective function. For example, Pseudocode 1 illustrates example pseudocode to estimate a saliency map for an image with the XAI system 100 of
In the example of Pseudocode 1, at line 1, the saliency computation circuitry 108 initializes a composite saliency map variable, S. At line 2 of Pseudocode 1, the XAI system 100 enters a first for loop to iterate through K kernels having different widths (σ). At line 3 of the Pseudocode 1, the adaptive sampling circuitry 104 initializes. In the example Pseudocode 1, at line 4, the saliency computation circuitry 108 initializes a score matrix, H, for the current kernel width.
In the illustrated example of Pseudocode 1, at line 5, the XAI system 100 enters a second for loop to generate N bitmasks having the current kernel width. At line 6 of Pseudocode 1, the adaptive sampling circuitry 104 generates a bitmask according to a global optimization function. In the example of Pseudocode 1, at line 7, the adaptive sampling circuitry 104 perturbs the input image with the bitmask to generate a masked input image. For example, at line 7, the adaptive sampling circuitry 104 generates a first masked input image 116A (e.g., perturbation i) based on a first bitmask having a kernel having a first width (e.g., kernel of size j) and centered at first coordinates of the input image.
In the illustrated example of Pseudocode 1, at line 8, the model execution circuitry 106 generates an output based on the masked input image. Additionally, at line 8, the saliency computation circuitry 108 computes a saliency score based on the output of the machine learning model implemented by the model execution circuitry 106. For example, the saliency computation circuitry 108 computes a salience score according to the saliency score function, h. At line 9 of Pseudocode 1, the saliency computation circuitry 108 adds the saliency score to the score matrix, H, and associates the saliency score with the current bitmask. For example, the saliency computation circuitry 108 takes the union of the saliency score and the score matrix, H. At line 10 of Pseudocode 1, the adaptive sampling circuitry 104 updates the global optimization function based on the current bitmask.
In the illustrated example of Pseudocode 1, at line 11, the XAI system 100 loops back to line 5 and repeats the operations of the second for loop (e.g., lines 6-10) until the adaptive sampling circuitry 104 has generated N bitmasks at the current kernel width. For example, on a second iteration, the adaptive sampling circuitry 104 generates a second masked input image 116B (e.g., perturbation i+1) based on a second bitmask having a kernel having the first width (e.g., kernel of size j) and centered at second coordinates of the input image. At line 12 of Pseudocode 1, the saliency computation circuitry 108 computes a saliency map for the current kernel width. For example, at line 12 of Pseudocode 1, the saliency computation circuitry 108 executes Equation 2.
In the illustrated example of Pseudocode 1, at line 13, the saliency computation circuitry 108 aggregates the saliency map for the current kernel width with saliency maps generated for other kernel widths to aggregate a composite saliency map for the input image. In the example of Pseudocode 1, at line 14, the XAI system 100 loops back to line 2 and repeats the operations of the first for loop (e.g., lines 3-13) until the adaptive sampling circuitry 104 has generated N bitmasks for all kernel widths (e.g., 1, . . . , K). For example, on a second iteration of the first for loop, at line 7, the adaptive sampling circuitry 104 generates a third masked input image 118A (e.g., perturbation i) based on a third bitmask having a kernel having a second width (e.g., kernel of size j+1) and centered at third coordinates of the input image. Additionally, on a second iteration of the first for loop and a second iteration of the second for loop, at line 7, the adaptive sampling circuitry 104 generates a fourth masked input image 118B (e.g., perturbation i+1) based on a fourth bitmask having a kernel having the second width (e.g., kernel of size j+1) and centered at fourth coordinates of the input image.
As illustrated in the example of
In the illustrated example of
For example, a deletion metric refers to a measurement of the drop in probability of a class as salient pixels are removed from an image where saliency is determined by the saliency map. A lower deletion metric indicates that an XAI system is better at explaining an AI model. An insertion metric measures the importance of pixels in terms of the ability of the pixels to synthesize an image. An insertion metric is measured by the rise in probability of a class of interest as pixels are added according to the saliency map. A higher insertion metric indicates that an XAI system is better at explaining an AI model.
In the illustrated example of
In the illustrated example of
In the illustrated example of
In the illustrated example of
In the illustrated example of
In the illustrated example of
In the illustrated example of
As described above, a deletion metric refers to a measurement of the drop in probability of a class as salient pixels are removed from an image where a lower deletion metric indicates that an XAI system is better at explaining an AI model. Additionally, an insertion metric is measured by the rise in probability of a class of interest as pixels are added according to the saliency map where a higher insertion metric indicates that an XAI system is better at explaining an AI model. A pointing game metric refers to a measurement of how accurate a model is at detecting an object in an image. The pointing game metric is a measure of model accuracy that is determined as a ratio between the number of accurate model predictions over the total model predictions. A higher accuracy indicates that an XAI system is better at explaining an AI model.
In the illustrated example of
As illustrated in
In the illustrated example of
While an example manner of implementing the XAI system 100 of
A flowchart representative of example machine readable instructions, which may be executed by programmable circuitry (e.g., instructions to cause programmable circuitry) to implement and/or instantiate the XAI system 100 of
The program may be embodied in instructions (e.g., software and/or firmware) stored on one or more non-transitory computer readable and/or machine readable storage medium such as cache memory, a magnetic-storage device or disk (e.g., a floppy disk, a Hard Disk Drive (HDD), etc.), an optical-storage device or disk (e.g., a Blu-ray disk, a Compact Disk (CD), a Digital Versatile Disk (DVD), etc.), a Redundant Array of Independent Disks (RAID), a register, ROM, a solid-state drive (SSD), SSD memory, non-volatile memory (e.g., electrically erasable programmable read-only memory (EEPROM), flash memory, etc.), volatile memory (e.g., Random Access Memory (RAM) of any type, etc.), and/or any other storage device or storage disk. The instructions of the non-transitory computer readable and/or machine readable medium may program and/or be executed by programmable circuitry located in one or more hardware devices, but the entire program and/or parts thereof could alternatively be executed and/or instantiated by one or more hardware devices other than the programmable circuitry and/or embodied in dedicated hardware. The machine readable instructions may be distributed across multiple hardware devices and/or executed by two or more hardware devices (e.g., a server and a client hardware device). For example, the client hardware device may be implemented by an endpoint client hardware device (e.g., a hardware device associated with a human and/or machine user) or an intermediate client hardware device gateway (e.g., a radio access network (RAN)) that may facilitate communication between a server and an endpoint client hardware device. Similarly, the non-transitory computer readable storage medium may include one or more mediums. Further, although the example program is described with reference to the flowchart illustrated in
The machine readable instructions described herein may be stored in one or more of a compressed format, an encrypted format, a fragmented format, a compiled format, an executable format, a packaged format, etc. Machine readable instructions as described herein may be stored as data (e.g., computer-readable data, machine-readable data, one or more bits (e.g., one or more computer-readable bits, one or more machine-readable bits, etc.), a bitstream (e.g., a computer-readable bitstream, a machine-readable bitstream, etc.), etc.) or a data structure (e.g., as portion(s) of instructions, code, representations of code, etc.) that may be utilized to create, manufacture, and/or produce machine executable instructions. For example, the machine readable instructions may be fragmented and stored on one or more storage devices, disks and/or computing devices (e.g., servers) located at the same or different locations of a network or collection of networks (e.g., in the cloud, in edge devices, etc.). The machine readable instructions may require one or more of installation, modification, adaptation, updating, combining, supplementing, configuring, decryption, decompression, unpacking, distribution, reassignment, compilation, etc., in order to make them directly readable, interpretable, and/or executable by a computing device and/or other machine. For example, the machine readable instructions may be stored in multiple parts, which are individually compressed, encrypted, and/or stored on separate computing devices, wherein the parts when decrypted, decompressed, and/or combined form a set of computer-executable and/or machine executable instructions that implement one or more functions and/or operations that may together form a program such as that described herein.
In another example, the machine readable instructions may be stored in a state in which they may be read by programmable circuitry, but require addition of a library (e.g., a dynamic link library (DLL)), a software development kit (SDK), an application programming interface (API), etc., in order to execute the machine-readable instructions on a particular computing device or other device. In another example, the machine readable instructions may need to be configured (e.g., settings stored, data input, network addresses recorded, etc.) before the machine readable instructions and/or the corresponding program(s) can be executed in whole or in part. Thus, machine readable, computer readable and/or machine readable media, as used herein, may include instructions and/or program(s) regardless of the particular format or state of the machine readable instructions and/or program(s).
The machine readable instructions described herein can be represented by any past, present, or future instruction language, scripting language, programming language, etc. For example, the machine readable instructions may be represented using any of the following languages: C, C++, Java, C#, Perl, Python, JavaScript, HyperText Markup Language (HTML), Structured Query Language (SQL), Swift, etc.
As mentioned above, the example operations of
“Including” and “comprising” (and all forms and tenses thereof) are used herein to be open ended terms. Thus, whenever a claim employs any form of “include” or “comprise” (e.g., comprises, includes, comprising, including, having, etc.) as a preamble or within a claim recitation of any kind, it is to be understood that additional elements, terms, etc., may be present without falling outside the scope of the corresponding claim or recitation. As used herein, when the phrase “at least” is used as the transition term in, for example, a preamble of a claim, it is open-ended in the same manner as the term “comprising” and “including” are open ended. The term “and/or” when used, for example, in a form such as A, B, and/or C refers to any combination or subset of A, B, C such as (1) A alone, (2) B alone, (3) C alone, (4) A with B, (5) A with C, (6) B with C, or (7) A with B and with C. As used herein in the context of describing structures, components, items, objects and/or things, the phrase “at least one of A and B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. Similarly, as used herein in the context of describing structures, components, items, objects and/or things, the phrase “at least one of A or B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. As used herein in the context of describing the performance or execution of processes, instructions, actions, activities, etc., the phrase “at least one of A and B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. Similarly, as used herein in the context of describing the performance or execution of processes, instructions, actions, activities, etc., the phrase “at least one of A or B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B.
As used herein, singular references (e.g., “a”, “an”, “first”, “second”, etc.) do not exclude a plurality. The term “a” or “an” object, as used herein, refers to one or more of that object. The terms “a” (or “an”), “one or more”, and “at least one” are used interchangeably herein. Furthermore, although individually listed, a plurality of means, elements, or actions may be implemented by, e.g., the same entity or object. Additionally, although individual features may be included in different examples or claims, these may possibly be combined, and the inclusion in different examples or claims does not imply that a combination of features is not feasible and/or advantageous.
In the illustrated example of
In the illustrated example of
In the illustrated example of
In the illustrated example of
In the illustrated example of
In the illustrated example of
The programmable circuitry platform 800 of the illustrated example includes programmable circuitry 812. The programmable circuitry 812 of the illustrated example is hardware. For example, the programmable circuitry 812 can be implemented by one or more integrated circuits, logic circuits, FPGAs, microprocessors, CPUs, GPUs, DSPs, and/or microcontrollers from any desired family or manufacturer. The programmable circuitry 812 may be implemented by one or more semiconductor based (e.g., silicon based) devices. In this example, the programmable circuitry 812 implements the example interface circuitry 102, the example adaptive sampling circuitry 104, the example model execution circuitry 106, and the example saliency computation circuitry 108.
The programmable circuitry 812 of the illustrated example includes a local memory 813 (e.g., a cache, registers, etc.). The programmable circuitry 812 of the illustrated example is in communication with main memory 814, 816, which includes a volatile memory 814 and a non-volatile memory 816, by a bus 818. The volatile memory 814 may be implemented by Synchronous Dynamic Random Access Memory (SDRAM), Dynamic Random Access Memory (DRAM), RAMBUS® Dynamic Random Access Memory (RDRAM®), and/or any other type of RAM device. The non-volatile memory 816 may be implemented by flash memory and/or any other desired type of memory device. Access to the main memory 814, 816 of the illustrated example is controlled by a memory controller 817. In some examples, the memory controller 817 may be implemented by one or more integrated circuits, logic circuits, microcontrollers from any desired family or manufacturer, or any other type of circuitry to manage the flow of data going to and from the main memory 814, 816.
The programmable circuitry platform 800 of the illustrated example also includes interface circuitry 820. The interface circuitry 820 may be implemented by hardware in accordance with any type of interface standard, such as an Ethernet interface, a universal serial bus (USB) interface, a Bluetooth® interface, a near field communication (NFC) interface, a Peripheral Component Interconnect (PCI) interface, and/or a Peripheral Component Interconnect Express (PCIe) interface.
In the illustrated example, one or more input devices 822 are connected to the interface circuitry 820. The input device(s) 822 permit(s) a user (e.g., a human user, a machine user, etc.) to enter data and/or commands into the programmable circuitry 812. The input device(s) 822 can be implemented by, for example, an audio sensor, a microphone, a camera (still or video), a keyboard, a button, a mouse, a touchscreen, a trackpad, a trackball, an isopoint device, and/or a voice recognition system.
One or more output devices 824 are also connected to the interface circuitry 820 of the illustrated example. The output device(s) 824 can be implemented, for example, by display devices (e.g., a light emitting diode (LED), an organic light emitting diode (OLED), a liquid crystal display (LCD), a cathode ray tube (CRT) display, an in-place switching (IPS) display, a touchscreen, etc.), a tactile output device, a printer, and/or speaker. The interface circuitry 820 of the illustrated example, thus, typically includes a graphics driver card, a graphics driver chip, and/or graphics processor circuitry such as a GPU.
The interface circuitry 820 of the illustrated example also includes a communication device such as a transmitter, a receiver, a transceiver, a modem, a residential gateway, a wireless access point, and/or a network interface to facilitate exchange of data with external machines (e.g., computing devices of any kind) by a network 826. The communication can be by, for example, an Ethernet connection, a digital subscriber line (DSL) connection, a telephone line connection, a coaxial cable system, a satellite system, a beyond-line-of-sight wireless system, a line-of-sight wireless system, a cellular telephone system, an optical connection, etc.
The programmable circuitry platform 800 of the illustrated example also includes one or more mass storage discs or devices 828 to store firmware, software, and/or data. Examples of such mass storage discs or devices 828 include magnetic storage devices (e.g., floppy disk, drives, HDDs, etc.), optical storage devices (e.g., Blu-ray disks, CDs, DVDs, etc.), RAID systems, and/or solid-state storage discs or devices such as flash memory devices and/or SSDs. In this example, the one or more mass storage discs or devices 828 implement the saliency score datastore 110.
The machine readable instructions 832, which may be implemented by the machine readable instructions of
The cores 902 may communicate by a first example bus 904. In some examples, the first bus 904 may be implemented by a communication bus to effectuate communication associated with one(s) of the cores 902. For example, the first bus 904 may be implemented by at least one of an Inter-Integrated Circuit (I2C) bus, a Serial Peripheral Interface (SPI) bus, a PCI bus, or a PCIe bus. Additionally or alternatively, the first bus 904 may be implemented by any other type of computing or electrical bus. The cores 902 may obtain data, instructions, and/or signals from one or more external devices by example interface circuitry 906. The cores 902 may output data, instructions, and/or signals to the one or more external devices by the interface circuitry 906. Although the cores 902 of this example include example local memory 920 (e.g., Level 1 (L1) cache that may be split into an L1 data cache and an L1 instruction cache), the microprocessor 900 also includes example shared memory 910 that may be shared by the cores (e.g., Level 2 (L2 cache)) for high-speed access to data and/or instructions. Data and/or instructions may be transferred (e.g., shared) by writing to and/or reading from the shared memory 910. The local memory 920 of each of the cores 902 and the shared memory 910 may be part of a hierarchy of storage devices including multiple levels of cache memory and the main memory (e.g., the main memory 814, 816 of
Each core 902 may be referred to as a CPU, DSP, GPU, etc., or any other type of hardware circuitry. Each core 902 includes control unit circuitry 914, arithmetic and logic (AL) circuitry (sometimes referred to as an ALU) 916, a plurality of registers 918, the local memory 920, and a second example bus 922. Other structures may be present. For example, each core 902 may include vector unit circuitry, single instruction multiple data (SIMD) unit circuitry, load/store unit (LSU) circuitry, branch/jump unit circuitry, floating-point unit (FPU) circuitry, etc. The control unit circuitry 914 includes semiconductor-based circuits structured to control (e.g., coordinate) data movement within the corresponding core 902. The AL circuitry 916 includes semiconductor-based circuits structured to perform one or more mathematic and/or logic operations on the data within the corresponding core 902. The AL circuitry 916 of some examples performs integer based operations. In other examples, the AL circuitry 916 also performs floating-point operations. In yet other examples, the AL circuitry 916 may include first AL circuitry that performs integer-based operations and second AL circuitry that performs floating-point operations. In some examples, the AL circuitry 916 may be referred to as an Arithmetic Logic Unit (ALU).
The registers 918 are semiconductor-based structures to store data and/or instructions such as results of one or more of the operations performed by the AL circuitry 916 of the corresponding core 902. For example, the registers 918 may include vector register(s), SIMD register(s), general-purpose register(s), flag register(s), segment register(s), machine-specific register(s), instruction pointer register(s), control register(s), debug register(s), memory management register(s), machine check register(s), etc. The registers 918 may be arranged in a bank as shown in
Each core 902 and/or, more generally, the microprocessor 900 may include additional and/or alternate structures to those shown and described above. For example, one or more clock circuits, one or more power supplies, one or more power gates, one or more cache home agents (CHAs), one or more converged/common mesh stops (CMSs), one or more shifters (e.g., barrel shifter(s)) and/or other circuitry may be present. The microprocessor 900 is a semiconductor device fabricated to include many transistors interconnected to implement the structures described above in one or more integrated circuits (ICs) contained in one or more packages.
The microprocessor 900 may include and/or cooperate with one or more accelerators (e.g., acceleration circuitry, hardware accelerators, etc.). In some examples, accelerators are implemented by logic circuitry to perform certain tasks more quickly and/or efficiently than can be done by a general-purpose processor. Examples of accelerators include ASICs and FPGAs such as those discussed herein. A GPU, DSP and/or other programmable device can also be an accelerator. Accelerators may be on-board the microprocessor 900, in the same chip package as the microprocessor 900 and/or in one or more separate packages from the microprocessor 900.
More specifically, in contrast to the microprocessor 900 of
In the example of
In some examples, the binary file is compiled, generated, transformed, and/or otherwise output from a uniform software platform utilized to program FPGAs. For example, the uniform software platform may translate first instructions (e.g., code or a program) that correspond to one or more operations/functions in a high-level language (e.g., C, C++, Python, etc.) into second instructions that correspond to the one or more operations/functions in an HDL. In some such examples, the binary file is compiled, generated, and/or otherwise output from the uniform software platform based on the second instructions. In some examples, the FPGA circuitry 1000 of
The FPGA circuitry 1000 of
The FPGA circuitry 1000 also includes an array of example logic gate circuitry 1008, a plurality of example configurable interconnections 1010, and example storage circuitry 1012. The logic gate circuitry 1008 and the configurable interconnections 1010 are configurable to instantiate one or more operations/functions that may correspond to at least some of the machine readable instructions of
The configurable interconnections 1010 of the illustrated example are conductive pathways, traces, vias, or the like that may include electrically controllable switches (e.g., transistors) whose state can be changed by programming (e.g., using an HDL instruction language) to activate or deactivate one or more connections between one or more of the logic gate circuitry 1008 to program desired logic circuits.
The storage circuitry 1012 of the illustrated example is structured to store result(s) of the one or more of the operations performed by corresponding logic gates. The storage circuitry 1012 may be implemented by registers or the like. In the illustrated example, the storage circuitry 1012 is distributed amongst the logic gate circuitry 1008 to facilitate access and increase execution speed.
The example FPGA circuitry 1000 of
Although
It should be understood that some or all of the circuitry of
In some examples, some or all of the circuitry of
In some examples, the programmable circuitry 812 of
A block diagram illustrating an example software distribution platform 1105 to distribute software such as the example machine readable instructions 832 of
From the foregoing, it will be appreciated that example systems, apparatus, articles of manufacture, and methods have been disclosed that provide fast and efficient black-box model explanation method that can be applied to any kind of model architectures and/or algorithm design. Disclosed methods, apparatus, and articles of manufacture provide model explanation results with 10-50× less computational burden compared to other approaches which improves the adoptability of XAI systems. Additionally, examples disclosed herein can efficiently and effectively explain optimized models for deployment. Disclosed systems, apparatus, articles of manufacture, and methods improve the efficiency of using a computing device by providing a general framework for designing a black-box XAI system that is not bound by a specific choice of kernel and/or global optimization function. As such, examples disclosed herein can be used as a fundamental framework for future development of XAI algorithms. Disclosed systems, apparatus, articles of manufacture, and methods are accordingly directed to one or more improvement(s) in the operation of a machine such as a computer or other electronic and/or mechanical device.
Example methods, apparatus, systems, and articles of manufacture to explain machine learning models are disclosed herein. Further examples and combinations thereof include the following:
Example 1 includes an apparatus comprising interface circuitry to access an input image including one or more pixels, computer executable instructions, and programmable circuitry to utilize the computer executable instructions to generate a bitmask having a kernel size, apply the bitmask to the input image to generate a first masked input image, compute a first saliency score for a first pixel of the input image based on the first masked input image, compute a second saliency score for a second pixel of the input image based on an output generated by a machine learning model, the output based on a second masked input image, and generate a saliency map for the input image based on the first saliency score and the second saliency score, the saliency map indicative of at least one feature of the input image that contributed to training of the machine learning model.
Example 2 includes the apparatus of example 1, wherein the bitmask is a first bitmask, and the programmable circuitry is to generate a second bitmask having the kernel size, the second bitmask based on the first saliency score computed for the first pixel of the input image at which the first bitmask was applied to the input image.
Example 3 includes the apparatus of any of examples 1 or 2, wherein the input image has first dimensions, the bitmask is a matrix having second dimensions equivalent to the first dimensions, and the programmable circuitry is to compute a candidate score for the first pixel, the candidate score corresponding to an objective function for the first pixel, and when the candidate score satisfies a current value of an objective function threshold, populate the matrix to generate the bitmask, the matrix including a kernel having the kernel size, the kernel centered at first coordinates of the matrix that match second coordinates of the first pixel, first values within the kernel being non-zero, second values outside of the kernel being zero.
Example 4 includes the apparatus of example 3, wherein the kernel is a Gaussian kernel.
Example 5 includes the apparatus of any of examples 1, 2, 3, or 4, wherein the input image has first dimensions, the bitmask is a matrix having second dimensions equivalent to the first dimensions, the matrix includes a kernel having the kernel size, the kernel centered at first coordinates of the matrix that match second coordinates of the first pixel, and the programmable circuitry is to compute a Hadamard product between the input image and the matrix to apply the bitmask to the input image.
Example 6 includes the apparatus of any of examples 1, 2, 3, 4, or 5, wherein the kernel size is a first kernel size, the saliency map is a first saliency map generated for first bitmasks having the first kernel size, and the programmable circuitry is to aggregate the first saliency map with a second saliency map to generate a composite saliency map for the input image, the second saliency map generated for second bitmasks having a second kernel size different than the first kernel size.
Example 7 includes the apparatus of any of examples 1, 2, 3, 4, 5, or 6, wherein the programmable circuitry is to compute the second saliency score based on a task to be achieved by the machine learning model.
Example 8 includes the apparatus of any of examples 1, 2, 3, 4, 5, 6, or 7, wherein the programmable circuitry is to generate the saliency map without accessing any of parameters of the machine learning model, features identified by the machine learning model, or gradients corresponding to the machine learning model.
Example 9 includes the apparatus of any of examples 1, 2, 3, 4, 5, 6, 7, or 8, wherein the at least one feature corresponds to at least one of the one or more pixels of the input image.
Example 10 includes a non-transitory machine readable storage medium comprising instructions to cause programmable circuitry to at least generate a bitmask having a kernel size, apply the bitmask to an input image to generate a first masked input image, the input image including one or more pixels, compute a first saliency score for a first pixel of the input image based on the first masked input image, compute a second saliency score for a second pixel of the input image based on an output generated by a machine learning model, the output based on a second masked input image, and generate a saliency map for the input image based on the first saliency score and the second saliency score, the saliency map indicative of at least one feature of the input image that contributed to training of the machine learning model.
Example 11 includes the non-transitory machine readable storage medium of example 10, wherein the bitmask is a first bitmask, and the instructions cause the programmable circuitry to generate a second bitmask having the kernel size, the second bitmask based on the first saliency score computed for the first pixel of the input image at which the first bitmask was applied to the input image.
Example 12 includes the non-transitory machine readable storage medium of any of examples 10 or 11, wherein the input image has first dimensions, the bitmask is a matrix having second dimensions equivalent to the first dimensions, and the instructions cause the programmable circuitry to compute a candidate score for the first pixel, the candidate score corresponding to an objective function for the first pixel, and when the candidate score satisfies a current value of an objective function threshold, populate the matrix to generate the bitmask, the matrix including a kernel having the kernel size, the kernel centered at first coordinates of the matrix that match second coordinates of the first pixel, first values within the kernel being non-zero, second values outside of the kernel being zero.
Example 13 includes the non-transitory machine readable storage medium of example 12, wherein the kernel is a Gaussian kernel.
Example 14 includes the non-transitory machine readable storage medium of any of examples 10, 11, 12, or 13, wherein the input image has first dimensions, the bitmask is a matrix having second dimensions equivalent to the first dimensions, the matrix includes a kernel having the kernel size, the kernel centered at first coordinates of the matrix that match second coordinates of the first pixel, and the instructions cause the programmable circuitry to compute a Hadamard product between the input image and the matrix to apply the bitmask to the input image.
Example 15 includes the non-transitory machine readable storage medium of any of examples 10, 11, 12, 13, or 14, wherein the kernel size is a first kernel size, the saliency map is a first saliency map generated for first bitmasks having the first kernel size, and the instructions cause the programmable circuitry to aggregate the first saliency map with a second saliency map to generate a composite saliency map for the input image, the second saliency map generated for second bitmasks having a second kernel size different than the first kernel size.
Example 16 includes the non-transitory machine readable storage medium of any of examples 10, 11, 12, 13, 14, or 15, wherein the instructions cause the programmable circuitry to compute the second saliency score based on a task to be achieved by the machine learning model.
Example 17 includes the non-transitory machine readable storage medium of any of examples 10, 11, 12, 13, 14, 15, or 16, wherein the instructions cause the programmable circuitry to generate the saliency map without accessing any of parameters of the machine learning model, features identified by the machine learning model, or gradients corresponding to the machine learning model.
Example 18 includes the non-transitory machine readable storage medium of any of examples 10, 11, 12, 13, 14, 15, 16, or 17, wherein the at least one feature corresponds to at least one of the one or more pixels of the input image.
Example 19 includes a method comprising generating, by utilizing an instruction with programmable circuitry, a bitmask having a kernel size, applying, by utilizing an instruction with the programmable circuitry, the bitmask to an input image to generate a first masked input image, the input image including one or more pixels, computing, by utilizing an instruction with the programmable circuitry, a first saliency score for a first pixel of the input image based on the first masked input image, computing, by utilizing an instruction with the programmable circuitry, a second saliency score for a second pixel of the input image based on an output generated by a machine learning model, the output based on a second masked input image, and generating, by utilizing an instruction with the programmable circuitry, a saliency map for the input image based on the first saliency score and the second saliency score, the saliency map indicative of at least one feature of the input image that contributed to training of the machine learning model.
Example 20 includes the method of example 19, wherein the bitmask is a first bitmask, and the method further includes generating a second bitmask having the kernel size, the second bitmask based on the first saliency score computed for the first pixel of the input image at which the first bitmask was applied to the input image.
Example 21 includes the method of any of examples 19 or 20, wherein the input image has first dimensions, the bitmask is a matrix having second dimensions equivalent to the first dimensions, and the method further includes computing a candidate score for the first pixel, the candidate score corresponding to an objective function for the first pixel, and when the candidate score satisfies a current value of an objective function threshold, populating the matrix to generate the bitmask, the matrix including a kernel having the kernel size, the kernel centered at first coordinates of the matrix that match second coordinates of the second pixel, first values within the kernel being non-zero, second values outside of the kernel being zero.
Example 22 includes the method of example 21, wherein the kernel is a Gaussian kernel.
Example 23 includes the method of any of examples 19, 20, 21, or 22, wherein the input image has first dimensions, the bitmask is a matrix having second dimensions equivalent to the first dimensions, the matrix includes a kernel having the kernel size, the kernel centered at first coordinates of the matrix that match second coordinates of the first pixel, and the method further includes computing a Hadamard product between the input image and the matrix to apply the bitmask to the input image.
Example 24 includes the method of any of examples 19, 20, 21, 22, or 23, wherein the kernel size is a first kernel size, the saliency map is a first saliency map generated for first bitmasks having the first kernel size, and the method further includes aggregating the first saliency map with a second saliency map to generate a composite saliency map for the input image, the second saliency map generated for second bitmasks having a second kernel size different than the first kernel size.
Example 25 includes the method of any of examples 19, 20, 21, 22, 23, or 24, further including computing the second saliency score based on a task to be achieved by the machine learning model.
Example 26 includes the method of any of examples 19, 20, 21, 22, 23, 24, or 25, further including generating the saliency map without accessing any of parameters of the machine learning model, features identified by the machine learning model, or gradients corresponding to the machine learning model.
Example 27 includes the method of any of examples 19, 20, 21, 22, 23, 24, 25, or 26, wherein the at least one feature corresponds to at least one of the one or more pixels of the input image.
The following claims are hereby incorporated into this Detailed Description by this reference. Although certain example systems, apparatus, articles of manufacture, and methods have been disclosed herein, the scope of coverage of this patent is not limited thereto. On the contrary, this patent covers all systems, apparatus, articles of manufacture, and methods fairly falling within the scope of the claims of this patent.