Multi-span question and answer method and system based on large and small model collaboration
By collaborating with a large language model and a small pre-trained model, knowledge-aware representations are generated and coverage matching training is performed, which solves the problems of cognitive gap and insufficient reasoning in multi-span question answering and achieves efficient and stable multi-answer extraction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-27
AI Technical Summary
Existing multi-span question answering methods suffer from cognitive gaps and insufficient reasoning when faced with complex reasoning, implicit intentions, and multi-entity relationships. They also have high computational costs, poor controllability, and difficulty in generalizing in open domain or cross-domain environments.
We adopt a multi-span question-answering knowledge perception method (COKE) based on collaboration between large and small models. This method generates knowledge perception representations through knowledge reconstruction and logical reasoning of a large language model, and combines coverage matching training and collaborative reasoning of a small pre-trained model to achieve the unification of knowledge perception and structured reasoning.
It improves the accuracy and generalization of multi-answer extraction, enhances the stability and interpretability of the model across different scenarios, and reduces computational costs.
Smart Images

Figure CN121745238A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology and relates to natural language processing technology. Specifically, it relates to a knowledge perception and reasoning method and system based on the collaboration of large and small models, which is applicable to multi-span question answering tasks. Background Technology
[0002] With the rapid development of natural language processing technology, question answering systems based on pre-trained language models (such as BERT and RoBERTa) have achieved significant results in extractive question answering tasks. Traditional single-answer extraction models can handle simple questions well, but in practical applications, user-generated questions often involve multiple discontinuous information fragments, requiring the integration of multiple contextual evidences to form a complete answer. This type of task is called a multi-span question answering task.
[0003] Existing multi-span question answering methods primarily rely on supervised learning paradigms, which involve fine-tuning small-scale pre-trained models to adapt them to specific tasks. However, these models exhibit a significant "cognitive gap" when facing complex reasoning, implicit intent, and multi-entity relationships, struggling to capture the semantic connections between multiple answers. Furthermore, supervised learning models typically depend on large amounts of manually labeled data, exhibiting weak generalization ability and being unsuitable for open-domain or cross-domain environments.
[0004] In recent years, large language models have demonstrated powerful capabilities in language understanding and logical reasoning. Through context learning and thought chain hints, large language models can simulate human reasoning processes and perform multi-step reasoning on complex problems. However, in multi-span question-answering scenarios, directly using large language models for end-to-end generation suffers from problems such as unstable reasoning, redundant output, and false answers, and also incurs high computational costs and poor controllability.
[0005] Therefore, how to combine the reasoning advantages of large language models with the structured extraction capabilities of small models while ensuring computational efficiency has become an important research direction in the field of multi-span question answering. There is an urgent need in this field for a collaborative technical solution with knowledge reconstruction, logical reasoning, and cognitive alignment mechanisms to improve the accuracy, stability, and interpretability of the system. Summary of the Invention
[0006] To overcome the cognitive gap and inadequate reasoning in existing multi-span question answering models, this invention proposes a multi-span question answering knowledge perception method (COKE) and system based on collaboration between large and small models. This invention integrates the reasoning ability of a large language model with the extraction ability of a small pre-trained model. Through knowledge reconstruction, logical reasoning, coverage matching training, and collaborative reasoning mechanisms, it achieves the unification of knowledge perception and structured reasoning, improving the accuracy and generalization of multi-answer extraction.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: The multi-span question-answering knowledge perception method based on size-model collaboration proceeds as follows: S1: Through the large language model, knowledge prompt generation and chain-like logical reasoning are performed to semantically expand and reconstruct the knowledge of the input question, resulting in a knowledge-aware representation containing potential answer entities, reasoning links and semantic dependencies, which serves as the input basis for subsequent steps; S2: Based on the knowledge-aware representation obtained in step S1, calculate the knowledge coverage rate between the standard answer and the knowledge-aware representation in the training samples; filter the training samples according to the knowledge coverage rate, and construct a high-quality training set with consistent coverage for supervised training of the small model with coverage matching constraints. S3: Based on the knowledge-aware representation from step S1 and the small model trained in step S2, the knowledge-aware representation is fused with the original question, i.e., the input question in S1, and input into the small model. The small model is then used to perform collaborative reasoning by leveraging its multi-span extraction capability to achieve the location and generation of answers for multi-span problems.
[0008] Preferably, in step S1, the present invention proposes a knowledge reconstruction mechanism based on a large language model to generate a knowledge-aware representation that is highly consistent with the semantics of the question.
[0009] Preferably, in step S1, the knowledge reconstruction mechanism based on the large language model is constructed as follows: Figure 1 As shown, the specific steps include: S1.1: Perform semantic parsing on the input question Q and context C to clarify the intent type, target entity, and information requirements of the question; S1.2: Guide the large language model to extract key information fragments related to the problem from the context and generate several formalized knowledge statements; S1.3: Based on the knowledge statement obtained in step S1.2, the large language model further integrates semantic information, generates logically consistent reasoning statements, and predicts the number of reasonable answers; S1.4: Through dual modeling at the factual level in step S1.2 and the logical level in step S1.3, the final knowledge perception representation K is formed.
[0010] More preferably, in step S1.1, by calling the contextual understanding and semantic parsing capabilities of the large language model, the intent recognition and structured analysis of the input question are automatically completed, and its category is determined by combining the semantic context, including people, events, time, place or attributes, so as to achieve semantic understanding of the question.
[0011] More preferably, in step S1.2, factual descriptions, event fragments, or entity relationships related to the semantics of the question are automatically identified from the input text, and the model is guided to generate a set of structured knowledge statements that match the question through prompt-based instruction templates.
[0012] More preferably, in step S1.3, based on the knowledge statement obtained in step S1.2, the large language model generates logically consistent reasoning chain statements in reasoning mode. This process integrates contextual association, event causality, and entity subordination to establish cross-sentence level reasoning connections. Simultaneously, the language model outputs probability assessments to determine a reasonable range for the number of answers, achieving knowledge integration from the factual layer to the logical layer.
[0013] More preferably, in step S1.4, based on the dual modeling of the factual layer and the logical layer, the factual knowledge statement in step S1.2 is fused with the reasoning chain statement in step S1.3 to obtain a structured knowledge-aware representation K: In the formula, Q represents the original question, C represents the original context, and LLM(•) represents the large language model.
[0014] The above representation explicitly models the "problem-evidence-reasoning" relationship, providing interpretable and high-coverage semantic input for subsequent small models, and significantly narrowing the semantic gap between problem understanding and answer location.
[0015] The aforementioned knowledge reconstruction mechanism based on a large language model demonstrates significant advantages in the following three aspects: 1) Through the contextual reasoning and semantic parsing capabilities of the large language model, a deep understanding of the intent of complex issues is achieved, which can identify cross-sentence, implicit and complex semantic relationships, and significantly improve the model's semantic modeling ability for multi-span issues; 2) The knowledge perception representation generated through the knowledge prompts and logical reasoning stages integrates factual descriptions and logical statements, enabling the model to have clear knowledge sources and explanation paths during the reasoning process, thereby enhancing the traceability and reliability of the results. 3) This mechanism relies entirely on large language models to automatically complete semantic analysis, evidence extraction and logic generation without the need for additional manual annotation or task-specific rules. It has good versatility and cross-domain transfer capabilities and can quickly adapt to different types of question-answering scenarios.
[0016] Preferably, in step S2, the present invention also proposes a coverage matching mechanism for dynamically aligning the data distribution during the supervised training phase. This mechanism adaptively filters and adjusts the weights of training samples by calculating the coverage ratio of answer information in the knowledge-aware input, enabling the model to simulate the knowledge distribution characteristics of the reasoning phase during training, thereby effectively reducing the risk of cognitive bias and enhancing the generalization stability of the model under cross-scenario and multi-task conditions.
[0017] Preferably, the coverage matching mechanism is constructed as follows: S2.1: Define the knowledge coverage parameter to measure the degree of coverage of answer information in the knowledge-perceived representation; S2.2: Construct a coverage matching training subset to ensure that the distribution of training samples remains consistent with that of the inference phase; S2.3: Perform supervised fine-tuning under coverage matching conditions to optimize model parameters and achieve cognitive alignment.
[0018] More preferably, in step S2.1, by analyzing the knowledge-aware representation K generated by the large language model during the knowledge reconstruction stage, the proportion of knowledge fragments containing target answer information is calculated, thereby defining the knowledge coverage parameter. ; Where, n ans n represents the number of correct answers in a knowledge segment. all This indicates the number of correct answers in the original context.
[0019] More preferably, in step S2.2, the knowledge coverage rate calculated in step S2.1 is... Coverage matching is performed on the training dataset to select coverage rates that are similar to the average coverage rate during the inference phase. Similar samples are used to construct a coverage matching training subset. : in, Q represents the coverage matching of a subset of training data. i Let K represent the question input for the i-th sample. i With A i Let Coverage(K) represent the knowledge perception representation and the answer set corresponding to question i, respectively. i The value represents the coverage rate of knowledge segments in the sample, i.e., the proportion containing answer information. Weights can also be assigned based on the importance of the samples to ensure that the knowledge distribution remains consistent with the reasoning stage, thereby effectively reducing distribution shift during training.
[0020] More preferably, in step S2.3, the coverage matching training subset described in step S2.2 is used... Supervised fine-tuning is performed on the pre-trained language model (small model); for different multi-span extraction architectures, the corresponding loss function is minimized to obtain the optimized parameters. : in, This represents the optimized model parameters. Represents the set of trainable parameters of the model. The model represents the dataset The loss function is used to measure the difference between the predicted result and the true label.
[0021] This step achieves cognitive alignment between the training and inference distributions by minimizing the loss function, thereby improving the model's generalization performance and stability.
[0022] Preferably, in step S3, the present invention also proposes a collaborative reasoning mechanism to achieve collaborative fusion of the large language model and the supervised extraction model during the reasoning stage. This mechanism achieves the unification of logical reasoning at the knowledge level and structured boundary recognition by constructing cognitive fusion input, performing structured extraction, and fusing multi-source results, thereby improving the accuracy and completeness of multi-span answer extraction.
[0023] Preferably, the collaborative reasoning mechanism is established as follows: S3.1: Construct cognitive fusion input by splicing and encoding the original question with the knowledge perception representation; S3.2: Perform multi-span answer extraction based on fusion representation and output the final multi-span answer set.
[0024] More preferably, in step S3.1, the knowledge-aware representation K generated by the knowledge reconstruction mechanism is concatenated with the original question Q and input into the pre-trained language model (small model) to form a cognitive fusion input sequence. : Wherein, [CLS] represents the sentence beginning classification tag, used to extract global semantic information, [SEP] represents the separator tag, used to distinguish different semantic segments, and PrLM(•) represents the pre-trained language model.
[0025] More preferably, in step S3.2, the fused representation obtained in step S3.1 is used. Structured prediction is performed using a multi-span extraction architecture: (1) When using the SpanQualifier architecture, the model models the multi-answer extraction task as a boundary interaction matching problem. Specifically, the model first starts from the fused representation Extract the start and end boundary vectors, denoted as B. s and B e Subsequently, through boundary-level linear transformation and distance encoding, the interaction feature matrix of all possible boundary pairs is constructed: in, This represents the starting boundary vector at position i. W represents the ending boundary vector at position j. s With W e The linear transformation matrices for the start and end boundaries are respectively, e j-i This indicates relative position embedding, used to capture the span length information of the answer. LayerNorm(•) indicates layer normalization operation.
[0026] Next, a matching score for each boundary pair is calculated using a multilayer perceptron: Among them, MLP m This refers to a multilayer perceptron (MLP) used to model boundary interaction features. ds H represents a multilayer perceptron used for modeling answer relevance. CLS This represents the global semantic vector corresponding to the [CLS] tag, used to integrate contextual information. i,j The overall matching score for the boundary pair (i,j).
[0027] The model selects several boundary pairs with the highest scores as candidate answer spans to achieve joint boundary prediction for multiple answers.
[0028] (2) When using the TASE architecture, the model models multi-span extraction as a sequence labeling problem, employing the BIO labeling strategy to predict multiple non-continuous intervals in the text that belong to the answer. For each position's hidden state vector h i The label distribution p is calculated using a linear classifier and a softmax function. i : Among them, h i Let f(•) represent the hidden state vector at the i-th position of the input sequence, f(•) represent a linear classifier used to map the hidden vector to the label space, and softmax(•) represent a normalization function used to calculate the probability of each label. p represents the size of the labeled category set. iLet represent the probability distribution of the i-th position across all label categories, and m represent the length of the input text.
[0029] During the decoding phase, the model combines multiple independent intervals using dynamic programming or a greedy algorithm to generate a set of multiple answers. The overall probability of this process can be expressed as: Where T represents a possible labeled sequence, Let T be the set of all feasible labeled sequences. i p represents the label corresponding to the i-th position in the sequence. i [T i ] indicates that the i-th position is predicted to be label T. i The model maximizes the likelihood function mentioned above, selects the independent intervals with the highest probabilities as the final prediction results, and thus forms a multi-span answer set.
[0030] Finally, by performing probability fusion and consistency screening on the results of the two extraction architectures, a multi-span answer set is obtained. : in, Indicates the optimization parameters The fusion prediction function obtained from the training is as follows. This represents the cognitive fusion representation obtained by concatenating the original question Q and the knowledge perception representation K and encoding them through a pre-trained model.
[0031] This step enables joint extraction of multiple answers based on knowledge-aware input, making the logical reasoning of the large language model and the boundary prediction of the supervised model semantically consistent, thereby improving the accuracy and stability of multi-span answer recognition.
[0032] This invention also discloses a multi-span question-answering knowledge perception system based on size model collaboration, used to execute the above method, comprising the following modules: Knowledge Reconstruction Module: Through a large language model, knowledge hint generation and chain-like logical reasoning are performed to semantically expand and reconstruct the input question, resulting in a knowledge-aware representation that includes potential answer entities, reasoning links, and semantic dependencies. Coverage matching training module: Based on the obtained knowledge-aware representation, calculate the knowledge coverage rate between the standard answer and the knowledge-aware representation in the training samples; filter the training samples according to the knowledge coverage rate, and construct a training set with consistent coverage for supervised training of small models with coverage matching constraints; Collaborative Reasoning Extraction Module: Based on knowledge-aware representation and the trained small model, the knowledge-aware representation is integrated with the original question and input into the small model to perform collaborative reasoning, thereby achieving answer location and generation for multiple spans.
[0033] Compared with the prior art, the present invention has several advantages, specifically including the following three key points: 1) Achieve cognitive alignment between questions, knowledge, and answers through knowledge reconstruction mechanisms, thereby improving reasoning consistency and interpretability.
[0034] 2) The training and inference distributions are dynamically aligned through a coverage matching mechanism to enhance the generalization stability of the model.
[0035] 3) By integrating the capabilities of large and small models through collaborative reasoning mechanisms, high-precision, multi-span answer extraction can be achieved.
[0036] Currently, this invention has achieved leading performance on public datasets such as MultiSpanQA and QUOREF, verifying the effectiveness and practical value of its theoretical design. Attached Figure Description
[0037] Figure 1 This is the overall process architecture diagram of the multi-span question-answering knowledge perception method based on big-small model collaboration proposed in the preferred embodiment of the present invention.
[0038] Figure 2 This is a case study diagram of the multi-span question-answering knowledge perception method based on big-small model collaboration proposed in the preferred embodiment of the present invention in the MultiSpanQA dataset.
[0039] Figure 3 This is a performance comparison chart of the multi-span question-answering knowledge perception method based on big-small model collaboration proposed in a preferred embodiment of the present invention under different coverage matching rates.
[0040] Figure 4 The experimental results of the preferred embodiment of the present invention on the public dataset QUOREF benchmark are shown in the figure.
[0041] Figure 5 This is a block diagram of a multi-span question-answering knowledge perception system based on size model collaboration proposed in a preferred embodiment of the present invention. Detailed Implementation
[0042] The implementation method of the present invention is illustrated below through specific embodiments. Those skilled in the art can easily understand the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific methods, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the features in the following embodiments can be combined with each other.
[0043] This invention aims to overcome the cognitive gap and inadequate reasoning in existing multi-span question-answering models, proposing a multi-span question-answering knowledge perception method and system based on the collaboration of large and small models, COKE. This invention integrates the reasoning ability of a large language model with the extraction ability of a small pre-trained model. Through a collaborative mechanism of knowledge hints and logical reasoning to generate knowledge-perceived representations, it achieves the unification of knowledge perception and structured reasoning, improving the accuracy and generalization of multi-answer extraction.
[0044] like Figure 1 As shown, this embodiment provides a multi-span question-answering knowledge perception method based on size model collaboration, which proceeds as follows: S1: Through the large language model, knowledge prompt generation and chain-like logical reasoning are performed to semantically expand and reconstruct the knowledge of the input question, resulting in a knowledge-aware representation containing potential answer entities, reasoning links and semantic dependencies, which serves as the input basis for subsequent steps; S2: Based on the knowledge-aware representation obtained in step S1, calculate the knowledge coverage rate between the standard answer and the knowledge-aware representation in the training samples; filter the training samples according to the knowledge coverage rate, and construct a high-quality training set with consistent coverage for supervised training of the small model with coverage matching constraints. S3: Based on the knowledge-aware representation from step S1 and the small model trained in step S2, the knowledge-aware representation is fused with the original question and input into the small model. The model is then used to perform collaborative reasoning by leveraging its multi-span extraction capability to achieve multi-span answer location and generation.
[0045] Reference Figure 2 This invention proposes a collaborative problem clarification and knowledge reconstruction mechanism. Through the synergistic effect of a large language model and a pre-trained extraction model, it achieves multi-level modeling from semantic understanding and knowledge extraction to logical reasoning, and ultimately unifies knowledge perception and multi-answer extraction.
[0046] Each step of this embodiment will be described in more detail below.
[0047] In step S1, during the specific implementation process, the large language model first receives the input question and contextual information, and generates knowledge statements related to the semantics of the question to clarify the main information requirements and core facts. For example, for the question "Who commanded the Battle of Waterloo?", the model extracts key information statements related to the semantics of the question from the context, such as: "Napoleon Bonaparte commanded the French army", "Michel Ney commanded part of the French army after Napoleon's defeat", "The Duke of Wellington commanded the British and Allied forces", and "Blücher commanded the Prussian army". The model then generates factual knowledge units corresponding to the semantics of the question, providing a semantic basis for subsequent logical reasoning and multi-span answer extraction.
[0048] The model further establishes a connection structure between the factual and logical layers, and performs reasoning modeling on the command relationships among multiple parties. For example, in the case of the Battle of Waterloo, the model first identifies Napoleon Bonaparte as the main commander of the French army in the early stages of the battle; after his defeat, Michel Ney took over command of part of the French army; meanwhile, the Duke of Wellington and Blücher led the British and Prussian armies respectively, forming opposing camps. Through multi-step logical reasoning, the model determines the organizational structure and command hierarchy of both sides in the battle, and then judges the reasonable number of answers and entity distribution, achieving the unity of factual knowledge and logical reasoning, and providing an interpretable decision-making basis for answer selection.
[0049] In its implementation, the model integrates the factual statements from the first two stages with the results of logical reasoning to generate a knowledge-aware representation with semantic consistency and structural clarity, as follows: In the formula, Q represents the original question, C represents the original context, and LLM(•) represents a large language model (such as ChatGPT-4o).
[0050] In this embodiment, the knowledge perception representation K obtained by model fusion is: "In the early stages of the Battle of Waterloo, the French army was commanded by Napoleon Bonaparte, and later part of the command was taken over by Michel Ney; on the anti-French coalition side, the British army and allied forces were led by the Duke of Wellington, and the Prussian army was led by Blücher." In this embodiment, the model organically combines factual information with logical reasoning processes to form a structured knowledge perception representation, which has clear semantic boundaries and can support subsequent small extraction models to perform high-precision answer location and generation.
[0051] In step S2, this invention dynamically filters and adjusts the weights of training samples through a coverage matching mechanism to maintain consistency between the training distribution and the inference distribution. The specific steps are as follows: 1) First, by analyzing the knowledge-aware representation K generated by the large language model during the knowledge reconstruction stage, the proportion of knowledge fragments containing target answer information is calculated, thereby defining the knowledge coverage parameter. ; Where, n ans n represents the number of correct answers in a knowledge segment. all This indicates the number of correct answers in the original context.
[0052] 2) Secondly, based on the knowledge coverage calculated above... Coverage matching is performed on the training dataset to select coverage rates that are similar to the average coverage rate during the inference phase. Similar samples are used to construct a coverage matching training subset. : in, Q represents the coverage matching of a subset of training data. i Let K represent the question input for the i-th sample. i With A i Let Coverage(K) represent the knowledge perception representation and the answer set corresponding to question i, respectively. i The value represents the coverage rate of knowledge segments in the sample, i.e., the proportion containing answer information. Weights can also be assigned based on the importance of the samples to ensure that the knowledge distribution remains consistent with the reasoning stage, thereby effectively reducing distribution shift during training.
[0053] In this embodiment, the knowledge-aware representation generated by the model includes both correct answer entities (i.e., "Napoleon Bonaparte" and "Michel Ney"). Therefore, its corresponding knowledge coverage rate is 1. Subsequently, the uniform coverage rate is statistically obtained. As a target standard, a consistency constraint is applied to the entire training set to ensure that the knowledge coverage of all training samples remains the same as the target value. In this way, the model can simulate the knowledge distribution characteristics of the inference stage during training, ensuring distribution consistency, reducing the risk of cognitive bias, and thus improving the model's stability and generalization performance in complex semantic scenarios.
[0054] 3) Finally, supervised fine-tuning is performed on the pre-trained language model. For different multi-span extraction architectures, the corresponding loss function is minimized to obtain the optimized parameters. : in, This represents the optimized model parameters. Represents the set of trainable parameters of the model. The model represents the dataset The loss function is used to measure the difference between the predicted result and the true label.
[0055] In this embodiment, the SpanQualifier architecture optimizes the probability distribution of start and end position predictions through boundary matching, while the TASE architecture uses a sequence labeling strategy to minimize label classification error.
[0056] In step S3, this invention employs a collaborative reasoning mechanism to fuse the knowledge-aware representation generated by the large language model with the original question as input, thereby achieving high-precision extraction of multi-span answers, as detailed below: 1) First, the knowledge-perceived representation K generated by the knowledge reconstruction mechanism is concatenated with the original question Q and input into the pre-trained language model to form a cognitive fusion input sequence: Wherein, [CLS] represents the sentence beginning classification marker, used to extract global semantic information, [SEP] represents the separator marker, used to distinguish different semantic segments, and PrLM9(•) represents the pre-trained language model.
[0057] 2) Secondly, the SpanQualifier architecture is used to perform structured prediction, modeling the multi-answer extraction task as a boundary interaction matching problem. Specifically, the model first starts from the fusion representation H... c Extract the start and end boundary vectors from (Q,K), denoted as B respectively. s and B e Subsequently, through boundary-level linear transformation and distance encoding, the interaction feature matrix of all possible boundary pairs is constructed: in, This represents the starting boundary vector at position i. W represents the ending boundary vector at position j. s With W e The linear transformation matrices for the start and end boundaries are respectively, e j-i This indicates relative position embedding, used to capture the span length information of the answer. LayerNorm(•) indicates layer normalization operation.
[0058] Next, a matching score for each boundary pair is calculated using a multilayer perceptron: Among them, MLP m This refers to a multilayer perceptron (MLP) used to model boundary interaction features. ds H represents a multilayer perceptron used for modeling answer relevance. CLS This represents the global semantic vector corresponding to the [CLS] tag, used to integrate contextual information. i,j The overall matching score for the boundary pair (i,j).
[0059] The model selects several boundary pairs with the highest scores as candidate answer spans to achieve joint boundary prediction for multiple answers.
[0060] 3) Finally, we obtain a multi-span answer set. : in, Indicates the optimization parameters The fusion prediction function obtained from the training is as follows. This represents the cognitive fusion representation obtained by concatenating the original question Q and the knowledge perception representation K and encoding them through a pre-trained model.
[0061] In this embodiment, the model obtains the final prediction result through a multi-span extraction mechanism. The result, which identifies "Napoleon Bonaparte and Michel Ney," fully covers all core answer entities under the question semantics, demonstrating that collaborative reasoning and multi-span extraction mechanisms can effectively integrate the logical reasoning capabilities of large language models with the structured extraction capabilities of small pre-trained models, thereby significantly improving the accuracy and consistency of answers in multi-span question answering tasks.
[0062] like Figure 3 As shown, this invention verifies the significant impact of the coverage matching mechanism on model performance by comparing model performance under different training set coverage conditions. Figure 3 The paper presents the changing trends of two evaluation metrics, exact matching and partial matching, under the TASE and SpanQualifier architectures, respectively. Experimental results show that as the training set coverage gradually increases from 70% to 90%, both the TASE and SpanQualifier architectures exhibit a significant upward trend in precision, recall, and F1 score, reaching optimal performance at 90% coverage. When the coverage is further increased to 100%, some models experience a performance decline, indicating that excessive knowledge redundancy may lead to the model learning noisy information and reducing generalization ability. Therefore, the coverage matching mechanism proposed in this invention can achieve adaptive constraints on the optimal coverage interval during the training phase, keeping the training distribution consistent with the inference distribution, thereby effectively improving the precision, recall, and overall F1 performance of multi-span question answering tasks, verifying the universality and stability of this invention under different model architectures.
[0063] like Figure 4 As shown, experimental results on the Quoref dataset fully validate the effectiveness of the proposed collaborative knowledge-aware method. Using TASE and SpanQualifier as baseline models, the MF1 and EMF1 metrics were evaluated at different knowledge coverage thresholds (70%–100%). It can be seen that the proposed method significantly improves model performance in the 70%–90% range, achieving optimal performance at 80% coverage. Compared to traditional training methods without knowledge coverage constraints, this invention maintains higher entity matching accuracy and multi-span consistency. By selecting high-coverage samples and constructing a consistent knowledge distribution during the training phase, and integrating knowledge-aware features and inference chains during the inference phase, this invention effectively reduces ambiguity interference caused by complex referential relationships and entity overlap in Quoref features, thereby significantly improving the model's generalization ability and robustness in cross-sentence reasoning and multi-entity localization scenarios. Therefore, the experimental results on the Quoref dataset demonstrate the technical advantages of this invention in achieving robust and accurate answer extraction in multi-span question-answering tasks.
[0064] like Figure 5 As shown, this embodiment discloses a multi-span question-answering knowledge perception system based on size model collaboration, used to execute the above method, and includes the following modules: Knowledge Reconstruction Module: Through a large language model, knowledge hint generation and chain-like logical reasoning are performed to semantically expand and reconstruct the input question, resulting in a knowledge-aware representation that includes potential answer entities, reasoning links, and semantic dependencies. Coverage matching training module: Based on the obtained knowledge-aware representation, calculate the knowledge coverage rate between the standard answer and the knowledge-aware representation in the training samples; filter the training samples according to the knowledge coverage rate, and construct a training set with consistent coverage for supervised training of small models with coverage matching constraints; Collaborative Reasoning Extraction Module: Based on knowledge-aware representation and the trained small model, the knowledge-aware representation is integrated with the original question and input into the small model to perform collaborative reasoning, thereby achieving answer location and generation for multiple spans.
[0065] Other aspects of this embodiment can be found in the above method embodiments.
[0066] In summary, this invention proposes a multi-span question-answering knowledge perception method (COKE) and system based on large and small model collaboration. This invention integrates the reasoning ability of a large language model with the extraction ability of a small pre-trained model, achieving a unified approach to knowledge reconstruction, logical reasoning, coverage matching training, and collaborative reasoning. This invention can establish cognitively consistent knowledge representations at the factual and logical levels, maintain alignment of knowledge distribution during training and inference stages, and complete high-precision answer extraction for multiple entities and spans under the guidance of fused input. This invention effectively improves semantic understanding, reasoning consistency, and answer completeness in multi-span question-answering tasks, possessing strong structure, high interpretability, and excellent generalization performance. It can be widely applied in natural language processing scenarios such as intelligent question answering, knowledge retrieval, and large model reasoning.
[0067] The above embodiments are merely preferred embodiments and explanations of the technical principles employed in this invention. Those skilled in the art can make other additions or modifications to the described specific embodiments, or substitute them with other methods. Therefore, although the objectives and advantages of this invention are made clearer through the above embodiments, this invention is not limited to the above embodiments. Thus, this specification should not be construed as limiting the invention.
Claims
1. A multi-span question-answering knowledge perception method based on big-small model collaboration, characterized by: Follow these steps: S1: Through a large language model, knowledge prompt generation and chain-like logical reasoning are performed to semantically expand and reconstruct the knowledge of the input question, resulting in a knowledge-aware representation containing potential answer entities, reasoning links and semantic dependencies. S2: Based on the knowledge-aware representation obtained in step S1, calculate the knowledge coverage rate between the standard answer and the knowledge-aware representation in the training samples; filter the training samples according to the knowledge coverage rate, and construct a training set with consistent coverage for supervised training of the small model with coverage matching constraints. S3: Based on the knowledge-aware representation from step S1 and the small model trained in step S2, the knowledge-aware representation is fused with the original question and input into the small model to perform collaborative reasoning, thereby achieving answer location and generation for multiple spans.
2. The multi-span question-answering knowledge perception method based on size model collaboration as described in claim 1, characterized in that: Step S1 is as follows: S1.1: Perform semantic parsing on the input question Q and context C to clarify the intent type, target entity, and information requirements of the question; S1.2: Guide the large language model to extract key information fragments related to the problem from the context and generate formal knowledge statements; S1.3: Using the knowledge statement obtained in step S1.2, the large language model integrates semantic information, generates logically consistent reasoning statements, and predicts the number of answers; S1.4: Through dual modeling at the factual level in step S1.2 and the logical level in step S1.3, a knowledge perception representation K is formed.
3. The multi-span question-answering knowledge perception method based on size model collaboration as described in claim 2, characterized in that: steps In S1.4, the knowledge perception representation K is specifically as follows: In the formula, Q represents the original question, C represents the original context, and LLM(•) represents the large language model.
4. The multi-span question-answering knowledge perception method based on size model collaboration as described in claim 3, characterized in that: Step S2 is as follows: S2.1: Define the knowledge coverage parameter to measure the degree of coverage of answer information in the knowledge-perceived representation; S2.2: Construct a coverage matching training subset to ensure that the distribution of training samples remains consistent with that of the inference phase; S2.3: Perform supervised fine-tuning under coverage matching conditions to optimize model parameters and achieve cognitive alignment.
5. The multi-span question-answering knowledge perception method based on size model collaboration as described in claim 4, characterized in that: In step S2.1, by analyzing the knowledge-aware representation K generated by the large language model during the knowledge reconstruction stage, the proportion of knowledge fragments containing target answer information is calculated, thereby defining the knowledge coverage parameter. ; Where, n ans n represents the number of correct answers in the knowledge perception representation. all This indicates the number of correct answers in the original context.
6. The multi-span question-answering knowledge perception method based on size model collaboration as described in claim 5, characterized in that: In step S2.2, coverage matching is performed on the training dataset to select the coverage rate that matches the average coverage rate during the inference phase. Similar samples are used to construct a coverage matching training subset. : in, Q represents the coverage matching of a subset of training data. i Let K represent the question input for the i-th sample. i With A i Let Coverage(K) represent the knowledge perception representation and the answer set corresponding to question i, respectively. i The ) represents the coverage of knowledge segments in the sample, that is, the proportion that contains answer information.
7. The multi-span question-answering knowledge perception method based on size model collaboration as described in claim 6, characterized in that: In step S2.3, supervised fine-tuning is performed on the pre-trained language model. For different multi-span extraction architectures, the corresponding loss function is minimized to obtain the optimized parameters. : in, This represents the optimized model parameters. Represents the set of trainable parameters of the model. The model represents the dataset The loss function is used to measure the difference between the predicted result and the true label.
8. The multi-span question-answering knowledge perception method based on size model collaboration as described in claim 7, characterized in that: Step S3 is as follows: S3.1: Construct cognitive fusion input by splicing and encoding the original question with the knowledge perception representation; S3.2: Perform multi-span answer extraction based on fusion representation and output a multi-span answer set.
9. The multi-span question-answering knowledge perception method based on size model collaboration as described in claim 8, characterized in that: In step S3.1, the knowledge perception representation K generated by the knowledge reconstruction mechanism is concatenated with the original question Q and input into the pre-trained language model to form a cognitive fusion input sequence H. c (Q,K), the cognitive fusion input sequence is represented as follows: Wherein, [CLS] represents the sentence beginning classification tag, used to extract global semantic information, [SEP] represents the separator tag, used to distinguish different semantic segments, and PrLM(•) represents the pre-trained language model; In step S3.2, the fused representation H obtained in step S3.1 is used. c (Q,K) is obtained by probabilistic fusion and consistency filtering of the results from the two extraction architectures to obtain a multi-span answer set. The set of answers with multiple spans is represented as follows: in, Indicates the optimization parameters The fusion prediction function H obtained from the training is as follows. c (Q,K) represents the cognitive fusion representation obtained by concatenating the original question Q and the knowledge perception representation K and encoding them through a pre-trained model.
10. A multi-span question-answering knowledge perception system based on size-model collaboration, used to perform the method as described in any one of claims 1-9, characterized in that: It includes the following modules: Knowledge Reconstruction Module: Through a large language model, knowledge hint generation and chain-like logical reasoning are performed to semantically expand and reconstruct the input question, resulting in a knowledge-aware representation that includes potential answer entities, reasoning links, and semantic dependencies. Coverage matching training module: Based on the obtained knowledge-aware representation, calculate the knowledge coverage rate between the standard answer and the knowledge-aware representation in the training samples; filter the training samples according to the knowledge coverage rate, and construct a training set with consistent coverage for supervised training of small models with coverage matching constraints; Collaborative Reasoning Extraction Module: Based on knowledge-aware representation and the trained small model, the knowledge-aware representation is integrated with the original question and input into the small model to perform collaborative reasoning, thereby achieving answer location and generation for multiple spans.
Citation Information
Cited By
A dynamic retrieval enhancement generation method based on size model cooperation
CN122388156A