Dynamic data selection method based on knowledge boundary

By introducing a dynamic data selection method based on knowledge boundaries in the data selection of large models, the problems of data selection bias and high-dimensional metric failure are solved, an efficient and general data selection framework is realized, and the generalization ability and data quality of the model are improved.

CN119849508AInactive Publication Date: 2025-04-18HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510316782.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-04-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art fails to effectively consider the knowledge boundaries of different models and data measurement problems in high-dimensional space in data selection of large models, resulting in data selection bias and measurement failure.

Method used

A dynamic data selection method based on knowledge boundaries is proposed. The initial data is divided into boundary samples and typical samples through a benchmark model, and the contribution degree reduction and multi-dimensional evaluation mechanism are adopted to merge and select to obtain high-quality data.

Benefits of technology

It effectively alleviates the problem of model bias against data, breaks through the dimensional disaster in high-dimensional space, improves the efficiency and effectiveness of data selection, and ensures the generalization ability of the model in complex tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849508A_ABST
    Figure CN119849508A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic data selection method based on a knowledge boundary. The method comprises the following steps: S1, dividing initial data into a boundary sample and a typical sample based on a reference large model; s2, coding all sample data based on the reference large model; s3, performing contribution degree dimension reduction on the coded data; s4, setting and selecting the quantity and proportion of the two kinds of sample data; s5, respectively extracting data samples from the typical samples and the boundary samples; s6, merging the two data samples to obtain seed data; s7, performing fine tuning on the reference large model by using the seed data, and verifying the performance of the fine-tuned model on the task; and S8, changing the number or proportion of the boundary samples and the typical samples in the step S4, and repeatedly executing the steps S5 to S7 to obtain the best performance result, namely the high-quality data. According to the method, the efficiency and effectiveness of high-quality data selection are improved, and the negative influence of a high-dimensional space on data measurement is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a dynamic data selection method based on knowledge boundaries. Background Art

[0002] In recent years, with the rapid development of artificial intelligence technology, large models such as the GPT series and Baidu Wenxin Yiyan have gradually become the focus of the technology field. These large models have a huge parameter scale and can handle a variety of natural language tasks, from text generation, knowledge question answering to machine translation, etc., showing amazing intelligent performance. Its development has benefited from the continuous optimization of deep learning algorithms and the substantial improvement of computing power, but one of the more critical factors is the support of massive data. So how can we train a good large model? At present, the industry has gradually realized that high-quality data is extremely important.

[0003] With the rapid development of large artificial intelligence models, data as its core element has attracted much attention. However, there is a general tendency in the industry to overemphasize the accumulation of data volume and ignore the key role of data quality. There are still many problems to be solved in the research of high-quality data.

[0004] On the one hand, the data sources are complicated, resulting in uneven data quality, with a large number of inaccurate annotations, repeated data, noise interference, etc., which seriously affects the accurate learning and induction of effective information by large models. On the other hand, the industry and academia have not yet reached a unified and complete standard on how to accurately measure data quality. There are different opinions and disputes when measuring from multiple dimensions such as annotation accuracy, data diversity, and data consistency, which makes it lack of clear guidance for obtaining and screening high-quality data.

[0005] Data selection strategy plays a vital role in data quality. Research methods based on data selection aim to improve the overall quality of the dataset by selecting high-quality and representative samples. The data selection strategy focuses on selecting the most representative or most challenging samples from the existing data. The key to this method is how to select data samples from limited samples that help improve the generalization ability and performance of the model.

[0006] At present, in order to solve the above problems, the existing data selection strategies include selection strategies based on data quality, selection strategies based on data diversity, and selection strategies based on custom indicators. The selection strategy based on data quality mainly focuses on the characteristics of the data set and the quality of the data itself. These indicators include but are not limited to: GPT-4 score, complexity, length, accuracy. They mainly focus on the quality or characteristics of the data itself, without considering the language characteristics and semantic expression of the data. The selection strategy based on data diversity is mainly based on the clustering idea, but clustering requires certain prior knowledge to determine how many clusters are appropriate. This method is not universal; and the distance measurement is almost invalid in high-dimensional space. The selection strategy based on custom indicators does not consider the knowledge boundary problem of the model. The training data used by different base models in the pre-training stage is not exactly the same, and there are even many deviations. Then the importance and necessity of the same data to different base models are also different.

[0007] In response to the above problems, how to design an efficient and universal data selection framework that can adapt to the knowledge boundaries of different large models, the language characteristics and semantic expressions of data is of great research significance. Summary of the invention

[0008] The purpose of this invention is to propose a dynamic data selection method based on knowledge boundaries, so as to effectively alleviate the problem of bias in existing methods for the same data due to failure to consider the knowledge boundaries of different large models, as well as the problem of measurement failure of existing measurement methods in high-dimensional space.

[0009] In order to achieve the above object, the technical solution specifically adopted by the present invention is as follows:

[0010] A dynamic data selection method based on knowledge boundary includes the following steps:

[0011] Step 1: Divide the initial data into boundary samples and typical samples based on the benchmark large model;

[0012] Step 2: Encode all boundary samples and typical sample data based on the benchmark large model;

[0013] Step 3: Perform contribution dimension reduction on the encoded data;

[0014] Step 4: Set the number of boundary samples and typical samples and the ratio of the two sample data; when selecting these typical samples, the goal is to ensure typicality, so that the model can learn in a variety of different scenarios and tasks or cover different aspects and variations of the same task, so as to enhance its generalization ability in the task. When selecting boundary samples, we should focus on complexity, difficulty and information content, and ensure that they can help the model improve its ability to process complex instructions.

[0015] Step 5: extract data samples from typical samples according to the typical sample selection algorithm; extract data samples from boundary samples according to the boundary sample selection algorithm;

[0016] Step 6: Merge the two data samples to obtain seed data;

[0017] Step 7: Use the seed data to fine-tune the benchmark large model and verify the performance of the fine-tuned model on the task;

[0018] Step 8: Change the number or ratio of boundary samples and typical samples in step 4, and repeat steps 5 to 7. The best performance result is high-quality data.

[0019] Further, in the step 1, the benchmark large model determines the division of boundary samples and typical samples according to the knowledge boundary, wherein the knowledge boundary refers to the knowledge scope and ability boundary that the model can handle when understanding, reasoning and making decisions; that is, the knowledge domain that the model can successfully apply is limited, it may have strong performance in some fields or tasks, and may have insufficient knowledge or unclear understanding in other fields or tasks. Boundary samples: These samples are located at the "edge" of the existing knowledge boundary of the model, that is, the model may have high uncertainty when facing these samples, or they represent scarce, vague or incomplete parts of the knowledge system. Such samples may be weak links in the understanding of the model, and usually represent the "long tail" part of the data set. These samples may contain rare, complex or difficult to classify situations, which help to reveal and expand the knowledge boundary of the model and promote the improvement of the model's reasoning ability in rare situations or unknown fields. Typical samples: In contrast to boundary samples, these samples represent the common knowledge domain mastered by the model, and are usually the parts that the model can understand and correctly reason with high confidence. They are the "main body" of the model's knowledge, usually including common, easy to predict and solve problems, which are in line with the knowledge coverage of the model in most situations. These samples help the model consolidate basic knowledge and ensure its efficient learning and stable performance in common tasks.

[0020] Furthermore, in step 2, the encoding steps are as follows:

[0021] Step 2.1: Decompose the original text into word units;

[0022] Step 2.2: Add a [CLS] tag at the beginning of the sentence and a [SEP] tag between two sentences;

[0023] Step 2.3: For each word unit, convert it into a high-dimensional vector representation using word embedding technology;

[0024] Step 2.4: Perform position encoding to assign a unique representation to each word unit to indicate its position in the sentence;

[0025] Step 2.5: Perform paragraph encoding to identify which sentence the current word unit belongs to;

[0026] Step 2.6: Add the word embedding, position encoding, and paragraph encoding to get the final input sequence;

[0027] Step 2.7: Use a 12-layer Transformer encoder to capture the dependencies between each position in the input sequence and other positions, and finally obtain a context-dependent representation of each input word unit.

[0028] Furthermore, in step 2.4, the position encoding is generated by predefined sine and cosine functions, and each position has a unique vector representation, and the formula is as follows:

[0029] , ;

[0030] Among them, pos is the position information of the word, i is the dimension index, and d is the dimension of the vector, which is 512.

[0031] Furthermore, the step 3 specifically includes the following steps:

[0032] Step 3.1: Average each dimension so that the mean of each dimension is zero;

[0033] Step 3.2: Calculate the covariance matrix. The calculation formula is as follows:

[0034]

[0035] Where: S is the covariance matrix, yes The transposed matrix of

[0036] Step 3.3: Calculate the eigenvalues ​​and eigenvectors of the covariance matrix so that , where x is the eigenvector, is the characteristic value;

[0037] Step 3.4: Calculate the contribution value of each dimension, select the dimensions with weighted contribution greater than 90%, and form the data after dimensionality reduction .

[0038] Furthermore, in step 5, the typical sample selection algorithm uses a double filtering algorithm based on lexical similarity and semantic similarity to filter out data with high lexical and semantic similarity. The remaining data is sample data with high typicality. It is divided into two steps. The first step is to perform preliminary screening through lexical similarity to quickly filter out 80% of the lexically similar data of the original sample; the second step is to perform fine screening through semantic similarity to accurately retain k data with the lowest semantic similarity.

[0039] Furthermore, in step 5, the boundary sample selection algorithm adopts an algorithm based on the combination of contribution row vector variance and maximum information amount; the specific implementation steps are as follows:

[0040] 5.2.1: Based on the current sample data, count the probability distribution of each dimension and construct a local dimension probability distribution table. The formula is as follows:

[0041]

[0042] Where: v is a possible value of dimension i, count(v,i) is the number of times value v appears in dimension i;

[0043] 5.2.2: Calculate the amount of information for each piece of data. The calculation formula is as follows:

[0044]

[0045] Where: I(x) is the information content of sample x, P(x i ) is the probability of the sample being in the interval where the i-th eigenvalue is located, and n is the total number of dimensions;

[0046] 5.2.3: Calculate the mean contribution of each piece of data. The calculation formula is as follows:

[0047]

[0048] in: is the weighted mean, x i is the i-th sample value, w i is the contribution value of the i-th sample, and n is the total number of samples;

[0049] 5.2.4: Calculate the contribution row variance of each data. The calculation formula is as follows:

[0050]

[0051] in: is the contributing row variance, is the weighted mean, x i is the i-th sample value, w i is the contribution value of the i-th sample, and n is the total number of samples;

[0052] 5.2.5: Standardize the information content and contribution row variance of each data, the formula is as follows:

[0053]

[0054] Where Z is the standardized score and X is the original data value. is the mean of the data, is the standard deviation of the data;

[0055] 5.2.6: Calculate the difficulty score of each data, which is the sum of the Z-score of the information content and the Z-score of the variance.

[0056] Compared with the prior art, the present invention has the following characteristics and beneficial effects:

[0057] 1) The present invention has made significant improvements in the aspect of model bias towards data. In previous methods, custom indicators were used as the selection criteria for high-quality data, and all data were treated on an equal footing. However, different large models have different knowledge boundaries for the same data set, which will inevitably lead to the problem of model bias towards data. The present invention proposes an idea based on knowledge boundaries, which uses the capabilities of different benchmark models to divide the data, and then selects the divided data according to different rules, which can effectively alleviate the impact of the model's bias towards data.

[0058] 2) The present invention has made a breakthrough innovation on the dimensionality curse problem in high-dimensional space. Traditional data measurement schemes will fail in high-dimensional space, such as distance, direction, density, etc. These measurement methods become less obvious in high-dimensional space, and at this time, the data needs to be reduced in dimension. However, traditional data dimensionality reduction schemes may not be able to capture the complex structures in high-dimensional space, especially nonlinear relationships, which limits their effectiveness in high-dimensional space, especially when the data has complex nonlinear characteristics. The present invention proposes a contribution-based dimensionality reduction method that breaks the limitations of high-dimensional nonlinear data relationships. By determining which dimensions we ultimately want to retain based on the contribution of the current dimension to the data, we can more accurately select and retain the dimensions that contribute to specific target tasks, thereby better retaining the structure of the data and task-related features in high-dimensional space.

[0059] 3) The present invention proposes a breakthrough innovation in data selection schemes. In view of the fact that traditional data selection schemes, such as diversity-based selection, heuristic-based selection, and greedy algorithm-based selection, will produce high spatiotemporal complexity in high-dimensional space, the present invention proposes two efficient data selection schemes to process typical samples and boundary samples respectively. When processing typical samples, a multiple filtering mechanism is introduced to reduce unnecessary redundant calculations and significantly speed up data selection; when processing boundary samples, the unique multi-dimensional evaluation mechanism of the present invention is introduced to ensure that the selected data is beneficial to the model. The two data selection schemes can also ensure that the method is still effective in high-dimensional space. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0061] Figure 1 A schematic diagram of the framework of a dynamic data selection method based on knowledge boundaries proposed by the present invention.

[0062] Figure 2 The flowchart of the typical sample selection method in the present invention.

[0063] Figure 3 The flowchart of the boundary sample selection method in the present invention. DETAILED DESCRIPTION

[0064] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.

[0065] The present invention discloses a dynamic data selection method based on knowledge boundary. Figure 1 The system architecture diagram of the present invention is given. Figure 2 and Figure 3 The algorithm flow charts of typical sample selection and boundary sample selection of the present invention are respectively given. The present invention is described in detail below in conjunction with Example 1, which specifically includes the following steps:

[0066] Step 1: Divide the initial data into boundary samples and typical samples according to the knowledge boundary based on the benchmark large model; the knowledge boundary refers to the knowledge scope and ability boundary that the model can handle when understanding, reasoning and making decisions; boundary samples: located at the "edge" of the model's existing knowledge boundary, that is, the model may have high uncertainty when facing these samples, or they represent scarce, vague or incomplete parts of the knowledge system. Typical samples: These samples represent the common knowledge areas mastered by the model, and are usually the parts that the model can understand and correctly reason with high confidence. Specific: First, use the initial large model (benchmark large model) to infer the initial data and get a direct answer; then compare the preset answer with the direct answer to determine whether it is a typical sample or a boundary sample. If the prediction output by the model is With preset answers If the difference between them is small and below a certain threshold, the sample is considered to be a typical sample; if the difference is large and above a certain threshold, the sample is considered to be a boundary sample.

[0067] The formula is as follows:

[0068]

[0069]

[0070]

[0071] Where: score(A,B) represents the absolute value function of the difference between answers A and B. Represents the benchmark large model for the data point The predicted output is Indicates a preset answer. Represents the difference between the model output and the true label.

[0072] Step 2: Encode all sample data, namely boundary samples and typical sample data, and then convert the text into a numerical form that the machine can understand, helping the model capture the semantics, grammar, context and other information in the language, so that it can perform various natural language processing tasks. The specific data encoding process is as follows:

[0073] Step 2.1: Before text encoding, the original text needs to be segmented to decompose the original text into word units.

[0074] Step 2.2: Add special tags: Add the [CLS] tag at the beginning of the sentence, which is usually used to represent the embedding representation of the entire sequence; and add the [SEP] tag between two sentences to separate the two sentences.

[0075] Step 2.3: For each word unit, use word embedding technology to convert it into a high-dimensional vector representation. Word embedding is learned through neural networks, mapping semantically similar words to similar vector spaces, so that the semantic relationship between words can be measured by the distance between vectors.

[0076] Step 2.4: Perform position encoding. In the model using the self-attention mechanism, since it does not have the ability to process sequence information, it is necessary to introduce position encoding to help the model recognize the order of words in the sentence. Position encoding assigns a unique representation to each word to indicate its position in the sentence. Position encoding is generated by predefined sine and cosine functions, and each position has a unique vector representation. The formula is as follows:

[0077] ,

[0078] Among them, pos is the position information of the word, i is the dimension index, and d is the dimension of the vector (512)

[0079] Step 2.5: Perform paragraph encoding to identify which sentence the current word belongs to.

[0080] Step 2.6: Add word embedding, position encoding, and paragraph encoding to get the final input sequence. The specific formula is as follows:

[0081]

[0082] Where: Ei is the final embedding representation of the i-th word, Wword[ti] is the word embedding representation, Wpos[ti] is the position encoding representation, and Wseg[ti] is the paragraph encoding representation.

[0083] Step 2.7: Use a 12-layer Transformer encoder to capture the dependencies between each position in the input sequence and other positions, and finally obtain the context-related representation of each input word. The multi-head attention mechanism is used to obtain the context representation. The specific formula is as follows:

[0084]

[0085] Where: Attention is the attention score, Q is the query vector, K is the key vector, V is the value vector, and dk is the dimension of the key vector.

[0086]

[0087] Among them: MultiHead is the multi-head attention score, headi is the output of the i-th attention head, and Wo is the output matrix.

[0088] Step 3: Calculate the contribution matrix of the dimension and perform data dimensionality reduction based on the contribution matrix. The specific data dimensionality reduction process is as follows:

[0089] Step 3.1: Decentralize the data, that is, average each dimension so that the mean of each dimension is zero. This ensures that the subsequent calculations are not offset by the mean difference of the dimension. For each dimension (i.e. each column), we subtract its mean from each data point so that the mean of each dimension becomes zero. The formula for decentralization is as follows:

[0090]

[0091] in: It is a decentralized data matrix. is the original data matrix (each column represents a dimension), is the mean of each feature (each column), Where n is the number of data

[0092] Step 3.2: Calculate the covariance matrix, which describes the linear relationship and correlation between different dimensions. The calculation formula is as follows:

[0093]

[0094] Where: S is the covariance matrix, yes The transposed matrix of

[0095] Step 3.3: Calculate the eigenvalues ​​and eigenvectors of the covariance matrix so that , where x is the eigenvector, is the characteristic value.

[0096] Step 3.4: Calculate the contribution value of each dimension, select the dimensions with weighted contribution greater than 90%, and form the data after dimensionality reduction , the formula is as follows:

[0097]

[0098] in: is the contribution value of the i-th dimension, is the eigenvalue of the i-th dimension.

[0099] Step 4: Set the number of selected boundary samples and typical samples and the ratio of the two sample data; typical samples represent the overall trend of the data, while boundary samples often represent a few patterns or special cases in the data. If only typical samples are retained, the model may only learn the common patterns of the data and lack some special laws in the data, resulting in poor generalization ability when facing complex or marginal samples. Even if it performs well on common problems, it may perform poorly when facing novel or extreme inputs; and if only boundary samples are retained, the model may lose its ability to handle common problems due to excessive attention to difficult samples, which may lead to overfitting boundary samples, that is, making incorrect adaptations to some overly complex or noisy data. Therefore, we need to learn the basic laws of the data through typical samples, and at the same time, we need to capture the details and boundary information in the data through boundary samples to improve the complexity and generalization ability of the model. When selecting these typical samples, the goal is to ensure typicality, so that the model can learn on a variety of different scenarios and tasks or cover different aspects and variations of the same task in order to enhance its generalization ability in the task. When selecting boundary samples, one should focus on complexity, difficulty, and information content, and ensure that they can help the model improve its ability to process complex instructions.

[0100] Step 5: Extract data samples for typical samples according to the typical sample selection algorithm; extract data samples for boundary samples according to the boundary sample selection algorithm; specifically:

[0101] The present invention designs a dual filtering algorithm based on lexical similarity and semantic similarity, which filters out data with high lexical and semantic similarity, and the remaining data is recognized to have high typicality. The algorithm flow chart is shown in Figure 2 As shown, the corresponding specific pseudo code implementation steps are as follows:

[0102]

[0103] The dual filtering algorithm based on lexical similarity and semantic similarity is divided into two steps. The first step is to use lexical similarity to perform preliminary screening to quickly filter out 80% of the lexically similar data of the original sample. This method mainly measures the surface features of the text, has low computational complexity, and is suitable for processing large-scale data sets. Through the preliminary screening, most of the obviously similar samples can be quickly removed. Although lexical similarity only considers surface features, it can effectively retain some data that may have semantic differences, providing a basis for subsequent precise screening. The second step is to use semantic similarity to perform fine screening to accurately retain k data with the lowest semantic similarity. Semantic similarity can capture the deep meaning of the text. The fine screening stage can accurately retain the data with the lowest semantic similarity to ensure semantic diversity between samples. Lexical similarity cannot understand the semantic content of the text, while the addition of semantic similarity can avoid missing samples with different lexical content but similar semantics. This two-stage screening method can effectively reduce redundant data, retain semantic diversity, and help improve the model's adaptability to different scenarios during the training phase. Compared with the O(n2) complexity of directly calculating semantic similarity pairwise comparison, the data size is reduced by first performing lexical screening and then performing precise screening, which significantly reduces computing resources and time costs. This method is very suitable for processing large-scale data sets, especially in the construction of high-quality data. This two-step strategy can achieve efficient screening and construction.

[0104] The present invention designs an algorithm based on the combination of contribution row vector variance and maximization of information. The row vector variance measures the degree of discreteness of each data in each dimension, that is, the volatility of each data between different features. Specifically, the weighted variance helps you identify data samples that vary greatly in each feature dimension. This type of data is usually difficult for model training because the model needs to spend more energy on these data to learn complex patterns. The amount of information measures the fit of the data sample with the overall distribution, that is, the "rarity" or "commonality" of the sample data under a given probability distribution. In weighted calculations, the amount of information is usually expressed using negative logarithmic probability. Samples with smaller probabilities mean that they are less common (or "difficult" samples). These samples are usually more challenging and should be given more attention. The algorithm flow chart is as follows Figure 3 As shown, the corresponding specific implementation steps are as follows:

[0105] 5.2.1: Based on the current sample data, count the probability distribution of each dimension and construct a local dimension probability distribution table. The formula is as follows:

[0106]

[0107] Where: v is a possible value of dimension i, and count(v,i) is the number of times value v appears in dimension i.

[0108] 5.2.2: Calculate the amount of information for each piece of data. The calculation formula is as follows:

[0109]

[0110] Among them: I(x) is the information content of sample x, P(xi) is the probability of the sample being in the interval where the i-th eigenvalue is located, and n is the total number of dimensions.

[0111] 5.2.3: Calculate the mean contribution of each piece of data. The calculation formula is as follows:

[0112]

[0113] in: is the weighted mean, xi is the i-th sample value, wi is the contribution value of the i-th sample, and n is the total number of samples.

[0114] 5.2.4: Calculate the contribution row variance of each data. The calculation formula is as follows:

[0115]

[0116] in: is the contributing row variance, is the weighted mean, xi is the i-th sample value, wi is the contribution value of the i-th sample, and n is the total number of samples.

[0117] 5.2.5: Standardize the information content and contribution row variance of each data, the formula is as follows:

[0118]

[0119] Where Z is the standardized score and X is the original data value. is the mean of the data, is the standard deviation of the data.

[0120] 5.2.6: Calculate the difficulty score of each data, which is the sum of the Z-score of the information content and the Z-score of the variance.

[0121] 5.2.7: Sort the data from highest to lowest difficulty score and select the data with the highest difficulty score.

[0122] Step 6: Combine the two data samples to obtain the seed data, which is the final selected data.

[0123] The effect of the present invention is further described below in conjunction with simulation experiments.

[0124] Experimental setup

[0125] The dataset used in the simulation experiment of the present invention is SST2, which is a text dataset for sentiment classification. It includes 67,350 training data and 1,821 test data in total. The benchmark model uses llama2-7b-chat and the llamafactory framework is used to fine-tune the large model. The data we selected is effective by comparing the fine-tuning of complete data and the fine-tuning of high-quality data.

[0126] Results Analysis

[0127] In model training, the quality and distribution of data have an important impact on the improvement of model performance. In view of the role of typical samples and boundary samples in model training, the present invention proposes a data selection method based on knowledge boundaries. Typical samples can provide stable and common pattern information, help the model reduce deviations and accurately handle most common problems; boundary samples contain more information and complex situations, which can guide the model to optimize the decision boundary and improve the ability to handle complex or rare situations. This experiment aims to verify the effectiveness of the method of the present invention, especially its performance on limited data sets.

[0128]

[0129] Combined with the above table, it can be seen that in the present invention, if only the typical samples or boundary samples divided in the first step are used, the effect will not be very good. The advantage of typical samples is that they provide stable and common patterns, which helps to reduce the deviation of the model and allows the model to handle most common problems more accurately. However, relying solely on typical samples may not improve the performance of the model in complex or rare situations, so there is limited room for improvement. Boundary samples usually contain more information and complex situations, and these samples usually appear in the uncertainty area of ​​the model. If only boundary samples are retained, the model may lose its ability to handle common problems due to excessive attention to difficult samples, which may lead to overfitting of boundary samples or change the decision boundary of the model, thereby affecting the overall model performance.

[0130] Therefore, according to the method I proposed, we need to learn the basic laws of the data through typical samples, and at the same time, we need to capture the details and boundary information in the data through boundary samples to improve the complexity and generalization ability of the model. By mixing the two samples in a certain proportion, a complementary effect is formed between boundary samples and typical samples. By adding a proper amount of boundary samples, the model can improve its ability to handle complex and rare situations, while retaining the stability and understanding of common patterns provided by typical samples.

[0131] The above simulation experiments show that the method of the present invention can achieve 97% of the effect of complete data by using only 5% of the original data, which significantly reduces the data demand and verifies the effectiveness of the method. Compared with the strategy of using only typical samples or boundary samples, it can take into account the model's understanding of common patterns and the capture of complex situations, and achieve dual optimization of performance and data efficiency. Moreover, comparison with other methods can further demonstrate the advantages of our method. The present invention effectively solves the problem of low data utilization efficiency, the problem of insufficient model processing ability for complex situations, and alleviates the problem of excessive computational space-time complexity in high-dimensional space.

[0132] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A dynamic data selection method based on knowledge boundary, characterized by: The steps include: Step 1: Divide the initial data into boundary samples and typical samples based on the benchmark large model; Step 2: Encode all boundary samples and typical sample data based on the benchmark large model; Step 3: Perform contribution dimension reduction on the encoded data; Step 4: Set the number of selected boundary samples and typical samples and the ratio of the two sample data; Step 5: extract data samples from typical samples according to the typical sample selection algorithm; extract data samples from boundary samples according to the boundary sample selection algorithm; Step 6: Merge the two data samples to obtain seed data; Step 7: Use the seed data to fine-tune the benchmark large model and verify the performance of the fine-tuned model on the task; Step 8: Change the number or ratio of boundary samples and typical samples in step 4, and repeat steps 5 to 7. The best performance result is high-quality data.

2. A method for dynamic data selection based on knowledge boundaries as claimed in claim 1, characterized in that: In step 1, the benchmark large model determines the division of boundary samples and typical samples based on the knowledge boundary, where the knowledge boundary refers to the knowledge scope and ability boundary that the model can handle when understanding, reasoning and making decisions; the boundary samples are located at the "edge" of the model's existing knowledge boundary, that is, the model may have high uncertainty when facing these samples, or they represent scarce, vague or incomplete parts of the knowledge system; typical samples represent the common knowledge areas mastered by the model.

3. The method for dynamic data selection based on knowledge boundary as claimed in claim 1, characterized in that: In step 2, the encoding steps are as follows: Step 2.1: Decompose the original text into word units; Step 2.2: Add a [CLS] tag at the beginning of the sentence and a [SEP] tag between two sentences; Step 2.3: For each word unit, convert it into a high-dimensional vector representation using word embedding technology; Step 2.4: Perform position encoding to assign a unique representation to each word unit to indicate its position in the sentence; Step 2.5: Perform paragraph encoding to identify which sentence the current word unit belongs to; Step 2.6: Add the word embedding, position encoding, and paragraph encoding to get the final input sequence; Step 2.7: Use a 12-layer Transformer encoder to capture the dependencies between each position in the input sequence and other positions, and finally obtain a context-dependent representation of each input word unit.

4. A method for dynamic data selection based on knowledge boundary as claimed in claim 3, characterized in that: In step 2.4, the position encoding is generated by predefined sine and cosine functions, and each position has a unique vector representation, as shown below: , ; Among them, pos is the position information of the word, i is the dimension index, and d is the dimension of the vector, which is 512.

5. The method for dynamic data selection based on knowledge boundary as claimed in claim 1, characterized in that: The step 3 specifically includes the following steps: Step 3.1: Average each dimension so that the mean of each dimension is zero; Step 3.2: Calculate the covariance matrix. The calculation formula is as follows: ; Where: S is the covariance matrix, yes The transposed matrix of Step 3.3: Calculate the eigenvalues ​​and eigenvectors of the covariance matrix so that , where x is the eigenvector, is the characteristic value; Step 3.4: Calculate the contribution value of each dimension, select the dimensions with weighted contribution greater than 90%, and form the data after dimensionality reduction .

6. The method for dynamic data selection based on knowledge boundary as claimed in claim 1, characterized in that: In step 5, the typical sample selection algorithm uses a double filtering algorithm based on lexical similarity and semantic similarity to filter out data with high lexical and semantic similarity. The remaining data is sample data with high typicality. It is divided into two steps. The first step is to perform preliminary screening through lexical similarity to quickly filter out 80% of the lexically similar data of the original sample; the second step is to perform fine screening through semantic similarity to accurately retain k data with the lowest semantic similarity.

7. The method for dynamic data selection based on knowledge boundary as claimed in claim 1, characterized in that: In step 5, the boundary sample selection algorithm adopts an algorithm based on the combination of contribution row vector variance and maximum information amount; the specific implementation steps are as follows: 5.2.1: Based on the current sample data, count the probability distribution of each dimension and build a local dimension probability distribution table. The formula is as follows: ; in: v is a possible value of dimension i, and count(v,i) is the number of times value v appears in dimension i; 5.2.2: Calculate the amount of information for each piece of data. The calculation formula is as follows: ; Where: I(x) is the information content of sample x, P(x i ) is the probability of the sample being in the interval where the i-th eigenvalue is located, and n is the total number of dimensions; 5.2.3: Calculate the mean contribution of each piece of data. The calculation formula is as follows: ; in: is the weighted mean, x i is the i-th sample value, w i is the contribution value of the i-th sample, and n is the total number of samples; 5.2.4: Calculate the contribution row variance of each data, the calculation formula is as follows: ; in: is the contributing row variance, is the weighted mean, x i is the i-th sample value, w i is the contribution value of the i-th sample, and n is the total number of samples; 5.2.5: Standardize the information content and contribution row variance of each data, the formula is as follows: ; Where Z is the standardized score and X is the original data value. is the mean of the data, is the standard deviation of the data; 5.2.6: Calculate the difficulty score of each data, which is the sum of the Z-score of the information content and the Z-score of the variance; 5.2.7: Sort the data from highest to lowest difficulty score and select the data with the highest difficulty score.