Method for improving accuracy of machine learning models

By employing partial label learning with logical rules, the method improves the accuracy of neuro-symbolic models by generating a new training dataset with possible labels and relationships, addressing the lack of training guarantees in existing methods.

GB2642421AActive Publication Date: 2026-01-14SAMSUNG ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
GB2024007057
Authority / Receiving Office
GB · GB
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-10
Filing Date
2024-05-17
Publication Date
2026-01-14
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

Current techniques for training neuro-symbolic machine learning models lack guarantees on the accuracy of the neural module training process.

Method used

The method employs partial label learning by using a neural module and a symbolic module to generate a new training dataset with possible labels and relationships, then updates the model weights based on logical rules and ground truth labels, ensuring improved training accuracy.

Benefits of technology

This approach provides statistical guarantees on the accuracy of neuro-symbolic models by reducing the training problem to partial label learning, enhancing the model's ability to accurately identify objects and relationships in images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Method for training a neuro-symbolic machine learning model, comprising: for each image depicting at least two objects of a training dataset: inputting the image into a neural module 102, 200, 202 to
Need to check novelty before this filing date? Find Prior Art

Description

Field 5

[001] The present application generally relates to a method and apparatus for improving the accuracy of machine learning, ML, models. In particular, the present application provides a method for training neuro-symbolic ML models through partial label learning that provides guarantees on the success of the training process for a neural module of the neuro-symbolic framework. 10 Background

[002] A growing focus in the advancement of machine learning models is the integration of high-level reasoning with low-level perception. So-called neuro-symbolic frameworks aim to 15 achieve this integration. The potential benefits of neuro-symbolic frameworks are that they require fewer training data, result in smaller models, and have higher accuracy. Typically, neuro-symbolic frameworks comprise several modules in a sequence. The frameworks are said to be stratified. An exemplary stratified framework could comprise a neural module that houses a neural network, a translator module that maps the outputs of the neural module such 20 that they are in an appropriate form to serve as input to a symbolic module.

[003] Current techniques for training neuro-symbolic frameworks do not provide a guarantee on how well the neural module is trained. 25

[004] The applicant has therefore identified the need for an improved method for training neuro-symbolic ML models with improved accuracy. Summary 3D

[005] In a first approach of the present techniques, there is provided a computer-implemented method for training a machine learning, ML, model to perform an image processing task, the method comprising: obtaining a training dataset comprising a plurality of images, each image depicting at least two objects; for each image of the plurality of images: inputting the image into a neural module of the ML model, wherein the neural module is trained 35 to output a bounding box around each object in an image; outputting, from the neural module, a bounding box around each object of the at least two objects in the input image and features of the object in each bounding box; inputting each bounding box and object features output from the neural module into a symbolic module of the ML model, wherein the symbolic module is trained to: output a plurality of possible labels based on the features of the object in each bounding box, and output, for each pair of bounding boxes, a plurality of possible relationships between objects in the pair of bounding boxes; outputting, from the symbolic module, a plurality of possible labels for each bounding box in the image, and a plurality of possible relationships between objects in each pair of bounding boxes; generating a new partially-labelled training dataset comprising the training dataset, the bounding boxes output from the neural model and the possible labels and possible relationships output by the symbolic module for each image of the training dataset; and training the ML model by: calculating a loss by comparing the plurality of possible labels and the plurality of possible relationships derived for each image with a ground truth label for the image; and updating weights of one or both of the neural module and the symbolic module based on the calculated loss.

[006] Typically, when neuro-symbolic ML models are trained, there are no guarantees on how well the ML models have been trained. Advantageously, the present techniques provide a training method which improves how well the ML model is trained, by reducing the training problem to that of partial label learning. In other words, the present techniques train the neural module through partial label learning, rather than conventional multi-class learning techniques.

[007] Consider the following problem. It is desirable to understand an image depicting at least two objects. For example, an image may be of the inside of a room in a house, and may depict a spoon inside a bowl, and the bowl on a table. A neuro-symbolic ML model may be trained to detect and label the three objects: spoon, bowl, table. The neuro-symbolic ML model may also be trained to generate relationships between the at least two objects, such as “the spoon is on the table”, “the spoon is inside the bowl”, etc. This may enable visual understanding of the scene depicted in the image. Similarly, an image may be of a tennis match, and may depict two players, where one of the players is shown hitting the tennis ball. The neuro-symbolic ML model may be trained to detect and label the objects: tennis ball, tennis racket 1, tennis racket 2, net, player 1, player 2. tennis court, etc. The model may also generate relationships between the objects, such as “player 1 and player 2 are playing a game of tennis”, “player 1 is holding a tennis racket”, “tennis racket 1 is in contact with a tennis ball”, etc. However, in both examples, it is desirable to check the accuracy of the labels and the relationships generated by the ML model. This is particularly important in cases where the neuro-symbolic ML model is to be used to control an electronic device, such as an autonomous vehicle or robotic device. It is also advantageous in cases where the ML model is to be used by humans (such as gallery search, question answering, augmented reality, etc) to enhance the user experience.

[008] The present techniques reduce the problem of determining how well a neuro-symbolic ML model has been trained to one of partial label learning, which is a well-understood problem and technique.

[009] Partial label learning is a technique for training a ML model, such as one comprising an image classifier, using data that is partially labelled. For example, an image depicting two people playing tennis may be labelled as “person A and person B playing tennis”. This is a partial label because you do not which person in the image is person A and which person in the image is person B. For a static image, this may not matter, but if the image is one of a series of frames from a video depicting the tennis match, it is going to be helpful to know which person is which so that each person’s activity can be tracked across the frames. Similarly, the image mentioned above of the inside of a house may be labelled with “a spoon and bowl on a table”, but it may not be clear which object is the spoon and which is the bowl, or that the spoon is in the bowl. A robotic home assistant device may need to know which object is which because it may be tasked with finding and retrieving the bowl.

[010] Thus, in order to train a neuro-symbolic ML model, the present techniques first use the neural module and symbolic module of the ML model in the normal way, to identify objects in an image, predict a plurality of possible labels for them, and predict a plurality of possible relationships between them. For example, in the tennis example, the image may depict two people playing tennis, as well as an umpire (who watches the game and enforces the rules), and a ball girl or ball boy (who retrieve and supply balls for the players). The label for the image - “person A and person B playing tennis” - does not make it clear which of the four people depicted are playing tennis. Thus, for each person, there may be four possible labels: player 1, player 2, umpire, ball girl / boy. For each person, there is a relationship with other objects and people in the image. Only one of the labels and relationships for each object is correct out of the set of possible labels and possible relationships, as required by partial label learning. These possible labels and relationships are then used to generate a new version of the original training dataset, and used to retrain the neuro-symbolic ML model.

[011] Thus, partial labels for each input image are generated using techniques from logic (i.e. logical reasoning) in order to implement the partial label learning. Rather than taking the conventional form of training dataset where information on the ground-truth class is provided, the training data for the neuro-symbolic ML model comprises information on a target output of a logical theory of the symbolic module. This particular form of the training dataset means that training neural modules is less well-controlled than for conventional training techniques. By adopting techniques from logic and adapting the architecture of the neural module, the present techniques provide guarantees on the learnability of the neural module.

[012] Outputting, from the symbolic module, a plurality of possible labels may comprise: generating, using a set of logical rules specifying constraints specific to the training dataset and the features of the object in each bounding box, the plurality of possible labels for the object in each bounding box, wherein the set of logical rules constrain the possible labels to be specific to the training dataset. For example, if the aim of the machine learning model is to perform the addition of two integers to obtain a known target total, where the two integers are obtained in the form of two images of single digits, then the set of logical rules may comprise combinations of integers whose sum would equal the target total. The rules constrain the predictions made by the symbolic module. Similarly, in the tennis example, the aim of the ML model may be to understand who in the image is playing tennis. The rules in this case may include the rules of tennis, such as that there are two players, the game involves rackets and a ball, and each player stands on either side of a net. This may help to narrow down which of the four people are playing tennis, and which people are umpiring or retrieving balls.

[013] Outputting, from the symbolic module, a plurality of possible relationships comprises, for each pair of bounding boxes in an image, may comprise: generating, using a set of logical rules specifying constraints specific to the training dataset and the plurality of possible labels for the object in each bounding box of the pair of bounding boxes, the plurality of possible relationships between the objects in the pair of bounding boxes, wherein the set of logical rules constrain the possible relationships to be specific to the training dataset. As noted above, the rules help to constrain the possible outputs of the symbolic module. In this case, the rules may help to determine the relationships between objects. For example, “player 1 is holding a racket”, “the ball girl is standing by the net”, and “player 1 is playing a tennis match against player 2”.

[014] In some cases, the image being processed may be a single image or frame of a video. In this case, the generating may comprise using a set of logical rules defining likely relationships for objects within a single image or frame. That is, the logical rules may define local rules for single images / frames. For example, if an image shows one person walking across a road, then there is a good chance other people in the image may also be walking across the road. One rule may be therefore that if two objects are close to each other in the same image / frame, then they are likely to be performing the same action. Similarly, if there are many people in the same image (e.g. image of a start line for a marathon or image of people inside a supermarket), then they may all be doing the same thing.

[015] In some cases, the image being processed may not be a single image / frame, but may comprise a plurality of adjacent frames of a video. In this case, above-mentioned rules may apply to each individual frame, but the generating may also comprise using a set of logical rules defining likely relationships for objects appearing in adjacent frames. That is, the logical rules may define global rules that apply across adjacent frames. For example, if a bounding box is placed around an object in substantially the same position in adjacent frames, then it is highly likely that each bounding box shows the same object.

[016] The logical rules may be or comprise general logical rules. For example, the logical rules may include arithmetic or other mathematical operations, or be based on laws of physics, which must hold true in all scenarios.

[017] The logical rules may be or comprise rules that are constructed by a human user or operator and be based on real-life scenarios. For example, for images depicting a group of people crossing a road, the fact that one actor in the image has been classified as walking, and that another actor has been identified in close proximity to the walking actor, may be used to infer that the identified actor is also walking. In other words, a logical rule may be constructed to stipulate that actors in close proximity to other actors performing an action are necessarily also performing the same action.

[018] In some cases, the image processing task may comprise scene graph generation, and the method may comprise outputting, from the ML model, a scene graph. A scene graph is a data structure which arranges and represents logical connections objects in a scene. For example, if the input image shows a spoon inside a bowl on a table, the scene graph generated using the outputs of the neural and symbolic modules may be a graph with a node corresponding to the spoon, a node corresponding to the bowl, a node corresponding to the table, and a directed edge between these the spoon and bowl nodes indicating the relationship between the spoon and the bowl, and a directed edge between the bowl and table nodes indicating the relationship between the bowl and table. The graph may indicate that the spoon is inside the bowl (correct relationship), or that the bowl is inside the spoon (incorrect relationship).

[019] In some cases, the image processing task may comprise action recognition. In this case, outputting, from the neural module, a bounding box around the at least two objects may comprise outputting a bounding box around the at least two actors within the image; and outputting, from the symbolic module, a plurality of possible labels and a plurality of possible relationships may comprise outputting a plurality of possible actions performed by each actor, and a plurality of possible relationships between the actors in each pair of bounding boxes. An actor is any human or animal who is performing an action in an image or video.

[020] In one example of the present techniques, training of the neuro-symbolic model involves using visual question answering. Visual question answering is the idea of answering a question about an input image, to thereby better understand the contents of the image. For example, for the image depicting a tennis match, a question might be “what is the tennis player holding?” and an answer to the question may be “a tennis racket’. To do so, the ML model may further comprise a semantic parsing module. In this case, obtaining a training dataset may comprise obtaining a training dataset comprising a plurality of images, and at least one question and answer pair for each image, wherein the question is a natural language question related to the at least two objects in the image and the answer is a ground truth natural language answer to the question.

[021] In this example, the method may further comprise, for each image: inputting the question of the at least one question and answer pair into the semantic parsing module; and generating, using the semantic parsing module, a programmatic query concerning the at least two objects in the image, wherein the programmatic query asks whether there is a connection between the at least two objects.

[022] In this example, the method may further comprise, for each image: inputting the programmatic query into the symbolic module of the ML model; wherein outputting, from the symbolic module, a plurality of possible relationships comprises outputting a plurality of possible relationships which satisfy the programmatic query.

[023] In this example, training the ML model may further comprise training the ML model by: generating, using the semantic parsing module of the ML model, a natural language answer to the question of the at least one question answer pair; calculating a further loss by comparing the generated answer to the ground truth answer; and updating weights of one or both of the neural module and the symbolic module based on the calculated further loss.

[024] In a second approach of the present techniques, there is provided a method for controlling an electronic device using a trained machine learning, ML, model (where the model has been trained using the techniques described herein), the method comprising: receiving an input image for processing, the input image depicting at least two objects; processing the input image by: using a trained neural module of the trained ML model to output a bounding box around each object in the input image and features of the object in each bounding box; and using a trained symbolic module of the trained ML model to output a label for the object in each bounding box and to output a relationship between the at least two objects depicted in the image; and controlling the electronic device based on the labels for the at least two objects and the relationship between the objects.

[025] In a third approach of the present techniques, there is provided an electronic device comprising: at least one processor coupled to memory, for: receiving an input image for processing, the input image depicting at least two objects; processing the input image by: using a trained neural module of a trained ML model to output a bounding box around each object in the input image and features of the object in each bounding box; and using a trained symbolic module of the trained ML model to output a label for the object in each bounding box and to output a relationship between the at least two objects depicted in the image; and controlling the electronic device based on the labels for the at least two objects and the relationship between the objects.

[026] The following features apply equally to the second and third approaches.

[027] 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, smart oven or smart vacuum cleaner). It will be understood that this is a non-exhaustive and non-limiting list of example devices.

[028] The electronic device may further comprise at least one image capture device for capturing the input image.

[029] In one example, the electronic device may be a controllable autonomous or semi-autonomous electronic device for performing a task in an environment comprising at least two objects. In this case, the input image may be an image captured of the environment; and the at least one processor may control the autonomous or semi-autonomous electronic device using the labels for the at least two objects and the relationship between the objects.

[030] For example, the environment may be a home or kitchen, or other domestic, office or factory / warehouse environment, in which the controllable electronic device is performing a task, such as moving an object relative to another object.

[031] The electronic device may further comprise at least one gripper. The at least one processor may control the gripper to interact with one or more of the at least two objects based on the labels for the at least two objects and the relationship between the objects.

[032] For example, the controllable electronic device may need to pick up a spoon from a bowl - in this example, the environment comprises at least the bowl and the spoon, both of which are objects in the environment. In this example, the controllable electronic device is controlled to move the bowl and the spoon relative to each other in a logically consistent manner. The controllable electronic device needs to understand that the spoon is inside the bowl, so that the spoon can be picked up.

[033] The electronic device may further comprise a system for moving the electronic device through the environment. The at least one processor may control the system based on the labels for the at least two objects and the relationship between the objects, so that the device does not bump into objects or try to move through solid objects.

[034] In another example, the electronic device may be a wearable augmented reality device for controlling virtual objects blended into a real-world environment comprising at least one real object. Here, the input image may be an image of the real-world environment; and the at least one processor may use the labels for the at least two objects and the relationship between the objects to control virtual objects correctly with respect to the at least one real object. This may be useful so that the virtual objects correctly interact with the real-world object(s) and do not violate any physical rules of the real-world environment.

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

[036] The apparatus may be a constrained-resource device, but which has the minimum hardware capabilities to use a trained neural network / ML model. The apparatus 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 apparatuses.

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

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

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

[040] 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 subcomponents 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.

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

[042] The techniques further provide processor control code to implement the abovedescribed 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.

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

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

[045] 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 5 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 10 performs neural network computation by computation between a result of computation by a previous layer and the plurality of weight values.

[046] As mentioned above, the present techniques may be implemented using an Al model. A function associated with Al may be performed through the non-volatile memory, the volatile 15 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 Al-dedicated processor such as a neural processing unit (NPU). The one or a 20 plurality of processors control the processing of the input data in accordance with a predefined operating rule or artificial intelligence (Al) 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 Al model of a 25 desired characteristic is made. The learning may be performed in a device itself in which Al according to an embodiment is performed, and / o may be implemented through a separate server / system.

[047] The Al model may consist of a plurality of neural network layers. Each layer has a 3D 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), 35 and deep Q-networks.

[048] 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. Brief description of the drawings

[049] Implementations of the present techniques will now be described, by way of example only, with reference to the accompanying drawings, in which:

[050] Figure 1 is a block diagram of a neuro-symbolic machine learning, ML, model;

[051] Figure 2 is a schematic diagram illustrating how a neuro-symbolic ML model can be trained using partial-label learning;

[052] Figure 3 is a flowchart of example steps in a method for training a machine learning model to perform an image processing task;

[053] Figure 4 is a schematic diagram of an example in which the neuro-symbolic model is trained by using visual question answering;

[054] Figure 5 is a flowchart of example steps for controlling an electronic device using a trained machine learning, ML, model;

[055] Figure 6 is a block diagram of an electronic device, which can be controlled based on the outputs of a trained ML model; and

[056] Figure 7 shows an example image, and a set of rules used to infer new knowledge or relationships based on low-level predictions made for the image. Detailed description of the drawings

[057] Broadly speaking, embodiments of the present techniques provide a method for training neuro-symbolic ML models through partial label learning, to improve the accuracy of the predictions of the ML models. Advantageously, the present techniques provide a training method which improves how well the ML model is trained, by reducing the training problem to that of partial label learning. In other words, the present techniques train the neural module through partial label learning, rather than conventional multi-class learning techniques.

[058] Training deep machine learning models, such as deep neural networks, is a data-hungry task. Logic has been proposed as a means to train deep models in a weak fashion, overcoming the need to provide annotated labelled data, which can be very time-consuming to label. Multiple so-called neurosymbolic techniques have been proposed for training deep models using logical theories and symbolic constraints.

[059] Neurosymbolic techniques have shown their merits in a multitude of scenarios including visual question answering (VQA) (i.e., answering queries over input images), and scene graph generation (i.e., understanding the objects occurring in an image and their interrelations). An example of a neurosymbolic technique is that of DeepProbLog (Robin Manhaeve et al.). DeepProbLog proposes an architecture in which a logical theory is used to reason over the predictions of neural classifiers, by treating the predictions of the neural classifiers as probabilistic facts.

[060] Despite its merits, DeepProbLog-based training faces many limitations, which are described below in relation to several examples based on VQA. In brief, the limitations relate to using very weak supervision signal as, thus, distracting the classifier (see Example 2 below), using contradicting supervision signals (see Example 3 below), and not taking into account proper side-away information (see Example 4 below). The present techniques aim to address the limitations described in more detail below.

[061] Figure 1 is a block diagram of a neuro-symbolic machine learning, ML, model 100. The ML model 100 comprises a neural module n 102, a translator module r 104 and a symbolic module s 106. It will be appreciated that the term “neuro-symbolic framework” is used interchangeably herein with “neuro-symbolic machine learning model”. ML models configured in this manner, wherein the modules are arranged in a sequence, are termed stratified neuro-symbolic frameworks.

[062] Each module 102, 104, 106 in such frameworks can be understood to be performing a mapping of its inputs, wherein each mapping provides an output. The outputs of these mappings comprise the outputs of each module. The function of the neural module 102 is to perform a mapping of an input vector x 108, where the output of the neural module is of an appropriate form to serve as input to a translator module 104. Correspondingly, the primary function of the translator module 104 is to transform the output of the neural module 102 such that the output of the translator module 104 is of an appropriate form to serve as input to a symbolic module 106.

[063] The symbolic module 106 adopts a logical theory T, and the mapping of the symbolic module 106 has a target output Q 110 when logically reasoning over the output provided by translator module. In the context of image classification tasks, conventional models (i.e. models that are not neuro-symbolic frameworks) are trained on training data of the form (x, y), where % is an input vector an y is a label providing information on the ground-truth class of x. In other words, y is the ground-truth label of the input vector x and the target of conventional models is to learn the ground-truth labels. However, for models that are neuro-symbolic frameworks, rather than taking the conventional form (x,y), the training data takes the form (x, Q). Here, Q is a target output of the symbolic module s. That is, in the context of neuro-symbolic frameworks, the training data provides no information on the ground-truth class of x. Instead, the training data provides information on a target output Q of a symbolic module s under a logical theory T.

[064] The target output Q is best understood as follows. During the process of training a neuro-symbolic framework, the neural module n provides a set of predicted classifications Y given the input feature vector x. In a conventional training process, the loss function is evaluated at this stage by comparing the set of predicted classifications Y with the corresponding labels. However, rather than evaluating the loss function at this stage, neuro-symbolic frameworks process the predicted classifications further using the translator r and symbolic s modules. The primary purpose of the translator module r is to translate the predictions Y into a form that is suitable for performing logical reasoning over the predictions. That is, the translator module 104 maps the predictions from the form Y provided by the neural module 102 to a set of translated predictions A such that logical reasoning may be performed by the symbolic module s over the translated predictions A.

[065] Logical reasoning is performed by a symbolic module 106 according to the rules of a logical theory T. That is, the result of the logical reasoning by the symbolic module 106 is an output q. However, the symbolic module 106 may have a target output Q. In order to have reached the target output Q, the translated predictions A, and therefore the neural module 102 predictions Y should have taken a particular form or adopted specific values in order to reach the target output Q. As a result, it is not possible to evaluate a loss function using the direct output of the neural module 102. Instead, it is necessary to also account for the output of the symbolic module 106.

[066] Therefore, the training of neuro-symbolic frameworks is less well-defined than the training of conventional machine lea'":-----,-1- iu-t use ground-truth class information. In particular, current techniques for training neuro-symbolic frameworks do not provide guarantees on how well the neural modules in such frameworks are trained.

[067] The present techniques aim to provide statistical guarantees on the accuracy of neural modules in neuro-symbolic frameworks. A key idea behind the present techniques is the reduction of the task of conventional multi-class learning to a task of partial label learning. The task of conventional multi-class learning is now briefly summarised to illustrate the difference with partial label learning.

[068] Multi-class learning: LetX denote the input space and y = {1,..., c} denote the output space. Let p be a density function over X x y. The goal of conventional multi-class learning is to learn a classifier g:X -> Rc that minimizes an estimator 52(g) = E[^(g(X), ey)] with E denoting expectation, (X, X) denoting pairs of random variables (RVs) distributed according to p, { denoting a proper loss function, i.e., a function that is continuous, non-negative and becomes zero when its two arguments are equal, and eY denoting the one-hot encoding vector.

[069] The difference between conventional multi-class learning and partial label learning is that the training data is not of the form (x,^ e X x y but of the form (x,.s) e X x 5, where £ includes each element in the powerset of y apart from the 0 and y itself. That is, for each x we are provided with a set of labels instead of a single label. The only requirement is that the target set must include the actual label of x.

[070] Partial-label learning: Let p' be a density function over X xS. The goal of partial label learning is to learn a classifier g: X Rc that minimizes an estimator 31pliS&) = ^pll(sW> ^)] with (X,S) denoting pairs of RVs distributed according to p' and £PLL denoting a proper loss function. Therefore, the primary difference between ordinary multi-class learning and partial label learning is the form of the training data; instead of being provided with a single label corresponding to the ground-truth class of each input vector x, a plurality of labels is provided.

[071] To reduce the task of conventional multi-class learning to a task of partial label learning, techniques from logic are used, with consequential modifications made to the architecture of the neural module 102. In particular, logical abduction or abductive reasoning may be used. A brief summary of the concepts used from abduction will now be provided. However, it will be appreciated that logical abduction / abductive reasoning is provided by way of example only, and that other forms of logical reasoning may be used.

[072] Abduction: Abductive reasoning is about finding the root causes of an observation. So, abductive reasoning aims to tell you *all the possible reasons* something holds. For example, suppose that you want to ask if there is a path from node a to node c in a graph (this becomes your query Q = path(a,c)). Suppose that the theory tells you that there is a path between two nodes, if either these two nodes are connected via an edge, or if there are paths via an intermediate node, i.e., theory T has the two rules: edge(X,Y) => path(X,Y) path(X,Z) AND path(Z,Y) => path(X,Y) Finally, suppose that you have the following edges: edge(a,b), edge(b,c), edge(a,d), edge(d,c). Then, abduction will return you all the possible ways a path is formed between a and b, i.e., (p = edge(a,b) AND edge(b,c) OR edge(a,d) AND edge(d,c).

[073] In the case of logical abduction, the aim of abductive reasoning is to find or calculate abductive formulae <p given a logical theory T, a plurality of abducible predicates JI, a set of integrity constraints 2 and a user query Q, such that T u <p i= Q and T u <p i= S. Each abductive formula <p may be a combination of disjunctions and conjunctions. In essence, the plurality of abducible predicates JI serves as the primary input into the abductive reasoning. In the context of abduction for the training of neuro-symbolic frameworks, the plurality of abducible predicates JI may be generated from an initial training dataset. The plurality of abducible predicates JI may be generated by a translator module 104 from an initial training dataset by obtaining an initial training dataset; processing, using a neural module 102, the initial training dataset to generate a processing result; and translating, using a translator module 104, the processing result into a plurality of abducible parameters.

[074] The present techniques use logical theories T where is a disjunction over conjunctions, where each conjunction includes c / Z-atoms only. Each conjunction is referred to as an explanation. In other words, the aim of abductive reasoning may also be understood as calculating a plurality of conjunctions or, equivalently, a plurality of logical explanations e. With respect to abduction, the explanations may be in the form of abductive formulae. The plurality of logical explanations, calculated using abduction and a plurality of abducible predicates, may be used to modify the architecture of the neural module 102. As noted above, it will be appreciated modifying the architecture of the neural module 102 using abduction as a form of logical reasoning is provided by way of example only, and that other appropriate forms of logical reasoning may be used. In other words, logical reasoning may be used to modify the architecture of a neural module 102 according to the present techniques.

[075] Figure 2 is a schematic diagram illustrating how a neuro-symbolic ML model can be trained using partial-label learning. The training method is illustrated using an exemplary task of training a neuro-symbolic framework for the addition of two digits using abduction. In this example, the neural module 102 identifies that the input images contain single digits. In this example, the neural module 102 comprises a first deep neural network, DNN, 200 and a second deep neural network, DNN 202, the two deep neural networks configured to extract features of input images in order for the images to be classified. It will be understood that a single DNN or multiple DNNs may be sufficient for analysing the input images, and that the specific example shown in Figure 2 is non-limiting. In this specific example, the DNN outputs features that can be used to determine that the image depicts any of the integers between 0 and 9. That is, each of the DNNs provides an output which indicates the digit in the corresponding image may be any of the integers {0,...,9}. Thus, in the example shown in Figure w, the first and second DNNs are provided with a first image 204 and a second image 206, each depicting a digit, as input. Therefore, for each image, there is a total of ten possibilities for the digit being depicted in the image.

[076] Thus, in terms of the sum of the two digits, there is a space of 100 possible explanations for the sum. For instance, the features extracted using the first DNN 200 may suggest the integer 2 is depicted in image 204, while the features extracted using the second DNN 202 may suggest the integer 4 is depicted in image 204. Therefore, a possible explanation for the sum may be 6.

[077] An additional output layer L' 208 is shown in Figure 2. As noted above, the additional output layer 208 may have the same number of nodes as the number of explanations in the plurality of logical explanations. In this case, the additional output layer comprises 100 neurons, as there are 100 explanations (i.e. possible outcomes) in the plurality of logical explanations.

[078] Furthermore, for each of the i nodes in L', an edge is added from the j-th node in the original output layer L (i.e. the output layer before the introduction of the additional output layer) to the additional output layer, wherein an edge is only added in the case that the translator mapping r( / ) of the j-th neuron in L' occurs in the i-th explanation in e. Here, the term “edge” is used to mean a non-zero weight between two nodes of a neural network.

[079] As noted above, the method comprises generating, from the initial training dataset, a modified training dataset, wherein the initial training dataset is of the form (x, Q), where Q is a target output of a logical theory T and x is an input feature vector. In this example, the logical theory T corresponds to the arithmetic rules of addition encoded in a logical form, and the target output Q corresponds to a chosen target sum for the addition of two digits. In this case, the target sum is chosen to be 5, denoted as sumQ^Iz, 5), where and I2 correspond to the integers depicted in the images provided as input to the first and second DNNs, respectively. The input feature vector corresponds to a representation of the input image. For example, the input feature vector may correspond to a matrix of pixel brightnesses.

[080] As noted above, the generation of the modified training dataset may comprise, for each data item in the initial training dataset: calculating, using the logical theory of the symbolic module 106, an abductive formula, the abductive formula comprising a plurality of logical explanations. The example shown in Figure 2 shows an example of such a calculation for single entry in the initial training dataset, the first image 204 depicting the integer 1 and the second image 206 depicting the integer 4. An example of an abductive formula comprising a plurality of logical explanations 210 is shown in Figure 2. The plurality of logical explanations comprises the possible combinations of classified digits that satisfy the target output, which is that the integers of depicted in the first and second images sum to 5. Each explanation in the plurality of logical explanations is assigned a corresponding label, denoted label l15,..., label l24, to generate a plurality of partial labels 212. A modified training dataset 214 is generated by combining the plurality of partial labels 212 with the plurality of logical explanations 210 of the abductive formula.

[081] According to the present techniques, the partial label learning comprises the minimization of a loss function. Without loss of generality, the loss function ■?PLL(n(X),S) = minies^(n(X),S) (1) may be minimized as part of the partial label learning of the neural module, where fPLL is the partial label learning, PLL, loss and £ is a conventional loss function, such as the cross-entropy loss or mean-squared error loss functions. It will be appreciated that the loss function shown in Eq. (1) above is provided by way of example only, and that other appropriate loss functions may be used. The use of the loss function in Eq. (1) results in the following well-known bound for partial label learning on the difference between the empirical risk classifier and an optimal classifier: if! I, f2\ ^PLlCnpLL) ~ ^-PLL^pll) 4 V2|g|p } Xm (gyJ + 2M J (2) y=l / where hPLL is the empirical risk classifier, is the optimal classifier, m is the size of the training set and (£y) is the expected Rademacher complexity of My for nand My is the function space for label y e {1,..., |£|] defined as {h: x -> ny(x)|n e £} with £ being the space of classifiers. It will be appreciated that it is possible to obtain alternative bounds via other partial label learning techniques. The bounds essentially provide guarantees on the accuracy of the trained model.

[082] Figure 3 is a flowchart of example steps in a method for training a machine learning model to perform an image processing task. The method comprises: obtaining a training dataset comprising a plurality of images, each image depicting at least two objects (step S100); for each image of the plurality of images: inputting the image into a neural module of the ML model, wherein the neural module is trained to output a bounding box around each object in an image; outputting, from the neural module, a bounding box around the at least two objects in the input image and features of the object in each bounding box (step S102); inputting the output from the neural module into a symbolic module of the ML model, wherein the symbolic module is trained to: output a plurality of possible labels based on the features of the object in each bounding box, and output a plurality of possible relationships between objects in each pair of bounding boxes; outputting, from the symbolic module, a plurality of possible labels derived for each bounding box in the image, and a plurality of possible relationships between objects in each pair of bounding boxes (step S104); generating a new partially-labelled training dataset comprising the training dataset and the bounding boxes output from the neural model and the possible labels and possible relationships output by the symbolic module for each image of the training dataset (step S106); and training the ML model (step S108) by: calculating a loss by comparing the plurality of possible labels and the plurality of possible relationships derived for each image with a ground truth label for the image; and updating weights of one or both of the neural module and the symbolic module based on the calculated loss.

[083] At step S104, outputting, from the symbolic module, a plurality of possible labels may comprise: generating, using a set of logical rules specifying constraints specific to the training dataset and the features of the object in each bounding box, the plurality of possible labels for the object in each bounding box. For example, if the aim of the machine learning model is to perform the addition of two integers to obtain a known target total, where the two integers are obtained in the form of two images of single digits, then the set of logical rules may comprise combinations of integers whose sum would equal the target total. The rules constrain the predictions made by the symbolic module. Similarly, in the tennis example, the aim of the ML model may be to understand who in the image is playing tennis. The rules in this case may include the rules of tennis, such as that there are two players, the game involves rackets and a ball, and each player stands on either side of a net. This may help to narrow down which of the four people are playing tennis, and which people are umpiring or retrieving balls.

[084] At step S104, outputting, from the symbolic module, plurality of possible relationships comprises, for each pair of bounding boxes in an image, may comprise: generating, using a set of logical rules specifying constraints specific to the training dataset and the plurality of possible labels for the object in each bounding box of the pair of bounding boxes, the plurality of possible relationships between the objects in the pair of bounding boxes. As noted above, the rules help to constrain the possible outputs of the symbolic module. In this case, the rules may help to determine the relationships between objects. For example, “player 1 is holding a racket”, “the ball girl is standing by the net”, and “player 1 is playing a tennis match against player 2”.

[085] In some cases, the image being processed may be a single image or frame of a video. In this case, the generating may comprise using a set of logical rules defining likely relationships for objects within a single image or frame. That is, the logical rules may define local rules for single images / frames. For example, if an image shows one person walking across a road, then there is a good chance other people in the image may also be walking across the road. One rule may be therefore that if two objects are close to each other in the same image / frame, then they are likely to be performing the same action. Similarly, if there are many people in the same image (e.g. image of a start line for a marathon or image of people inside a supermarket), then they may all be doing the same thing.

[086] In some cases, the image being processed may not be a single image / frame, but may comprise a plurality of adjacent frames of a video. In this case, above-mentioned rules may apply to each individual frame, but the generating may also comprise using a set of logical rules defining likely relationships for objects appearing in adjacent frames. That is, the logical rules may define global rules that apply across adjacent frames. For example, if a bounding box is placed around an object in substantially the same position in adjacent frames, then it is highly likely that each bounding box shows the same object.

[087] The logical rules may be or comprise general logical rules. For example, the logical rules may include arithmetic or other mathematical operations, or be based on laws of physics, which must hold true in all scenarios.

[088] The logical rules may be or comprise rules that are constructed by a human user or operator and be based on real-life scenarios. For example, for images depicting a group of people crossing a road, the fact that one actor in the image has been classified as walking, and that another actor has been identified in close proximity to the walking actor, may be used to infer that the identified actor is also walking. In other words, a logical rule may be constructed to stipulate that actors in close proximity to other actors performing an action are necessarily also performing the same action.

[089] The set of logical rules is now explained in more detail. Figure 7 shows an example image, and a set of rules used to infer new knowledge or relationships based on low-level predictions made for the image. Similarly to the example illustrated in relation to Figure 3 above, logical theories T that are more complex than those governing arithmetic operations may be constructed. A logical theory T comprising a number of logical rules may be constructed to make inferences about the features or characteristics of images. For example, a logical rule may be constructed to stipulate that if many actors in a given image are performing the same action, then all actors are performing that action. Another logical rule may be constructed to stipulate that actors in a given image in close proximity to one another are performing the same action. In this specific example, the rules may include the five rules shown in Figure 7, where rules involving lowercase a are defined for each action a (e.g. singing, walking, etc.). These rules relate to the following: • R1 corresponds to beliefs about local predictions. • R2 expresses the belief that if many actors in the current frame are doing a particular action, then perhaps everyone is doing that action. The FRAMELABEL predicate accumulates the LOCAL activity beliefs for all actors in the frame. • R3 enforces the effect of proximity on activity, where actors that are close in the same frame are likely to perform the same action. • R4 is used for identity maintenance and tracking. It says that if two bounding boxes occur in adjacent frames and their positions have not changed significantly, then they are likely the same actor. • It can then be reasoned, in R5, that if two bounding boxes (in adjacent frames) refer to the same actor, then they are likely to be doing the same activity.

[090] In the example shown in Figure 7, an image 700 may depict a plurality of actors with bounding boxes. A neuro-symbolic framework may infer that the bounding box 702 depicts a person walking. By applying a logical rule, which stipulates that actors in close proximity to an actor performing a particular action are also performing that action, a neuro-symbolic framework may infer that bounding boxes 704 and 706 also depict people walking. The present techniques provide a way of training neuro-symbolic frameworks, for performing inferences like those in Figure 7, which provides guarantees on how well the neural modules of such frameworks is trained.

[091] Returning to Figure 3, in some cases, the image processing task may comprise scene graph generation, and the method may comprise outputting, from the ML model, a scene graph. A scene graph is a data structure which arranges and represents logical connections objects in a scene. For example, if the input image shows a spoon inside a bowl on a table, the scene graph generated using the outputs of the neural and symbolic modules may be a graph with a node corresponding to the spoon, a node corresponding to the bowl, a node corresponding to the table, and a directed edge between these the spoon and bowl nodes indicating the relationship between the spoon and the bowl, and a directed edge between the bowl and table nodes indicating the relationship between the bowl and table. The graph may indicate that the spoon is inside the bowl (correct relationship), or that the bowl is inside the spoon (incorrect relationship).

[092] In some cases, the image processing task may comprise action recognition. In this case, outputting, from the neural module, a bounding box around the at least two objects may comprise outputting a bounding box around the at least two actors within the image; and outputting, from the symbolic module, a plurality of possible labels and a plurality of possible relationships may comprise outputting a plurality of possible actions performed by each actor, and a plurality of possible relationships between the actors in each pair of bounding boxes.

[093] Figure 4 is a schematic diagram of an example in which the neuro-symbolic model is trained by using visual question answering. Visual question answering is the idea of answering a question about an input image, to thereby better understand the contents of the image. For example, for the image depicting a tennis match, a question might be “what is the tennis player holding?” and an answer to the question may be “a tennis racket”. To do so, the ML model may further comprise a semantic parsing module 400. In this case, obtaining a training dataset may comprise obtaining a training dataset comprising a plurality of images, and at least one question and answer pair for each image, where the question is a natural language question related to the at least two objects in the image and the answer is a ground truth natural language answer to the question. In Figure 4, a single image is shown together with a single question and answer pair, for the sake of simplicity.

[094] In this example, the method may further comprise, for each image: inputting the question of the at least one question and answer pair into the semantic parsing module 400; and generating, using the semantic parsing module 400 of the ML model, a programmatic query concerning the at least two objects in the image.

[095] In this example, the method may further comprise, for each image: inputting the programmatic query into the symbolic module 106 of the ML model; wherein outputting, from the symbolic module 106, a plurality of possible relationships comprises outputting a plurality of possible relationships which satisfy the programmatic query.

[096] In this example, training the ML model may further comprise training the ML model by: generating a natural language answer to the question of the at least one question answer pair; calculating a further loss by comparing the generated answer to the ground truth answer; and updating weights of one or both of the neural module and the symbolic module based on the calculated further loss.

[097] Figure 5 is a flowchart of example steps for controlling an electronic device using a trained machine learning, ML, model (where the model has been trained using the techniques described herein). The method comprises: receiving an input image for processing, the input image depicting at least two objects (step S500); processing the input image by: using a trained neural module of the trained ML model to output a bounding box around each object in the input image and features of the object in each bounding box (step S502); and using a trained symbolic module of the trained ML model to output a label for the object in each bounding box and a relationship between the at least two objects depicted in the image (step S504); and controlling the electronic device based on the labels for the at least two objects and the relationship between the objects (step S506).

[098] Figure 6 is a block diagram of an electronic device 600, which can be controlled based on the outputs of a trained ML model 100. The electronic device comprises at least one processor 602 coupled to memory 604, and storage 606.

[099] The processor 602 may comprise one or more of: a microprocessor, a microcontroller, and an integrated circuit. The memory 604 may comprise volatile memory, such as random access memory (RAM), for use as temporary memory, and / or non-volatile memory such as Flash, read only memory (ROM), or electrically erasable programmable ROM (EEPROM), for storing data, programs, or instructions, for example.

[100] The processor 602 may be arranged for: receiving an input image for processing, the input image depicting at least two objects; processing the input image by: using a trained neural module of a trained ML model to output a bounding box around each object in the input image and features of the object in each bounding box; and using a trained symbolic module of the trained M L model to output a label for the object in each bounding box and a relationship between the at least two objects depicted in the image; and controlling the electronic device based on the labels for the at least two objects and the relationship between the objects.

[101] The following features apply equally to Figures 5 and 6.

[102] The electronic device 600 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, smart oven or smart vacuum cleaner). It will be understood that this is a non-exhaustive and non-limiting list of example devices.

[103] The electronic device 600 may further comprise at least one image capture device 608 for capturing the input image.

[104] In one example, the electronic device 600 may be a controllable autonomous or semi-autonomous electronic device for performing a task in an environment comprising at least two objects. In this case, the input image may be an image captured of the environment; and the at least one processor may control the autonomous or semi-autonomous electronic device using the labels for the at least two objects and the relationship between the objects.

[105] For example, the environment may be a home or kitchen, or other domestic, office or factory / warehouse environment, in which the controllable electronic device is performing a task, such as moving an object relative to another object.

[106] The electronic device 600 may further comprise at least one gripper (not shown). The at least one processor may control the gripper to interact with one or more of the at least two objects based on the labels for the at least two objects and the relationship between the objects.

[107] For example, the controllable electronic device may need to pick up a spoon from a bowl - in this example, the environment comprises at least the bowl and the spoon, both of which are objects in the environment. In this example, the controllable electronic device is controlled to move the bowl and the spoon relative to each other in a logically consistent manner. The controllable electronic device needs to understand that the spoon is inside the bowl, so that the spoon can be picked up.

[108] The electronic device 600 may further comprise a system (not shown) for moving the electronic device through the environment. The at least one processor may control the system based on the labels for the at least two objects and the relationship between the objects, so that the device does not bump into objects or try to move through solid objects.

[109] In another example, the electronic device may be a wearable augmented reality device for controlling virtual objects blended into a real-world environment comprising at least one real object. Here, the input image may be an image of the real-world environment; and the at least one processor may use the labels for the at least two objects and the relationship between the objects to control virtual objects correctly with respect to the at least one real object. This may be useful so that the virtual objects correctly interact with the real-world object(s) and do not violate any physical rules of the real-world environment.

[110] Some theoretical underpinnings of the present techniques are now explained, for completeness.

[111] Preliminaries. The common notions related to logic and probabilistic programming are summarized below. Symbols T, 1 denote the logical true and false, respectively. An atom is a formula of the form p(t), where p is a predicate and t is a tuple of constants or variables. Atoms that have no variables as arguments are called facts. A rule is a formula of the form p(t) ^^1=1 Pi(td, where i and tit for 1 <i <N are tuples of constants and variables. The present techniques adopt Datalog (Serge Abiteboul et al.), a language widely used in neurosymbolic Al, according to which each variable occurring in the conclusion, also occurs in the premise. Notice that a fact can be represented as a rule with an empty premise. A logic program or simply, program, is a set of rules. Symbol i= denotes logical entailment, where sets of atoms and rules are viewed as first-order theories.

[112] In the present techniques, supervision is provided via conjunctive queries (CQs) (Ashok K. Chandra et al.). A CQ Q can be represented as a Datalog rule with a distinct predicate in its conclusion (denoted as Q for brevity). An answer to a CQ Q over a program P is a tuple of constants c so that P i= Q(c).

[113] Probabilistic logic programs (PLPs) extend traditional programs by treating each input fact (notice that it is possible to assign probabilities also to the rules by adding extra “dummy” facts to the rule premises with probabilities equal to that of the rules) as an independent Bernoulli random variable that becomes true (resp. false) with a fixed probability ft (resp. 1 - / ?). Differently from traditional programs, each derived fact is true with some probability. The present techniques adhere to the widely-adopted possible world semantics (Dan Suciu et al., Jiani Huang et al.).

[114] In deep learning, learning a classifier h^Xi -> where y t = {1,...,KJ and >1, reduces to learning a scoring function -> [0,1] Then, the prediction of classifierin x is defined argmaxjf^ (x), where fi(x) denotes the value of the j-th output element of J(x). We use f*(xj to denote the score of Zi / s prediction on and i* to denote that prediction.

[115] Neural predicates are the components that enable learning via entailment. For a scoring function fa and an input, a neural predicate fa (for brevity, we use the same symbol to refer to a neural predicate and its associated classifier) models in relational form the outputs of fa when provided with x. In particular, an atom of the form is created for each class j ey^ with probability equal to f^fx). Each fa induces a probability distribution via a softmax layer. Hence, X / cy, ftW = 1 holds for each / ), while the predictions are mutually exclusive.

[116] Problem Statement. The present techniques employ a stratified setting in which the predictions of one or more scoring functions are reasoned on top of by using a fixed program P. To ease the presentation, it is assumed that P is non-probabilistic; however, the below discussion can be easily extended when P is probabilistic. It is assumed that N independent scoring functions f = (fa,..., fM~) and use 0 to denote the trainable weights of all the f / s. The variable x is used to denote the inputs to f, where x may comprise one or more inputs per / ). As described in above, providing / ^ ...,fM with x leads to the creation of a database / f(x) that includes for each fa, each j e and each inputz e xto / ), exactly one probabilistic fact / )( / , z). Due to the above, QA in the present techniques reduces to QA over the PLP P u If (x). P(a = a\P,x, O') is used to denote the probability that the truth value of atom a is o e {T, 1} under P, x and 0. When the context is clear, P(a = a) is simply used. Notice that P(a =1) = 1 - P(a = T).

[117] The problem of learning via entailment is now introduced. Let 5 be a set of training instances. Each instance s is of the form (x,Q,a,o), where x is an input f, Q is CQ, a is an answer to Q under P and and o e {T, 1} denotes the target truth value of a in this context. The aim of training is to amend the weights of fa, so that the expectation E(X;(Za;£7)~D[-logP(a = v\P,x, 0)]is minimized, where D denotes the distribution of the training instances. Intuitively, training proceeds via amending the weights of the classifiers, so that the target answer probabilities match the ground truth ones. While other loss functions are also applicable, negative log likelihood is used as it is one of the most standard ones (Robin Manhaeve et al.).

[118] It has been previously shown that the probability a derived atom is true or false in a PLP reduces to the probability of its lineage being true or false in the PLP. A proof for an atom a under P, f and x, or simply, a proof for a when the context is clear, is a minimal subset T of the facts in P and / f(x) (ignoring their probabilities) so that T i= a; its lineage is the formula that results after taking the disjunction of all its proofs, after treating each proof as the conjunction of its constituting atoms. Notice that the probability the lineage formula is true adheres to the possible world semantics, to align with the semantics adopted for P u / f (x).

[119] As the parameters of the fa's are the only trainable ones (recall that P is non-probabilistic), the non-neural atoms from each proof are ignored. A>a is used to denote the lineage of an atom a. P(a = T) = P(®a = T), while P(0a =1) = = T). Based on the above, instead of providing the training instances to the learning process, the corresponding lineage formulas can be directly provided. proofs(O) is used to denote the proofs of lineage ¢. For a lineage formula ¢, polarity(4>) = T; if O is the negation of a lineage, then polarity(O) =1.

[120] Training in the present techniques, that is learning the parameters of then’s, proceeds via gradient descent. In particular, the partial derivatives of the loss are computed under the neural atoms occurring in the lineage of the answer atoms. Then, the loss gradients of all neural parameters are obtained via the chain rule.

[121] Motivation. The limitations of current techniques are now introduced. The VQAR benchmark (Jiani Huang et al.) is considered, that is designed for visual question answering (VQA) using commonsense Datalog rules.

[122] Example 1. The VQAR benchmark includes three classifiers, namely name, attr and rel, where yn, ya and y r denote the output domains of those classifiers, respectively. Given a bounding box o, classifiers name and attr output the type and the properties of o, respectively. For a pair of bounding boxes and o2, classifier rel outputs their relationship.

[123] The benchmark includes six rules in total, three of which are shown below: isa(N, thing) «- name(N, 0) name(N, 0) name(N', O') A isa(N',N) isa(A,C) isa(A,B) Aisa(B,C) (1) (2) (3)

[124] Rule (1) states that every object is of type thing. The second one states that if an object 0 is of type N' (e.g., jacket) and N’ is of type N (e.g., wearable), then 0 is of type N. The third rule states that is_a is a transitive relation. The is_a facts are from the CRIC ontology (Difei Gao et al.) and encode commonsense knowledge about object hierarchies.

[125] The first limitation relates to training under non-useful supervision. This can affect both the total training time and the accuracy of the classifiers.

[126] The second limitation relates to training under contradicting supervision signals.

[127] Example 2. Consider the query Q2(P,0') <- name(ball,0) Arel(left,0,0') A name(desk, O'). The query asks for all pairs of objects (0, O') for which 0 is a ball, 0' is a desk and 0 is left of O'. Assume that Q2 is part of two training instances and that the gold answers to Q2 in those instances are (02,0^ and (03,0^ with probability one and zero, respectively. According to the lineage of the first answer, should be a desk. In contrast, according to the lineage of the second answer and the fact that its probability should be zero, might not be a desk. Thus, the two training instances provide contradicting supervision signals for o^.

[128] With the aim to reduce the overhead of computing the probability of the proofs, prior art relied on top-fc approaches. A top-fc approach essentially computes the probability of an answer considering only the k most likely proofs. However, fixing a k introduces an unnecessary overhead. In addition, it might impact the convergence of the classifiers.

[129] Example 3. Consider the query Q3(O) <- rel(wearing,0',0) K name (teddy, O') that asks for the cloth a teddy bear is wearing. Assuming that the gold answer to Q3 is o, and that there are five input bounding boxes in total, to o5, the lineage of Q3(o() is V rel(wearing, 0, ox) A name(teddy, 0) (5) 0 6 02i03>04<0S

[130] According to (5), any of o2 to o5 can be a teddy and, thus, we should accordingly update the weights of classifier name to reflect this possibility. However, if classifier rel (i) returns with very high probability relation wearing for the inputs o2 and or and (ii) returns with very low probability relation wearing for the remaining pairs of objects, then o2 is most likely a teddy. Based on the above, it is seen that fixing a k, say k = 5, introduces an unnecessary computation cost. Furthermore, the supervision strength for o2 is less than what it would be and also wrongly updates the rest of the objects.

[131] Contribution. The contributions of the present techniques are presented below. In particular, techniques for overcoming the limitations presented in Examples 2 and 3 above are presented.

[132] Training under contradicting proofs. Example 2 demonstrates that the predictions should be chosen which are forced to become zero and which are forced to become one, respectively; otherwise, the training falls into the case in which the training is under contradicting gradients:

[133] Definition 3. The gradients for a neural atom a are contradicting, if they are of the form dP(<PA = T) / da and dP(<S>2 =1) / da and a occurs in both lineage formulas 4½ and 4>2.

[134] Returning back to Example 2, the gradients produced under the two training instances are contradicting, since in first case, the aim is to maximize P(^>1 = T), while in the second one, the aim is to maximize P(42 =±), where = name(ball,o2) Arel(left,o2,of) A name(desk, ot) and 4>2 = name(ball, o3) A rel(left, o3,0^ A name(desk, 0^.

[135] What would be a reasonable strategy to produce non-contradicting gradients? Our natural choice is to force the probability of name(desk, 0^ to one. By doing that, both objectives are satisfied, as P(O2 =1) can still be maximized by forcing the probabilities of neural atoms name(wearable,o3) and relieft, o3, of) to zero. Forcing the probability nameCdes^of) to zero, would violate the objective of the first training instance, that is to maximize P(<PA = T).

[136] Progressive proof purification. To address the limitations from Example 3, a strategy inspired from learning in the presence of noisy data is employed. Assuming that for a noisy classifier f there is a pure region in which its predictions are highly confident and f is consistent with the Bayes optimal one—the one that is trained in a supervised fashion and minimized the 0-1 loss- the techniques described in Yikai Zhang et al. outline a learning technique that relies on this region to train f. The intuition is that / j will be more accurate after being trained in this pure region and, subsequently, its new pure region will grow bigger. To turn the above intuition into a practical algorithm, the techniques of Yikai Zhang et al. rely on the confidence of ft to amend incorrect predictions. In particular, given a noisy training instance (%,y), where x denotes the input to f and y the noisy label, y is turned into i*, if f*(x) - ff(x) >£. The steps of the techniques described in Yikai Zhang et al. can be summarized to the following iterative process: firstly, the training instances are amended using a threshold e as above; secondly, f is trained using the amended instances; lastly, if no instance’s label is amended, e is decreased and the whole process starts from the beginning.

[137] To employ the above rationale in the present techniques, several extensions are required. Firstly, the notion of e-valid neural atoms is introduced.

[138] Fix f and P.

[139] Definition 4. Neural atom f^c, z) is £-valid if f*(z) - <e holds.

[140] e-valid neural atoms represent the predictions for which the classifiers are highly confident, as per Yikai Zhang et al.. Secondly, the above notion is generalized to proofs.

[141] Definition 5. Given a query Q and a tuple of constants a, a proof <p for Q(a) under P, f and x is E-valid, fors = (£0, if either: • each neural atom f^c, z) e <p is -valid; or • there exist an EDB-rewriting of Q under P and a neural atom f^c, z) that is £rvalid, s.t. only one grounding of the EDB-rewriting under / f(x) Q' satisfies the following: Q(a) = h(Q') and fi(c,zj occurs in b(Q'j.

[142] The concept of EDB-rewritings has been introduced in Efthymia Tsamoura et al. Above, a proof is simply said to be E-valid, if the context is clear. Notice that a non-E-valid proof might still include cy-valid neural atoms. References • Robin Manhaeve, Sebastijan Dumancic, Angelika Kimmig, Thomas Demeester, and Luc De Raedt. DeepProbLog: Neural probabilistic logic programming. In NeurlPS, pages 3749-3759, 2018. • Serge Abiteboul, Richard Hull, and Victor Vianu. Foundations of Databases. Addison-Wesley, 1995. • Ashok K. Chandra and Philip M. Merlin. Optimal implementation of conjunctive queries in relational data bases. In STOC, pages 77-90, 1977. • Dan Suciu, Dan Olteanu, Christopher Re, and Christoph Koch. Probabilistic Databases. Synthesis Lectures on Data Management. Morgan &Claypool Publishers, 2011. • Jiani Huang, Ziyang Li, Binghong Chen, Karan Samel, Mayur Naik, Le Song, and Xujie Si. Scallop: From probabilistic deductive databases to scalable differentiable reasoning. In NeurlPS, pages 25134-25145, 2021. • Difei Gao, Ruiping Wang, Shiguang Shan, and Xilin Chen. From two graphs to N questions: A VQA dataset for compositional reasoning on vision and commonsense. CoRR, abs / 1908.02962, 2019 • Yikai Zhang, Songzhu Zheng, Pengxiang Wu, Mayank Goswami, and Chao Chen. Learning with feature-dependent label noise: A progressive approach. In ICLR, 2021. • Efthymia Tsamoura, David Carral, Enrico Malizia, and Jacopo llrbani. Materializing knowledge bases via trigger graphs. PVLDB, 14(6):943-956, 2021. • [DKT07] Luc De Raedt, Angelika Kimmig, and Hannu Toivonen. ProbLog: A probabilistic Prolog and its application in link discovery. In IJCAI, pages 2462-2467, 2007. • [DRK15] Luc De Raedt and Angelika Kimmig. Probabilistic (logic) programming concepts. Machine Learning, 100(1):5-47, 2015. • [DXYZ19] Wang-Zhou Dai, Qiuling Xu, Yang Yu, and Zhi-Hua Zhou. Bridging Machine Learning and Logical Reasoning by Abductive Learning. In NeurlPS, pages 2815-2826, 2019. • [FWDT19] Aaron M. Ferber, Bryan Wilder, Bistra Dilkina, and Milind Tambe. Mipaal: Mixed integer program as a layer. CoRR, abs / 1907.05912, 2019. • [GWSC19] Difei Gao, Ruiping Wang, Shiguang Shan, and Xilin Chen. From two graphs to N questions: A VQA dataset for compositional reasoning on vision and commonsense. CoRR, abs / 1908.02962, 2019. • [HLC+21] Jiani Huang, Ziyang Li, Binghong Chen, Karan Samel, Mayur Naik, Le Song, and Xujie Si. Scallop: From probabilistic deductive databases to scalable differentiable reasoning. In NeurlPS, pages 25134-25145, 2021. • Robin Manhaeve, Sebastijan Dumancic, Angelika Kimmig, Thomas Demeester, and Luc De Raedt. Deepproblog: Neural probabilistic logic programming. In NeurlPS, pages 3749-3759, 2018. • [PPM+19] Marin Vlastelica P., Anselm Paulus, V13053'ft Musil, Georg Martius, and Michal Roll3053'fnek. Differentiation of blackbox combinatorial solvers. CoRR, abs / 1912.02175, 2019. • [PRM+21] Anselm Paulus, Michal RolA-nek, VA-t Musil, Brandon Amos, and Georg Martius. Comboptnet: Fit the right np-hard problem by learning integer programming constraints, 2021. • [SORK11] Dan Suciu, Dan Olteanu, Christopher Re, and Christoph Koch. Probabilistic Databases. Synthesis Lectures on Data Management. Morgan &Claypool Publishers, 2011. • [TCMU21] Efthymia Tsamoura, David Carral, Enrico Malizia, and Jacopo Urbani. Materializing knowledge bases via trigger graphs. PVLDB, 14(6):943-956, 2021. • [THM21] Efthymia Tsamoura, Timothy Hospedales, and Loizos Michael. Neural-symbolic integration: A compositional perspective. In AAAI, pages 5051-5060, 2021. • [Val79] Leslie G. Valiant. The complexity of enumeration and reliability problems. SIAM J. Comput., 8(3):410-421, 1979. • [XXM+19] Yaqi Xie, Ziwei Xu, Kuldeep S. Meel, Mohan S. Kankanhalli, and Harold Soh. Embedding symbolic knowledge into deep networks. In NeurlPS, pages 4235-4245, 2019. • [YIL20] Zhun Yang, Adam Ishay, and Joohyung Lee. NeurASP: Embracing neural networks into answer set programming. In IJCAI, pages 1755-1762, 2020. • [ZBH+17] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In ICLR, 2017. • [ZWYC20] Alireza Zareian, Zhecan Wang, Haoxuan You, and Shih-Fu Chang. Learning visual commonsense for robust scene graph generation. In ECCV, pages 642-657,2020. • [ZZW+21] Yikai Zhang, Songzhu Zheng, Pengxiang Wu, Mayank Goswami, and Chao Chen. Learning with feature-dependent label noise: A progressive approach. In ICLR, 2021.

[143] 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. A computer-implemented method for training a machine learning, ML, model to perform an image processing task, the method comprising:obtaining a training dataset comprising a plurality of images, each image depicting at least two objects;for each image of the plurality of images:inputting the image into a neural module of the ML model, wherein the neural module is trained to output a bounding box around each object in an image;outputting, from the neural module, a bounding box around each object of the at least two objects in the input image and features of the object in each bounding box;inputting each bounding box and object features output from the neural module into a symbolic module of the ML model, wherein the symbolic module is trained to:output a plurality of possible labels based on the features of the object in each bounding box, andoutput, for each pair of bounding boxes, a plurality of possible relationships between objects in the pair of bounding boxes;outputting, from the symbolic module, a plurality of possible labels for each bounding box in the image, and a plurality of possible relationships between objects in each pair of bounding boxes;generating a new partially-labelled training dataset comprising the training dataset, the bounding boxes output from the neural model, and the possible labels and possible relationships output by the symbolic module for each image of the training dataset; andtraining the ML model by:calculating a loss by comparing the plurality of possible labels and the plurality of possible relationships derived for each image with a ground truth label for the image; andupdating weights of one or both of the neural module and the symbolic module based on the calculated loss.

2. The method as claimed in claim 1 wherein outputting, from the symbolic module, a plurality of possible labels comprises:generating, using a set of logical rules specifying constraints specific to the training dataset and the features of the object in each bounding box, the plurality of possible labels for the object in each bounding box, wherein the set of logical rules constrain the possible labels to be specific to the training dataset.

3. The method as claimed in claim 1 or 2 wherein outputting, from the symbolic module, a plurality of possible relationships comprises, for each pair of bounding boxes in an image:generating, using a set of logical rules specifying constraints specific to the training dataset and the plurality of possible labels for the object in each bounding box of the pair of bounding boxes, the plurality of possible relationships between the objects in the pair of bounding boxes, wherein the set of logical rules constrain the possible relationships to be specific to the training dataset.

4. The method as claimed in claim 2 or 3 wherein the image is a single image or frame of a video, and the generating comprises using a set of logical rules defining likely relationships for objects within a single image or frame.

5. The method as claimed in claim 2, 3 or 4 wherein the image comprises a plurality of adjacent frames of a video, and the generating comprises using a set of logical rules defining likely relationships for objects appearing in adjacent frames.

6. The method of any preceding claim wherein the image processing task comprises scene graph generation.

7. The method of any preceding claim wherein the image processing task comprises action recognition, and wherein:outputting, from the neural module, a bounding box around the at least two objects comprises outputting a bounding box around the at least two actors within the image; andoutputting, from the symbolic module, a plurality of possible labels and a plurality of possible relationships comprises outputting a plurality of possible actions performed by each actor, and a plurality of possible relationships between the actors in each pair of bounding boxes.

8. The method of any preceding claim wherein:the ML model further comprises a semantic parsing module; andobtaining a training dataset comprises obtaining a training dataset comprising a plurality of images and at least one question and answer pair for each image, wherein the question is a natural language question related to the at least two objects in the image and the answer is a ground truth natural language answer to the question.

9. The method as claimed in claim 8 further comprising, for each image:inputting the question of the at least one question and answer pair into the semantic parsing module; andgenerating, using the semantic parsing module, a programmatic query concerning the at least two objects in the image, wherein the programmatic query asks whether there is a connection between the at least two objects.

10. The method as claimed in claim 9 further comprising, for each image:inputting the programmatic query into the symbolic module of the ML model;wherein outputting, from the symbolic module, a plurality of possible relationships comprises outputting a plurality of possible relationships which satisfy the programmatic query.

11. The method as claimed in claim 10 wherein training the ML model further comprises training the ML model by:generating, using the semantic parsing module of the ML model, a natural language answer to the question of the at least one question answer pair;calculating a further loss by comparing the generated answer to the ground truth answer; andupdating weights of one or both of the neural module and the symbolic module based on the calculated further loss.

12. A method for controlling an electronic device using a trained machine learning, ML, model, the method comprising:receiving an input image for processing, the input image depicting at least two objects;processing the input image by:using a trained neural module of the trained ML model to output a bounding box around each object in the input image and features of the object in each bounding box; andusing a trained symbolic module of the trained ML model to output a label for the object in each bounding box and to output a relationship between the at least two objects depicted in the image; andcontrolling the electronic device based on the labels for the at least two objects and the relationship between the objects.

13. An electronic device comprising:at least one processor coupled to memory, for:receiving an input image for processing, the input image depicting at least two objects;processing the input image by:using a trained neural module of a trained ML model to output a bounding box around each object in the input image and features of the object in each bounding box; andusing a trained symbolic module of the trained ML model to output a label for the object in each bounding box and to output a relationship between the at least two objects depicted in the image; andcontrolling the electronic device based on the labels for the at least two objects and the relationship between the objects.

14. The electronic device as claimed in claim 13 further comprising at least one image capture device for capturing the input image.

15. The electronic device as claimed in claim 13 or 14 wherein:the electronic device is a controllable autonomous or semi-autonomous electronic device for performing a task in an environment comprising at least two objects;the input image is an image captured of the environment; andthe at least one processor controls the autonomous or semi-autonomous electronic device using the labels for the at least two objects and the relationship between the objects.

16. The electronic device as claimed in claim 15 further comprising at least one gripper and wherein the at least one processor controls the gripper to interact with one or more of the at least two objects based on the labels for the at least two objects and the relationship between the objects.

17. The electronic device as claimed in claim 15 further comprising a system for moving the electronic device through the environment, and wherein the at least one processor controls the system based on the labels for the at least two objects and the relationship between the objects.

18. The electronic device as claimed in claim 13 or 14 wherein:the electronic device is a wearable augmented reality device for controlling virtual objects blended into a real-world environment comprising at least one real object;the input image is an image of the real-world environment; andthe at least one processor uses the labels for the at least two objects and the relationship between the objects to control virtual objects correctly with respect to the at least one real object.

19. A computer-readable storage medium comprising instructions which, when executed by a processor, causes the processor to carry out the method of claims 1 to 11 or 12.Amendments to the Claims have been filed as follows:09 05 25CLAIMS1. A computer-implemented method fortraining a machine learning, ML, model to perform an image processing task, the method comprising:obtaining a training dataset comprising a plurality of images, each image depicting at least two objects;for each image of the plurality of images:inputting the image into a neural module of the ML model, wherein the neural module is trained to output a bounding box around each object in an image;outputting, from the neural module, a bounding box around each object of the at least two objects in the input image and features of the object in each bounding box;inputting each bounding box and object features output from the neural module into a symbolic module of the ML model, wherein the symbolic module is trained to:output a plurality of possible labels based on the features of the object in each bounding box, andoutput, for each pair of bounding boxes, a plurality of possible relationships between objects in the pair of bounding boxes;outputting, from the symbolic module, a plurality of possible labels for each bounding box in the image, and a plurality of possible relationships between objects in each pair of bounding boxes;generating a new partially-labelled training dataset comprising the training dataset, the bounding boxes output from the neural model, and the possible labels and possible relationships output by the symbolic module for each image of the training dataset; andtraining the ML model by:calculating a loss by comparing the plurality of possible labels and the plurality of possible relationships derived for each image with a ground truth label for the image; andupdating weights of one or both of the neural module and the symbolic module based on the calculated loss.

2. The method as claimed in claim 1 wherein outputting, from the symbolic module, a plurality of possible labels comprises:generating, using a set of logical rules specifying constraints specific to the training dataset and the features of the object in each bounding box, the plurality of possible labels for the object in each bounding box, wherein the set of logical rules constrain the possible labels to be specific to the training dataset.09 05 253. The method as claimed in claim 1 or 2 wherein outputting, from the symbolic module, a plurality of possible relationships comprises, for each pair of bounding boxes in an image:generating, using a set of logical rules specifying constraints specific to the training dataset and the plurality of possible labels for the object in each bounding box of the pair of bounding boxes, the plurality of possible relationships between the objects in the pair of bounding boxes, wherein the set of logical rules constrain the possible relationships to be specific to the training dataset.

4. The method as claimed in claim 2 or 3 wherein the image is a single image or frame of a video, and the generating comprises using a set of logical rules defining likely relationships for objects within a single image or frame.

5. The method as claimed in claim 2, 3 or 4 wherein the image comprises a plurality of adjacent frames of a video, and the generating comprises using a set of logical rules defining likely relationships for objects appearing in adjacent frames.

6. The method of any preceding claim wherein the image processing task comprises scene graph generation.

7. The method of any preceding claim wherein the image processing task comprises action recognition, and wherein:outputting, from the neural module, a bounding box around the at least two objects comprises outputting a bounding box around the at least two actors within the image; andoutputting, from the symbolic module, a plurality of possible labels and a plurality of possible relationships comprises outputting a plurality of possible actions performed by each actor, and a plurality of possible relationships between the actors in each pair of bounding boxes.

8. The method of any preceding claim wherein:the ML model further comprises a semantic parsing module; andobtaining a training dataset comprises obtaining a training dataset comprising a plurality of images and at least one question and answer pair for each image, wherein the question is a natural language question related to the at least two objects in the image and the answer is a ground truth natural language answer to the question.09 05 259. The method as claimed in claim 8 further comprising, for each image:inputting the question of the at least one question and answer pair into the semantic parsing module; andgenerating, using the semantic parsing module, a programmatic query concerning the at least two objects in the image, wherein the programmatic query asks whether there is a connection between the at least two objects.

10. The method as claimed in claim 9 further comprising, for each image:inputting the programmatic query into the symbolic module of the ML model;wherein outputting, from the symbolic module, a plurality of possible relationships comprises outputting a plurality of possible relationships which satisfy the programmatic query.

11. The method as claimed in claim 10 wherein training the ML model further comprises training the ML model by:generating, using the semantic parsing module of the ML model, a natural language answer to the question of the at least one question answer pair;calculating a further loss by comparing the generated answer to the ground truth answer; andupdating weights of one or both of the neural module and the symbolic module based on the calculated further loss.

12. A computer-readable storage medium comprising instructions which, when executed by a processor, causes the processor to carry out the method of claims 1 to 11.

Citation Information

Patent Citations

  • Method and system for efficient neural network training

    GB2597352A

  • ViewGB2597352AonEspacenetopensinnewtab