Logic verifiable machine learning model

By adding symbolic annotations and logical rules to the machine learning model, the model is trained to verify the consistency of its output logic, which solves the problem of LLM generating logically inconsistent text, improves the credibility of the output and user trust, and reduces resource consumption.

CN122072848APending Publication Date: 2026-05-22ALEPH ALPHA GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ALEPH ALPHA GMBH
Filing Date
2025-11-21
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing large language models (LLMs) are difficult to verify effectively when generating text that is logically inconsistent or irrelevant to the prompts, which limits their applicability in domains where factual integrity is critical and may undermine users’ trust in artificial intelligence systems.

Method used

By adding symbolic annotations and logical rules to machine learning models, the models are trained to verify the logical consistency of their outputs themselves. The ability of the model to verify logical consistency itself when generating outputs is extended by leveraging the symbolic annotation and logical validator modules, reducing reliance on subsequent processing.

Benefits of technology

This enables the model to reliably verify the logical consistency of its output, reduces the consumption of processing resources, and improves the credibility of the output and user trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122072848A_ABST
    Figure CN122072848A_ABST
Patent Text Reader

Abstract

A method for training a machine learning model, a method for generating an output based on a natural language and a corresponding machine learning model, a data processing device and a computer program are disclosed. A training method may include providing at least one training data sample and adjusting a parameter set of a machine learning model based on the at least one training data sample. The training data samples may include natural language-based input tokens, sign annotations of the natural language-based input tokens, natural language-based target tokens, and sign annotations of the natural language-based target tokens, where the sign annotations may be used to validate an output of the machine learning model by means of logical rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates generally to the field of machine learning, and more specifically to techniques for providing logically verifiable machine learning models. Background Technology

[0002] Recent advances in artificial intelligence (especially deep learning) have led to the development of large language models (LLMs). These models are designed to process and generate natural language text by completing word sequences based on massive amounts of data. By training on diverse text datasets, LLMs learn statistical patterns in language, enabling them to perform a range of natural language processing tasks, such as text generation, translation, summarization, and question answering. Consequently, LLMs are becoming highly valuable across various domains, including customer service, content creation, and automated assistance. Their ability to generate context-sensitive and coherent responses makes them highly effective in applications where language understanding and generation are crucial.

[0003] Despite its impressive capabilities, LLM faces inherent challenges due to its data-driven and probabilistic nature. A key issue is the occurrence of "illusion," where text generated by a language model appears credible or authoritative but is actually inaccurate, logically inconsistent, or irrelevant to the prompts.

[0004] Illusions are particularly problematic where LLM outputs might be perceived as fact, or where incorrect information could lead to harm or misunderstanding. These risks limit the applicability of LLM in high-risk or specialized fields where factual integrity is critical. Furthermore, illusions can undermine users' trust and confidence in AI systems, as they may find it difficult to distinguish between factual and fictional outputs.

[0005] Due to the probabilistic nature of LLMs, completely mitigating this effect appears difficult, and efforts have been made to provide techniques for verifying the outputs of LLMs. However, these techniques remain partial and are often complex to implement at scale, as they typically require additional components, such as logical verifiers that process the outputs of LLMs, and therefore require further computational resources.

[0006] Therefore, the purpose of this disclosure is to provide a logically verifiable machine learning model that at least partially overcomes the aforementioned shortcomings of the prior art. Summary of the Invention

[0007] This objective is achieved by the subject matter defined in the independent claims. Advantageous modifications to the embodiments of this disclosure are defined in the dependent claims, as well as in the specification and drawings.

[0008] One aspect of this disclosure relates to a method for training a machine learning model. This method may be computer-implemented. The method may include providing at least one training data sample and adjusting a set of parameters of the machine learning model based on the at least one training data sample.

[0009] At least one training data sample may include natural language-based input tokens, natural language-based symbolic annotations of the input tokens, natural language-based target tokens, and natural language-based symbolic annotations of the target tokens. The symbolic annotations can be used to validate the output of the machine learning model using logical rules. This can also be referred to as logical validation.

[0010] Throughout this disclosure, “illusion” should be understood as ignoring information provided by the model input (e.g., given context) or contradictory model generation (i.e., output) that resembles a given input.

[0011] Throughout this disclosure, "tuning model parameters" should be understood as the step of adjusting model parameters (e.g., weights) (e.g., using backpropagation and employing appropriate loss functions such as cross-entropy loss, label-smoothed cross-entropy loss, etc.). Therefore, "tuning" can also be referred to as training or fitting a model to perform a specific task.

[0012] Throughout this disclosure, "symbolic annotation" should be understood as any combination of natural language annotation (e.g., elements of text such as words, letters, sentences, etc.) and / or symbolic annotation (e.g., one or more symbols indicating higher-level concepts such as grammar). Thus, "symbolic annotation" can include both natural language annotation and / or symbolic annotation.

[0013] The inventors discovered that hallucinations frequently occur because the model outputs an answer to a given input (e.g., a hint, context, etc.) that depends solely on the trained model state and thus ignores / disregards information provided by the input. To detect this inconsistency, the inventors therefore augmented the output generation of known machine learning models with an additional mathematical proof system capable of detecting inconsistencies and providing the user with a corresponding indication. Due to the statistical nature and complexity of language, this method may not detect all inconsistencies. However, if it does detect an inconsistency, it is irrefutable. Therefore, a method for reliably verifying model output is provided, which can additionally output a corresponding indication to the user that a hallucination has been detected.

[0014] To this end, additional symbolic annotations are provided for the tokens, enabling the model to derive logical rules based on which the model can evaluate and thus verify its generation on the symbols found in the corresponding embeddings during processing.

[0015] Therefore, the capabilities of the model are extended by using a logic validator module (also known as a neural symbol validator). Thus, a system implementing a model trained according to the training method of the present invention no longer requires subsequent processing of the model output by an additional validator, because the model is capable of validating its output itself.

[0016] Therefore, compared with systems known in the art, processing resources are saved.

[0017] According to another aspect of this disclosure, the method may further include providing a natural language-based input token and a symbolic annotation of the natural language-based input token as input to a machine learning model to obtain a predicted output from the machine learning model. The predicted output may include a natural language-based prediction token and a symbolic annotation of the natural language-based prediction token. The method may include determining a first prediction loss based on a target token and a prediction token. The method may include determining a second prediction loss based on the symbolic annotation of the target token and the symbolic annotation of the prediction token. The method may include adjusting the parameter set of the machine learning model based on the first prediction loss and the second prediction loss.

[0018] In this way, the model is not only trained to generate meaningful output tokens based on the provided input tokens, but also to generate corresponding symbolic annotations, which can be used to verify the model output.

[0019] According to another aspect of this disclosure, symbol annotations may indicate one or more symbols of a natural language-based input token to be validated.

[0020] In this way, model training can be further enhanced as causal symbolic relations (e.g., grammar) are picked up by the model more quickly.

[0021] According to another aspect of this disclosure, verification may include converting symbolic annotations into one or more logical meanings. Logical verification may include determining the degree of consistency between the one or more logical meanings as a third prediction loss. The third prediction loss may indicate a consistency score between the target token and the predicted token. In this aspect, the parameter set of the machine learning model may be further adjusted based on the third prediction loss.

[0022] This provides an additional model output that indicates a consistency score between the target and the predicted token. The score can be, for example, a probability (e.g., 0-1). Therefore, this additional output can be used as an indicator of illusion. In other words, if the consistency score is low (e.g., below 50%), it indicates that the model is producing an illusion, while if the consistency score is high (e.g., above 50%), the model is not producing an illusion.

[0023] According to another aspect of this disclosure, one or more logical meanings may include one or more first-order logic (FOL) rules.

[0024] In this way, the model is configured to generate output not only based on the state of the model it was trained on, but also based on derived rules and facts to adjust its generation.

[0025] According to another aspect of this disclosure, logical rules can be defined as: causal symbolic relations of one or more sentences represented by natural language-based input tokens, causal symbolic relations of one or more sentences represented by natural language-based input tokens and natural language-based target tokens, causal symbolic relations of one or more words represented by natural language-based input tokens, causal symbolic relations between one or more words or sentences represented by natural language-based input tokens and one or more generated target words or sentences, and / or causal symbolic relations of one or more words represented by natural language-based input tokens and natural language-based target tokens.

[0026] In this way, the model is able to pick up rules from both long contexts (e.g., causal symbolic relationships in an entire paragraph of sentences) and short contexts (e.g., improving attention training of sentences when they are bound together by annotations through labeled word segments).

[0027] According to another aspect of this disclosure, logical rules can be defined based on a given context, the inputs and / or outputs of the machine learning model.

[0028] In this way, the model output is adapted to take into account all parts of the available information (i.e., the input provided, including prompts, given context, etc.) and the logical rules of the output.

[0029] According to another aspect of this disclosure, logical rules may include one or more dynamically determined rules and / or one or more predetermined rules.

[0030] In this way, model training and therefore model generation become controllable. This means that, depending on the given use case, the model can be more stringent during validation. To this end, one or more predefined rules can be provided, which define the more stringent rules used for validation. Dynamically determined rules can include rules derived from the model itself (e.g., during training). Furthermore, both (i.e., dynamically determined and predefined rules) can be modified (e.g., adding new rules, deleting rules, or changing rules) to guide model generation without requiring retraining the model.

[0031] Another aspect of this disclosure relates to a method for generating natural language-based output using a machine learning model. The machine learning model can be trained according to the training methods described herein. This method may be particularly useful for fact-based generation or applications where reliable (i.e., non-illusionary) model output is generally crucial. These applications may include database queries, retrieval augmented generation (RAG), or summarization, etc.

[0032] The method may include providing natural language-based input as input to a machine learning model, and receiving natural language-based output generated from the machine learning model based on the provided natural language-based input.

[0033] The same applies to any of the advantages mentioned above. Other advantages may also apply.

[0034] According to another aspect of this disclosure, the method may further include receiving a consistency score associated with the natural language-based output from the machine learning model.

[0035] The same applies to any of the advantages mentioned above. Other advantages may also apply.

[0036] Another aspect of this disclosure relates to a machine learning model.

[0037] Machine learning models can be trained using any of the training methods described in this article.

[0038] Machine learning models may include a text embedding module. This module can be configured to receive natural language-based input text, generate natural language-based input tokens based on the input text, and generate symbolic annotations for the generated input tokens. These annotations can be used to validate the output of the machine learning model using logical rules.

[0039] The machine learning model may include an output header module. The output header module may be configured to generate natural language-based output based on the natural language-based input tokens. The output header module may be configured to generate symbolic annotations for the generated natural language-based output. The output header module may be configured to generate a consistency score associated with the natural language-based output based on the symbolic annotations of the generated input tokens and / or the symbolic annotations of the generated output.

[0040] The same applies to any of the advantages mentioned above. Other advantages may also apply.

[0041] Another aspect of this disclosure relates to a machine learning model, preferably the machine learning model described above, which is trained according to the training methods described herein.

[0042] The same applies to any of the advantages mentioned above. Other advantages may also apply.

[0043] According to another aspect of this disclosure, symbol annotations may include one or more part-of-speech (POS) tags.

[0044] According to another aspect of this disclosure, machine learning models may include large language models (LLM).

[0045] Another aspect of this disclosure relates to a data processing apparatus comprising a method for performing any aspect described herein and / or a machine learning model for performing any aspect described herein.

[0046] The same applies to any of the advantages mentioned above. Other advantages may also apply.

[0047] Another aspect of this disclosure relates to a computer program that includes instructions that, when executed by a computer, cause the computer to perform the methods of any aspect described herein, and / or to perform a machine learning model of any aspect described herein.

[0048] The same applies to any of the advantages mentioned above. Other advantages may also apply.

[0049] Another aspect of this disclosure relates to a computer-readable medium comprising a computer program, wherein the computer program includes instructions that, when executed by a computer, cause the computer to perform the methods of any aspect described herein, and / or to perform a machine learning model of any aspect described herein.

[0050] The same applies to any of the advantages mentioned above. Other advantages may also apply. Attached Figure Description

[0051] This disclosure can be better understood by referring to the following figures:

[0052] Figure 1 : A flowchart of a method for training a machine learning model according to embodiments of the present disclosure.

[0053] Figure 2 : A flowchart of a method for generating natural language-based output using a machine learning model according to embodiments of the present disclosure.

[0054] Figure 3 : A flowchart for verifying the output of a machine learning model according to embodiments of the present disclosure.

[0055] Figure 4 Exemplary machine learning models according to embodiments of this disclosure.

[0056] Figure 5 A simplified overview of the functionality of public markers.

[0057] Figure 6 A simplified overview of the functionality of the symbol tokenizer according to embodiments of the present disclosure.

[0058] Figure 7 Embedding steps according to embodiments of the present disclosure.

[0059] Figure 8 Training results of a method for training a machine learning model according to embodiments of the present disclosure.

[0060] Figure 9 Example computing devices for training machine learning models and / or generating natural language-based outputs using machine learning models, according to embodiments of the present disclosure. Detailed Implementation

[0061] In the following sections, representative embodiments illustrated in the accompanying drawings will be explained. It should be understood that the illustrated embodiments and the following description are examples and are not intended to limit the embodiments to a single preferred embodiment.

[0062] Figure 1 A flowchart of a method 100 for training a machine learning model according to an exemplary embodiment is shown.

[0063] Method 100 may include providing (step 102) at least one training data sample.

[0064] At least one training data sample may include natural language-based input tokens, natural language-based symbolic annotations of the input tokens, natural language-based target tokens, and natural language-based symbolic annotations of the target tokens. The symbolic annotations can be used to validate the output of the machine learning model using logical rules.

[0065] Method 100 may include adjusting (step 104) the set of parameters of a machine learning model based on at least one training data sample.

[0066] Method 100 may also include any aspects as described herein.

[0067] Figure 2 A flowchart is shown of a method 200 for generating natural language-based output using a machine learning model, according to an exemplary embodiment.

[0068] Training methods can be applied based on any aspect described in this article (e.g., Figure 1 Method 100) is used to train machine learning models.

[0069] Method 200 may include providing (step 202) natural language-based input as input to a machine learning model.

[0070] Method 200 may include receiving (step 204) a natural language-based output generated from the provided natural language-based input from a machine learning model.

[0071] Method 200 may also include any aspects as described herein.

[0072] Figure 3 A flowchart illustrating the validation of the output of a 300 machine learning model according to an exemplary embodiment is shown. Validation can be performed using logical rules.

[0073] The machine learning model 304 (shown as LLM in this document) can receive natural language-based input text 302. In this example, the input text 302 could include “An object that is on the barge, and that is holding an umbrella”.

[0074] Model 304 can generate natural language-based input tokens for the text 302, as well as corresponding symbol annotations that can be used to verify the output of model 304.

[0075] In this example, symbolic annotations can indicate several elements (e.g., words) of the generated token based on which verification is performed. In this example, symbolic annotations could indicate the elements "on", "barge", "is holding", and "umbrella".

[0076] The model can validate the corresponding output using logical rule 306. Logical rule 306 can be defined using a formal rule language and is therefore independent of the language of the input text 302. Logical rule 306 can be represented as including the logical meaning of one or more FOL rules. For this purpose, symbolic annotations can be translated into one or more of these logical meanings, based on which the degree of consistency (also known as the third prediction loss) can be determined. Based on the degree of consistency, an indication of the consistency score 310 between the input text 302 and the corresponding output can be determined. In this respect, model 304 acts as a logical validator (e.g., forward inferencer 308), which uses logical rule 306 to determine the consistency freedom. The consistency score 310 determined in this way can be provided as feedback to the user (e.g., by displaying the score 310 on a display of a computing device).

[0077] Figure 4 An exemplary machine learning model 400 according to an exemplary embodiment is shown. Training methods can be implemented according to any aspect described herein (e.g., Figure 1 Method 100) is used to train the machine learning model 400. Thus, the machine learning model 400 can be configured (e.g., via training) to execute methods for generating natural language-based output according to any aspect described herein (e.g., Figure 2 Method 200).

[0078] The machine learning model 400 may include a text embedding module 402, a text encoder module 404, and an output header module 406.

[0079] The text embedding module 402 can be configured to receive natural language-based input text, generate natural language-based input tokens based on the input text, and generate symbolic annotations for the generated input tokens that can be used to verify the output of a machine learning model with the aid of logical rules.

[0080] The text encoder module 404 may include multiple encoder blocks. Each encoder block may include a multi-head self-attention module, a residual connection (Add) and layer normalization (Norm) module, a feedforward module, and a sequence of additional Add and Norm modules.

[0081] Output header module 406 can be a task-specific header module (i.e., fine-tuned to perform a specific task). Output header module 406 may include multiple task-specific header modules. Output header module 406 can be configured to generate natural language-based output based on natural language-based input tokens and / or generate symbolic annotations for the generated natural language-based output. Output header module 406 can also be configured to generate a consistency score associated with the natural language-based output based on the symbolic annotations of the generated input tokens and / or the symbolic annotations of the generated output.

[0082] Specifically, during training, the output header module 406 can also output a loss 408 based on which it trains the model 400. The loss 408 may include the first prediction loss, the second prediction loss, and / or the third prediction loss as described above.

[0083] In an exemplary embodiment, configuring these modules to achieve the described behavior can be done by providing corresponding training data samples 410 based on their training model 400 (e.g., by using...). Figure 1 This can be achieved through method 100.

[0084] Training data sample 410 may include natural language-based input tokens (i.e., standard embeddings) generated from natural language-based input text and symbolic annotations (e.g., POS tag embeddings) of the natural language-based input text tokens. By including this additional information in the training process of model 400, the model can (i.e., be configured) validate the output (such as regarding...) using logical rules. Figure 3 (As explained). This additional information can be included through, for example, regarding... Figure 7 The overload explained is completed.

[0085] In this example, training data sample 410 includes natural language-based input tokens, which include [the|clown||the|clown|on|wednesday|in|berlin]. Corresponding symbol annotations (here, POS labels) can indicate the part-of-speech tag(s) to be validated based on, i.e., the elements and / or symbols of the natural language-based input token. In this example, the symbol annotations include […|subject|verb|…|object|…|time|…|location].

[0086] Figure 5 A simplified overview of the functionality 500 of the public tokenizer 504, as used in the output 512 generated by the LLM 510, is shown. As illustrated, the tokenizer 504 receives natural language-based input 502 as input and encodes / tokenizes it. Encoding / tokenization includes segmenting the input 506 and defining a corresponding unique identifier 508. In other words, words in the input text 502 can be mapped to corresponding unique IDs. Whitespace between words can be encoded as special characters (e.g., "_"). The LLM can then predict subsequent tokens (e.g., unique IDs associated with corresponding words) as output based on the encoded input. In this example, the LLM 510 can therefore predict the word "jumps" based on the provided input "The quick brown fox".

[0087] Figure 6 A simplified overview of the functionality 600 of a symbol tokenizer 602 according to an embodiment of the present disclosure is shown.

[0088] In the first step 604, the natural language-based input 602 is first segmented into words / elements, and each word / element is assigned a corresponding symbol annotation (e.g., POS label). For example, the input text "Heidelberg Caste is alandmark of the city" can be segmented as shown in the figure, where each word / element is assigned one of the following POS labels: PROPN (proper noun), AUX (auxiliary verb), DET (determinative), NOUN (noun), ADP (adposition), or PUNCT. (punctuation).

[0089] Symbolic annotations help models learn language faster. It can be seen that symbolic annotations can indicate simple grammatical rules, but they can also indicate other more advanced concepts, such as time or place, as can be seen in... Figure 4 This is seen in training data sample 410.

[0090] This is advantageous because users typically query models by searching for, for example, specific locations. Therefore, model generation can be guided by providing different symbolic annotations indicating different high-level concepts, such as time, place, food, or any other desired topic.

[0091] For example, you can use something like " <food>"Placeholder symbols like these, rather than actually sampling 'specific food' during generation." This method can be further extended with beam search to generate more complex structures.

[0092] In step 606, the segmented text and the assigned symbol annotations are encoded (e.g., using a pre-trained tokenizer, such as...). Figure 4 (The marker). Figure 7 The embedding step 606 is shown in more detail.

[0093] As part of the embedding step 606, the token set is further processed to assign each token its corresponding symbol annotation (e.g., word-level POS tags as assigned in step 604). This additional step is necessary because, as shown in the example, a word (here, "Heidelberg") can be divided into multiple tokens. This can happen if the word is not correctly represented in the training set. In this example, the word "Heidelberg" is divided into two tokens, "He" and "idelberg". By assigning the same symbol annotation to both, a causal symbolic relationship between the two parts of the word is indicated.

[0094] Figure 7 An embedding step 700 according to an embodiment of this disclosure is illustrated. (See also: Regarding...) Figure 6 As explained in step 606, the input text is not only segmented into tokens, but also annotated with corresponding symbolic annotations (here, POS tags).

[0095] Therefore, the input (here, "Heidelberg is") is first segmented and encoded, and then annotated with corresponding symbolic annotations (step 702). Token embedding is then performed on the segmented and encoded words (step 704), producing corresponding tokens 710 for these words. In a separate step (step 706), POS embedding is performed on the corresponding symbolic annotations, producing corresponding tokens 708. The two tokens (i.e., word token 710 and symbolic annotation token 708) are then added to each other (e.g., concatenated), producing token 714. This step is also called overload embedding. The (overloaded) token 714 is then provided as input to the LLM, as per [reference needed]. Figure 4 As explained, the LLM includes various task-specific output headers. In this example, the LLM may include an output header 720 for predicting the next token (e.g., the target token) and an output header 718 for predicting the next POS (e.g., the target symbol annotation). In the given example, the next token could be "_a" and the corresponding symbol annotation could be "D" (i.e., DET).

[0096] Figure 8 Training results 800 of a method for training a machine learning model according to embodiments of the present disclosure are shown. Training results 800 illustrate how the method according to aspects of the present invention can improve the training of a machine learning model compared to training a model using public training methods. The figure shows the average next prediction token accuracy (Y-axis) with and without symbol annotations during training on multiple training data samples (X-axis). It can be observed that symbol annotations lead to faster convergence (i.e., obtaining correct predictions). Therefore, training results 800 demonstrate that the model trains / tunes faster and generates more reliable results using the additional information provided by symbol annotations.

[0097] The graph 802 in this figure shows what is currently the standard "normal next token training" (i.e., training without symbol annotations) in the prior art.

[0098] Graph 804 illustrates a "syntax-improved" tokenizer (i.e., training without symbol annotations), whose structure facilitates the logical verification of its output. As mentioned at the beginning, the logical verification of the model output can be performed by additional components (e.g., a logic validator). However, this requires additional computational resources.

[0099] Graph 806 illustrates how training can be improved by using symbolic annotations. It can be seen that graph 806 indicates a higher average next-predict token accuracy, similar to graphs 802 or 804. Furthermore, this model requires fewer training data samples to achieve similar performance to the models below graphs 802 and 804. In this example, symbolic annotations in the form of 20 POS labels are used. In other words, the embedding is overloaded with 20 symbolic annotations.

[0100] Graph 808 also illustrates how symbolic annotations can be used to improve training. It can be seen that graph 808 indicates a higher average next-predict token accuracy, similar to graphs 802 or 804. Furthermore, this model requires fewer training data samples to achieve similar performance to the models below graphs 802 and 804. It can also be observed that training can be manipulated (e.g., regarding stability and speed) by using more symbolic annotations. Compared to the model in graph 806, this example uses 60 symbolic annotations in the form of POS labels. In other words, the embeddings are overloaded with 60 symbolic annotations. This demonstrates that annotations can be used to guide the training of the model, as fewer / more annotations lead to different training trajectories.

[0101] Figure 9 A block diagram of an example computing device 900 for training a machine learning model and / or generating natural language-based output using a machine learning model, according to an exemplary embodiment, is shown. The computing device 900 may also be referred to as, for example, an "apparatus," a "computing device," a "computer system," or a "computing system." The computing device 900 may include means for performing methods (e.g., methods 100, 200, 300) of any aspect described herein. Examples of such means are given below.

[0102] In some embodiments, computing device 900 includes one or more of the following: one or more processors 902 (which may be referred to as a "hardware processor" or simply a "hardware processor"); one or more memory devices 904; one or more network interface devices 906; one or more display interfaces 908; and one or more user input adapters 910. Additionally, in some embodiments, computing device 900 is connected to or includes display devices, input devices, etc. These components (e.g., processor 902, memory device 904, network interface device 906, display interface 908, user input adapter 910) are hardware devices (e.g., electronic circuits or combinations of circuits) configured to perform various functions of computing device 900. In some embodiments, these components of computing device 900 may be collectively referred to as computing resources, such as resources for executing instructions and including processors (one or more processors 902), storage (one or more memory devices 904), and I / O (network interface devices 906, one or more display interfaces 908, and one or more user input adapters 910).

[0103] In some instances, terminology processing resources can be used interchangeably with terminology computing resources. In some embodiments, multiple instances of computing device 900 can be deployed in a distributed computing system. Computing device 900 can be configured to communicate with one or more external devices 916. External devices 916 can be other instances of computing devices or can be different (e.g., just storage devices, sensors, etc.). In some examples, computing device 900 includes multiple computing devices 900. As an example, computing device 900 includes different architectures that can be used in a cloud computing environment.

[0104] In some embodiments, each or any of the processors 902 is or includes, for example, a single-core or multi-core processor, a microprocessor (e.g., which may be referred to as a central processing unit or CPU), a digital signal processor (DSP), a microprocessor associated with a DSP core, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) circuit, or a system-on-a-chip (SoC) (e.g., an integrated circuit including a CPU and other hardware components such as memory, network interfaces, etc.). And / or in some embodiments, each or any of the processors 902 uses an instruction set architecture such as x86 or an advanced RISC machine (ARM).

[0105] In some embodiments, each or any of the memory devices 904 is or includes, or comprises, other types of devices that are random access memory (RAM) (such as dynamic RAM (DRAM) or static RAM (SRAM)), flash memory (based on, for example, NAND or NOR technology), hard disk, magneto-optical media, optical media, cache memory, registers (e.g., storing instructions), or volatile or non-volatile storage of data and / or instructions (e.g., software executed on or by processor 902). Memory device 904 is an example of a non-transitory computer-readable storage medium.

[0106] In some embodiments, each or any network interface device 906 includes one or more circuits (such as a baseband processor and / or a wired or wireless transceiver) and implements a first layer, second layer and / or higher layer for one or more wired communication technologies (such as Ethernet (IEEE 802.3)) and / or wireless communication technologies (such as Bluetooth, WiFi (IEEE 802.11), GSM, CDMA2000, UMTS, LTE, LTE-A Advanced, LTE Pro, 5G New Radio (5G NR) and / or other short-range, medium-range and / or long-range wireless communication technologies).

[0107] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items and may be abbreviated to " / ".

[0108] Although some aspects have been described in the context of the apparatus, it is clear that these aspects also represent a description of the corresponding method, where a block or device corresponds to a method step or feature of a method step. Similarly, aspects described in the context of a method step also represent a description of a corresponding block or item or feature of the corresponding apparatus.

[0109] Embodiments of this disclosure can be implemented on a computer system. The computer system can be a local computer device (e.g., a personal computer, laptop computer, tablet computer, or mobile phone) having one or more processors and one or more storage devices, or it can be a distributed computer system (e.g., a cloud computing system having one or more processors and one or more storage devices distributed across various locations (e.g., local clients and / or one or more remote server farms and / or data centers)). The computer system can include any circuitry or combination of circuitry. In one embodiment, the computer system can include one or more processors of any type. As used herein, a processor can mean any type of computing circuitry, such as, but not limited to, a microprocessor, microcontroller, complex instruction set computing (CISC) microprocessor, reduced instruction set computing (RISC) microprocessor, very long instruction word (VLIW) microprocessor, graphics processor, digital signal processor (DSP), multi-core processor, field-programmable gate array (FPGA), or any other type of processor or processing circuitry. Other types of circuitry that can be included in the computer system can be custom circuitry, application-specific integrated circuits (AS1C), etc., such as one or more circuitry (e.g., communication circuitry) used in wireless devices (e.g., mobile phones, tablet computers, laptop computers, two-way radios, and similar electronic systems). A computer system may include one or more storage devices, which may include one or more memory elements suitable for a particular application, such as main memory in the form of random access memory (RAM), one or more hard disk drives, and / or one or more drives that process removable media such as optical discs (CDs), flash memory cards, and digital video discs (DVDs). The computer system may also include a display device, one or more speakers, and a keyboard and / or controller, which may include a mouse, trackball, touchscreen, voice recognition device, or any other device that allows system users to input and receive information from the computer system.

[0110] Some or all of the method steps may be performed by (or using) hardware devices, such as processors, microprocessors, programmable computers, or electronic circuits. In some embodiments, one or more of the most important method steps may be performed by such devices.

[0111] Depending on certain implementation requirements, embodiments of this disclosure can be implemented in hardware or software. The implementation can be performed using a non-transitory storage medium, such as a digital storage medium like a floppy disk, DVD, Blu-ray, CD, ROM, PROM, EPROM, EEPROM, or flash memory, storing electronically readable control signals that cooperate (or are capable of cooperating with) a programmable computer system to cause the corresponding methods to be executed. Therefore, the digital storage medium can be computer-readable.

[0112] Some embodiments of this disclosure include a data carrier having electronically readable control signals, which is capable of cooperating with a programmable computer system to perform one of the methods described herein.

[0113] Typically, embodiments of this disclosure can be implemented as a computer program product having program code that, when run on a computer, is operable to perform one of the methods. The program code may, for example, be stored on a machine-readable medium.

[0114] Other embodiments include a computer program stored on a machine-readable medium for performing one of the methods described herein.

[0115] In other words, therefore, embodiments of this disclosure are computer programs having program code for performing one of the methods described herein when a computer program is run on a computer.

[0116] Therefore, another embodiment of this disclosure is a storage medium (or data carrier, or computer-readable medium) including a computer program stored thereon for performing one of the methods described herein when executed by a processor. Data carriers, digital storage media, or recording media are generally tangible and / or non-transitory. Another embodiment of this disclosure is an apparatus as described herein, including a processor and a storage medium.

[0117] Therefore, another embodiment of this disclosure represents a data stream or signal sequence for performing one of the methods described herein. The data stream or signal sequence may, for example, be configured to be transmitted via a data communication connection (e.g., via the Internet).

[0118] Another embodiment includes a processing means, such as a computer or programmable logic device, configured or adapted to perform one of the methods described herein.

[0119] Another embodiment includes a computer on which a computer program for performing one of the methods described herein is mounted.

[0120] Another embodiment of this disclosure includes an apparatus or system configured (e.g., electronically or optically) to transmit a computer program for performing one of the methods described herein to a receiver. The receiver may be, for example, a computer, mobile device, memory device, etc. The apparatus or system may, for example, include a file server for transmitting the computer program to the receiver.

[0121] In some embodiments, a programmable logic device (e.g., a field-programmable gate array) may be used to perform some or all of the functions of the methods described herein. In some embodiments, the field-programmable gate array may cooperate with a microprocessor to perform one of the methods described herein. Generally, these methods are preferably performed by any hardware device.< / food>

Claims

1. A computer-implemented method (100) for training a machine learning model, the method comprising: Provide (102) at least one training data sample, the training data sample comprising: Input tokens based on natural language; The symbolic annotation of the input token based on natural language; Natural language-based target tokens; and The symbolic annotation of the target token based on natural language; The symbol annotations can be used to verify the output of the machine learning model using logical rules; The parameter set of the machine learning model is adjusted (104) based on the at least one training data sample.

2. The method according to the preceding claims further includes: The natural language-based input token and its symbolic annotation are provided as input to the machine learning model to obtain a prediction output from the machine learning model, the prediction output including: Natural language-based prediction tokens; and Symbolic annotations for the predictive tokens based on natural language; The first prediction loss is determined based on the target token and the prediction token; The second prediction loss is determined based on the symbolic annotation of the target token and the symbolic annotation of the predicted token; and The parameter set of the machine learning model is adjusted based on the first prediction loss and the second prediction loss.

3. The method according to any one of the preceding claims, wherein, The symbol annotation indicates one or more symbols of the natural language-based input token to be used to perform the verification.

4. The method according to any one of the preceding claims, wherein, The verification includes: Convert the symbol annotations into one or more logical meanings; The degree of consistency of the one or more logical meanings is determined as a third prediction loss, wherein the third prediction loss indicates the consistency score between the target token and the predicted token; and The parameter set of the machine learning model is further adjusted based on the third prediction loss.

5. The method according to the preceding claim, wherein, The one or more logical meanings include one or more first-order logic FOL rules.

6. The method according to any one of the preceding claims, wherein, Logical rules define one or more of the following: The causal symbolic relationship of one or more sentences represented by the natural language-based input tokens; The causal symbolic relationship of one or more sentences represented by the natural language-based input token and the natural language-based target token; The causal symbolic relationship of one or more words represented by the natural language-based input tokens; A causal symbolic relationship between one or more words or sentences represented by natural language-based input tokens and one or more generated target words or sentences; or A causal symbolic relationship between one or more words represented by the natural language-based input token and the natural language-based target token.

7. The method according to any one of the preceding claims, wherein, The logical rules are defined based on a given context, the inputs and / or outputs of the machine learning model; and Preferably, the logical rules include one or more dynamically determined rules and / or one or more predetermined rules.

8. A method (200) for generating natural language-based output using a machine learning model trained according to any one of claims 1-7, the method comprising: Provide (202) natural language-based input as input to the machine learning model; Receive (204) a natural language-based output generated from the provided natural language-based input from the machine learning model.

9. The method according to the preceding claim, wherein, The machine learning model The method according to claim 4 further includes: Receive a consistency score associated with the natural language-based output from the machine learning model.

10. A machine learning model, comprising: The text embedding module is configured as follows: Receive input text based on natural language; Generate a natural language-based input token based on the input text; as well as Generate symbolic annotations for the generated input tokens, which can be used to verify the output of the machine learning model using logical rules; and The output header module is configured as follows: Generate natural language-based output based on the natural language-based input token; Generate symbolic annotations for the generated natural language-based output; as well as A consistency score is generated based on symbolic annotations of the generated input tokens and / or symbolic annotations of the generated output, which is then used to associate the natural language-based output.

11. A learning model, preferably the machine learning model according to claim 10, trained by the method according to any one of claims 1-7.

12. The method according to any one of claims 1-9, or the machine learning model according to any one of claims 10-11, wherein, The symbol annotation includes one or more part-of-speech (POS) tags.

13. The method according to any one of claims 1-9 or 12, or the machine learning model according to any one of claims 10-12, wherein, The machine learning model includes the Large Language Model (LLM).

14. A data processing apparatus (900) configured to perform the method (100, 200) according to any one of claims 1-9 or 12-13, or to perform a machine learning model according to any one of claims 10-13.

15. A computer program or a computer-readable medium including a computer program, wherein, The computer program includes instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-9 or 12-13, or to perform the machine learning model according to any one of claims 10-13.