Method for controlling an electronic device using a machine learning model
By using an epistemic neural network to quantify the uncertainty of predictions and select reliable beliefs, the method addresses the challenge of reliability in machine learning models, particularly in safety-critical applications like assisted driving systems.
Patent Information
- Application Number
- PCT/KR2024/003058
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-08
- Filing Date
- 2024-03-08
- Publication Date
- 2025-03-13
AI Technical Summary
Existing machine learning models lack the ability to quantify the uncertainty associated with their predictions, which is critical in applications where reliability and safety are paramount, such as assisted driving systems.
The method employs an epistemic neural network that processes inputs to derive a set of possible beliefs, calculates their probabilities and certainties using a Dirichlet distribution, and selects the most reliable belief to control an electronic device, thereby incorporating uncertainty into the decision-making process.
This approach enables the electronic device to make informed decisions based on the reliability of the predictions, reducing the risk of adverse consequences by acknowledging and managing uncertainty effectively.
Smart Images

Figure KR2024003058_13032025_PF_FP_ABST
Abstract
Description
METHOD FOR CONTROLLING AN ELECTRONIC DEVICE USING A MACHINE LEARNING MODEL
[0001] The present application generally relates to a method for processing inputs using a trained machine learning, ML, model. In particular, the present application provides a method for controlling an electronic device by using a trained ML model to process data and controlling the device using the output of the model.
[0002] In recent years, advancements in machine learning, ML, models mean that they are being deployed in a growing number of areas. In many cases, the task of a ML model is to provide a prediction, or set of predictions, based on a given input after undergoing training. Whilst the architecture of ML models, the training method and the precise form of the inputs may vary by application, the goal of the ML models in providing a prediction remains the same. From speech recognition on mobile devices to assisted driving systems, there is a growing dependency on the predictions provided by ML models in a diverse range of fields.
[0003] Particularly in the context of areas where ML model predictions may have adverse consequences for the health and safety of users, such as assisted driving systems, there is an increasing importance on quantifying the extent to which the user can trust the ML model predictions. That is, a primary challenge is to quantify the uncertainty associated with any given prediction and to incorporate this uncertainty into the functionality of a ML model.
[0004] The applicant has therefore identified the need for machine learning models which provide information on the reliability of their predictions.
[0005] In a first approach of the present techniques, there is provided a computer-implemented method for controlling an electronic device using a trained machine learning, ML, model, the method comprising: receiving an input data item for processing; processing the input data item using an epistemic neural network of the trained ML model, wherein activation of each output neuron j in the epistemic neural network is the parameter ajof a K-dimensional Dirichlet distribution, by: deriving a plurality of possible beliefs from the input data item wherein a belief is an assumption based on information in the input data item, calculating a probability associated with each possible belief, and calculating a certainty associated with the probability for each possible belief; selecting one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs; and controlling the electronic device based on the selected possible belief. Here, K denotes the total number of classes - or specifically beliefs - that the epistemic neural network is able to predict. As explained below, the certainty is based on the strength of any evidence in favour of the belief. Evidence is defined as ej= aj- 1; belief is defined as bj=ej / S, where ), and the overall uncertainty is defined by u = K / S.
[0006] Conventional neural networks generate marginal predictions: given one input, they predict one label. However, if such a conventional neural network outputs a prediction with a 50% certainty, it remains unclear if that certainty arises because of genuine ambiguity in the input, or because the neural network has had insufficient training (e.g. has not been trained on enough training data). In contrast to conventional neural networks, an epistemic neural network, ENN, makes predictions given a single input and provides a means for dealing with uncertainty in deep learning based on the Dempster-Shafer Theory (DST) of Evidence described below.
[0007] As noted above, the input data item is processed using an ENN, which derives a plurality of possible beliefs from the input data item. Beliefs, or belief functions, are a set of possibilities for a given question or fact. Belief functions may be based on DST, which is a generalization of the Bayesian framework for reasoning with subjective uncertainty. Belief functions are used as a way to model uncertainty where imprecision, or lack of knowledge, has to be modelled explicitly. For example, if the input data item is an image showing the back of a person wearing a suit, the beliefs that could be derived from the image may include that "the person is wearing a shirt" (because people who wear suits often wear them with a shirt), "the person is wearing a tie" (because a tie is often worn with a suit), "the person is a woman" (because women wear suits), "the person is a businessperson" (because suits are often worn by businesspeople), and so on. These beliefs or assumptions are derived based on the information in the input image, but cannot actually be seen or verified from the image itself. Thus, they are not facts, but assumptions or theories which, if true, provide additional information to the information actually present within the image.
[0008] In an example, the electronic device may be a robot or robotic device. In this example, the robot may rely on a camera for "seeing" the environment in which the robot is located and objects within the environment. Thus, inputs into the trained ML model may be images, videos or video frames captures by the camera. The epistemic neural network may process the input image and recognise objects within the input image. The robot may also have a planner module which may be a symbolic component that decides the next action the robot will make based on what the robot "sees" and the rules of the planner module. The present techniques enable each next action decided by the planner module to be associated with the uncertainty associated with the objects recognised by the epistemic neural network. Thus controlling the electronic device may comprise controlling a robot to perform an action.
[0009] Calculating a probability associated with each possible belief may comprise calculating how likely a belief is based on the input data item and what the ENN was trained on. For example, if the ENN was trained on mostly images of animals, then when the input data item is an image showing the back of a person wearing a suit, the ENN may not be confident in the beliefs generated for this image because it has not encountered such images during training.
[0010] The method comprises calculating a certainty associated with the probability of each possible belief. A certainty of a belief measures the strength of the evidence in favour of the belief, and ranges from 0 (indicating no evidence to support the belief), to 1 (indicating much evidence to support the belief, such that the belief is certain).
[0011] Thus, the present techniques derive some beliefs based on the input data item and then, based on how likely and / or confident the ML model is about the belief being true, one of the beliefs is selected and used to control the electronic device. For example, in the context of autonomous vehicles, the input data item may be an image or set of images captured by one or more cameras of the autonomous vehicle. For an image showing a straight length of road and a roadsign that is typically used to provide drivers with information that a bend is coming-up, some of the beliefs derived from the image(s) may be, for example, "There is a bend coming-up in the road" and "There is no upcoming change in the road". For an image showing a length of road and a roadsign that is typically used to provide drivers with information that they should change gear because a change in gradient is coming-up, some of the beliefs derived from the image(s) may be, for example, "There is an ascent coming-up in the road" or "There is a descent coming-up in the road". Selecting one of the plurality of possible beliefs comprises selecting one of the plurality of possible beliefs having an associated probability greater than or equal to a threshold probability value and an associated certainty greater than or equal to a threshold certainty value. That is, the belief which is selected is the one that is most likely, based on both the probability value and the certainty value. For example, in the above examples, the belief "There is a bend coming-up in the road" may have a higher associated certainty than the belief "There is no upcoming change in the road". In this case, the autonomous vehicle may be controlled to reduce speed and / or to change direction of the wheels, in view of the belief that there is bend coming-up in the road.
[0012] When two or more of the plurality of possible beliefs have an associated probability greater than or equal to a threshold probability value and an associated certainty greater than or equal to a threshold certainty value, the method may comprise: selecting one out of the two or more possible beliefs having the highest certainty value.
[0013] The method may further comprise determining an overall likelihood score for each possible belief using the calculated probability and calculated certainty, wherein selecting one of the plurality of possible beliefs comprises selecting a possible belief from the plurality of possible beliefs having a highest overall likelihood score.
[0014] The trained ML model used by the electronic device may be a lightweight model that is suitable for running on resource-constrained devices. The lightweight model may be a smaller version of a full, large model. The lightweight model may be generated from the full, large model using any technique.
[0015] When a lightweight model is used, and when the plurality of possible beliefs each have an associated probability below a threshold probability value and an associated certainty below a threshold certainty value, controlling the electronic device based on one of the possible beliefs may comprise: temporarily pausing taking any action to control the electronic device.
[0016] In some cases, the method may further comprise: transmitting the input data item to a remote server with a request for the input data item to be processed by a full version of the lightweight model on the server; receiving a server-generated plurality of possible beliefs together with a server-calculated probability and server-calculated certainty for each of the server-generated plurality of possible beliefs; selecting one of the plurality of server-generated possible beliefs; and controlling the electronic device using the selected server-generated possible belief.
[0017] In other cases, the method may further comprise: outputting a request to a user of the electronic device for further information.
[0018] Preferably, receiving an input data item for processing may comprise receiving sensor data from a sensor of the electronic device. In this case, outputting a request to a user for further information may comprise outputting a request to move the electronic device to enable the sensor to collect better sensor data.
[0019] When a request to a user for further information is output, the method may comprise: receiving the requested further information; selecting one of the plurality of possible beliefs using the requested further information; and controlling the electronic device using the selected possible belief.
[0020] Receiving an input data item for processing may comprise: receiving at least one image.
[0021] Deriving a plurality of possible beliefs from the input data item may comprise: identifying at least one object within the image.
[0022] The method may further comprise: guessing at least one class for the at least one object.
[0023] The method may further comprise: deriving a plurality of possible beliefs based on the identified at least one object.
[0024] Deriving a plurality of possible beliefs from the input data item may comprise: using a knowledge base comprising a plurality of probabilistic facts and a plurality of rules for deriving beliefs from the probabilistic facts.
[0025] Processing the input data item using an epistemic neural network of the trained ML model may comprise: deriving a plurality of possible beliefs from the input data item using an epistemic neural network and a translator module; calculating a probability associated with each possible belief using a reasoning module to generate a trigger graph; and calculating an certainty associated with the probability for each possible belief using a d-NNF module. A d-NNF module is a decision-NNF, where NNF is a negation normal form.
[0026] In a second approach of the present techniques, there is provided an electronic device comprising: at least one processor coupled to memory, for: receiving an input data item for processing; processing the input data item using an epistemic neural network of the trained ML model by: deriving a plurality of possible beliefs from the input data item, calculating a probability associated with each possible belief, and calculating an certainty associated with the probability for each possible belief; selecting one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs; and controlling the electronic device based on the selected possible belief.
[0027] The features described above with respect to the first approach apply equally to the second approach and therefore, for the sake of conciseness, are not repeated.
[0028] The electronic device may be a constrained-resource device, but which has the minimum hardware capabilities to use a trained neural network / ML model. The electronic device may be any one of: a smartphone, tablet, laptop, computer or computing device, virtual assistant device, a vehicle, an autonomous vehicle, a robot or robotic device, a robotic assistant, image capture system or device, an augmented reality system or device, a virtual reality system or device, a gaming system, an Internet of Things device, or a smart consumer device (such as a smart fridge). It will be understood that this is a non-exhaustive and non-limiting list of example electronic devices.
[0029] In a third approach of the present techniques, there is provided a computer-implemented method for processing inputs using a trained machine learning, ML, model, the method comprising: receiving an input data item for processing; processing the input data item using an epistemic neural network of the trained ML model by: deriving a plurality of possible beliefs from the input data item, calculating a probability associated with each possible belief, and calculating an certainty associated with the probability for each possible belief; and outputting, from the trained ML model, the plurality of possible beliefs, the associated probabilities and the associated uncertainties.
[0030] The features described above with respect to the first approach apply equally to the third approach and therefore, for the sake of conciseness, are not repeated.
[0031] In a fourth approach of the present techniques, there is provided a system for controlling electronic devices using a trained machine learning, ML, model, the system comprising: a server comprising: a trained ML model, and at least one processor coupled to memory; a plurality of electronic devices, where each electronic device comprises: a lightweight ML model, which is a smaller version of the trained ML model of the server, and at least one processor coupled to memory for: receiving an input data item for processing; processing the input data item using an epistemic neural network of the lightweight ML model by: deriving a plurality of possible beliefs from the input data item, calculating a probability associated with each possible belief, and calculating an certainty associated with the probability for each possible belief; selecting one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs; and controlling the electronic device based on the selected possible belief.
[0032] The features described above with respect to the first approach apply equally to the fourth approach and therefore, for the sake of conciseness, are not repeated.
[0033] When the plurality of possible beliefs each have an associated probability below a threshold probability value and an associated certainty below a threshold certainty value, controlling the electronic device based on one of the possible beliefs may comprise: transmitting the input data item to the server with a request for the input data item to be processed by the trained ML model of the server.
[0034] In a related approach of the present techniques, there is provided a computer-readable storage medium comprising instructions which, when executed by a processor, causes the processor to carry out any of the methods described herein.
[0035] As will be appreciated by one skilled in the art, the present techniques may be embodied as a system, method or computer program product. Accordingly, present techniques may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.
[0036] Furthermore, the present techniques may take the form of a computer program product embodied in a computer readable medium having computer readable program code embodied thereon. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable medium may be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
[0037] Computer program code for carrying out operations of the present techniques may be written in any combination of one or more programming languages, including object oriented programming languages and conventional procedural programming languages. Code components may be embodied as procedures, methods or the like, and may comprise sub-components which may take the form of instructions or sequences of instructions at any of the levels of abstraction, from the direct machine instructions of a native instruction set to high-level compiled or interpreted language constructs.
[0038] Embodiments of the present techniques also provide a non-transitory data carrier carrying code which, when implemented on a processor, causes the processor to carry out any of the methods described herein.
[0039] The techniques further provide processor control code to implement the above-described methods, for example on a general purpose computer system or on a digital signal processor (DSP). The techniques also provide a carrier carrying processor control code to, when running, implement any of the above methods, in particular on a non-transitory data carrier. The code may be provided on a carrier such as a disk, a microprocessor, CD- or DVD-ROM, programmed memory such as non-volatile memory (e.g. Flash) or read-only memory (firmware), or on a data carrier such as an optical or electrical signal carrier. Code (and / or data) to implement embodiments of the techniques described herein may comprise source, object or executable code in a conventional programming language (interpreted or compiled) such as Python, C, or assembly code, code for setting up or controlling an ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array), or code for a hardware description language such as Verilog (RTM) or VHDL (Very high speed integrated circuit Hardware Description Language). As the skilled person will appreciate, such code and / or data may be distributed between a plurality of coupled components in communication with one another. The techniques may comprise a controller which includes a microprocessor, working memory and program memory coupled to one or more of the components of the system.
[0040] It will also be clear to one of skill in the art that all or part of a logical method according to embodiments of the present techniques may suitably be embodied in a logic apparatus comprising logic elements to perform the steps of the above-described methods, and that such logic elements may comprise components such as logic gates in, for example a programmable logic array or application-specific integrated circuit. Such a logic arrangement may further be embodied in enabling elements for temporarily or permanently establishing logic structures in such an array or circuit using, for example, a virtual hardware descriptor language, which may be stored and transmitted using fixed or transmittable carrier media.
[0041] In an embodiment, the present techniques may be realised in the form of a data carrier having functional data thereon, said functional data comprising functional computer data structures to, when loaded into a computer system or network and operated upon thereby, enable said computer system to perform all the steps of the above-described method.
[0042] The method described above may be wholly or partly performed on an apparatus, i.e. an electronic device, using a machine learning or artificial intelligence model. The model may be processed by an artificial intelligence-dedicated processor designed in a hardware structure specified for artificial intelligence model processing. The artificial intelligence model may be obtained by training. Here, "obtained by training" means that a predefined operation rule or artificial intelligence model configured to perform a desired feature (or purpose) is obtained by training a basic artificial intelligence model with multiple pieces of training data by a training algorithm. The artificial intelligence model may include a plurality of neural network layers. Each of the plurality of neural network layers includes a plurality of weight values and performs neural network computation by computation between a result of computation by a previous layer and the plurality of weight values.
[0043] As mentioned above, the present techniques may be implemented using an AI model. A function associated with AI may be performed through the non-volatile memory, the volatile memory, and the processor. The processor may include one or a plurality of processors. At this time, one or a plurality of processors may be a general purpose processor, such as a central processing unit (CPU), an application processor (AP), or the like, a graphics-only processing unit such as a graphics processing unit (GPU), a visual processing unit (VPU), and / or an AI-dedicated processor such as a neural processing unit (NPU). The one or a plurality of processors control the processing of the input data in accordance with a predefined operating rule or artificial intelligence (AI) model stored in the non-volatile memory and the volatile memory. The predefined operating rule or artificial intelligence model is provided through training or learning. Here, being provided through learning means that, by applying a learning algorithm to a plurality of learning data, a predefined operating rule or AI model of a desired characteristic is made. The learning may be performed in a device itself in which AI according to an embodiment is performed, and / o may be implemented through a separate server / system.
[0044] The AI model may consist of a plurality of neural network layers. Each layer has a plurality of weight values, and performs a layer operation through calculation of a previous layer and an operation of a plurality of weights. Examples of neural networks include, but are not limited to, convolutional neural network (CNN), deep neural network (DNN), recurrent neural network (RNN), restricted Boltzmann Machine (RBM), deep belief network (DBN), bidirectional recurrent deep neural network (BRDNN), generative adversarial networks (GAN), and deep Q-networks.
[0045] The learning algorithm is a method for training a predetermined target device (for example, a robot) using a plurality of learning data to cause, allow, or control the target device to make a determination or prediction. Examples of learning algorithms include, but are not limited to, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning.
[0046] Implementations of the present techniques will now be described, by way of example only, with reference to the accompanying drawings, in which:
[0047] Figure 1 is a flowchart of example steps to control an electronic device using a trained machine learning, ML, model;
[0048] Figure 2 is a block diagram of a system for controlling electronic devices using a trained ML model;
[0049] Figure 3 is a schematic diagram of a neuro-symbolic framework for processing data;
[0050] Figure 4 shows an example use of the neuro-symbolic framework of Figure 3;
[0051] Figure 5 is a schematic diagram of a technique for deriving knowledge using trigger graphs;
[0052] Figure 6 is schematic diagram of a technique for performing inference using a trained ML model;
[0053] Figure 7 is a schematic diagram of a technique for training a ML model; and
[0054] Figure 8a and Figure 8b show example uses of the present techniques.
[0055] Broadly speaking, embodiments of the present techniques provide a method for processing inputs using a trained machine learning, ML, model. In particular, the present application provides a method for controlling an electronic device by using a trained ML model to process data and controlling the device using the output of the model. Advantageously, the trained ML model provides information on the reliability of its predictions, so that it can be determined whether any action should be taken on the basis of the predictions. In other words, if the trained ML model makes predictions which it is not confident about, it is possible to decide whether to rely on the predictions or provide further information to the model to improve the predictions.
[0056] As mentioned above, it is useful to design AI / ML models that know when they do not know how to process an input. One of the biggest challenges in modern AI is to assess the trustworthiness of its outcomes. For instance, can a model abstain from making a decision when it is provided with out-of-distribution data (i.e. data that belongs to a different domain relative to the data the model was trained on)? Or, can a model assess its confidence and communicate this confidence to the human with whom it interacts? Such models may be beneficial in a variety of scenarios. Existing techniques have focussed on developing AI models that assess their trustworthiness in the context of deep learning. However, the problem of developing neuro-symbolic frameworks, i.e., frameworks that blend logic with deep networks, empowered with the above capabilities is still open.
[0057] For example, it would be desirable for an assisted driving system to alert the user to override the system if the certainty associated with the ML model predictions are high enough to bring the trustworthiness of the predictions into question. Another example is that of a kitchen assistant, where a ML model guides the user through a recipe by predicting the next step that the user should take based on images of the actions of the user, taken on a mobile device. In the absence of sufficiently clear images, it would be desirable for the assistant to prompt the user that a prediction of the next step is not possible and to move the mobile device in a way that results in clearer images of the user's actions.
[0058] More importantly, the success of the interaction between humans and AI systems hinges on the human correctly deciding how to follow the recommendations of the AI system and when to override them. The benefits from collaboration with the AI system depends on the human developing insights of when to trust the AI system with its recommendations. If the human mistakenly trusts the AI system in regions where it is likely to err, catastrophic failures may occur. For example, recently, an AI-assisted driving system caused a fatality, as the system's perception module confused the white side of a trailer for bright sky.
[0059] Bayesian Neural Networks build on accounting for parameter uncertainty by applying a prior distribution on synaptic connection weights. However, the problem of developing neuro-symbolic frameworks, i.e., frameworks that blend logic with deep networks, empowered with the above capabilities is still open. Indeed, in the literature, neuro-symbolic frameworks can be found that blend logic with Bayesian probability theory that associate logical consequences only to a degree of possibility, but not to a degree of uncertainty.
[0060] Neuro-symbolic frameworks aim to bring the best of both worlds together: integrate high-level reasoning with low-level perception. The benefits of that integration are applications that: require fewer training data; result in smaller, in terms of size, models; have higher accuracy; can be trained with fewer data.
[0061] The present techniques provide a framework that integrates logic with deep networks under second-order uncertainty. This integration is performed in a scalable fashion by using Trigger Graphs (TGs), a technique for scalable inference and learning in the presence of logical theories. Trigger Graphs are described in United Kingdom patent publication number GB2611049, which is incorporated by reference herein in its entirety. The present framework is capable of tying logical consequences to possibility and uncertainty in a scalable fashion and principled fashion under the semantics of Subjective Logic (SL).
[0062] Figure 1 is a flowchart of example steps to control an electronic device using a trained machine learning, ML, model. The method comprises receiving an input data item for processing (step S100). Step S100 may comprise receiving sensor data from a sensor of the electronic device. Additionally or alternatively, step S100 may comprise receiving at least one image.
[0063] The method comprises processing the input data item using an epistemic neural network of the trained ML model. The processing comprises: deriving a plurality of possible beliefs from the input data item (step S102), calculating a probability associated with each possible belief (step S104), and calculating a certainty associated with the probability for each possible belief (step S106). In other words, for the input data item, several possible beliefs may be derived.
[0064] For example, if the input data item is an image showing the back of a person wearing a suit, the beliefs that could be derived from the image may include that "the person is wearing a shirt" (because people who wear suits often wear them with a shirt), "the person is wearing a tie" (because a tie is often worn with a suit), "the person is a woman" (because women wear suits), "the person is a businessperson" (because suits are often worn by businesspeople), and so on. These beliefs or assumptions are derived based on the information in the input image, but cannot actually be seen or verified from the image itself. Thus, they are not facts, but assumptions or theories which, if true, provide additional information to the information actually present within the image.
[0065] Each derived belief is associated with a probability or likelihood of the belief being true / correct. Furthermore, each derived belief is associated with a certainty value, i.e. a value indicating how sure the ML model is of this belief. For example, if the trained ML model has been trained on data from a particular domain (e.g. images of animals), and the input data item is from the same domain (e.g. an image of a cat), the certainty value may be quite high for any derived beliefs. However, if the input data item is from a different domain (e.g. an image of a street), the certainty value associated with any derived beliefs may not be as high. This is useful because it is better to know when a model is not sure about its predictions / outputs than to assume everything it outputs is correct.
[0066] In the example above, the probability of the belief "the person is wearing a shirt" may be higher than the probability of the belief "the person is a businessperson", because images of people wearing suits often show them wearing shirts, but many different people wear suits not just businesspeople. However, the certainty associated with each fact may be similar if the model has been trained on similar images.
[0067] The method comprises: selecting one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs (step S108); and controlling the electronic device based on the selected possible belief (step S110). There are a number of ways that the electronic device may be controlled based on the output of the ML model.
[0068] At step S108, selecting one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs may comprise: selecting one of the plurality of possible beliefs having an associated probability greater than or equal to a threshold probability value and an associated certainty greater than or equal to a threshold certainty value. That is, the electronic device may only be controlled using the output of the ML model if one of the possible beliefs is likely and the model is quite certain about the belief being possible.
[0069] When two or more of the possible beliefs have an associated probability greater than or equal to a threshold probability value and an associated certainty greater than or equal to a threshold certainty value, the method may comprise: selecting one out of the two or more possible beliefs having the highest certainty value.
[0070] In some cases, the trained ML model used by the electronic device may be a lightweight model that is suitable for running on resource-constrained devices. The lightweight model may be a smaller version of a full, large model. The lightweight model may be generated from the full, large model using any technique. When a lightweight model is used, and when the plurality of possible beliefs each have an associated probability below a threshold probability value and an associated certainty below a threshold certainty value, controlling the electronic device based on one of the possible beliefs may comprise: temporarily pausing taking any action to control the electronic device.
[0071] Then, in some cases, the method may comprise: transmitting the input data item to a remote server with a request for the input data item to be processed by a full version of the lightweight model on the server; receiving a server-generated plurality of possible beliefs together with a server-calculated probability and server-calculated certainty for each of the server-generated plurality of possible beliefs; selecting one of the plurality of server-generated possible beliefs; and controlling the electronic device using the selected server-generated possible belief. In other words, if the certainty and probability are low, a request for the full model to process the input data item may be sent in case the full model is better able to produce beliefs that it is certain / confident about. This is also known as offloading. Offloading allows a lightweight model installed on a mobile phone, for example, to assess the confidence of its predictions, and consult a heavier model if the lightweight model is not confident enough about its outcomes.
[0072] Additionally or alternatively, when the plurality of possible beliefs each have an associated probability below a threshold probability value and an associated certainty below a threshold certainty value, the method may comprise: outputting a request to a user of the electronic device for further information.
[0073] For example, receiving an input data item for processing may comprise receiving sensor data from a sensor of the electronic device. The sensor may be an image capture device, such as a camera. The electronic device may be a virtual assistant device, for example. In this case, outputting a request to a user for further information may comprise outputting a request to move the electronic device to enable the sensor to collect better sensor data. For example, if the virtual assistant device is being used to help a user to follow a food recipe, the virtual assistant device needs to be able to see the user's actions and the objects around the user (e.g. ingredients, utensils, etc.). When the user asks the virtual assistant device for the next step in the recipe, the device needs to know what the user is currently doing to ascertain which step of the recipe they are currently at. If the virtual assistant device is unable to, via its sensor, see the user's actions and / or the objects the user is using, the ML model may not be able to provide a response to the user with a suitable certainty. Thus, the device may ask the user to move the sensor / camera to a different location so that it can attempt to answer the user's question with more accuracy and certainty.
[0074] In another example, outputting a request to a user for further information may comprise outputting a request to the user to input, via a user interface of the electronic device, further information. For example, the electronic device may be a robotic device and may be instructed by the user to perform an action. The user may ask the robotic device to move the cup onto the table, for instance. In order for the robotic device to understand the user's command, the robotic device needs to know what a "cup" is and what a "table" is. If the robotic device does not know what a cup is, or cannot, for some other reason, identify a cup in its vicinity, the robotic device may ask the user for further information. This further information could be a picture of a cup, or could be instructions for the robotic device to reach the cup (e.g. "I think it is in the next room"). Then, the method may further comprise: receiving the requested further information; selecting one of the plurality of possible beliefs using the requested further information; and controlling the electronic device using the selected possible belief.
[0075] Where the input data item is an image, deriving a plurality of possible beliefs from the input data item (step S102) may comprise: identifying at least one object within the image. The method may comprise guessing at least one class for the at least one object. The method may comprise: deriving a plurality of possible beliefs based on the identified at least one object and / or at least one class.
[0076] Deriving a plurality of possible beliefs from the input data item may comprise: using a knowledge base comprising a plurality of probabilistic facts and a plurality of rules for deriving beliefs from the probabilistic facts. An example technique for deriving beliefs from probabilistic facts and rules is described in United Kingdom Patent Publication GB2611049A, which is incorporated herein by reference in its entirety.
[0077] A probabilistic fact of the probabilistic facts may comprise a likelihood that a first object detected in an image has a first label. The rules may comprise rules for determining that a second object detected in the image has a second label. The second object may be a sub-object of the first object. The derived new facts may include the likelihood that the second object has the second label. The image including the first and second objects and first and
[0078] Processing the input data item using an epistemic neural network of the trained ML model may comprise: deriving a plurality of possible beliefs from the input data item using an epistemic neural network and a translator module; calculating a probability associated with each possible belief using a reasoning module to generate a trigger graph; and calculating an certainty associated with the probability for each possible belief using a d-NNF module.
[0079] Figure 2 is a block diagram of a system 10 for controlling electronic devices using a trained ML model. The system comprises a server 100 and a plurality of electronic devices 200. Only one electronic device 200 is shown in Figure 2 for the sake of simplicity.
[0080] The server 100 comprises: a trained ML model 106, and at least one processor 102 coupled to memory 104.
[0081] Each electronic device 200 comprises: a lightweight ML model 206, which is a smaller version of the trained ML model 106 of the server 100. Each electronic device 200 comprises at least one processor 202 coupled to memory 204 for: receiving an input data item for processing; processing the input data item using an epistemic neural network of the lightweight ML model by: deriving a plurality of possible beliefs from the input data item, calculating a probability associated with each possible belief, and calculating an certainty associated with the probability for each possible belief; selecting one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs; and controlling the electronic device based on the selected possible belief.
[0082] The electronic device 200 may comprise one or more interfaces 208, such as a display, an input mechanism, a microphone, a speaker, and so on.
[0083] The electronic device 200 may comprise one or more sensors 210, such as a camera.
[0084] Figure 3 is a schematic diagram of a neuro-symbolic framework for processing data. The present applicant focuses on neuro-symbolic frameworks that integrate a symbolic module adopting a logical theory T and computing a function on top of a DNN computing a function . The translator maps each output of n to a symbol in the input domain of the symbolic module s. These frameworks are referred to as stratified frameworks.
[0085] Figure 4 shows an example use of the neuro-symbolic framework of Figure 3. In this example, at inference time, given two images of digits, the trained DNN is trained to recognise the digits in the images. The framework also comprises a symbolic module which adds the digits together. The goal of the framework in this example is to determine the sum of the digits in the images.
[0086] At training time, the framework is given two images of digits, an untrained DNN, a fixed theory that adds digits, and the target sum of the digits in the images. The goal during training is to adjust the weights of the DNN so that it correctly recognises the digits in the images.
[0087] Returning to Figure 3, in the present framework, n is an Epistemic-DNN that outputs upon each input , a Dirichlet distribution capturing the likelihood of each probability assignment to the output neurons of n and s adheres to the semantics of Subjective Logic so that each logical consequence is associated with a belief, disbelief and uncertainty value. The present techniques address two problems: (1) how to do inference over the framework assuming that both n and s are both fixed, and (2) how to train n assuming a fixed s when the training data are of the form (x, Q), where x is the input to n and Q is the target output of s when reasoning over the predictions of n on x.
[0088] Epistemic uncertainty is the uncertainty arising due to a lack of information. For example, measuring the average height in a population from a sample of 100 people will result in a less accurate estimate than measuring the average height in a population from a sample of 1000 people. The estimate obtained from the sample of 100 people is said to have a greater epistemic uncertainty than the estimate obtained from the sample of 1000 people. This is in contrast to aleatoric uncertainty that arises due to intrinsic randomness in a given process and does not scale with sample size.
[0089] In the context of ML models, epistemic uncertainty is particularly relevant when considering the size of training data samples. Considering an example of a conventional ML model performing a classification task, the set of model weights obtained after training with 100 training data samples will be different to the model weights obtained after training with 1000 training data samples. That is, it is possible to train models that have different sets of weights for performing the same task, depending on the training data provided. Therefore, it follows that it is possible to train models that have different performances for performing the same task given potential variations in the model weights based on the training data provided. Such variations in model weights may give rise to different classification predictions. There is said to be an epistemic uncertainty on the classifications provided by the ML model.
[0090] Epistemic deep neural networks, E-DNNs, aim to capture the epistemic uncertainty associated with ML model predictions. In the case of a classification task, there is an epistemic uncertainty on the classifications. Conventionally, in the case of supervised learning, it is possible to assess the performance of a classification DNN on validation data during training and on test data samples following the training process. However, conventional DNNs necessarily produce a classification regardless of the epistemic uncertainty and are ignorant to prediction confidence. That is, conventional DNNs do not account for epistemic uncertainty in their output classifications. In the case of a classification associated with a large epistemic uncertainty, it may be desirable to abstain from providing a classification prediction and, instead, provide an output that reflects the large epistemic uncertainty. For example, such an output may be a prompt to the user. In the example of a ML model implemented as part of an assisted driving system, the output may be a prompt to the user to override the system.
[0091] Each output neuron j of an E-DNN for performing an N classification task corresponds to a parameter aj, where ,of an N-dimensional Dirichlet distribution , such that D is the probability density function, pdf, modelled by the E-DNN and p is an N-dimensional vector of probabilities whose elements lie in the range {0,1} and the sum over all elements of p is one. That is, an E-DNN may be defined as a neural network where the output corresponds to a distribution D that models the possible probability assignments, and the parameters ajmodel the total evidence estimated by the network for assignment of the input to the j-th class. The marginal distributions of Dirichlet distributions are Beta distributions. Therefore, the j-th output neuron is associated with a Beta distribution with parameters ajand , where ajis the sum over all the aiparameters, except the case where j = i and is the aiparameter for the case where j = i.
[0092] Epistemic-DNNS (E-DNNs). Given an input datum, E-DNNs output a Dirichlet distribution that models the possible probability assignments. In particular, given an item x designed for classification with N being the number of total classes, each output neuron j, for , of an E-DNN is associated with a parameter αjthat models the total evidence estimated by the network for the assignment of x to the j-th class.
[0093] The high-level idea is that each output neuron j in an E-DNN is associated with a parameter aj, so that is the probability distribution function modeled by the E-DNN, where is a vector of probabilities of the output neurons. Due to the connection between Dirichlet and Beta distributions, the probability distribution function associated with the j-th output neuron is a Beta one with parameters ajand , where ajis the sum over all ai's excluding the case where j = i.
[0094] From an opinion to α Beta distributed RV with parameters and :
[0095] ,
[0096] In the above cases, W > 0 and 0 < o < 1 are user-defined where W specifies the strength of the prior assumption.
[0097] Trigger Graphs (TGs) are directed acyclic graphs that allow scalable probabilistic reasoning. United Kingdom patent publication number GB2611049 outlines the ways to reason via TGs over a logical theory, i.e., a Knowledge Base (KB) or a Knowledge Graph (KG), taking into account the probabilities of the facts in the logical theory. Trigger graphs adopt a logical theory, such as a knowledge base or a knowledge graph, and allow scalable probabilistic reasoning. Probabilistic reasoning via TGs works using two stages - reasoning and probability computation. The reasoning stage comprises a number of rounds k, wherein, at each round, a TG of depth k is built. The rules associated with the TG nodes are executed up to this point, and the derivation history of the logical consequences is kept. The probability computation stage (after reasoning completes) comprises probability computation, wherein the derivation history of each logical consequence is translated into an arithmetic d-NNF circuit. Each leaf node (i.e. nodes without a further branching to other nodes)in the d-NNF circuit is associated with a single-point probability value and the root node with the logical consequence of interest. Each non-leaf node (i.e. nodes representing branching points in the circuit) is associated with an arithmetic operation. The d-NNF circuit is traversed by processing the nodes of the circuit in a bottom-up fashion. Initially, arithmetic operations are performed on the leaf nodes as determined by the neighbouring non-leaf nodes. The arithmetic operations are performed as dictated by the non-leaf nodes of the circuit until a final value is computed at the root node. The final the final value computed at the root node is the final probability of the logical consequence.
[0098] The building elements of Subjective Logic are opinions. An opinion of a proposition is a tuple , where b, d, u represent the belief, the disbelief and the uncertainty the proposition is true at a given instance and o is the prior probability the proposition is true in the absence of any observations. We have that b +d + u = 1. The value b + uo is an estimate of the ground-truth probability of the proposition and is referred to as the expected probability.
[0099] From α Beta distributed RV with parameters ( ) to an opinion w:
[0100] w = ( )
[0101] Above, s = , u = 1 - - .
[0102] From an opinion to α Beta distributed RV with parameters and :
[0103] ,
[0104] In the above cases, W > 0 and 0 < o < 1 are user-defined where W specifies the strength of the prior assumption.
[0105] d-NNF circuits - background: Let v be a set of variables. An NNF circuit over v is a rooted DAG where each leaf node is associated with the logical true or false or a variable from v or its negation and each internal node is annotated with the conjunction or disjunction . An NNF circuit is decomposable if the children of each conjunction node share no common variables. An NNF circuit is deterministic if the children of each disjunction node are logically contradictory. The circuits satisfying the above properties are referred to as d-NNF circuits.
[0106] Figure 6 is schematic diagram of a technique for performing inference using a trained ML model. Here, logic is integrated with a deep neural network under uncertainty. Integrating logic is the process of integrating a logical theory with the ML model to guide the reasoning of the model. A deep neural network is under uncertainty when there is an uncertainty associated with the activations of the output neurons.
[0107] An epistemic deep neural network, E-DNN, models a probability distribution function, PDF, through the activations ajof each of the output neurons j = 1, ... , N and a vector of probabilities p of the output neurons. A translator module generates opinions / beliefs wjand facts fjbased on the PDF provided by the E-DNN. The facts fjserve as input to a reasoning module that is guided by trigger graphs, TGs.
[0108] The TG-guided reasoning module uses a logical theory, T , and a target output of the logical theory, Q, to compute a derivation history of Q. A decomposable and deterministic negation normal form, d-NNF, circuit C, which has a series of leaf nodes (leaves), is generated by a d-NNF translator module. Subjective Logic, SL, calculus is used to propagate the opinions wjover the leaves of C. The opinion propagated up to the root of C holds the probability and uncertainty that Q is true. The probability and uncertainty that Q is true may be understood as the probability and uncertainty that a given logical prediction is true, given the information provided by the E-DNN. This may be used to apply logical reasoning to the task at hand. For example, if there is a high probability and low uncertainty that a logical prediction is true, then an action to control a device may be taken based on the logical prediction.
[0109] In Figure 6, an input data item is input into the E-DNN to perform a classification task and to generate a distribution that models the uncertainties associated with the output neurons. The translator module generates parameters that capture the information in the distribution generated by the E-DNN in a form that facilitates the application of a logical theory. The trigger graph-guided reasoning module performs, using a logical theory and by using a subset of the parameters generated by the translator module, a computation of a derivation history of the target output of the logical theory. In the space of possible predictions made by an E-DNN, there is a given set of predictions that would satisfy the target output of the logical theory upon application of the corresponding rules and / or formulae of the logical theory. The derivation history represents the set of predictions, and the corresponding behaviour under the rules of the logical theory, necessary for the E-DNN predictions to satisfy the target output of the logical theory. The method further comprises using a d-NNF translator module to translate the derivation history of the target output of the logical theory into an arithmetic decomposable and deterministic negational normal form circuit. Upon generating the circuit, a subset of the parameters generated by the translator module are evaluated to determine which of the parameters in the subset of parameters is propagated up to the root of the logical circuit. The parameter that is propagated up to the root of the circuit is the probability and uncertainty that the target output of the logical theory is true.
[0110] Figure 7 is a schematic diagram of a technique for training a ML model that integrates logic with a deep neural network for a classification task under uncertainty. The method may comprise inputting training data items into the epistemic deep neural network (E-DNN). The method may comprise using a translator module and an initial output distribution of the E-DNN to associate each output neuron of the E-DNN with a parameter that represents the class identified in a training data item. The method may comprise passing the parameters representing the class to a trigger graph-guided reasoning module. The method may further comprise using a trigger graph-guided reasoning module to perform, using a logical theory and the parameters representing the class, a computation of the derivation history of the target output of the logical theory.
[0111] Upon computing the derivation history, the method may further comprise: computing a plurality of parameter pairs that maximise an expected probability of the target output of a logical theory. The computing of the plurality of parameter pairs may be via the expectation maximization (EM) optimization technique. Each computed parameter pair in the plurality of parameter pairs corresponds to the parameters of a Beta distribution which maximises the expected probability of the target output of a logical theory. As noted above, the marginal distributions of a Dirichlet distribution are Beta distributions. The method may further comprise computing an optimised distribution by aggregating the plurality of parameter pairs into a single distribution. As noted above, the output of an E-DNN corresponds to a Dirichlet distribution. The optimised distribution corresponds to the E-DNN output distribution which would have been necessary to maximize the probability of reaching the target output of the logical theory and minimizing its uncertainty. The method may further comprise: training the deep neural network by: evaluating a loss function that constitutes a measure of the difference between the optimised and the initial output distributions of the neural network; and backpropagating using the evaluated loss function.
[0112] Figures 8a and 8b show example uses of the present techniques. In the example of Figure 8a, a user may interact with their electronic device (an example of human-computer or human-robot interaction). To interact with users, the electronic device (e.g. a robot) must understand the users' commands. The present techniques enable the development of robotic devices which can integrate both neural and symbolic models to make predictions. Furthermore, by quantifying uncertainty (or certainty), the robotic systems can ask for further information when they are not certain enough about their outcomes. In the illustrated example, an input into the electronic device may be a user command to move the cup onto the table, together with any image data of the environment. The electronic device may output that it cannot identify any cup in the room because it cannot identify any cup with a required level of certainty. Thus, the electronic device may also output a request for further information from the user, in this case instructions for how to reach the cup.
[0113] In the example of Figure 8b, the electronic device is functioning as a virtual kitchen assistant. To help a user cook a recipe, the virtual assistant must understand the user's actions and related objects. By quantifying the uncertainty (or certainty), the virtual assistant can ask for further information when it is not certain enough about its predictions. In the illustrated example, an input into the electronic device may be a user command asking for the next step in a recipe that the user is following, together with any image data of the environment. The electronic device may output that it cannot recognise the user's actions because it cannot identify the actions and related objects with a required level of certainty. Thus, the electronic device may also output a request for further information from the user, in this case a request for a camera to be moved closer to the user.
[0114] Those skilled in the art will appreciate that while the foregoing has described what is considered to be the best mode and where appropriate other modes of performing present techniques, the present techniques should not be limited to the specific configurations and methods disclosed in this description of the preferred embodiment. Those skilled in the art will recognise that present techniques have a broad range of applications, and that the embodiments may take a wide range of modifications without departing from any inventive concept as defined in the appended claims.
Claims
1.An electronic device comprising:at least one processor coupled to memory, for:receiving an input data item for processing;processing the input data item using an epistemic neural network of the trained ML model by:deriving a plurality of possible beliefs from the input data item,calculating a probability associated with each possible belief, andcalculating a certainty associated with the probability for each possible belief;selecting one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs; andcontrolling the electronic device based on the selected possible belief.2.The electronic device as claimed in claim 1, wherein selecting one of the plurality of possible beliefs comprises:selecting one of the plurality of possible beliefs having an associated probability greater than or equal to a threshold probability value and an associated certainty greater than or equal to a threshold certainty value.3.The electronic device as claimed in claim 1, wherein when two or more of the plurality of possible beliefs have an associated probability greater than or equal to a threshold probability value and an associated certainty greater than or equal to a threshold certainty value, the at least one processor:selects one out of the two or more possible beliefs having the highest certainty value.4.The electronic device as claimed in claim 1, wherein the at least one processor is configured to determine an overall likelihood score for each possible belief using the calculated probability and calculated certainty, and wherein selecting one of the plurality of possible beliefs comprises selecting a possible belief from the plurality of possible beliefs having a highest overall likelihood score.5.The electronic device as claimed in claim 3, wherein when the plurality of possible beliefs each have an associated probability below a threshold probability value and an associated certainty below a threshold certainty value, controlling the electronic device based on one of the possible beliefs comprises temporarily pausing taking any action to control the electronic device, and the processor is further configured to: output a request to a user of the electronic device for further information.6.The electronic device as claimed in claim 5 further comprising at least one sensor, and wherein:receiving an input data item for processing comprises receiving sensor data from the at least one sensor of the electronic device; andoutputting a request to a user for further information comprises outputting a request to move the electronic device to enable the sensor to collect better sensor data.7.The electronic device as claimed in claim 5 further comprising a user interface, and wherein:outputting a request to a user for further information comprises outputting a request to the user to input, via the user interface of the electronic device, further information.8.The electronic device as claimed in claim 7, wherein receiving an input data item for processing comprises:receiving at least one image.9.A computer-implemented method for controlling an electronic device using a trained machine learning, ML, model, the method comprising:receiving an input data item for processing;processing the input data item using an epistemic neural network of the trained ML model, wherein activation of each output neuron j in the epistemic neural network is the parameter ajof a K-dimensional Dirichlet distribution, by:deriving a plurality of possible beliefs from the input data item wherein a belief is an assumption based on information in the input data item,calculating a probability associated with each possible belief, andcalculating a certainty associated with the probability for each possible belief;selecting one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs; andcontrolling the electronic device based on the selected possible belief.10.The method as claimed in claim 9, wherein selecting one of the plurality of possible beliefs comprises:selecting one of the plurality of possible beliefs having an associated probability greater than or equal to a threshold probability value and an associated certainty greater than or equal to a threshold certainty value.11.The method as claimed in claim 10, wherein when two or more of the plurality of possible beliefs have an associated probability greater than or equal to a threshold probability value and an associated certainty greater than or equal to a threshold certainty value, the method comprises:selecting one out of the two or more possible beliefs having the highest certainty value.12.The method as claimed in claim 9 further comprising determining an overall likelihood score for each possible belief using the calculated probability and calculated certainty, wherein selecting one of the plurality of possible beliefs comprises selecting a possible belief from the plurality of possible beliefs having a highest overall likelihood score.13.The method as claimed in claim 11, wherein the trained ML model is a lightweight model and when the plurality of possible beliefs each have an associated probability below a threshold probability value and an associated certainty below a threshold certainty value, controlling the electronic device based on one of the possible beliefs comprises temporarily pausing taking any action to control the electronic device.14.The method as claimed in claim 13 further comprising:transmitting the input data item to a remote server with a request for the input data item to be processed by a full version of the lightweight model on the server;receiving a server-generated plurality of possible beliefs together with a server-calculated probability and server-calculated certainty for each of the server-generated plurality of possible beliefs;selecting one of the plurality of server-generated possible beliefs; andcontrolling the electronic device using the selected server-generated possible belief.15.A computer-readable storage medium comprising instructions which, when executed by a processor of an electronic device, causes the processor to:receive an input data item for processing;process the input data item using an epistemic neural network of the trained ML model, wherein activation of each output neuron j in the epistemic neural network is the parameter ajof a K-dimensional Dirichlet distribution, by:derive a plurality of possible beliefs from the input data item wherein a belief is an assumption based on information in the input data item,calculate a probability associated with each possible belief, andcalculate a certainty associated with the probability for each possible belief;select one of the plurality of possible beliefs, based on the calculated probability and certainty of the possible beliefs; andcontrol the electronic device based on the selected possible belief.
Citation Information
Patent Citations
Method for locating one or more candidate digital images that are likely candidates for depicting an object - Patent Application 20070122999
JP6889132B2
Systems and methods for image description generation
US20180181832A1
Machine learning for automatic detection of intracranial hemorrhages with uncertainty measures from CT images
US20220293247A1
Object recognition
US20220392209A1
Uncertainty analysis of evidential deep learning neural networks
US20230136209A1