Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
PREDICTION EXPLANATION IN MACHINE LEARNING CLASSIFIERS
Document Type and Number:
WIPO Patent Application WO/2021/223882
Kind Code:
A1
Abstract:
A method of classifying input text data using a machine-learning classifier is disclosed. The method comprises receiving input text data, performing text classification operations using the machine-learning classifier on the input text data and predicting a classification for the input text data, identifying a textual feature of the input text data relevant to the classification prediction, comparing the identified textual feature of the input text data to a knowledge graph representation of textual features wherein one or more textual features of the knowledge graph are labelled with a natural-language descriptor of the respective textual feature. The method could, for example, be used for moderating user-generated content in an online discussion forum to remove offensive posts. The use of a knowledge graph representation of textual features, such as words, advantageously allows for respective semantic meanings of a large set of textual features to be defined using only sparse natural-language descriptor labels by definition of semantic relationships between textual features in the knowledge graph. Sparse labelling of textual features in a reference advantageously incurs less human time/computational cost to generate than a full set of labels, whilst still desirably facilitating explanation of reasons for a classification prediction even where a reason for the classification prediction relates to unlabelled textual features of the knowledge graph.

Inventors:
KHAN SULEIMAN (SE)
ROMANO SIMONE (SE)
VAN HEESWIJK MARK (SE)
AMMAD-UD-DIN MUHAMMAD (SE)
FERNANDEZ STRAHL JONATHAN (SE)
FLANAGAN ADRIAN (SE)
TAN KUAN (SE)
Application Number:
PCT/EP2020/062888
Publication Date:
November 11, 2021
Filing Date:
May 08, 2020
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
HUAWEI TECH CO LTD (CN)
KHAN SULEIMAN ALI (SE)
International Classes:
G06N20/00; G06F40/20; G06N3/04; G06N3/08
Foreign References:
EP3462385A12019-04-03
Other References:
GONG JIBING ET AL: "Hierarchical Graph Transformer-Based Deep Learning Model for Large-Scale Multi-Label Text Classification", IEEE ACCESS, IEEE, USA, vol. 8, 10 February 2020 (2020-02-10), pages 30885 - 30896, XP011772649, DOI: 10.1109/ACCESS.2020.2972751
LU ZHIBIN ET AL: "VGCN-BERT: Augmenting BERT with Graph Embedding for Text Classification", 8 April 2020, LECTURE NOTES IN COMPUTER SCIENCE; [LECTURE NOTES IN COMPUTER SCIENCE; LECT.NOTES COMPUTER], SPRINGER BERLIN HEIDELBERG, BERLIN GERMANY, PAGE(S) 369 - 382, ISBN: 978-3-030-67069-6, ISSN: 0302-9743, XP047547106
YAO LIANG ET AL: "Graph Convolutional Networks for Text Classification", 13 November 2018 (2018-11-13), XP055775123, Retrieved from the Internet [retrieved on 20210211], DOI: 10.1609/aaai.v33i01.33017370
SEONGJUN YUN ET AL: "Graph Transformer Networks", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 6 November 2019 (2019-11-06), XP081592564
JIE ZHOU ET AL: "Graph Neural Networks: A Review of Methods and Applications", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 20 December 2018 (2018-12-20), XP080994868
MARCOS ZAMPIERI ET AL: "SemEval-2019 Task 6: Identifying and Categorizing Offensive Language in Social Media (OffensEval)", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 19 March 2019 (2019-03-19), XP081162731
Attorney, Agent or Firm:
KREUZ, Georg (DE)
Download PDF:
Claims:
Claims

1. A method of classifying input text data using a machine-learning classifier, the method comprising: receiving input text data, performing text classification operations using the machine-learning classifier on the input text data and predicting a classification for the input text data, identifying a textual feature of the input text data relevant to the classification prediction, comparing the identified textual feature of the input text data to a knowledge graph representation of textual features wherein one or more textual features of the knowledge graph are labelled with a natural-language descriptor of the respective textual feature.

2. A method as claimed in claim 1, further comprising identifying one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data.

3. A method as claimed in claim 2, further comprising identifying natural-language descriptor labels of the one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data, inputting vector representations of the identified natural language descriptor labels into a graph convolutional network, and predicting a natural-language descriptor using the graph convolutional network for the identified textual feature of the input text data based on the natural-language descriptor labels of the one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data.

4. A method as claimed in claim 3, wherein the method comprises training the graph convolutional neural network to predict one or more natural-language descriptor labels for textual features of the knowledge graph based on natural language descriptor labels of one or more other textual features of the knowledge graph.

5. A method as claimed in claim 4, wherein the method comprises training the graph convolutional neural network to predict one or more natural-language descriptor labels for any unlabelled textual feature of the knowledge graph based on the natural language descriptor labels of the one or more other textual features of the knowledge graph.

6. A method as claimed in claim 4 or claim 5, wherein the graph convolutional neural network is trained by stochastic gradient descent.

7. A method as claimed in any one of claims 3 to 6, comprising outputting the predicted classification for the input text data and the predicted natural-language descriptor for the identified textual feature of the input text data.

8. A method as claimed in claim 7 wherein outputting the predicted classification for the input text data and the predicted natural-language descriptor for the identified textual feature of the input text data comprises outputting the predicted classification together with the natural- language descriptor.

9. A method as claimed in any one of the preceding claims, wherein comparing the identified textual feature of the input text data to a knowledge graph representation of textual features wherein one or more textual features of the knowledge graph are labelled with a natural-language descriptor of the respective textual feature, comprises obtaining a knowledge graph representation of textual features, obtaining natural-language descriptors of one or more of the textural features of the knowledge graph, and storing the knowledge graph of textual features and the natural-language descriptors in a machine-readable memory wherein the natural-language descriptors are linked to a respective textual feature of the knowledge graph.

10. A method as claimed in any one of claims 2 to 9, wherein identifying one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data., comprises: identifying one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data, determining a semantic relationship between the one or more corresponding textual features of the knowledge graph and one or more other textural features of the knowledge graph, and identifying one or more other textual features of the knowledge graph which correspond to the one or more corresponding textual features of the knowledge graph.

11. A method as claimed in claim 10, wherein determining a semantic relationship between the one or more corresponding textual features of the knowledge graph and the one or more other textural features of the knowledge graph comprises: generating for each of the textual features a numerical vector representing a semantic of the textual feature, and computing a similarity between the numerical vectors.

12. A method as claimed in claim 11, wherein generating for each of the textual features a numerical vector representing a semantic of the textual feature comprises generating a numerical vector representing a context in which the textual feature is used in a text.

13. A method as claimed in claim 12, wherein generating a numerical vector representing a context in which the textual feature is used in a text comprises: generating a numerical vector for the textual feature and generating numerical vectors for one or more other textual features accompanying the textual feature in the text, computing a numerical vector representing an average of numerical vectors of the one or more other textual features accompanying the textual feature in the text, and computing a concatenation numerical vector representing a concatenation of the numerical vector of the textual feature and the average of numerical vectors of the one or more other textual features accompanying the textual feature in the text.

14. A method as claimed in claim 13, comprising storing the concatenation numerical vector in the machine-readable memory linked to the respective textual feature of the knowledge graph.

15. A method as claimed in claim 13 or claim 14, comprising computing a concatenation numerical vector representing a concatenation of a textual feature of the knowledge graph and an average of numerical vectors of textual features accompanying the textual feature in text for each textual feature in the knowledge graph.

16. A method as claimed in any one of claims 12 to 15, wherein the numerical vectors are generated using a transformer neural network architecture.

17. A computer program comprising instructions which, when executed by a computer, cause the computer to carry out the method of any one of claims 1 to 16.

18. A computer-readable data carrier having stored thereon the computer program of claim 17.

19. A computer system configured to perform the method of any one of claims 1 to 16.

Description:
PREDICTION EXPLANATION IN MACHINE LEARNING CLASSIFIERS

Field of the Disclosure

The present disclosure relates to explanation of reasons for classification predictions of machine learning based text classifiers.

Background of the Disclosure

Machine learning (ML) text classifiers, such as neural network text classifier models, employ successive layers of operations to progressively extract features from input text data to generate a classification prediction for the input text data. One application of ML text classifiers is automated moderation of user-generated text content in online discussion forums, for deciding whether to display or hide a content item, such as a user post, from forum users. However, classification predictions of ML text classifiers may appear relatively arbitrary and difficult to understand. This may undesirably result in a lack of users’ trust in classification predictions and decisions based thereon. It is therefore desirable to provide an explanation of the reasons for classification predictions of ML text classifiers.

Summary of the Disclosure

An objective of the present disclosure is to provide a method for explaining reasons for classification predictions of ML text classifiers. From a user’s perspective, by providing reasons for classification predictions, a user may better comprehend the prediction and decisions based thereon. Consequently, users’ trust in classification predictions of ML text classifiers and decisions based thereon may advantageously be increased.

The foregoing and other objectives are achieved by the features of the independent claims. Further implementation forms are apparent from the dependent claims, the description and the Figures.

An aspect of the present disclosure provides a method of classifying input text data using a machine-learning classifier, the method comprising: receiving input text data, performing text classification operations using the machine-learning classifier on the input text data and predicting a classification for the input text data, identifying a textual feature of the input text data relevant to the classification prediction, comparing the identified textual feature of the input text data to a knowledge graph representation of textual features wherein one or more textual features of the knowledge graph are labelled with a natural-language descriptor of the respective textual feature.

The method could, for example, be used for moderating user-generated content in an online discussion forum to remove offensive posts. In this scenario, the step of receiving input text data could comprise selecting a user-generated post for review. The textual features could, for example, be words or phrases.

The method firstly involves generating a classification for input text data, e.g. whether the input text is ‘offensive’ or ‘not-offensive’. A problem however with outputting only such a classification prediction to a user however is that the user may not understand the reason why the classification prediction was reached, e.g. why a post is classified as ‘offensive’ and thus removed, and may thus not trust the process.

The method of the disclosure thus further facilitates generating an explanation of the reason for the classification prediction in a human-understandable natural-language, for example, English-language.

The explanation of the reason for the classification prediction involves identifying textual features, e.g. word, of the input text data that are relevant to the classification prediction are identified. The identified textual features are then compared to a knowledge graph representation of textual features, wherein one or more textual features of the knowledge graph are labelled with natural-language descriptors. The natural-language descriptors are human generated pre-defmed label describing the semantic meaning of the textual features in a natural language, e.g. “this word/phrase is derogatory.”. Such a natural-language descriptor may desirably be capable of explaining succinctly and understandably to a human user why a classification prediction and associated decision was made, e.g. that a comment was removed because the comment was classified as “offensive” because “word X is derogatory”.

If a complete reference of textual features was available in which each textual feature had its own natural-language descriptor label, it would be possible to merely match the textual features of the input text data identified as relevant to the classification prediction to textual features of the reference, and retrieve the natural-language descriptors associated with those textual features for output to a user. However, in many applications, for example, moderating of user- generated content in an online discussion forum, to be useful in classifying input text data the reference would need to contain a very large number of textual features, e.g. words, and it may be prohibitively time-consuming for a human to generate a unique natural-language descriptor label for each word in the reference, and may additionally be very computationally expensive to store such as large number of natural-language descriptor labels.

The use of a knowledge graph representation of textual features, such as words, however allows for respective semantic meanings of a large set of textual features to be defined using only sparse natural-language descriptor labels by definition of semantic relationships between textual features in the knowledge graph. Sparse labelling of textual features in a reference advantageously incurs less human time/computational cost to generate than a full set of labels, whilst still desirably facilitating explanation of reasons for a classification prediction even where a reason for the classification prediction relates to unlabelled textual features of the knowledge graph.

In an implementation, the method further comprises identifying one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data.

In an implementation, the method further comprises identifying natural-language descriptor labels of the one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data, inputting vector representations of the identified natural language descriptor labels into a graph convolutional network, and predicting a natural- language descriptor using the graph convolutional network for the identified textual feature of the input text data based on the natural-language descriptor labels of the one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data.

In an implementation, the method comprises training the graph convolutional neural network to predict one or more natural-language descriptor labels for textual features of the knowledge graph based on natural language descriptor labels of one or more other textual features of the knowledge graph.

In an implementation, the method comprises training the graph convolutional neural network to predict one or more natural-language descriptor labels for any unlabelled textual feature of the knowledge graph based on the natural language descriptor labels of the one or more other textual features of the knowledge graph. In other words, the method may involve predicting natural-language descriptor labels for all unlabelled textual features of the knowledge graph, to thereby generate a fully-labelled knowledge graph based on the human-generated sparse- labels.

In an implementation, the graph convolutional neural network is trained by stochastic gradient descent.

In an implementation, the method further comprises outputting the predicted classification for the input text data and the predicted natural-language descriptor for the identified textual feature of the input text data. For example, the predicted classification and the predicted natural-language descriptor could be output via an electronic display device for display to a user.

In an implementation, the method further comprises outputting the predicted classification for the input text data and the predicted natural-language descriptor for the identified textual feature of the input text data comprises outputting the predicted classification together with the predicted natural-language descriptor. Outputting the predicted classification together with the predicted natural-language descriptor may desirably allow a human-user to easily associate the reason with the classification prediction. For example, the output could present the information as “Classification = offensive; because = word X is derogatory”.

In an implementation, comparing the identified textual feature of the input text data to a knowledge graph representation of textual features wherein one or more textual features of the knowledge graph are labelled with a natural-language descriptor of the respective textual feature, comprises obtaining a knowledge graph representation of textual features, obtaining natural-language descriptors of one or more of the textural features of the knowledge graph, and storing the knowledge graph of textual features and the natural-language descriptors in a machine-readable memory wherein the natural-language descriptors are linked to a respective textual feature of the knowledge graph. In other words, the method may comprise obtaining a pre-built knowledge graph representation of textual features and adding sparse natural- language descriptor labels. Obtaining a pre-built knowledge graph may advantageously reduce the time and number of computations required to generate the knowledge graph. In an implementation, identifying one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data., comprises identifying one or more textual features of the knowledge graph corresponding to the identified textual feature of the input text data, determining a semantic relationship between the one or more corresponding textual features of the knowledge graph and one or more other textural features of the knowledge graph, and identifying one or more other textual features of the knowledge graph which correspond to the one or more corresponding textual features of the knowledge graph. This may allow for identification of a plurality of textual features of the knowledge graph which correspond to the identified textual features of the input text data. Advantageously this facilitates identification of natural-language descriptor labels of the corresponding textual features.

In an implementation, determining a semantic relationship between the one or more corresponding textual features of the knowledge graph and the one or more other textural features of the knowledge graph comprises, generating for each of the textual features a numerical vector representing a semantic of the textual feature, and computing a similarity between the numerical vectors. Computing similarities between numerical vector representations advantageously allows for similarities between textual features of the knowledge graph to be inferred.

In an implementation, generating for each of the textual features a numerical vector representing a semantic of the textual feature comprises generating a numerical vector representing a context in which the textual feature is used in a text. This advantageously allows for encoding of a semantic of the textual feature. Desirably, the text could comprise a plurality of sources of text, to increase the accuracy and/or precision of the encoded semantic.

In an implementation, generating a numerical vector representing a context in which the textual feature is used in a text comprises, generating a numerical vector for the textual feature and generating numerical vectors for one or more other textual features accompanying the textual feature in the text, computing a numerical vector representing an average of numerical vectors of the one or more other textual features accompanying the textual feature in the text, and computing a concatenation numerical vector representing a concatenation of the numerical vector of the textual feature and the average of numerical vectors of the one or more other textual features accompanying the textual feature in the text.

In an implementation, the method further comprises storing the concatenation numerical vector in the machine-readable memory linked to the respective textual feature of the knowledge graph. In other words, the concatenation numerical vector, representing the semantic of the textual feature, is pre-computed and stored in the knowledge graph. This may advantageously reduce latency during execution of the reason prediction task and reduce the computational resource required for execution of the reason prediction task.

In an implementation, the method further comprises computing a concatenation numerical vector representing a concatenation of a textual feature of the knowledge graph and an average of numerical vectors of textual features accompanying the textual feature in text for each textual feature in the knowledge graph. In other words, the method may comprise generating an embedding for every textual feature of the knowledge graph. This may advantageously enable a full network of the textual features to be created.

In an implementation, the numerical vectors are generated using a transformer neural network architecture.

A further aspect of the present disclosure provides a computer program comprising instructions which, when executed by a computer, cause the computer to carry out the method of any one of the preceding statements.

A further aspect of the present disclosure provides a computer-readable data carrier having stored thereon the computer program of the immediately preceding statement.

A further aspect of the present disclosure provides a computer system configured to perform the method of any one of the preceding statements.

These and other aspects of the invention will be apparent from the embodiment s) described below. Brief Description of the Drawings

In order that the present invention may be more readily understood, embodiments of the invention will now be described, by way of example, with reference to the accompanying drawings, in which:

Figure 1 shows schematically an example of a computer embodying an aspect of the invention;

Figures 2 and 3 show an overview of processes of a method of classifying input text data using a machine-learning classifier model run on the computer identified with reference to Figure 1 to generate one or more classification predictions for the input text data using a convolutional neural network and predict one or more reasons for the classification prediction using a graph convolutional neural network;

Figure 4 shows an overview of processes involved in predicting one or more reasons for the classification prediction using the graph convolutional neural network;

Figure 5 shows an overview of processes involved in training the convolutional neural network identified previously with reference to Figures 2 and 3 for the classification task;

Figure 6 shows an overview of processes involved in generating a sparsely-labelled knowledge graph representation of textual features;

Figure 7 shows schematically an overview of processes involved in generating embeddings for textural features of the knowledge graph;

Figure 8 shows schematically a sparsely-labelled knowledge graph obtained by the processes identified previously with reference to Figure 6;

Figure 9 shows an overview of processes involved in training the graph convolutional neural network previously identified with reference to Figure 4;

Figure 10 shows an overview of processes involved in generating a classification prediction for input text data; Figure 11 shows an overview of processes involved in predicting one or more reasons for the classification prediction obtained in the processes identified previously with reference to Figure 10 using a graph convolutional neural network, which includes a step of predicting reasons for unlabelled textual features of the knowledge graph using the graph convolutional neural network; and

Figure 12 shows schematically an overview of process involved in predicting reasons for unlabelled textual features of the knowledge graph using the graph convolutional neural network.

Detailed Description of the Disclosure

Referring firstly to Figure 1, a computer 101 embodying an aspect of the invention comprises central processing unit 102, flash memory 103, random-access memory 104, input/output interface 105, and system bus 106. The computer 101 is configured to run a machine-learning text classification model, specifically, a neural network, for classification of input text data.

Central processing unit 102 is configured for execution of instructions of a computer program. Flash memory 103 is configured for non-volatile storage of computer programs for execution by the central processing unit 102. Random-access memory 104 is configured as read/write memory for storage of operational data associated with computer programs executed by the central processing unit 102. Input/output interface 105 is provided for connection of external computing devices and/or other peripheral hardware to computer 101, to facilitate control of the computer 101 and inputting of input data. The components 102 to 105 of the computer 101 are in communication via system bus 106.

The flash memory 103 has a computer program for classifying input text data stored thereon. The computer program is operable on input text data to generate one or more classification predictions for characteristics of the input text data using a convolutional neural network model, and further to predict one or more reasons for the classification prediction(s) using a graph convolutional neural network model. In the exemplary embodiment, the computer program is configured for classification of input text data with respect to “offensive” and “not- offensive” classifications. The computer 101 is thus configured, in accordance with the instructions of the computer program, to receive input text data via the input/output interface 105, for example, input text data from a connected computing device, process the input text data on the central processing unit 102 using a convolutional neural network trained for the classification task to thereby generate one or more classification predictions for the input data, i.e. whether the input text data is ‘offensive’ or ‘not-offensive’, and further generate one or more reason predictions for the classification prediction reached by the neural network, e.g. reason = “because word ‘X’ of the input text data is derogatory”, using a graph convolutional neural network trained for predicting reasons. The computer 101 is then configured to output the classification prediction(s) and the reason prediction(s), for example, for display to a user of the computer via a display device connected to the input/output interface 105.

Referring next in particular to Figures 2 and 3, the method for classifying input text data performed by the computer program stored on flash memory 103 comprises seven stages.

At stage 201, the computer program causes the central processing unit 102 to perform initialisation and training processes. The processes comprise: training a ‘text classification’ convolutional neural network model for the classification task of classifying input text data into the classifications of “offensive” and “not-offensive”; constructing a sparsely-labelled knowledge graph representation of a vocabulary of words in which a subset of words of the knowledge graph are labelled with natural-language descriptor labels defining a semantic meaning of the respective word; and training a ‘reason prediction’ graph convolutional neural network for predicting natural language descriptor labels for unlabelled words of the sparsely- labelled knowledge graph. Stage 201 further comprises storing the trained neural network models and knowledge graph in the flash memory 103 of computer 101.

At stage 202, the computer program causes the central processing unit 102 to locate and load from the flash memory 103 the text classification convolutional neural network model trained at stage 201.

At stage 203, the computer program causes the central processing unit 102 to locate input text data for classification by the text classification convolutional neural network model. For example, this stage could involve the central processing unit 102 outputting, via a display device connected to input/output interface 105, a message to prompt a user to input text data for classification via the input/output interface 105. As an exemplary alternative, where the computer program is operating in an ‘automated’ text classification mode, stage 202 could involve the central processing unit 102 itself directly selecting and importing textual content for classification, for example, text posted by a user in an online discussion forum accessible by the central processing unit 102.

At stage 204, the computer program causes the central processing unit 102 to execute the text classification convolutional neural network model on the input text data received at stage 203, and generate one or more classification predictions for the input text data, e.g. that the input text data is ‘offensive’ or ‘not-offensive’. For example, the output of stage 203 could be probabilities of the input text data falling into each of the offensive/not-offensive classifications.

At stage 205, the computer program causes the central processing unit 102 to locate and load from flash memory 103 the reason prediction graph convolutional neural network model trained at stage 201. In the embodiment, the graph convolutional neural network model is trained for predicting reasons for classification predictions of the convolutional neural network model, i.e. for predicting reasons why input text data has been classified as offensive/not- offensive.

At stage 206, the computer program causes the central processing unit 102 to execute the graph convolutional neural network model on words of the input text data that are identified as important to the classification prediction(s) of the convolutional neural network model generated at stage 204, to generate predictions for the reason(s) for the classification prediction(s) of the first neural network model, e.g. “because word X is derogatory”, and/or “because word Y is an expletive”.

At stage 207, the computer program causes the central-processing unit 102 to output the classification prediction(s) obtained at stage 203 and the reason prediction obtained at stage 205. For example, this stage may involve the computer 101 outputting the classification prediction(s) and the reason prediction(s) via a display device connected to the input/output interface 105.

In the example embodiment, the initialisation and training processes of stage 201 are conducted immediately prior to the text classification processes of stages 202 to 204 and reason prediction processes of stages 205 to 207. As an alternative, one or more of the initialization and training processes of stage 201 could be performed ahead of time. For example, the text classifier convolutional neural network model and reason prediction graph convolutional neural network, could be trained, and the knowledge graph constructed, ahead of time, using computing devices external to the computer 101, and the pre-trained neural network models and the pre constructed knowledge graph could be uploaded onto flash memory 103 of computer 101 via input/output interface 105.

Referring next to Figure 4, the method of stage 201 for initialization and training comprises four stages.

At stage 401, the text classification convolutional neural network model is trained for the task of classifying input text data of classifying input text data into the classifications of “offensive” and “not-offensive”.

At stage 402, the sparsely-labelled knowledge graph representation of a vocabulary of words is constructed, to include a subset of words labelled with natural-language descriptor labels defining a semantic meaning of the respective word.

At stage 403, the reason prediction graph convolutional neural network is trained for the task of predicting natural language descriptor labels for unlabelled words of the sparsely-labelled knowledge graph.

At stage 404, the text classification convolutional neural network and graph convolutional neural network models trained at stages 401 and 403 respectively, parameters associated with the trained neural network models, and the knowledge graph constructed at stage 402, are stored in the flash memory 103 of computer 101.

Referring next in particular to Figure 5, the method of stage 401 for training the text classification convolutional neural network model for the task of classifying input text data into the classifications of “offensive” and “not-offensive” comprises four stages.

At stage 501, a plurality of items of training text data labelled with respect to the offensive/not- offensive classification of interest is input into the computer 101 via the input/output interface 105. At stage 502, a convolutional neural network model, comprising plural successive feature extraction and classification layers, is executed by the central-processing unit 102 on each item of the training text data input at stage 501, and a classification prediction for the offensive/not- offensive classification of interest is generated for each item of training data.

At stage 503, the classification prediction generated at stage 502 for each item of the training text data is compared to the respective label of the item of training text data, and a loss function representative of an error in the classification prediction is computed.

At stage 504, the loss function obtained at stage 503 is back-propagated through the text classification convolutional neural network model, and the parameters of the model, such as the weights of the feature extraction and classification layers, are updated.

Referring next to Figures 6 to 8, the method of stage 402 for constructing the sparsely-labelled knowledge graph representation of a vocabulary of words comprises four stages.

At stage 601, a vocabulary of words is obtained.

At stage 602, for each word, w, of the vocabulary, an embedding e ( i.e. a low-dimensional vector encoding a semantic of the word, is computed.

The embedding e ( for each word W j is computed using Transformer architectures by crawling textual corpora containing the word, for example, Wikipedia (trade mark) and news articles. The final embedding e ( stored is the concatenation of e w and e c ; where e w is the embedding for the word w ; , and e c is the average embedding of the context words around the word W j in the textual corpora. The final embedding e ( thus defines a semantic meaning of the respective word.

At stage 603, the embeddings generated at stage 602 are used to determine semantic relationships, i.e. links between words of the vocabulary, to define a graph structure in which words of the vocabulary are represented by nodes of the graph, and semantic relationships between words by edges of the graph. For example, nodes (representing words) in the graph may be linked by semantic relationships such as “synonym”, “antonym”, “hypernym” and “hyponym”. The knowledge graph thus defines semantic relationships between words of the vocabulary.

At stage 604, a subset of words of the vocabulary are labelled with natural-language descriptor labels o ( The natural-language descriptor labels are human-generated descriptions of the semantic sentiment of the word, e.g. “this word is derogatory”. A human-generated natural- language descriptor label may be particularly efficient in explaining clearly and succinctly to a human user why a classification prediction has been made, e.g. that a post has been classified as ‘offensive’ because “word X is derogatory”.

Referring next to Figure 9, the method of stage 403 for training the reason prediction graph convolutional neural network for predicting reason labels for unlabelled words of the knowledge graph comprises two stages. The graph convolutional neural network comprises a plurality of successive convolutional layers.

At stage 901, the word embeddings for each node of the knowledge graph, summarised as a n x s matrix W, where ‘n’ is the number of nodes in the knowledge graph and ‘s’ is the size of the word embeddings, the links in the graph structure, summarised as an n x n adjacency matrix A, wherein ‘n’ is again the number of nodes in the knowledge graph, and a matrix representation of O’ of reason labels o ( from the sparsely-labelled knowledge graph are input into the graph convolutional neural network model. Labels in O’ are available for the rows that have a correspondingly labelled node in the knowledge graph. If labels are missing for a node in the knowledge graph, the corresponding row in O’ has a correspondingly missing value.

At stage 902, the parameters of the graph convolutional neural network, such as the weights of the successive convolutional layers, are updated using a stochastic gradient descent technique.

Referring next to Figure 10, the method of stage 204 for generating a classification prediction for the input text data comprises three stages.

At stage 1001, encoding operations are applied to the input text data to generate a numerical vector representation of the text data for processing. At stage 1002, the numerical vector representations obtained at stage 1001 are passed through layers of convolutional feature extraction and classification operations to generate a classification prediction for the input text data with respect to the offensive/not-offensive classification of interest.

At stage 1003, the classification prediction for the input text data obtained at stage 1002 is stored in random-access memory 104 of computer 101.

Referring next to Figures 11 and 12, the method of stage 206 for predicting reasons for the classification predictions of the text classification convolutional neural network model comprises six stages.

At stage 1101, textual features, e.g. words, of the input text data that are relevant to the classification prediction generated at stage 204 are identified.

At stage 1102, the identified textual features are compared to the sparsely-labelled knowledge graph obtained at stage 402 and corresponding, features of the knowledge graph are identified.

At stage 1103, respective embeddings, e for the corresponding features of the knowledge graph obtained at stage 402 are identified and summarised as an n x s embedding matrix W, where ‘n’ is again the number of nodes in the graph and s is again the size of the word embeddings.

At stage 1104, the graph convolutional neural network model takes as an input the n x s embedding matrix W along with the weighted n x n adjacency matrix A.

The GCN comprises multiple convolutional layers:

Convolutional layers H (/) 1={1,...,L}, where L is the total number of layers, are then represented as non-linear functions: where H (0) = W and H (/,) = O. The function / is defined as: where: s is the RELU (Rectified Linear Unit) activation, introducing a non-linearity. A = A + 1, where I is the identity matrix added to ensure nodes own embeddings are also used, D is the diagonal node-degree matrix of A , to normalize the model from variance in node-connections. V (/) is the weight of the I th layer of neural network.

The output of the graph convolutional neural network is an n by r matrix O, defining ‘r’ predicted reasons for each of the identified textual features of the input text data: O = GCN(W,A), where ‘r’ is the number of possible reasons for explanation.

The ‘r’ possible reasons may then be output to the user at stage 207, alongside the classification prediction for the input text data obtained at stage 204. The user may thus be presented not only with a classification prediction for the input text data, e.g. a post in an online discussion forum, but also a list of possible reasons for the classification prediction, e.g. “because word X is derogatory”, and/or “because word Y is an expletive”. The user may thus be assisted in better understanding and appreciating the classification prediction. Consequently, a user’s trust in the classification prediction, and decisions based thereon, may desirably be improved.

Although the present invention and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims. _In the claims, the word “comprising” does not exclude other elements or steps, and the indefinite article “a” or “an” does not exclude a plurality.