Knowledge learning method for commonsense reasoning in intelligent machine

By constructing a combinatorial paradigm and a multi-dimensional feature learning method, and combining the mutually exclusive characteristics of pre-trained models and common sense reasoning tasks, the performance of intelligent machines in common sense reasoning is improved. This solves the problems of lack of generalization ability and semantic insufficiency in existing technologies, and achieves more efficient common sense knowledge learning.

WO2026067596A1PCT designated stage Publication Date: 2026-04-02HAPPYTUK CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing commonsense reasoning methods lack generalization ability in intelligent machines, deep learning models have insufficient reasoning ability when semantic information is lacking, supervised models perform poorly when the commonsense reasoning dataset is small, and fine-tuning methods rely only on the dataset and language preference learning, which has limited effectiveness.

Method used

By combining pre-trained models, a combined paradigm is constructed to integrate multi-dimensional features. Fine-grained semantic features are captured through the differences between trigger words and pronouns. Common sense knowledge is mined using neutral sentences, positive sentences, and negative sentences to improve the model's ability to associate common sense.

Benefits of technology

It enhances the common sense reasoning ability of intelligent machines, improves the accuracy and robustness of the model in common sense reasoning tasks, and enables it to better distinguish common sense knowledge with different semantics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025124235_02042026_PF_FP_ABST
    Figure CN2025124235_02042026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention is a knowledge learning method for commonsense reasoning in an intelligent machine. The method comprises the following steps: step 1, normalizing commonsense reasoning data; step 2, constructing a combination paradigm; step 3, performing multi-dimensional feature commonsense knowledge learning; and step 4, performing model testing and commonsense reasoning.
Need to check novelty before this filing date? Find Prior Art

Description

A knowledge learning method for intelligent machine common sense reasoning

[0001] Related cross-references

[0002] The present application is based on and claims priority to Chinese Patent Application No. 202411377466.3, filed on September 30, 2024, the entire contents of which are hereby incorporated by reference into the present application. TECHNICAL FIELD

[0003] The present application relates to a knowledge learning method for intelligent machine common sense reasoning, and belongs to the technical fields of Internet and artificial intelligence. BACKGROUND

[0004] Common sense reasoning, as a key technology for intelligent machine learning, is mainly the ability to make judgments about the world using the common sense implied by the extensive knowledge and assumptions possessed by humans. This reasoning is crucial for many natural language understanding tasks, such as intelligent Internet of Things, question answering, and dialogue systems. However, common sense reasoning remains a challenging problem for machines, as it requires learning and reasoning about entities and events that have not been observed or mentioned.

[0005] Traditional common sense reasoning methods are mainly based on known knowledge bases or manually formulated rules, and although they have achieved some success, this method is a common sense reasoning driven by humans and lacks generalization ability. Deep learning models perform common sense reasoning by learning the contextual semantic information of sentences, but when the sentences lack semantic information, the model's reasoning ability is insufficient. In addition, supervised deep learning models require a large amount of manually labeled tags, and when faced with a small-scale common sense reasoning dataset, the effect is not ideal.

[0006] Pre-trained models have certain implicit common sense knowledge because they learn text knowledge in large-scale corpora, and can provide entity relationship reasoning in common sense sentences. Researchers have begun to use fine-tuning methods combined with prior knowledge to achieve good results on the representative common sense reasoning task Winograd Schema Challenge, but the fine-tuning-based method only relies on data sets and language tendencies to learn shallow semantic clues, and is very limited in accurately understanding common sense relationships. Based on previous research, we introduce multi-dimensional features into the common sense reasoning task based on pre-trained models, and use trigger words to learn the deep common sense knowledge of mutually exclusive sentences in common sense reasoning problems, thereby improving the reasoning ability of the model.

[0007] Therefore, the application introduces a new knowledge learning method for intelligent machine common sense reasoning, which combines the powerful coding ability of the pre-training model, combines multi-dimensional features with the mutually exclusive properties of paired common sense tasks to construct a combination paradigm, and captures fine-grained semantic features by the difference between trigger words and referring nouns. After obtaining the semantic features, a common sense knowledge learning method for multi-dimensional features is proposed, which captures the common sense knowledge implied by different word meanings by using neutral sentences, positive sentences and negative sentences, thereby improving the common sense reasoning ability of the model. SUMMARY

[0008] In order to solve the problems and deficiencies in the prior art, the application provides a knowledge learning method for intelligent machine common sense reasoning, which constructs a combination paradigm, fuses the mutually exclusive characteristics of common sense reasoning tasks, and performs paired semantic coding on comparison sentences, thereby better comparing the difference between trigger words and referring nouns. In addition, after obtaining the semantic coding information of the paired sentences, multi-dimensional feature common sense knowledge learning is constructed to mine the common sense knowledge between neutral sentences, positive sentences and negative sentences, improve the common sense correlation ability of the model, and gradually learn the model to better distinguish the common sense knowledge implied by different semantics.

[0009] In order to achieve the above-mentioned purpose, the technical scheme of the application is as follows: a knowledge learning method for intelligent machine common sense reasoning, the method comprising the following steps:

[0010] Step 1: Common sense reasoning data standardization;

[0011] Step 2: Combination paradigm construction;

[0012] Step 3: Multi-dimensional feature common sense knowledge learning;

[0013] Step 4: Model testing and common sense reasoning.

[0014] As an improvement of the application, step 1: common sense reasoning data standardization, first, the crawler technology is used to obtain the common sense reasoning data set, and the data set is standardized to contain two sentences with pronouns and two candidate words for the pronouns. Replacing the pronouns in each sentence with candidate words can form different sentence semantics, so as to meet the common sense knowledge logic.

[0015] As an improvement of the application, step 2: combination paradigm construction, the standardized common sense reasoning data is constructed into a combination paradigm, specifically, the sentence pair Tw containing pronouns is constructed into a combination input T l twherein, l={1,2}, represents the number of sentence pairs. t={m, p, n} is a combination of sentence identifiers, wherein m represents the identifier of the masked neutral sentence, p represents the identifier of the positive sentence, and n represents the identifier of the negative sentence. consisting of a set of multiple sentences, the sentence T l m is a neutral sentence, which is formed by replacing the pronoun P with a masking mark; T l p is a positive sentence, which is generated by replacing the pronoun P with a correct candidate word; is a negative sentence, which is formed by replacing the sentence pronoun P with an incorrect candidate word.

[0016] As an improvement of the present application, step 3: multi-dimensional feature common sense knowledge learning, specifically as follows, using the combination paradigm processed in step 2, first use the pre-training model BERT to perform context encoding representation, to obtain the semantic information representation of each group. After obtaining the semantic representation of the sentence, a multi-dimensional feature common sense knowledge learning strategy is introduced to learn the model. The implementation of this step is divided into the following sub-steps:

[0017] Sub-step 3-1, construct the model context encoding layer, use the pre-training model BERT to convert each word sequence in the normalized combined input into a word vector representation, and respectively obtain the mapped question word vector sequence:

[0018] wherein p∈{1,2}, t∈{m, p, n}, respectively represent neutral sentences, positive sentences and negative sentences, d is the dimension of the context embedding representation, and k represents the length of the sentence. Then use the BERT encoder e

[0019] to perform context encoding learning:

[0020] d h represents the dimension of each layer. The [CLS] mark output in the hidden layer of the last layer encoding representation is regarded as the context encoding representation of the entire sentence. Therefore, the final encoding information representation of the combination paradigm is obtained:

[0021] Sub-step 3-2, multi-dimensional feature common sense knowledge learning. Multi-dimensional feature common sense knowledge learning mainly learns cross-entropy loss and multi-dimensional loss.

[0022] Cross-entropy loss is a widely used loss function in classification tasks, which evaluates the loss by comparing the target class and the predicted class, and its purpose is to improve the classification accuracy by maximizing the probability of the correct class. The mathematical formula of cross-entropy loss is as follows:

[0023] where y is the true label, is the predicted probability distribution.

[0024] The multi-dimensional loss function, as a loss function designed for embedding vector space learning, is commonly used to measure learning tasks. Its main purpose is to minimize the distance between samples of the same class while maximizing the distance between samples of different classes, thereby effectively enhancing the robustness and classification accuracy of the model. Its corresponding objective function is:

[0025] where subscript 2 represents the L2 norm, which is used for normalization of data. I represents the total number of samples, T i m is the i-th neutral sentence, T i p is the i-th positive sentence, T i n is the i-th negative sentence.

[0026] The fusion loss aims to optimize the comprehensive objective of the above loss functions: L = λ1Loss1 + λ2Loss2.

[0027] where λ1 and λ2 represent learnable hyperparameters,

[0028] Sub-step 3-3, training model loss. The parameters of the encoding stage are determined according to the configuration file of the pre-trained model, and the AdamW optimizer is used for gradient backpropagation to update the parameters. By performing a decay operation before updating the weight parameters, the learning rate is set to 1e-6 linear decay, and the dropout rate is set to 0.1, with a batch size of 8. It is worth noting that two different markers are added to each sentence during preprocessing. The [CLS] marker is added at the beginning of the sentence. The [SEP] marker is inserted after the sentence as an indicator of the sentence boundary. The BERT model is used to embed the token dimension of the model to 1024, with 24 hidden layers. The length of the sentence is uniformly set to 128, and sequences exceeding this limit will be truncated, while shorter sequences will be padded. The entire model is tested in an experimental environment composed of a virtual environment. The created virtual environment tests the PyTorch and NumPy versions 1.12.1 and 1.23.3, respectively.

[0029] As an improvement of the present application, step 4, model testing and common sense reasoning, the model trained in step 3 with the smallest loss value is used as the best validation model for common sense reasoning learning, and the accuracy is used to test the final performance of the model.

[0030] An electronic device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the knowledge learning method for intelligent machine common sense reasoning when executing the program.

[0031] A storage medium has a computer program stored thereon, wherein the computer program implements the knowledge learning method for intelligent machine common sense reasoning when executed by a processor.

[0032] Compared with the prior art, the present application has the following advantages:

[0033] (1) The present application introduces a knowledge learning method for intelligent machine common sense reasoning, which combines a pre-trained model with strong coding learning language features, focuses on the mutual exclusion characteristics of common sense tasks, and introduces a combination paradigm to replace the traditional input form, so that the model is compatible with the paired mutual exclusion characteristics of common sense reasoning tasks, and the common sense reasoning performance of the model is improved.

[0034] (2) The present application uses a new multi-dimensional feature common sense knowledge learning mode to supervise the loss of neutral sentences and positive instances in model learning, and excludes the learning of neutral sentences and negative instances, improves the precision of deep mining of common sense association of the language model, and thus gives the model the ability to accurately capture and utilize common sense knowledge to distinguish different semantics, further enhancing the performance of intelligent machine learning and distinguishing common sense knowledge. BRIEF DESCRIPTION OF DRAWINGS

[0035] Fig. 1 is a whole model diagram of an embodiment of the present application;

[0036] Fig. 2 is a method processing flowchart of an embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to deepen the understanding and understanding of the present application, the present application will be further illustrated below in combination with specific embodiments.

[0038] Embodiment 1: A knowledge learning method for intelligent machine common sense reasoning, which first normalizes the common sense reasoning data in the Internet. Then, a combination paradigm is constructed, the mutual exclusion characteristics of common sense reasoning tasks are fused, and the paired semantic coding of comparison sentences is performed, so as to better compare the differences between trigger words and referring nouns. Then, a pre-trained model is used to perform embedded semantic representation on the paired input sentences. After obtaining the semantic coding information of the paired sentences, a multi-dimensional feature knowledge learning is constructed, the common sense knowledge between neutral sentences, positive sentences and negative sentences is utilized, the common sense association ability of the model is improved, so that the model gradually reasons and learns, and better distinguishes the common sense knowledge implied by different semantics.

[0039] The specific model is shown in Fig. 1, and the detailed implementation steps are as follows:

[0040] Step 1: Common Sense Reasoning Data Normalization. First, web scraping technology is used to obtain a common sense reasoning dataset, which is then normalized so that each dataset contains two sentences with pronouns and two candidate words for referring to those pronouns. Replacing the pronouns in each sentence with the candidate words creates different sentence semantics, ensuring that the sentences conform to common sense logic.

[0041] Step 2: Combinatorial Paradigm Construction. The standardized commonsense reasoning data is used to construct a combinatorial paradigm. Specifically, sentences containing pronouns (Tw) are combined to form the input T. l t Where l = {1, 2} represents the number of sentence pairs, and t = {m, p, n} is the combination of sentence identifiers, where m represents the identifier of the neutral sentence being masked, p represents the identifier of the positive sentence, and n represents the identifier of the negative sentence. It consists of a collection of multiple sentences. Sentence T l m It is a neutral sentence, formed by replacing the pronoun P with a masking marker; T l p A positive sentence is generated by replacing pronoun P with the correct candidate word; A negative sentence is formed by replacing the sentence pronoun P with an incorrect candidate word.

[0042] Step 3: Multi-dimensional feature commonsense knowledge learning. Utilizing the combined paradigm processed in Step 2, the pre-trained model BERT is first used for context encoding to obtain the semantic information representation of each group. After obtaining the semantic representation of the sentence, a multi-dimensional feature commonsense knowledge learning strategy is introduced to enable the model to learn reasoning. This step is implemented in the following sub-steps:

[0043] Sub-step 3-1: Construct the model context encoding layer, using the pre-trained BERT model to convert each word sequence in the normalized combined input into a word vector representation, and obtain the mapped question word vector sequence respectively:

[0044] in p∈{1,2}, t∈{m,p,n}, representing neutral sentence, positive sentence, and negative sentence respectively, d e The dimension of the embedding representation is defined by context, where k represents the sentence length. Then, BERT encoding is used.

[0045] The device performs context encoding learning:

[0046] d hdenotes the dimension of each layer. The [CLS] token output in the hidden layer of the last layer encoding representation is taken as the context encoding representation of the entire sentence. Therefore, the final combined encoding information is represented as:

[0047] Sub-step 3-2, multi-dimensional feature common sense knowledge learning. The multi-dimensional feature common sense knowledge learning in this embodiment mainly learns by fusing cross-entropy loss and multi-dimensional loss.

[0048] Cross-entropy loss is a widely used loss function in classification tasks, which evaluates the loss by comparing the target class and the predicted class. The purpose is to improve the classification accuracy by maximizing the probability of the correct class. The mathematical formula of cross-entropy loss is as follows:

[0049] where y is the true label, is the predicted probability distribution,

[0050] Multi-dimensional loss function is a loss function designed for embedding vector space learning, which is usually used to measure the learning task. Its main purpose is to minimize the distance between samples of the same class, while maximizing the distance between samples of different classes, so as to effectively enhance the robustness and classification accuracy of the model. Its corresponding objective function is:

[0051] where subscript 2 represents L2 norm, which is used for data normalization. I represents the total number of samples, T i m is the i-th neutral sentence, T i p is the i-th positive sentence, T i n is the i-th negative sentence,

[0052] The fusion loss aims to optimize the comprehensive objective of the above loss functions: L = λ1Loss1 + λ2Loss2.

[0053] where λ1 and λ2 represent learnable hyperparameters,

[0054] Sub-step 3-3, training model loss. The parameters of the encoding stage of this embodiment are all determined according to the configuration file of the pre-trained model, the AdamW optimizer is used for gradient back propagation to update the parameters, the decay operation is performed before the weight parameter update, the learning rate is set to 1e-6 linear decay, the dropout rate is set to 0.1, and the batch size is 8. It is worth noting that two different markers are added to each sentence during preprocessing. The [CLS] marker is added at the beginning of the sentence. The [SEP] marker is inserted after the sentence as an indicator of the sentence boundary. The embedding dimension of the model is set to 1024 using BERT, and the hidden layer is 24. The length of the sentence is uniformly set to 128, and sequences exceeding this limit will be truncated, while shorter sequences will be padded. The entire model is tested in an experimental environment composed of a virtual environment. The created virtual environment tests the PyTorch and NumPy versions respectively as 1.12.1 and 1.23.3.

[0055] Step 4, model testing and common sense reasoning, according to the loss value trained by the model in step 3, the model with the minimum loss value is selected as the best verification model, and the common sense reasoning learning is carried out, and the accuracy is used to test the final performance of the model.

[0056] Based on the same inventive concept, the knowledge learning method and device for intelligent machine common sense reasoning of the present application include a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements the above-mentioned knowledge learning method for intelligent machine common sense reasoning.

[0057] Those skilled in the art will appreciate that the embodiments described herein are intended to aid the reader in understanding the principles of the present application, and it should be understood that the embodiments are only used to illustrate the present application and not to limit the scope of the present application. After reading the present application, those skilled in the art can make various modifications to the present application, and all such modifications fall within the scope of the present application as defined by the claims.

Claims

1. A knowledge learning method for intelligent machine common sense reasoning, the method comprising the following steps: Step 1: Common sense reasoning data normalization; Step 2: Combination paradigm construction; Step 3: Multi-dimensional feature common sense knowledge learning; Step 4: Model testing and common sense reasoning.

2. The knowledge learning method for intelligent machine common sense reasoning according to claim 1, wherein step 1: Common sense reasoning data normalization is as follows: first, obtain common sense reasoning data set by using crawler technology, and normalize it to contain two sentences with pronouns in each data set, and have two candidate words for the pronouns, replace the pronouns in each sentence with the candidate words to form different sentence semantics, so as to conform to the common sense knowledge logic.

3. The knowledge learning method for intelligent machine common sense reasoning according to claim 1, step 2: combination paradigm construction, specifically as follows, the normalized common sense reasoning data is constructed into a combination paradigm, specifically, the sentence pair Tw containing pronouns is constructed into a combination input T l t wherein, l = {1,2} represents the number of sentence pairs, t = {m, p, n} is a combination of sentence identifiers, where m represents the identifier of the neutral sentence masked by MASK, p represents the identifier of the positive sentence, and n represents the identifier of the negative sentence, consisting of a set of multiple sentences, sentence T l m is a neutral sentence formed by replacing the pronoun P with a masking mark; T l p is a positive sentence generated by replacing the pronoun P with the correct candidate word; is a negative sentence formed by replacing the sentence pronoun P with an incorrect candidate word.

4. The knowledge learning method for intelligent machine common sense reasoning according to claim 3, wherein step 3: Multi-dimensional feature common sense knowledge learning is as follows: using the combination paradigm processed in step 2, first, use the pre-trained model BERT to perform context encoding representation to obtain the semantic information representation of each group, after obtaining the semantic representation of the sentence, introduce multi-dimensional feature common sense knowledge learning strategy to perform reasoning learning on the model, the implementation of this step is divided into the following sub-steps: Sub-step 3-1, build a model context encoding layer, use the pre-trained model BERT to convert each word sequence in the normalized combined input into a word vector representation, and respectively obtain the mapped question word vector sequence: wherein p e {1, 2}, t e {m, p, n} respectively represent neutral sentences, positive sentences and negative sentences, d e dimension of contextual embedding representation, k represents the length of the sentence, and then BERT encoding is used Contextual coding learning is performed on the device: d h The dimensions of each layer are represented, and the [CLS] token output in the hidden layer of the last layer encoding is regarded as the context encoding representation of the whole sentence, so the combined final encoding information representation is obtained: Sub-step 3-2, multi-dimensional feature common sense knowledge learning. The multi-dimensional feature common sense knowledge learning mainly learns by fusing the cross-entropy loss and the multi-dimensional loss. The mathematical formula of the cross-entropy loss is as follows: where y is the true label, is the predicted probability distribution, As a kind of loss function designed for embedding vector space learning, multi-dimensional loss function is usually used to measure learning tasks, and its main purpose is to minimize the distance between samples of the same class and maximize the distance between samples of different classes, so as to effectively enhance the robustness and classification accuracy of the model, and its corresponding objective function is: where subscript 2 represents L2 norm for normalizing data, I represents total number of samples, T i m is the ith neutral sentence, T i p is the ith positive sentence, T i n is the ith negative sentence, the fusion loss, the target is to optimize the comprehensive target of the above loss function: L = λ1Loss1 + λ2Loss2; wherein λ1 and λ2 represent learnable hyperparameters, sub-step 3-3, training model loss, the parameters in the encoding stage are determined according to the configuration file of the pre-trained model, the AdamW optimizer is used for gradient back propagation to update the parameters, the learning rate is set to 1e-6 linear decay, the dropout rate is set to 0.1, and the batch size is 8.

5. The knowledge learning method for intelligent machine common sense reasoning according to claim 1, wherein step 4, model testing and common sense reasoning, the model with the minimum loss value trained in step 3 is used as the best verification model for common sense reasoning learning, and the accuracy is used to test the final performance of the model.

6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the knowledge learning method for intelligent machine common sense reasoning according to any one of claims 1 to 6 when executing the program.

7. A storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the knowledge learning method for intelligent machine common sense reasoning according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Generation common sense reasoning method for strengthening aggregated knowledge guidance

    CN113255918A

  • Contrastive self-supervised machine learning for commonsense reasoning

    CN113850392A

  • Visual common sense reasoning method and system based on knowledge perception attention network

    CN115759262A

  • Common sense knowledge graph reasoning method based on concept semantic information learning under relation constraint

    CN118536600A

  • Intelligent machine common sense reasoning-oriented knowledge learning method

    CN119272877A