Data processing method and device, computer equipment, readable storage medium and program product

By employing sparse nonnegative matrix factorization and context-aware affine concept editing algorithms, bias features in large language models are identified and corrected, solving the problem of inaccurate bias identification in traditional methods and improving the accuracy and robustness of model output.

CN121745157APending Publication Date: 2026-03-27CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Traditional large language models suffer from model bias when processing business data. Existing prompting engineering algorithms and post-processing techniques cannot accurately identify the sources of bias, resulting in poor accuracy of output results.

Method used

The sparse nonnegative matrix factorization algorithm is used to identify bias features in the activation matrix of the business model, generate a bias feature hierarchy tree, and locate and correct the target neurons through a context-aware affine concept editing algorithm to ensure the accuracy of business results.

Benefits of technology

It achieves accurate identification and localization of bias features, improves the accuracy and robustness of the output results of large language models in complex real-world scenarios, and provides a reliable bias mitigation mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745157A_ABST
    Figure CN121745157A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring business data of a target business, business guidance information and a pre-trained business model; in the process of analyzing and processing the service data and the service guidance information by the service model, determining a prejudice feature in an activation matrix of the service model based on a sparse non-negative matrix factorization algorithm, and generating a prejudice feature hierarchical tree; the activation matrix is a structured set of output states of each neuron of the service model; based on the prejudice feature hierarchical tree, positioning a target neuron corresponding to the prejudice feature in the business model; and based on a context-aware affine concept editing algorithm, correcting the prejudice features of the target neuron code to obtain a service result of the target service. By adopting the method, the accuracy of the output result of the large language model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, and in particular to a data processing method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Technology

[0002] With the development of large language model technology, more and more application fields are deploying large language models to provide corresponding business services, such as recruitment screening services, credit approval services, and judicial auxiliary decision-making services.

[0003] In traditional technologies, users invoke a pre-trained large language model, which analyzes and makes decisions based on the business logic to be processed and the user's input guidance, outputting the target result that satisfies the user's guidance. Simultaneously, to avoid model bias issues inherent in large language models, the analysis and processing of the business logic by the large language model also employs prompting engineering methods and post-processing techniques to correct any potential model biases.

[0004] However, in traditional technologies, the prompting information of prompting engineering algorithms is limited by the application scenario, and post-processing techniques mainly rely on statistical methods such as the mean of the difference in the output results, which cannot identify the actual sources of bias in large language models, thus resulting in poor accuracy of the output results of large language models. Summary of the Invention

[0005] Therefore, it is necessary to provide a data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems.

[0006] In a first aspect, this application provides a data processing method, the method comprising:

[0007] Acquire business data, business guidance information, and pre-trained business models for the target business;

[0008] During the process of the business model analyzing and processing the business data and the business guidance information, the bias features in the activation matrix of the business model are determined based on the sparse nonnegative matrix factorization algorithm, and a bias feature hierarchy tree is generated; the activation matrix is ​​a structured set of the output states of each neuron in the business model.

[0009] Based on the aforementioned bias feature hierarchy tree, the target neuron corresponding to the bias feature is located in the business model;

[0010] A context-aware affine concept editing algorithm is used to correct the bias features encoded by the target neuron to obtain the business results of the target business.

[0011] In one embodiment, determining the bias features in the activation matrix of the business model based on the sparse nonnegative matrix factorization algorithm includes:

[0012] Based on the sparse nonnegative matrix factorization algorithm, the activation matrix is ​​decomposed into a feature matrix and a nonnegative coefficient matrix;

[0013] The bias correlation score between the coefficient vector of each latent feature corresponding to the non-negative coefficient matrix and the preset bias reference label vector is calculated using a preset correlation scoring formula.

[0014] Based on the bias correlation score and the preset bias score threshold, bias features are selected from the implicit features contained in the feature matrix.

[0015] In one embodiment, the step of decomposing the activation matrix into a feature matrix and a nonnegative coefficient matrix based on a sparse nonnegative matrix factorization algorithm includes:

[0016] Extract the activation matrix of the multilayer perceptron at the target level in the business model;

[0017] Based on the sparse nonnegative matrix factorization algorithm, the activation matrix is ​​decomposed into a feature matrix and a nonnegative coefficient matrix;

[0018] The feature matrix is ​​used to characterize the hidden features within the model, and the non-negative coefficient matrix is ​​used to reflect the correlation strength between each hidden feature and the input business data.

[0019] In one embodiment, generating the biased feature hierarchy tree includes:

[0020] Based on the aforementioned bias features, construct a bias feature submatrix;

[0021] Based on the sparse nonnegative matrix factorization algorithm, the bias feature submatrix and the nonnegative coefficient matrix are decomposed into multiple levels to obtain each level of bias sub-features and each level of coefficient vector.

[0022] Based on the coefficient vector of each level in the non-negative coefficient matrix, a hierarchical association is established to generate a bias feature hierarchy tree.

[0023] In one embodiment, locating the target neuron corresponding to the bias feature in the business model based on the bias feature hierarchy tree includes:

[0024] Extract the bias sub-features of each level in the bias feature hierarchy tree and the coefficient vectors in the corresponding non-negative coefficient matrix;

[0025] Based on the parent-child node association rules and the coefficient vector, the mapping relationship between each biased sub-feature and the upper-level parent biased sub-feature is determined, and the column vectors in the biased feature matrix or the recursively decomposed biased feature sub-matrix corresponding to each level of the biased sub-feature are determined.

[0026] Identify the positions of target elements with non-zero weight coefficients in the column vector, and determine the target neuron corresponding to the target element position based on the correspondence between the element position and the neurons in the multilayer perceptron of the business model.

[0027] In one embodiment, the context-aware affine concept editing algorithm corrects the bias features encoded by the target neuron to obtain the business result of the target business, including:

[0028] Based on the bias features corresponding to each target neuron, the bias direction is calculated;

[0029] Based on the average activation vector obtained from preset positive and negative samples, a neutral bias point is calculated, and the activation vectors containing biased features in the business data are biased based on the central bias point.

[0030] The corrected activation vector is input into the business model to complete subsequent inference and output the business results of the target business.

[0031] In one embodiment, the method further includes:

[0032] According to a preset time period, extract the semantic embedding vector and scene context vector of each business data in the business model;

[0033] Based on the semantic embedding vector, the scenario context vector, and the preset risk assessment function, the probability of bias risk of the business data is calculated.

[0034] Obtain the risk coefficient of the current target business scenario and calculate the risk intervention threshold of the business scenario;

[0035] Based on the bias risk probability, the risk intervention threshold, and the preset risk decision-making strategy, it is determined whether the business data needs bias correction.

[0036] Secondly, this application also provides a data processing apparatus, the apparatus comprising:

[0037] The acquisition module is used to acquire business data, business guidance information, and pre-trained business models for the target business.

[0038] The generation module is used to determine the bias features in the activation matrix of the business model based on the sparse nonnegative matrix factorization algorithm during the analysis and processing of the business data and the business guidance information by the business model, and generate a bias feature hierarchy tree; the activation matrix is ​​a structured set of the output states of each neuron of the business model.

[0039] The localization module is used to locate the target neuron corresponding to the bias feature in the business model based on the bias feature hierarchy tree;

[0040] The correction module is used to correct the bias features encoded by the target neuron based on a context-aware affine concept editing algorithm to obtain the business result of the target business.

[0041] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0042] Acquire business data, business guidance information, and pre-trained business models for the target business;

[0043] During the process of the business model analyzing and processing the business data and the business guidance information, the bias features in the activation matrix of the business model are determined based on the sparse nonnegative matrix factorization algorithm, and a bias feature hierarchy tree is generated; the activation matrix is ​​a structured set of the output states of each neuron in the business model.

[0044] Based on the aforementioned bias feature hierarchy tree, the target neuron corresponding to the bias feature is located in the business model;

[0045] A context-aware affine concept editing algorithm is used to correct the bias features encoded by the target neuron to obtain the business results of the target business.

[0046] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0047] Acquire business data, business guidance information, and pre-trained business models for the target business;

[0048] During the process of the business model analyzing and processing the business data and the business guidance information, the bias features in the activation matrix of the business model are determined based on the sparse nonnegative matrix factorization algorithm, and a bias feature hierarchy tree is generated; the activation matrix is ​​a structured set of the output states of each neuron in the business model.

[0049] Based on the aforementioned bias feature hierarchy tree, the target neuron corresponding to the bias feature is located in the business model;

[0050] A context-aware affine concept editing algorithm is used to correct the bias features encoded by the target neuron to obtain the business results of the target business.

[0051] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0052] Acquire business data, business guidance information, and pre-trained business models for the target business;

[0053] During the process of the business model analyzing and processing the business data and the business guidance information, the bias features in the activation matrix of the business model are determined based on the sparse nonnegative matrix factorization algorithm, and a bias feature hierarchy tree is generated; the activation matrix is ​​a structured set of the output states of each neuron in the business model.

[0054] Based on the aforementioned bias feature hierarchy tree, the target neuron corresponding to the bias feature is located in the business model;

[0055] A context-aware affine concept editing algorithm is used to correct the bias features encoded by the target neuron to obtain the business results of the target business.

[0056] The aforementioned data processing methods, devices, computer equipment, computer-readable storage media, and computer program products, through the sparse nonnegative matrix factorization algorithm, achieve accurate identification and hierarchical representation of bias features from the model level to the neuron combination level, overcoming the limitations of traditional detection methods such as coarse-grainedness and susceptibility to noise interference. Furthermore, by constructing a hierarchical tree of bias features, they achieve precise localization of target neurons, providing clear targets for subsequent interventions and ensuring the targeted nature of bias mitigation. Relying on a context-aware affine concept editing algorithm, bias features are directionally corrected in the activation space, avoiding damage to the normal business feature representation of the model and improving the accuracy of the output results of large language models. Through scene-adaptive intervention logic, they significantly improve the robustness and credibility of bias mitigation in complex real-world scenarios. Simultaneously, the hierarchical analysis and precise localization mechanism endow the entire bias mitigation process with high interpretability, providing key technical support for the reliable deployment of large language models in high-risk domains. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is a flowchart illustrating a data processing method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating the steps for filtering bias features in one embodiment;

[0060] Figure 3 This is a flowchart illustrating the steps of decomposing the activation matrix based on a sparse nonnegative matrix factorization algorithm in one embodiment.

[0061] Figure 4 This is a flowchart illustrating the steps involved in generating a bias feature hierarchy tree in one embodiment.

[0062] Figure 5 This is a flowchart illustrating the steps for determining the target neuron corresponding to the location of a target element in one embodiment.

[0063] Figure 6 This is a flowchart illustrating the steps for correcting activation vectors containing biased features in one embodiment.

[0064] Figure 7 This is a flowchart illustrating the steps involved in assessing the risk of bias in business data in one embodiment.

[0065] Figure 8 This is a schematic diagram illustrating a specific example of a data processing method in one embodiment;

[0066] Figure 9 This is a structural block diagram of a data processing device in one embodiment;

[0067] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0069] In one exemplary embodiment, such as Figure 1As shown, a data processing method is provided. This embodiment illustrates the method applied to a terminal, but it is understood that the method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0070] Step 102: Obtain the target business's business data, business guidance information, and pre-trained business model.

[0071] In implementation, this data processing method can be applied to, but is not limited to, recruitment, finance, and judicial fields. Therefore, for different application areas, the corresponding target business may involve resume screening tasks, credit qualification review tasks, judicial assistance tasks, etc. This embodiment does not limit the target business or business application scenario. Users carry out target business using a terminal that has been pre-deployed with this data processing method. A unified multimodal model (i.e., a business model) is pre-trained in this terminal to execute the business, improving the processing efficiency and accuracy of the business. Specifically, users call the business model through the terminal, input business guidance information into the business model for the target business, and execute the target business through the business model. The business guidance information is used to clarify the key basis for the model's task objectives, execution rules, and output requirements. The business guidance information includes, but is not limited to, core business requirements, data screening criteria, decision priority constraints, and output format specifications, providing clear task guidance for the business model. The pre-trained business model is a large language model optimized to adapt to the target business scenario. Its core component includes the Multilayer Perceptron (MLP) in the Transformer architecture, which has the ability to understand the semantics of business data, extract features, and make decision inferences. It has been pre-trained with a large amount of business-related data and can quickly adapt to the analysis needs of specific businesses.

[0072] Step 104: During the process of analyzing and processing business data and business guidance information in the business model, the bias features in the activation matrix of the business model are determined based on the sparse non-negative matrix factorization algorithm, and a bias feature hierarchy tree is generated.

[0073] The activation matrix is ​​a structured set of the output states of each neuron in the business model.

[0074] In implementation, the terminal control business model initiates analysis and reasoning on the acquired business data and business guidance information. To avoid model bias during this process, the data processing method in this embodiment incorporates a mechanism for detecting and correcting model bias: the terminal extracts the activation matrix output from one or more MLP layers within the business model in real time. This activation matrix is ​​a structured set of the output states of each neuron in the business model. The row dimension corresponds to the number of neurons in the MLP layer, and the column dimension corresponds to the number of input business data samples. Each element in the matrix precisely records the activation intensity of a specific neuron when processing the corresponding sample. In this way, the terminal calls the Sparse Non-negative Matrix Factorization (SNMF) algorithm to decompose the activation matrix, obtaining a feature matrix representing the latent features inside the model and a non-negative coefficient matrix reflecting the correlation strength between each latent feature and the input sample. Subsequently, the terminal calculates the correlation between each latent feature and a preset bias reference label (e.g., demographic feature label), quantifies the bias correlation strength of each latent feature through a preset bias scoring formula, and filters out bias features by combining a set threshold, forming a bias feature sub-matrix. Further, the terminal performs recursive SNMF decomposition on the bias feature sub-matrix, determines the parent-child relationship of bias features at different levels through the non-negative coefficient matrix, and finally constructs a hierarchical structure from abstract bias concepts to specific bias features (i.e., a bias feature hierarchy tree), completing the systematic identification and structured representation of bias features.

[0075] Step 106: Based on the bias feature hierarchy tree, locate the target neuron corresponding to the bias feature in the business model.

[0076] In implementation, the terminal parses the generated bias feature hierarchy tree. Each node in this tree corresponds to a type of bias sub-feature. The terminal then initiates the target neuron localization process. This hierarchy tree presents a clear hierarchical structure: upper-level nodes correspond to abstract bias concepts, and lower-level nodes correspond to detailed bias sub-features. Each node is bound to a column vector in the decomposed feature matrix or the recursively decomposed sub-feature matrix. The element positions of these column vectors precisely correspond to the neuron numbers in the MLP layer of the business model, and non-zero values ​​represent the weights of the corresponding neurons in encoding that bias feature. Based on this association logic, the terminal extracts the feature vectors corresponding to the bound column vectors of each node in the hierarchy tree, identifies the positions of elements with non-zero weights in the feature vectors, and thus locates the neuron combinations in the business model that play a core role in encoding that bias feature. These neuron combinations are the target neurons encoding the corresponding hierarchical bias features, achieving precise localization from the bias feature hierarchy structure to the model neuron level, providing clear targets for subsequent targeted bias correction.

[0077] Step 108: Based on the context-aware affine concept editing algorithm, the bias features encoded by the target neuron are corrected to obtain the business results of the target business.

[0078] In implementation, the terminal calculates a unified bias direction vector based on the bias feature vector corresponding to the target neuron, combined with the strength weights of each bias feature, through vector normalization and weighted summation, clarifying the specific direction of the bias in the model activation space. Subsequently, the terminal retrieves the average activation vector of positive and negative samples on the target neuron, and then determines the neutral bias point in the activation space by calculating the mean projection of the average activation vector in the bias direction, serving as a fair benchmark for bias correction. The terminal dynamically adjusts the intervention intensity coefficient based on the contextual information of the target business scenario, constructing a context-aware affine transformation correction rule. Finally, the terminal calls the Affine Concept Editing (ACE) algorithm to perform targeted correction on the activation vector of the business data (i.e., input samples) of the target business based on the bias direction vector, the neutral bias point, and the intervention intensity coefficient, accurately removing the bias components while fully preserving the activation information of normal business features. The terminal inputs the corrected activation vector into the business model, controls the model to complete the subsequent inference process, and finally outputs a fair, accurate business result that meets the requirements of business guidance information.

[0079] In this embodiment, a sparse nonnegative matrix factorization algorithm is used to achieve accurate identification and hierarchical representation of bias features from the model level to the neuron combination level, overcoming the limitations of traditional detection methods such as coarse-grainedness and susceptibility to noise interference. Furthermore, by constructing a hierarchical tree of bias features, the target neurons are accurately located, providing clear targets for subsequent interventions and ensuring the targeted nature of bias mitigation. Relying on a context-aware affine concept editing algorithm, bias features are directionally corrected in the activation space, which not only avoids the destruction of the normal business feature representation of the model and improves the accuracy of the output results of the large language model, but also significantly improves the robustness and credibility of bias mitigation in complex real-world scenarios through scene-adaptive intervention logic. At the same time, the hierarchical analysis and accurate positioning mechanism endow the entire bias mitigation process with high interpretability, providing key technical support for the reliable deployment of large language models in high-risk domains.

[0080] In one exemplary embodiment, such as Figure 2 As shown, step 104 determines the bias features in the activation matrix of the business model based on the sparse nonnegative matrix factorization algorithm and generates a bias feature hierarchy tree, which is specifically implemented through the following steps:

[0081] Step 201: Based on the sparse nonnegative matrix factorization algorithm, the activation matrix is ​​decomposed into a feature matrix and a nonnegative coefficient matrix.

[0082] In implementation, during the analysis and processing of business data and guidance information of the target business by the terminal, the activation matrix output by the multilayer perceptron (MLP) within the business model is extracted in real time. This activation matrix is ​​a structured set of the output states of each neuron. The row dimension of the activation matrix corresponds to the number of neurons in the MLP layer, and the column dimension corresponds to the number of input business data samples. Each element in the activation matrix precisely records the activation intensity of a specific neuron when processing the corresponding sample data. The terminal calls the Sparse Non-negative Matrix Factorization (SNMF) algorithm to decompose the activation matrix, ultimately obtaining two types of key matrices: one is a feature matrix, whose column vectors correspond to various latent features within the model. This feature matrix has no sign restriction and can comprehensively represent the complex feature patterns extracted by the model; the other is a non-negative coefficient matrix, whose elements all satisfy non-negativity constraints. This matrix is ​​used to quantify the correlation strength between each latent feature and each input sample data, providing basic data support for the subsequent identification of biased features. Specifically, taking the first step of the business model... Taking the MLP activation matrix of the layer as an example, for this... MLP activation matrix of layer Decomposition using SNMF:

[0083] (1)

[0084] In formula (1): For the characteristic matrix, It is a non-negative coefficient matrix. The characteristic matrix, or non-negative coefficient matrix, represents the set of real numbers, where each element is a real number. The dimension identifier in the characteristic matrix. ×k, where Row dimension, representing the first The number of neurons in an MLP layer, k-column dimensions, and the total number of latent features extracted from the activation matrix. Dimension identifiers in the nonnegative coefficient matrix. The k-column dimension represents the total number of latent features extracted from the activation matrix; The column dimension represents the total number of original business data samples input into the business model.

[0085] Step 202: Calculate the bias correlation score between the coefficient vector of each latent feature corresponding to the non-negative coefficient matrix and the preset bias reference label vector using a preset correlation scoring formula.

[0086] In implementation, the terminal first defines a preset bias reference label vector. This vector is based on common bias-related dimensions in the target business scenario, covering demographic attributes such as gender, region, and age that are irrelevant to business decisions but may trigger bias. Each element in the bias reference vector corresponds to the label information of a sample on the corresponding bias dimension. Then, the terminal uses each column of the non-negative coefficient matrix as a coefficient vector, which corresponds to the distribution of the correlation strength between a latent feature in the feature matrix and all input samples. Next, the terminal uses a correlation analysis algorithm (such as the Pearson correlation coefficient calculation method) to calculate the correlation between the coefficient vector corresponding to each latent feature and the preset bias reference label vector, obtaining a bias correlation score. This score directly reflects the closeness of the association between the latent feature and the bias attribute. Specifically, the terminal performs quantitative calculations using a preset correlation score formula. This formula introduces a variance term and a regularization term into the coefficient vector. The variance term reduces noise interference, and the regularization term avoids the influence of extreme values, ultimately outputting the correlation score for each latent feature, achieving accurate quantification of the correlation between latent features and bias. The bias correlation score formula for the correlation between each feature in the terminal's feature matrix and the preset bias reference label vector is shown in the following formula (2):

[0087] (2)

[0088] in, Characterizing correlation results, As a preset bias reference label vector, For regularization terms, Indicates the first The activation vector decomposition yields from Multiple initial coefficient vectors.

[0089] Step 203: Based on the bias correlation score and the preset bias score threshold, filter bias features from the implicit features contained in the feature matrix.

[0090] In implementation, the terminal obtains a bias correlation score based on the coefficient vectors corresponding to each bias feature and the preset bias reference label. The terminal compares the bias correlation score of each implicit feature with a preset bias score threshold. This bias score threshold is preset based on factors such as the tolerance of the target business scenario for bias and the distribution of bias in historical data, and is used to define whether an implicit feature is a bias feature. When the bias score of a certain implicit feature exceeds the threshold, the terminal determines that it is a bias feature and extracts such bias features from the feature matrix to form a bias feature submatrix, thus completing the accurate screening of bias features and laying the foundation for the subsequent generation of a bias feature hierarchy tree. Specifically, the formula for screening bias features is shown in the following formula (3):

[0091] (3)

[0092] in, For bias rating threshold, Score the relevance of bias.

[0093] In this embodiment, the activation matrix is ​​precisely decomposed into a feature matrix and a non-negative coefficient matrix using a sparse non-negative matrix factorization algorithm. Then, a bias relevance score is calculated by combining the coefficient vectors of each latent feature in the non-negative coefficient matrix with a preset bias reference label vector using a pre-defined relevance scoring formula. Finally, bias features are filtered based on the bias relevance score and a preset threshold, ensuring the targeting and accuracy of bias feature selection. The entire process not only overcomes the limitations of traditional bias detection methods, such as coarse-grainedness and susceptibility to interference, achieving accurate bias identification from the model level to the feature level, but also endows the bias detection process with high interpretability through matrix factorization and quantitative scoring, while ensuring the adaptability of the screening results to business scenarios.

[0094] In one exemplary embodiment, such as Figure 3 As shown, the specific processing steps in step 201, which decompose the activation matrix into a feature matrix and a nonnegative coefficient matrix based on the sparse nonnegative matrix factorization algorithm, include:

[0095] Step 301: Extract the activation matrix of the multilayer perceptron at the target level in the business model.

[0096] In implementation, the terminal first clarifies the target level of the business model. This target level can be the first level in the Transformer architecture responsible for complex feature computation and concept representation. The Multilayer Perceptron (MLP) layer is the core module for extracting abstract features from data in large language models. Its output activation state directly reflects the model's internal representation logic of the input data. The terminal control business model performs forward propagation processing on the target business's business data and business guidance information. When data flows through the target layer's MLP, the terminal captures the output states of all neurons in that layer in real time and structures them into an activation matrix. The dimension of this activation matrix is ​​the number of neurons × the number of samples (i.e., ...). Each element in the activation matrix precisely records the activation intensity of a specific neuron when processing the corresponding business data sample, fully carrying the business features and potential bias features learned by the model from the input data.

[0097] Step 302: Based on the sparse nonnegative matrix factorization algorithm, the activation matrix is ​​decomposed into a feature matrix and a nonnegative coefficient matrix.

[0098] The feature matrix is ​​used to characterize the hidden features within the model, and the non-negative coefficient matrix is ​​used to reflect the correlation strength between each hidden feature and the input business data.

[0099] In implementation, the terminal invokes the Sparse Nonnegative Matrix Factorization (SNMF) algorithm to perform decomposition operations on the extracted activation matrix, following the core logic of matrix multiplication to approximate the original matrix. This ultimately yields two types of functionally distinct matrices: the feature matrix and the nonnegative coefficient matrix. The feature matrix (with dimensions of...) The model has no restrictions on the symbols used, and its column vectors correspond to various implicit features within the model. These features are abstract representations of the original business data, including both normal features related to business decisions and biased features related to demographic attributes, comprehensively capturing the complex feature patterns within the model; the non-negative coefficient matrix (dimension 1) Then it satisfies the constraint that all elements are non-negative. Its rows correspond to the latent features in the feature matrix, and its columns correspond to the input business data samples. The numerical value of the matrix elements directly reflects the correlation strength between the corresponding latent feature and the sample.

[0100] In this embodiment, the activation matrix of the multilayer perceptron at the target level of the business model is first accurately extracted to fully capture the model's internal representation information of the input business data. Then, the activation matrix is ​​decomposed into a feature matrix and a non-negative coefficient matrix through a sparse non-negative matrix factorization algorithm. This not only overcomes the limitation of traditional methods in decomposing the complex feature representations inside the model, making the originally abstract internal behavior of the model quantifiable and analyzable, but also improves the interpretability of the entire bias detection process by leveraging the transparency of matrix factorization, thus strongly supporting the need for fair and reliable model applications.

[0101] In one exemplary embodiment, such as Figure 4 As shown, step 104 includes steps 402 to 406. Wherein:

[0102] Step 402: Construct a bias feature submatrix based on each bias feature.

[0103] In implementation, the terminal, based on all the selected bias features, recombines the extracted bias feature column vectors according to the column order of the original feature matrix to form a dedicated bias feature submatrix. Each column vector in the bias feature submatrix is ​​a quantitative representation of a specific bias feature, with its element position precisely corresponding to the neuron number in the MLP layer of the business model, and the element value representing the weight of the corresponding neuron in encoding that bias feature. The row dimension of this bias feature submatrix in the terminal remains consistent with the number of neurons in the MLP layer, while the column dimension equals the total number of selected bias features. This fully preserves the neuronal encoding information of all bias features, providing a core data carrier focused on bias features for subsequent multi-level decomposition and hierarchical structure analysis.

[0104] Step 404: Based on the sparse nonnegative matrix factorization algorithm, perform multi-level decomposition on the bias feature submatrix and nonnegative coefficient matrix respectively to obtain the bias sub-features and coefficient vectors of each level.

[0105] In implementation, the terminal uses the Sparse Nonnegative Matrix Factorization (SNMF) algorithm to construct the bias feature submatrix. Perform recursive multi-level decomposition By setting a decreasing sequence of decomposition parameter values, the upper-level abstract bias features are gradually decomposed into more detailed lower-level bias sub-features. Each decomposition yields a sub-feature matrix at the corresponding level. The bias features representing this level and the sub-nonnegative coefficient matrix ( (This represents the correlation strength between the biased sub-features at this level and the biased features at the higher level). Simultaneously, the terminal performs corresponding level-specific SNMF decomposition on the original non-negative coefficient matrix to obtain coefficient vectors for each level. These coefficient vectors are used to quantify the correlation strength between the biased sub-features at each level and the input business data samples. Through multi-level recursive decomposition, the terminal gradually refines the originally general biased features into hierarchical sub-features, and each level forms a matching set of "biased sub-feature + coefficient vector".

[0106] Step 406: Based on the coefficient vector of each level in the non-negative coefficient matrix, establish hierarchical associations and generate a bias feature hierarchy tree.

[0107] In implementation, the terminal uses the coefficient vectors obtained from each level of decomposition as the core basis to construct the correlation between bias features at different levels: for each bias sub-feature at the next lower level, the terminal analyzes the numerical values ​​of each element in its corresponding coefficient vector to determine the correlation strength between the bias sub-feature and all bias features at the previous level (parent bias sub-features), and selects the upper-level bias feature with the strongest correlation strength as its parent-child correlation node (i.e., clarifying which upper-level abstract bias feature the sub-feature belongs to). Following the logic of "upper-level abstract bias concept—middle-level sub-bias features—lower-level specific bias sub-features," the terminal sequentially establishes parent-child relationships between each level, organizing all bias features and bias sub-features into a tree-like model with a clear hierarchical structure, namely, a bias feature hierarchy tree. This hierarchy tree clearly defines the evolutionary relationship and propagation path of bias features from abstract to concrete.

[0108] Specifically, in the recruitment scenario, the MLP activation matrix of the l-th layer of this business model is decomposed into a feature matrix using SNMF. (Contains 8 core features, dimensions) ×8). By analyzing the correlation between each feature and demographic information, it was found that the features in column 3 were strongly correlated with "Type I bias" and the features in column 6 were strongly correlated with "Type II bias". Therefore, these two columns were extracted to form a bias feature submatrix. (dimension) ×2), that is =[ , ].

[0109] First round of recursive decomposition: [The rest of the text appears to be incomplete and requires further context.] Applying SNMF, the number of features is set to decrease (e.g., from 2 to 3), and the sub-feature matrix is ​​obtained by decomposition. (dimension) ×3) and coefficient matrix (Dimension 2×3). Assumptions The value is:

[0110]

[0111] Through Parent( )= Calculate: Biased Sub-Feature 1 ( =1) The parent node is the first row (parent feature is Column 1, “Type 1 Bias”, Sub-feature 2 ( =2) The parent node is the second row (parent feature is Column 2, “Second Type Bias”, sub-feature 3 ( =3) The parent node is the second row (parent feature is The second column, “Type II Bias”, means that “Type I Bias” derives one sub-feature and “Type II Bias” derives two sub-features.

[0112] Second round of recursive decomposition: [The rest of the text appears to be incomplete and requires further context.] Sub-features 2 and 3 related to "Type II bias" are again decomposed using SNMF with a smaller number of features (e.g., reduced from 3 to 2) to obtain the bias sub-feature matrix. (dimension) ×2) and coefficient matrix (Dimension 3×2). Assume that the bias sub-feature 2 is derived from the sub-feature "second type derived bias A1" through calculation, and the bias sub-feature 3 is derived from the sub-feature "second type derived bias B1".

[0113] The final constructed hierarchy tree T of the bias concept is: the top-level parent node is The tree structure consists of "Type I bias" and "Type II bias". Middle-level child nodes are derived from "Type I bias" ("Type I derived bias") and "Type II bias A" and "Type II bias B" ("Type II derived bias A"), respectively. The bottom-level leaf nodes are derived from "Type II bias A" ("Type II derived bias A1") and "Type II derived bias B" ("Type II derived bias B1") ("Type II derived bias B"). Through this bias feature hierarchy tree, the originally abstract concepts of "Type I bias" and "Type II bias" are broken down into precisely locatable sub-bias concepts, allowing for targeted mitigation interventions for specific sub-nodes (such as "Type I derived bias").

[0114] In this embodiment, a bias feature sub-matrix is ​​constructed based on the selected bias features, achieving effective separation between bias features and normal business features. Then, a multi-level decomposition of the bias feature sub-matrix and non-negative coefficient matrix is ​​performed using a sparse non-negative matrix factorization algorithm, gradually breaking down the abstract bias features into bias sub-features with detailed attributes. At the same time, coefficient vectors at each level are obtained, which not only reveals the internal detailed structure of the bias features, but also quantifies the correlation between bias features at different levels and between bias features and business data through coefficient vectors. Finally, a hierarchical association is established based on the coefficient vectors at each level, and a bias feature hierarchical tree is generated, clearly presenting the evolution path and attribution relationship from the abstract bias concept to specific bias sub-features.

[0115] In one exemplary embodiment, such as Figure 5 As shown, the specific processing steps of step 106 include:

[0116] Step 501: Extract the bias sub-features of each level in the bias feature hierarchy tree and the coefficient vectors in the corresponding non-negative coefficient matrix.

[0117] In implementation, the terminal first parses the generated bias feature hierarchy tree, clarifying the complete hierarchical structure of the tree from top to bottom, including the abstract bias concept, mid-level bias features, and lower-level detailed bias sub-features, ensuring that no bias-related feature at any level is missed. Subsequently, the terminal traces the generation source of each level of bias feature, extracting the non-negative coefficient matrix (including the initial non-negative coefficient matrix and the sub-coefficient matrices obtained from each level of recursive decomposition) corresponding to each level of bias sub-feature in the recursive SNMF decomposition process. Based on the hierarchical matching relationship, it accurately extracts the coefficient vector specific to each bias sub-feature. This coefficient vector records the correlation strength information between the corresponding bias sub-feature and the upper-level bias features or the input business data sample.

[0118] Step 502: Based on the parent-child node association rules and coefficient vectors, determine the mapping relationship between each biased sub-feature and the upper-level parent biased sub-feature, and determine the column vector in the biased feature matrix or the biased feature sub-matrix after recursive decomposition corresponding to each level of biased sub-feature.

[0119] In implementation, the terminal analyzes the coefficient vector corresponding to each biased sub-feature based on the parent-child node association rules. By calculating the numerical value of each element in the coefficient vector, it locates the peak correlation strength between the biased sub-feature and all upper-level biased features. The upper-level biased feature with the strongest correlation strength is determined as its corresponding parent biased feature, thus clarifying the precise mapping relationship between each level of biased sub-feature and its upper-level parent biased feature, and clarifying the hierarchical belonging logic of biased features. Simultaneously, based on the established hierarchical mapping relationship, the terminal traces the source of the quantitative representation of each level of biased sub-feature, extracting a column vector uniquely corresponding to each biased sub-feature from the initial biased feature matrix or the sub-matrices of each level of biased feature obtained through recursive decomposition. This column vector is the quantitative representation of the corresponding biased sub-feature in the model activation matrix.

[0120] Step 503: Identify the positions of target elements with non-zero weight coefficients in the column vector, and determine the target neuron corresponding to the target element position based on the correspondence between the element position and the neurons in the multilayer perceptron of the business model.

[0121] In implementation, the terminal performs element-by-element analysis on the column vector corresponding to each extracted bias feature, filtering out elements with non-zero weight coefficients. The positions of these non-zero elements are the target element positions. Specifically, the magnitude of the non-zero weight coefficient directly reflects the contribution of the corresponding neuron to the encoding of the bias feature. Since the dimension of this column vector is exactly the same as the number of neurons in the multilayer perceptron (MLP) of the business model, and there is a one-to-one pre-defined relationship between the position of each element in the column vector and the number of the neuron in the MLP layer, the terminal accurately maps the selected target element positions to the specific neurons in the MLP layer based on this fixed correspondence.

[0122] In this embodiment, firstly, the biased sub-features of each level in the biased feature hierarchy tree and the coefficient vectors in the corresponding non-negative coefficient matrix are extracted. Then, based on the parent-child node association rules and coefficient vectors, the mapping relationship between each biased sub-feature and the upper-level parent biased sub-feature is clarified. At the same time, the column vectors in the feature matrix or sub-feature matrix corresponding to each level of biased sub-feature are accurately located. Finally, by identifying the position of the target element with non-zero weight coefficient in the column vector and combining the correspondence between the element position and the multilayer perceptron neuron, the target neuron is determined, thus achieving accurate tracing from the biased feature hierarchy structure to the model neuron level.

[0123] In one exemplary embodiment, such as Figure 6 As shown, the specific processing steps of step 108 include:

[0124] Step 601: Calculate the bias direction based on the bias features corresponding to each target neuron.

[0125] In implementation, the terminal first identifies the bias features corresponding to each target neuron. These bias features come from different levels of a bias feature hierarchy tree, covering abstract bias concepts and detailed bias sub-features, and each bias feature is quantitatively represented by column vectors of a feature matrix or sub-feature matrix. The terminal assigns weights to each bias feature, which are determined based on the bias relevance score; the higher the bias intensity, the greater the weight, ensuring that high-impact bias features dominate the calculation. Subsequently, the terminal normalizes the column vectors corresponding to each bias feature to eliminate interference from differences in vector scale. Then, the normalized column vectors are multiplied by their corresponding weights, and finally, all weighted vectors are summed to obtain a unified bias direction vector.

[0126] Specifically, the formula for calculating the bias direction is shown in formula (4) below:

[0127] (4)

[0128] in, The bias direction vector, For the first Each weight coefficient, | | indicates the first Bias feature vectors The L2 norm (i.e., the magnitude of the vector). Represents the bias feature vector The vector is normalized so that its magnitude is 1 (i.e., a unit vector).

[0129] Step 602: Calculate the neutral bias point based on the average activation vector obtained from the preset positive and negative samples, and perform bias correction on the activation vectors containing biased features in the business data based on the neutral bias point.

[0130] In implementation, the terminal first acquires a preset set of positive and negative samples. The positive sample set consists of business data samples with a positive label related to a certain bias (e.g., male candidate samples in a recruitment scenario), and the negative sample set consists of business data samples with a corresponding negative label (e.g., female candidate samples). Both types of samples are screened to ensure representativeness. The terminal extracts the activation vectors of the positive and negative sample sets on the target neurons, calculates the average value of the activation vectors of the two types of samples, and obtains the average activation vector of the positive samples and the average activation vector of the negative samples. Then, the terminal calculates the projection values ​​of these two average activation vectors onto the bias direction vector, and determines the mean of the two projection values ​​as the neutral bias point. Specifically, the formula for calculating the neutral bias point is shown in the following formula (5):

[0131] (5)

[0132] in, Indicates the neutral bias point. The coefficient of the arithmetic mean. It is the standard representation of the vector inner product (dot product); This represents the average projection position of the positive sample set in the bias direction. This represents the average projection position of the negative sample set along the bias direction. This is the average activation vector corresponding to the positive sample set. This is the average activation vector corresponding to the negative sample set.

[0133] In this way, the neutral bias point serves as the "unbiased" reference position in the activation space, achieving a quantitative definition of the fair activation state. Subsequently, the terminal extracts the original activation vector containing biased features from the current business data, calculates the projection value of this original activation vector onto the biased direction vector, and adjusts the components of the original activation vector in the biased direction using an affine transformation formula, with the neutral bias point as the reference, according to a preset intervention intensity coefficient. This accurately removes the biased components while fully preserving the effective feature information relevant to the business, completing the targeted correction of the biased activation vector. Specifically, the ACE intervention correction process is as follows:

[0134] Activation vectors of the input containing biased features Make corrections: .

[0135] in, It is the activation vector after modification and removal of bias components. The intervention intensity coefficient is used to balance the effect of bias mitigation with the model's operational performance. Represents the original activation vector The bias direction vector obtained after weighted normalization of the bias features identified by SNMF. Projection values ​​on, It is a neutral bias point.

[0136] Step 603: Input the corrected activation vector into the business model to complete subsequent inference and output the business results of the target business.

[0137] In implementation, the terminal re-inputs the corrected activation vector into the subsequent processing flow of the business model. This activation vector has been stripped of bias and retains complete business features, ensuring that the model infers based on fair internal representations. After receiving the corrected activation vector, the business model continues to execute subsequent computations in the Transformer architecture (such as self-attention mechanism processing, subsequent MLP layer feature fusion, etc.), completing the entire inference process according to the task objectives and decision rules set in the business guidance information. The terminal monitors the model's inference process in real time to ensure that the corrected activation vector is not interfered with by subsequent processes. The final model outputs a result that meets business requirements—a result that accurately reflects the core value of business data (such as candidate skill matching degree, applicant creditworthiness) while avoiding the impact of bias factors on decision-making, achieving the best balance between fairness and business utility, and providing reliable support for credible decision-making in high-risk scenarios.

[0138] In this embodiment, the bias direction and neutral bias point are calculated based on bias features, and the biased activation vector is corrected in a targeted manner through ACE technology. Finally, a bias risk prediction model and an adaptive threshold adjustment mechanism are constructed to achieve dynamic monitoring and preventive intervention, realize precise bias localization at the neuron level, and have context adaptability and high interpretability. While effectively mitigating bias, the model's business performance is preserved to the maximum extent, providing key technical support for the reliable deployment of large language models.

[0139] In one exemplary embodiment, such as Figure 7 As shown, in addition to correcting model biases during business model processing, the method can also dynamically monitor and prevent biases in the business data within the model. This process can be executed during model processing, and the execution order is not limited. The method also includes:

[0140] Step 701: Extract the semantic embedding vector and scene context vector of each business data in the business model according to the preset time period.

[0141] In implementation, the terminal pre-sets a reasonable time period (which can be adaptively adjusted according to the frequency of business data updates and the complexity of the scenario, such as daily or after each batch of data input) and periodically triggers the data feature extraction process. For each piece of business data flowing into the business model, the terminal extracts its semantic embedding vector through the model's embedding layer. This semantic embedding vector accurately captures the core semantic information of the business data (such as the skill description of candidates in a recruitment scenario or the qualification information of applicants in a credit scenario). At the same time, the terminal synchronously extracts the scenario context vector corresponding to the business data. This scenario context vector contains the key attributes of the current business scenario (such as business type, decision constraints, scenario fairness requirements, etc.), comprehensively carrying the environmental information of the data and providing complete feature input for subsequent risk assessment.

[0142] Step 702: Based on the semantic embedding vector, the scene context vector, and the preset risk assessment function, calculate the bias risk probability of the business data.

[0143] In implementation, the terminal concatenates and fuses the extracted semantic embedding vector with the scene context vector to form a comprehensive feature vector with unified dimensions, ensuring that both the semantics of the data itself and the scene environment information are included. Subsequently, the terminal calls a preset risk assessment function to process the comprehensive feature vector. This risk assessment function, by learning the feature patterns of historical bias data, can quantify the likelihood that the output business data will trigger biased decisions, i.e., the probability of bias risk (ranging from 0 to 1). The closer the probability is to 1, the higher the likelihood that the data contains bias risk. This risk assessment function... Specifically:

[0144] (6)

[0145] in, For the weight matrix, For bias terms, It is the Sigmoid activation function. Representative business data semantic embedding vector, Representative business data The scene context vector.

[0146] Step 703: Obtain the risk coefficient of the current target business scenario and calculate the risk intervention threshold of the business scenario.

[0147] In implementation, the terminal pre-stores risk coefficients corresponding to different business scenarios (such as recruitment, credit, and the judiciary). These risk coefficients are set based on the scenario's sensitivity to fairness and the severity of the consequences of biased decisions (e.g., the risk coefficient for the judiciary scenario is higher than that for a typical recruitment scenario). The terminal accurately retrieves the corresponding scenario risk coefficient based on the target business being processed, and then combines this with a preset basic intervention threshold. The risk intervention threshold for the current scenario is calculated using a preset risk intervention formula. Specifically, the preset risk intervention formula is as follows:

[0148] (7)

[0149] in, This represents the risk intervention threshold for the current business scenario. Basic intervention threshold, This represents the risk coefficient of the current business scenario.

[0150] In this way, the calculated risk intervention threshold can be adaptively adjusted according to the scenario, which ensures strict intervention standards in high-risk scenarios while avoiding efficiency losses caused by excessive intervention in low-risk scenarios.

[0151] Step 704: Based on the probability of bias risk, the risk intervention threshold, and the preset risk decision-making strategy, determine whether the business data needs bias correction.

[0152] In implementation, the terminal compares the calculated probability of bias risk with the obtained risk intervention threshold and makes targeted decisions based on preset risk decision-making strategies. Specifically, if the probability of bias risk in business data exceeds the risk intervention threshold, the terminal determines that the business data needs bias correction and includes it in the subsequent ACE intervention process; if it does not exceed the threshold, it determines that the business data does not require additional correction and directly enters the normal inference process of the model. This process achieves accurate identification and targeted intervention of high-risk data, effectively preventing bias risk while avoiding unnecessary processing of risk-free data, thus improving the operational efficiency and targeting of the bias mitigation system.

[0153] In this embodiment, by periodically extracting semantic embedding vectors and scenario context vectors from business data, and combining them with a preset risk assessment function to accurately calculate the probability of bias risk, the intervention threshold is dynamically adjusted based on the risk coefficient of the business scenario. Finally, a risk decision-making strategy is used to determine whether bias correction is needed. This achieves forward-looking monitoring and scenario-based adaptive intervention of bias risk, proactively identifying and protecting against high-risk data, while avoiding efficiency losses caused by indiscriminate intervention. It ensures the fairness of the model while taking into account operational efficiency. Furthermore, by relying on clear quantitative calculation and scenario adaptation logic, it improves the targeting and interpretability of bias governance, providing continuous assurance for the reliable operation of the model.

[0154] In a specific embodiment, such as Figure 8As shown, a specific example flow of a data processing method is provided. This example flow includes: First, the user inputs text containing business data through a terminal. After forward propagation of the model, the activation matrix of the MLP layer is extracted. SNMF decomposition of the activation matrix is ​​completed through "Step 1: SNMF Bias Feature Identification," and bias features are selected by combining bias correlation calculations. Next, in "Step 2: Hierarchical Bias Structure Analysis," the selected bias features are recursively decomposed into SNMF, a hierarchical tree is constructed, and bias patterns are identified. Subsequently, in "Step 3: Context-Aware ACE Intervention," the bias direction and neutral bias point are calculated based on the bias features, and ACE intervention is performed to correct the biased activation vectors. Finally, in "Step 4: Dynamic Bias Monitoring and Prevention," bias risk is predicted for the business data, and real-time intervention decisions are made based on adaptive threshold adjustments (divided into three categories: strong intervention, light intervention, and monitoring only). The final output is a result that meets business needs while avoiding bias. The entire process, from activation extraction, feature selection, and structural analysis to intervention execution and dynamic monitoring, forms an end-to-end bias governance closed loop, taking into account accuracy, interpretability, and scenario adaptability.

[0155] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0156] Based on the same inventive concept, this application also provides a data processing apparatus for implementing the data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data processing apparatus embodiments provided below can be found in the limitations of the data processing method described above, and will not be repeated here.

[0157] In one exemplary embodiment, such as Figure 9 As shown, a data processing device 900 is provided, including: an acquisition module 901, a generation module 902, a positioning module 903, and a correction module 904, wherein:

[0158] The acquisition module 901 is used to acquire business data, business guidance information, and pre-trained business models for the target business.

[0159] The generation module 902 is used to determine the bias features in the activation matrix of the business model based on the sparse nonnegative matrix factorization algorithm during the analysis and processing of business data and business guidance information in the business model, and generate a bias feature hierarchy tree; the activation matrix is ​​a structured set of the output states of each neuron in the business model.

[0160] The localization module 903 is used to locate the target neuron corresponding to the bias feature in the business model based on the bias feature hierarchy tree;

[0161] The correction module 904 is used in a context-aware affine concept editing algorithm to correct the bias features encoded by the target neuron and obtain the business results of the target business.

[0162] In one embodiment, the generation module 902 is specifically used to decompose the activation matrix into a feature matrix and a nonnegative coefficient matrix based on a sparse nonnegative matrix factorization algorithm.

[0163] By using a pre-defined relevance scoring formula, the bias relevance score between the coefficient vector of each latent feature corresponding to the non-negative coefficient matrix and the pre-defined bias reference label vector is calculated.

[0164] Based on the bias correlation score and the preset bias score threshold, bias features are selected from the implicit features contained in the feature matrix.

[0165] In one embodiment, the generation module 902 is specifically used to extract the activation matrix of the multilayer perceptron at the target level in the business model;

[0166] Based on the sparse nonnegative matrix factorization algorithm, the activation matrix is ​​decomposed into a feature matrix and a nonnegative coefficient matrix;

[0167] The feature matrix is ​​used to characterize the hidden features within the model, and the non-negative coefficient matrix is ​​used to reflect the correlation strength between each hidden feature and the input business data.

[0168] In one embodiment, the generation module 902 is specifically used to construct a bias feature sub-matrix based on each bias feature;

[0169] Based on the sparse nonnegative matrix factorization algorithm, the bias feature submatrix and nonnegative coefficient matrix are decomposed into multiple levels to obtain the bias sub-features and coefficient vectors at each level.

[0170] Based on the coefficient vector of each level in the non-negative coefficient matrix, hierarchical associations are established to generate a bias feature hierarchy tree.

[0171] In one embodiment, the positioning module 903 is specifically used to extract the bias sub-features of each level in the bias feature hierarchy tree and the coefficient vectors in the corresponding non-negative coefficient matrix;

[0172] Based on the parent-child node association rules and coefficient vectors, the mapping relationship between each biased sub-feature and the upper-level parent biased sub-feature is determined, and the column vectors in the biased feature matrix or the recursively decomposed biased feature sub-matrix corresponding to each level of biased sub-feature are determined.

[0173] Identify the positions of target elements with non-zero weight coefficients in the column vector, and determine the target neuron corresponding to the target element position based on the correspondence between the element position and the neurons in the multilayer perceptron of the business model.

[0174] In one embodiment, the correction module 904 is specifically used to calculate the bias direction based on the bias features corresponding to each target neuron;

[0175] Based on the average activation vector obtained from preset positive and negative samples, calculate the neutral bias point, and perform bias correction on the activation vectors containing biased features in the business data based on the center bias point.

[0176] The corrected activation vector is input into the business model to complete subsequent inference and output the business results of the target business.

[0177] In one embodiment, the data processing apparatus 900 further includes:

[0178] The extraction module is used to extract the semantic embedding vectors and scene context vectors of each business data in the business model according to a preset time period.

[0179] The first calculation module is used to calculate the probability of bias risk in business data based on semantic embedding vectors, scenario context vectors, and preset risk assessment functions.

[0180] The second calculation module is used to obtain the risk coefficient of the current target business scenario and calculate the risk intervention threshold of the business scenario.

[0181] The determination module is used to determine whether business data needs bias correction based on the probability of bias risk, risk intervention threshold, and preset risk decision-making strategies.

[0182] Each module in the aforementioned data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0183] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a data processing method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0184] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0185] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0186] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0187] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0188] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0189] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0190] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0191] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data processing method, characterized in that, The method includes: Acquire business data, business guidance information, and pre-trained business models for the target business; During the process of the business model analyzing and processing the business data and the business guidance information, the bias features in the activation matrix of the business model are determined based on the sparse nonnegative matrix factorization algorithm, and a bias feature hierarchy tree is generated; the activation matrix is ​​a structured set of the output states of each neuron in the business model. Based on the aforementioned bias feature hierarchy tree, the target neuron corresponding to the bias feature is located in the business model; A context-aware affine concept editing algorithm is used to correct the bias features encoded by the target neuron to obtain the business results of the target business.

2. The method according to claim 1, characterized in that, The determination of bias features in the activation matrix of the business model based on the sparse nonnegative matrix factorization algorithm includes: Based on the sparse nonnegative matrix factorization algorithm, the activation matrix is ​​decomposed into a feature matrix and a nonnegative coefficient matrix; The bias correlation score between the coefficient vector of each latent feature corresponding to the non-negative coefficient matrix and the preset bias reference label vector is calculated using a preset correlation scoring formula. Based on the bias correlation score and the preset bias score threshold, bias features are selected from the implicit features contained in the feature matrix.

3. The method according to claim 1, characterized in that, The sparse nonnegative matrix factorization algorithm decomposes the activation matrix into a feature matrix and a nonnegative coefficient matrix, including: Extract the activation matrix of the multilayer perceptron at the target level in the business model; Based on the sparse nonnegative matrix factorization algorithm, the activation matrix is ​​decomposed into a feature matrix and a nonnegative coefficient matrix; The feature matrix is ​​used to characterize the hidden features within the model, and the non-negative coefficient matrix is ​​used to reflect the correlation strength between each hidden feature and the input business data.

4. The method according to claim 1 or 2, characterized in that, The generation of the biased feature hierarchy tree includes: Based on the aforementioned bias features, construct a bias feature submatrix; Based on the sparse nonnegative matrix factorization algorithm, the bias feature submatrix and nonnegative coefficient matrix are decomposed into multiple levels to obtain each level of bias sub-features and each level of coefficient vector. Based on the coefficient vector of each level in the non-negative coefficient matrix, a hierarchical association is established to generate a bias feature hierarchy tree.

5. The method according to claim 1, characterized in that, The step of locating the target neuron corresponding to the bias feature in the business model based on the bias feature hierarchy tree includes: Extract the bias sub-features of each level in the bias feature hierarchy tree and the coefficient vectors in the corresponding non-negative coefficient matrix; Based on the parent-child node association rules and the coefficient vector, the mapping relationship between each biased sub-feature and the upper-level parent biased sub-feature is determined, and the column vectors in the biased feature matrix or the recursively decomposed biased feature sub-matrix corresponding to each level of the biased sub-feature are determined. Identify the positions of target elements with non-zero weight coefficients in the column vector, and determine the target neuron corresponding to the target element position based on the correspondence between the element position and the neurons in the multilayer perceptron of the business model.

6. The method according to claim 1, characterized in that, The context-aware affine concept editing algorithm corrects the bias features encoded by the target neuron to obtain the business result of the target business, including: Based on the bias features corresponding to each target neuron, the bias direction is calculated; Based on the average activation vector obtained from preset positive and negative samples, a neutral bias point is calculated, and the activation vectors containing biased features in the business data are biased based on the central bias point. The corrected activation vector is input into the business model to complete subsequent inference and output the business results of the target business.

7. The method according to claim 1, characterized in that, The method further includes: According to a preset time period, extract the semantic embedding vector and scene context vector of each business data in the business model; Based on the semantic embedding vector, the scenario context vector, and the preset risk assessment function, the probability of bias risk of the business data is calculated. Obtain the risk coefficient of the current target business scenario and calculate the risk intervention threshold of the business scenario; Based on the bias risk probability, the risk intervention threshold, and the preset risk decision-making strategy, it is determined whether the business data needs bias correction.

8. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire business data, business guidance information, and pre-trained business models for the target business. The generation module is used to determine the bias features in the activation matrix of the business model based on the sparse nonnegative matrix factorization algorithm during the analysis and processing of the business data and the business guidance information by the business model, and generate a bias feature hierarchy tree; the activation matrix is ​​a structured set of the output states of each neuron of the business model. The localization module is used to locate the target neuron corresponding to the bias feature in the business model based on the bias feature hierarchy tree; The correction module is used to correct the bias features encoded by the target neuron based on a context-aware affine concept editing algorithm to obtain the business result of the target business.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.