Financial risk judgment method and device and feature analysis model training method and device
By combining feature analysis models with hybrid expert models and utilizing knowledge distillation techniques to transfer knowledge from large models to small-scale models, the problem of low efficiency in financial risk assessment is solved, achieving efficient and rapid financial risk assessment.
Patent Information
- Application Number
- CN202511061108.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-11
AI Technical Summary
Existing methods for assessing financial risks are inefficient. Manual assessment is also inefficient, and rule engines have a high error rate in complex trading scenarios and require manual intervention, resulting in low efficiency.
The system combines a feature analysis model with a hybrid expert model. The feature analysis model is a student model of the large artificial intelligence model after knowledge distillation. The system selects an appropriate expert model based on transaction characteristics to determine financial risk, and combines LSTM, GCN and other models for efficient judgment.
It improves the efficiency of financial risk assessment, enables rapid response in high-concurrency scenarios, reduces computing power requirements, is suitable for mobile devices and low-computing-power platforms, and enhances assessment efficiency and accuracy.
Smart Images

Figure CN120931396A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for determining financial risk, a method and apparatus for training a feature analysis model. Background Technology
[0002] Assessing the risks of various transactions in financial activities is a key aspect of financial risk control.
[0003] With the rapid development of the mobile internet, financial institutions' risk control business needs to deal with massive user behavior, complex data, and rapidly increasing transaction frequency, which places higher demands on the efficiency of risk assessment.
[0004] Current methods for assessing financial risk involve manual judgment and / or rule engines (a software system used to define, manage, and execute pre-defined risk assessment rules). Human intervention is limited by physical and mental capacity, resulting in low efficiency. Rule engines, based on pre-defined risk assessment rules, may fail to make accurate judgments or experience high error rates in complex trading scenarios. Therefore, rule engines often require frequent human intervention, further contributing to low overall efficiency. Summary of the Invention
[0005] This invention provides a method for determining financial risk, a method and apparatus for training a feature analysis model, and an apparatus to address the problem of low efficiency in existing methods for determining financial risk.
[0006] To solve the above-mentioned technical problems, the present invention is implemented as follows:
[0007] In a first aspect, embodiments of the present invention provide a method for determining financial risk, including:
[0008] In response to receiving a user's transaction request, the system extracts the transaction features of the transaction request, calls a feature analysis model to infer the transaction features, and obtains the feature indicators of the transaction request; wherein, the feature analysis model is a student model obtained after knowledge distillation using a large artificial intelligence model as the teacher model;
[0009] Based on the aforementioned feature indicators, at least one expert model is selected as the target expert model from the pre-trained hybrid expert models used for financial risk assessment. The hybrid expert models include multiple expert models used for assessing financial risk.
[0010] The target expert model is invoked to infer the transaction characteristics and obtain the financial risk assessment result.
[0011] Optionally, the feature indicators include: financial scenario category, time characteristics, and transaction relationship characteristics;
[0012] Based on the aforementioned feature indicators, at least one expert model is selected as the target expert model from the pre-trained hybrid expert models used for financial risk assessment, including:
[0013] Select the expert model that matches the financial scenario category from the hybrid expert model to obtain the candidate expert model set;
[0014] Based on the time characteristics, determine whether the transaction request is a time-intensive request. If the transaction request is a time-intensive request, select a model with a Long Short-Term Memory (LSTM) network architecture from the set of candidate expert models as the first expert model.
[0015] Based on the characteristics of the transaction relationship, it is determined whether the transaction request is a complex relationship request. If the transaction request is a complex relationship request, the model with the graph convolutional network (GCN) architecture selected from the set of candidate expert models is the second expert model.
[0016] The first expert model and the second expert model are used as the target expert model.
[0017] Optionally, the target expert model is invoked to infer the transaction characteristics to obtain a financial risk assessment result, including:
[0018] The financial risk assessment result is obtained by integrating the reasoning results of all the target expert models on the transaction characteristics.
[0019] Secondly, embodiments of the present invention provide a method for training a feature analysis model, comprising:
[0020] Obtain a set of historical transaction requests, and extract the transaction features of each historical transaction request in the set of historical transaction requests to obtain a training data set;
[0021] Using a large artificial intelligence model as the teacher model and an initial analysis model as the student model, the teacher model is invoked to perform inference based on the training data set to obtain the feature indicators of each of the historical transaction requests as the inference result of the teacher model; and the training data is input into the initial analysis model to obtain the feature indicators of each of the historical transaction requests output by the initial analysis model as the inference result of the student model.
[0022] Based on the reasoning results of the teacher model and the student model, the initial analysis model is trained by knowledge distillation to obtain the feature analysis model.
[0023] Alternatively, the loss function for knowledge distillation is determined based on at least one of the following loss functions:
[0024] Contrast learning loss function, attention distillation loss function, soft label loss function, hard label loss function.
[0025] Thirdly, embodiments of the present invention provide a financial risk determination device, comprising:
[0026] The inference module is used to respond to a received user transaction request, extract the transaction features of the transaction request, call the feature analysis model to infer the transaction features, and obtain the feature indicators of the transaction request; wherein, the feature analysis model is a student model obtained after knowledge distillation using a large artificial intelligence model as the teacher model;
[0027] The routing module is used to select at least one expert model as the target expert model from the pre-trained hybrid expert models for financial risk assessment based on the feature indicators. The hybrid expert models include multiple expert models for assessing financial risk.
[0028] The execution module is used to call the target expert model to reason about the transaction characteristics and obtain the financial risk assessment result.
[0029] Fourthly, embodiments of the present invention provide a training apparatus for a feature analysis model, comprising:
[0030] The acquisition module is used to acquire a set of historical transaction requests and extract the transaction features of each historical transaction request in the set of historical transaction requests to obtain a training data set.
[0031] The execution module is used to use a large artificial intelligence model as a teacher model and an initial analysis model as a student model. It calls the teacher model to perform inference based on the training data set to obtain the feature indicators of each of the historical transaction requests as the inference result of the teacher model. It also inputs the training data into the initial analysis model to obtain the feature indicators of each of the historical transaction requests output by the initial analysis model as the inference result of the student model.
[0032] The distillation training module is used to perform knowledge distillation training on the initial analysis model based on the reasoning results of the teacher model and the reasoning results of the student model, so as to obtain the feature analysis model.
[0033] Fifthly, embodiments of the present invention provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps in the financial risk determination method as described in any one of the first aspects, or implement the steps in the feature analysis model training method as described in any one of the first aspects.
[0034] In a sixth aspect, embodiments of the present invention provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps in the financial risk determination method as described in any one of the first aspects, or implement the steps in the feature analysis model training method as described in any one of the second aspects.
[0035] In a seventh aspect, embodiments of the present invention provide a computer program product, including computer instructions, which, when executed by a processor, implement the steps in the financial risk determination method as described in any one of the first aspects, or implement the steps in the feature analysis model training method as described in any one of the second aspects.
[0036] In this embodiment of the invention, in response to receiving a user's transaction request, the transaction features of the transaction request are extracted, and a feature analysis model is invoked to infer the transaction features to obtain the feature indicators of the transaction request. The feature analysis model is a student model obtained after knowledge distillation using a large artificial intelligence model as the teacher model. Based on the feature indicators, at least one expert model is selected as the target expert model from a pre-trained hybrid expert model used for financial risk assessment. The hybrid expert model includes multiple expert models used for assessing financial risk. The target expert model is invoked to infer the transaction features to obtain the financial risk assessment result. Compared to existing technologies that use manual and / or rule engine assessments, this embodiment of the invention uses a combination of feature analysis models and hybrid expert models to achieve risk assessment, improving the efficiency of risk assessment. Attached Figure Description
[0037] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0038] Figure 1 This is a flowchart illustrating the financial risk determination method according to an embodiment of the present invention.
[0039] Figure 2 This is a schematic diagram of a multi-expert collaborative work process based on a hybrid expert model.
[0040] Figure 3 This is a timeline diagram of a multi-expert collaborative workflow based on a hybrid expert model.
[0041] Figure 4 This is a flowchart illustrating the training method of the feature analysis model according to an embodiment of the present invention;
[0042] Figure 5 A schematic diagram of the knowledge distillation process;
[0043] Figure 6 This is a timeline diagram of the knowledge distillation process;
[0044] Figure 7 This is a schematic diagram of the financial risk determination device according to an embodiment of the present invention;
[0045] Figure 8 This is a schematic diagram of the training device for the feature analysis model according to an embodiment of the present invention;
[0046] Figure 9 This is a schematic block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0047] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] The terms "first," "second," etc., used in this embodiment of the invention are used to distinguish similar objects, not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, without limiting the number of objects; for example, the first object can be one or more. Furthermore, in this embodiment of the invention, "or" indicates at least one of the connected objects. For example, "A or B" covers three scenarios: Scenario 1: includes A but does not include B; Scenario 2: includes B but does not include A; Scenario 3: includes both A and B. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0049] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0050] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of personal information involved in the technical solutions of this invention comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to personal information data and to maintain personal information security and network security.
[0051] This invention provides a method for determining financial risk; see [link to relevant documentation]. Figure 1 As shown, Figure 1This is a flowchart illustrating the financial risk determination method according to an embodiment of the present invention. The financial risk determination method includes:
[0052] Step 11: In response to receiving a user's transaction request, extract the transaction features of the transaction request, call the feature analysis model to infer the transaction features, and obtain the feature indicators of the transaction request; wherein, the feature analysis model is the student model obtained after knowledge distillation using a large artificial intelligence model as the teacher model;
[0053] Step 12: Based on the feature indicators, select at least one expert model as the target expert model from the pre-trained hybrid expert models used for financial risk assessment. The hybrid expert models include multiple expert models used for assessing financial risk.
[0054] Step 13: Call the target expert model to infer transaction characteristics and obtain the financial risk assessment result.
[0055] Large AI models (or simply large models) refer to a class of artificial intelligence models with a large number of parameters, constructed from artificial neural networks. Large models are typically trained on large datasets using self-supervised or semi-supervised learning. The primary term for large models is Large Language Models (LLMs). With technological advancements, the concepts of visual large models, multimodal large models, and basic scientific large models have gradually expanded to include these.
[0056] In some embodiments, the large model can be a large language model, more specifically, it can be at least one of the following large language models: DeepSeek, GPT, and Qwen. In the large language model, by inputting corresponding prompt words, for example, the feature indicators may include: financial scenario category, time characteristics, and transaction relationship characteristics. If the input prompt word is "Analyze the financial scenario category, time characteristics, and transaction relationship characteristics in the transaction request," the output results of the large language model, including the financial scenario category, time characteristics, and transaction relationship characteristics, can be obtained.
[0057] Understandably, while large models possess powerful data processing and risk assessment capabilities, their complex structure and large number of parameters result in slow inference speeds, especially in high-concurrency real-time transaction environments where they cannot respond quickly. When dealing with high-concurrency scenarios such as electronic payments and real-time transactions, they suffer from response delays and poor timeliness.
[0058] In this embodiment of the invention, the feature analysis model is a student model obtained by performing knowledge distillation using a large model as the teacher model. In other words, by utilizing model distillation technology, the knowledge from the large model is extracted and transferred to a small-scale feature analysis model. This significantly reduces the demand for computing resources while maintaining model performance, substantially improving inference speed and enhancing the rapid response capability for high-concurrency scenarios such as electronic payments and real-time transactions. Understandably, the reduced demand for computing resources in the small-scale feature analysis model allows the financial risk assessment method of this invention to be deployed on mobile devices or low-computing-power platforms, lowering the application threshold. In some specific embodiments, the training method for the feature analysis model may include: obtaining a set of historical transaction requests, and extracting the transaction features of each historical transaction request in the set of historical transaction requests to obtain a training data set; using a large artificial intelligence model as a teacher model and an initial analysis model as a student model, calling the teacher model to perform inference based on the training data set to obtain the feature indicators of each historical transaction request as the inference result of the teacher model; and inputting the training data into the initial analysis model to obtain the feature indicators of each historical transaction request output by the initial analysis model as the inference result of the student model; and performing knowledge distillation training on the initial analysis model based on the inference results of the teacher model and the inference results of the student model to obtain the feature analysis model.
[0059] In some embodiments, the feature indicators may include: financial scenario category, time characteristics, and transaction relationship characteristics.
[0060] Financial scenarios can include at least one of the following: money transfer scenarios, bank card transfer scenarios, and abnormal login scenarios.
[0061] HeBao Transfer is a function for transferring funds through HeBao Payment. HeBao Payment is a mobile payment service that allows users to perform online payments, transfers, and top-ups through their HeBao accounts.
[0062] Temporal characteristics can be classified as either time-intensive or time-sparse. It's important to note that time-intensive processing involves frequent operations over a short period, while time-sparse processing involves infrequent operations over a long period. In practical applications, users can predefine evaluation time and frequency thresholds. Processing frequencies above or equal to the threshold within the evaluation time are considered time-intensive, while processing frequencies below the threshold are considered time-sparse. These predefined time characteristic criteria are then input into the large model via prompts, enabling the model to evaluate the time characteristics of transaction features according to these criteria. This ensures that the feature analysis model obtained after knowledge distillation can also evaluate and output time characteristics according to these criteria.
[0063] Relationship characteristics can be classified as either complex or simple. It's important to note that complex relationships represent fund transfers between a large number of entities (e.g., financial accounts), while simple relationships represent fund transfers between a small number of entities (e.g., financial accounts). In practical applications, users can predefine thresholds for the number of entities. A relationship is considered complex if the number of entities is greater than or equal to the threshold, and vice versa. These predefined criteria for determining relationship characteristics are then input into the large model via prompts. This allows the large model to evaluate the relationship characteristics of transaction features according to these criteria, ensuring that the feature analysis model obtained after knowledge distillation can also evaluate and output relationship characteristics according to these criteria.
[0064] Mixture of Experts (MoE) is a machine learning architecture designed to improve predictive performance and efficiency by combining multiple expert models. The core idea is to decompose complex tasks into multiple sub-tasks, with each expert focusing on a specific sub-task or subset of data, thereby enabling the overall system to better handle complex inputs.
[0065] In some embodiments, the hybrid expert model includes at least one of the following models: LSTM expert model for packet transfer scenarios (i.e., expert model with LSTM (Long Short-Term Memory) architecture), GCN expert model for packet transfer scenarios (i.e., expert model with GCN (Graph Convolutional Network) architecture), LSTM expert model for bank card transfer scenarios, GCN expert model for bank card transfer scenarios, and XGBoost expert model for abnormal login scenarios (i.e., expert model with XGBoost architecture).
[0066] Understandably, for money transfer scenarios, depending on the specific transaction characteristics, the time characteristics can be either time-intensive or time-sparse, and the relationship characteristics can be either complex or simple. For bank card transfer scenarios, depending on the specific transaction characteristics, the time characteristics can be either time-intensive or time-sparse, and the relationship characteristics can be either complex or simple. For abnormal login scenarios, the time characteristics are time-sparse, and the relationship characteristics are simple.
[0067] When the time characteristic is time-intensive, the LSTM expert model can achieve high inference efficiency and high inference accuracy; when the relationship characteristic is complex, the GCN expert model can achieve high inference efficiency and high inference accuracy; when the relationship characteristic is abnormal login scenarios, the XGBoost expert model can achieve high inference efficiency and high inference accuracy. Therefore, regarding selecting at least one expert model from pre-trained hybrid expert models used for financial risk assessment as the target expert model based on feature indicators, the following examples illustrate this: For example, when the financial scenario category is a money transfer scenario, the time characteristic is time-intensive, and the relationship characteristic is simple, then the LSTM expert model in the money transfer scenario is the target expert model. For example, when the financial scenario category is a money transfer scenario, the time characteristic is time-sparse, and the relationship characteristic is complex, then the GCN expert model in the money transfer scenario is the target expert model. For example, when the financial scenario category is a money transfer scenario, the time characteristic is time-intensive, and the relationship characteristic is complex, then both the LSTM expert model and the GCN expert model in the money transfer scenario are target expert models. For example, when the financial scenario is classified as an abnormal login scenario, and the time characteristics of this scenario are time-sparse and the relation characteristics are simple, then the XGBoost expert model in the abnormal login scenario is the target expert model.
[0068] General-purpose models are difficult to optimize and reason efficiently for different scenarios. This invention adopts a hybrid expert model scheme, which dynamically selects the appropriate expert model for reasoning based on task requirements (i.e. feature indicators), improves the switching efficiency between different tasks, and ensures that the optimal model can be used for specific scenarios (such as money transfer, bank card transfer, abnormal login, etc.), thus guaranteeing timeliness and accuracy when handling complex, multi-scenario tasks.
[0069] In this embodiment of the invention, in response to receiving a user's transaction request, the transaction features of the transaction request are extracted, and a feature analysis model is invoked to infer the transaction features to obtain the feature indicators of the transaction request. The feature analysis model is a student model obtained after knowledge distillation using a large artificial intelligence model as the teacher model. Based on the feature indicators, at least one expert model is selected as the target expert model from a pre-trained hybrid expert model used for financial risk assessment. The hybrid expert model includes multiple expert models used for assessing financial risk. The target expert model is invoked to infer the transaction features to obtain the financial risk assessment result. Compared to existing technologies that use manual and / or rule engine assessments, this embodiment of the invention uses a combination of feature analysis models and hybrid expert models to achieve risk assessment, improving the efficiency of risk assessment.
[0070] In some embodiments, the feature indicators may include: financial scenario category, time characteristics, and transaction relationship characteristics;
[0071] Based on the characteristic indicators, at least one expert model is selected as the target expert model from the pre-trained hybrid expert models used for financial risk assessment, including:
[0072] Select the expert models from the hybrid expert models that match the financial scenario category to obtain the set of candidate expert models;
[0073] Based on the time characteristics, determine whether the transaction request is a time-intensive request. If the transaction request is a time-intensive request, select the model with the Long Short-Term Memory (LSTM) network architecture from the set of candidate expert models as the first expert model.
[0074] Based on the characteristics of the transaction relationship, determine whether the transaction request is a complex relationship request. If the transaction request is a complex relationship request, the model with the graph convolutional network (GCN) architecture selected from the set of candidate expert models is the second expert model.
[0075] The first expert model and the second expert model are used as the target expert models.
[0076] The following examples illustrate this:
[0077] When the time characteristic is time-intensive, the LSTM expert model can achieve high inference efficiency and high inference accuracy; when the relation characteristic is complex, the GCN expert model can achieve high inference efficiency and high inference accuracy.
[0078] When the financial scenario is a money transfer scenario, the set of candidate expert models includes: an LSTM expert model for the money transfer scenario and a GCN expert model for the money transfer scenario. If the transaction request is a time-intensive request, the LSTM expert model for the money transfer scenario is determined as the first expert model; if the transaction request is a relationally complex request, the GCN expert model for the money transfer scenario is determined as the second expert model. Furthermore, the LSTM expert model and the GCN expert model for the money transfer scenario are the target expert models.
[0079] When the financial scenario is a bank card transfer scenario, the set of candidate expert models includes: an LSTM expert model for bank card transfer scenarios and a GCN expert model for bank card transfer scenarios. If the transaction request is a time-intensive request, the LSTM expert model for bank card transfer scenarios is determined as the first expert model; if the transaction request is a relationally complex request, the GCN expert model for bank card transfer scenarios is determined as the second expert model. Furthermore, the LSTM expert model and the GCN expert model for bank card transfer scenarios are the target expert models.
[0080] In this embodiment of the invention, at least one expert model is selected as the target expert model from a pre-trained hybrid expert model for financial risk assessment based on feature indicators. This includes: selecting an expert model from the hybrid expert model that matches the financial scenario category to obtain a set of candidate expert models; determining whether the transaction request is a time-intensive request based on time characteristics; if the transaction request is a time-intensive request, selecting a model with a Long Short-Term Memory (LSTM) network architecture from the set of candidate expert models as the first expert model; determining whether the transaction request is a complex relationship request based on transaction relationship characteristics; if the transaction request is a complex relationship request, selecting a model with a Graph Convolutional Network (GCN) architecture from the set of candidate expert models as the second expert model; using the first expert model and the second expert model as the target expert models, this embodiment of the invention comprehensively considers the financial scenario category, time characteristics, and relationship characteristics, which can accurately select the target expert model and avoid missing expert models that could lead to inference failure or reduced inference efficiency.
[0081] In some embodiments, expert models that fit the financial scenario category from the hybrid expert models are selected to obtain a set of candidate expert models, which then includes:
[0082] Based on time characteristics, determine whether the transaction request is a time-intensive request; based on transaction relationship characteristics, determine whether the transaction request is a relationship-complex request. If the transaction request is neither a time-intensive nor a relationship-complex request, use all expert models in the candidate expert model set as the target expert model.
[0083] For example, when the financial scenario category is abnormal login scenario, the set of candidate expert models includes: XGBoost expert models for abnormal login scenario. Since the abnormal login scenario has time-sparse characteristics and simple relational characteristics, the step of determining the first and second expert models is skipped. Instead, the step of using all expert models in the candidate expert model set as the target expert model is initiated, i.e., determining the XGBoost expert model for abnormal login scenario as the target expert model.
[0084] In some embodiments, the characteristic indicators include: time characteristics, transaction network characteristics, and amount anomalies;
[0085] Based on the characteristic indicators, at least one expert model is selected as the target expert model from the pre-trained hybrid expert models used for financial risk assessment, including:
[0086] Based on time characteristics, transaction network characteristics, and abnormal amounts, the target expert model is determined according to a preset routing strategy.
[0087] Specifically, under the preset routing strategy, the router no longer selects a model based on a single feature, but instead conducts a comprehensive evaluation by combining multi-dimensional feature indicators (time characteristics, transaction network characteristics, and amount anomalies).
[0088] The default routing policy expression is as follows:
[0089] R(x) = β1·f LSTM (x)+β2·f GCN (x)+β3·f XGB (x)
[0090] Where β1, β2, and β3 represent the weight coefficients of different features, and their weighted values are used to dynamically select the expert model (LSTM, GCN, or XGBoost) for processing. β1, β2, and β3 represent the weight coefficients of different features, which are dynamically adjusted according to the importance of each feature in the business scenario; R(x) represents the routing decision made by the system based on the selection of different features; f LSTM (x), f GCN (x), f XGB (x) represents the output of the LSTM, GCN and XGBoost models for the input feature x, respectively.
[0091] For example, in a blacklist user identification scenario, if a user's transaction behavior involves multiple large-amount inter-provincial transfers (i.e., the weights of amount and transaction location are relatively high), with weights β1 = 0.5, β2 = 0.4, and β3 = 0.1, then a combination of the LSTM expert model and the GCN expert model will be used as the primary model (i.e., the target expert model) to process the user's transaction behavior and generate a financial risk assessment result.
[0092] In some embodiments, the target expert model is invoked to infer transaction characteristics and obtain financial risk assessment results, including:
[0093] By integrating the reasoning results of all target expert models on transaction characteristics, a financial risk assessment result is obtained.
[0094] In some embodiments, the method of fusing inference results may be to set weight values for the inference results of each target expert model, and then fuse the inference results of all target expert models on transaction features according to the weights to obtain the financial risk judgment result.
[0095] Specifically, a dynamic task-weighted fusion approach is adopted: in complex tasks, multiple target expert models may collaborate in the processing. The outputs of different target expert models are weighted and combined through an attention mechanism-based weighted averaging to generate a final comprehensive judgment result, which serves as the financial risk assessment result.
[0096] For example, when a transaction request exhibits both time-intensive and relationally complex characteristics, the LSTM and GCN expert models will perform collaborative reasoning, fusing the outputs of the two expert models:
[0097] The expression for the fused output y:
[0098]
[0099] Among them, b i The attention weights for each expert model, y i This refers to the output of the target expert model.
[0100] For example, in the scenario of detecting large-value cross-province transactions, an LSTM expert model is used to capture the changing characteristics of transaction amount and frequency, a GCN expert model is used to analyze the cross-province transaction network relationships, and an XGBoost expert model is used to further evaluate the anomalies of transaction behavior. That is, the target expert models include an LSTM expert model, a GCN expert model, and an XGBoost expert model.
[0101] The output results y of different expert models LSTM y GCN and y XGB The final comprehensive judgment result is generated using the following weighted formula:
[0102] y i =c·y LSTM +β·y GCN +γ·y XGB
[0103] Where: y i The overall assessment result, i.e., the output of the target expert model, represents the overall risk score for the current trading behavior. LSTM y GCN and y XGB represents the risk scores of the LSTM, GCN, and XGBoost expert models for this trading behavior, respectively. c, β, and γ are the weighting coefficients of the output results of each expert model, which are dynamically adjusted according to the importance of each expert model in the trading scenario.
[0104] The following describes the method for determining financial risk with specific examples:
[0105] See Figure 2 and Figure 3As shown, this paper demonstrates a multi-expert collaborative workflow based on a Hybrid Expert (MOE) model, combining dynamic routing strategies and attention mechanisms to handle complex transaction discrimination. The system uses a distilled smaller model (Phi-3 model) for scene discrimination and text extraction, dynamically routing to the corresponding expert model (e.g., LSTM and GCN for packet transfers; LISTM and GCN for bank card transfers) based on scene classification. Text extraction determines whether the data has time complexity (LSTM model) or relational complexity (GCN model). For complex scenarios, multiple experts may collaborate, with expert outputs weighted and combined using attention mechanisms or weighted averaging to generate the final result. Simultaneously, the larger model (Qwen-2-7B) enhances the scene discrimination capability of the smaller model through knowledge distillation, ensuring efficient operation under resource constraints. This system demonstrates innovation in dynamic task allocation and multi-expert collaboration, significantly improving the efficiency and accuracy of transaction discrimination.
[0106] 1) Scene discrimination capability
[0107] First, using knowledge distillation technology, the scene discrimination capability of a large model (such as Qwen-2-7B) is fine-tuned into a smaller model (such as Phi-3) through distillation, enabling it to recognize scenes and extract text features. This smaller model can then identify whether the input transaction data belongs to a specific business scenario (such as money transfer, bank card transfer, abnormal login, etc.) and determine whether the transaction data has time-intensive or multi-party transaction relationship characteristics.
[0108] 2) Text extraction and feature input
[0109] For data not on the blacklist, the system generates a text description x1, summarizing the key features of the data (such as transaction time, amount, number of transactions, etc.). Simultaneously, the raw feature values x2 (such as transaction time, amount, number of transfers, etc.) passed by the business caller will serve as input features for subsequent expert models. The Phi-3 mini-model utilizes its text extraction capabilities to further analyze the temporal and relational characteristics of the transaction data to help select a suitable expert model; for example, LSTM handles temporal features, and GCN handles transaction network features.
[0110] 3) Scene identification and expert selection
[0111] By leveraging the text extraction and scenario discrimination capabilities of the Phi-3 small model, the system can determine whether the transaction data is time-intensive or transaction relationship-intensive. The scenario discrimination capability further identifies the business scenario to which the data belongs, such as money transfers via bank transfer, bank card transfers, or abnormal logins. Based on these discrimination results, the system employs an enhanced dynamic routing strategy to select a suitable expert model.
[0112] Enhanced dynamic routing strategy:
[0113] (1) Multi-dimensional feature fusion: Routers no longer select models based on a single feature, but rather combine multi-dimensional features (such as time characteristics, transaction network characteristics, and amount anomalies) for comprehensive evaluation. The routing selection formula is as follows:
[0114] R(x) = β1·f LSTM (x)+β2·f GCN (x)+β3·f XGB (x)
[0115] Where β1, β2, and β3 represent the weight coefficients of different features, and their weighted values are used to dynamically select the expert model (LSTM, GCN, or XGBoost) for processing. β1, β2, and β3 represent the weight coefficients of different features, which are dynamically adjusted according to the importance of each feature in the business scenario; R(x) represents the routing decision made by the system based on the selection of different features; f LSTM (x), f GcN (x), f XGB (x) represents the output of the LSTM, GCN and XGBoost models for the input feature x, respectively.
[0116] For example, in a blacklist user identification scenario, if a user's transaction behavior involves multiple large-amount inter-provincial transfers (i.e., the weights of amount and transaction location characteristics are relatively high), the system might set weights β1 = 0.5, β2 = 0.4, and β3 = 0.1. In this case, the combination of the LSTM expert model and the GCN expert model will serve as the primary model (i.e., the target expert model) to process the user's transaction behavior and generate a financial risk assessment result.
[0117] (2) Dynamic Task Weighted Fusion Output: In complex tasks, multiple expert models may participate in the processing simultaneously. The outputs of different experts are weighted and combined by using an attention mechanism to generate the final comprehensive judgment result.
[0118] In this scenario (cross-province large-value transaction detection scenario), the LSTM model is called to capture the changing characteristics of transaction amount and transaction frequency, the GCN model is called to analyze the cross-province transaction network relationship, and the XGBoost model is used to further evaluate the anomaly of transaction behavior.
[0119] For the output results y of different models LSTM y GCN and y XGB The final comprehensive judgment result is generated using the following weighted formula:
[0120] y i =c·y LSTM +β·yGCN +γ·y XGB
[0121] Where: y i The output of each expert model represents the system's overall risk score for the current trading behavior. LSTM y GCN and y XGB represents the risk scores of the LSTM, GCN, and XGBoost models for this trading behavior, respectively. c, β, and γ are the weighting coefficients of the outputs of each model, which are dynamically adjusted according to the importance of each model in the trading scenario.
[0122] 4) The work of expert models
[0123] Based on the dynamic routing strategy, the following modes can be selected:
[0124] Single expert selection: For example, if the transaction data exhibits obvious time-intensive characteristics, the LSTM model will be chosen to process the time series features.
[0125] Multi-expert collaboration in the same scenario: If the transaction data has both time-intensive and complex relationship characteristics, both LSTM and GCN models will be selected, and their outputs will be merged through an attention weighting mechanism.
[0126] Cross-scenario multi-expert collaboration: If the transaction data involves multiple scenarios (such as money transfer and abnormal login), expert models for different scenarios (such as LSTM for money transfer and GCN for abnormal login) will be selected and their output results will be fused through weighted fusion.
[0127] 5) Multi-expert collaboration
[0128] In multi-expert collaborative processing, different expert models can work together to handle tasks within the same or cross-business scenarios. An attention mechanism is used to integrate the outputs of each expert. For example, when transaction data exhibits both time-intensive and multi-party transaction characteristics, LSTM and GCN will work collaboratively. If the transaction involves multiple scenarios, multiple expert models (such as LSTM and GCN) can be selected, and their outputs can be fused.
[0129] The expression for the fused output y:
[0130]
[0131] Among them, b i The attention weights for each expert model, y i This refers to the output of the target expert model.
[0132] 6) Final output:
[0133] By integrating the outputs of different expert models, a final business judgment result is generated. This judgment can be something like "abnormal transaction of money transfer" or "black market transaction of bank card transfer".
[0134] Enhanced dynamic routing strategy: It combines multi-dimensional feature fusion and dynamic task weighted fusion mechanism to make model selection more accurate and make full use of the advantages of expert models such as LSTM and GCN.
[0135] Innovation in scene recognition and model selection: Through knowledge distillation and the scene recognition capabilities of small models, the system can flexibly determine the business scenario of transaction data and allocate expert models according to the scene characteristics.
[0136] Multi-expert collaboration and output fusion: For complex business scenarios, the system can simultaneously trigger multiple experts to perform collaborative calculations and fuse the output results through an attention mechanism to ensure the accuracy and comprehensiveness of the final judgment.
[0137] This invention provides a method for training a feature analysis model, see [link to relevant documentation]. Figure 4 As shown, Figure 4 This is a flowchart illustrating the training method of the feature analysis model according to an embodiment of the present invention. The training method of the feature analysis model includes:
[0138] Step 21: Obtain the set of historical transaction requests, and extract the transaction features of each historical transaction request in the set of historical transaction requests to obtain the training data set;
[0139] Step 22: Using the large AI model as the teacher model and the initial analysis model as the student model, the teacher model is called to perform inference based on the training data set to obtain the feature indicators of each historical transaction request as the inference result of the teacher model; and the training data is input into the initial analysis model to obtain the feature indicators of each historical transaction request output by the initial analysis model as the inference result of the student model.
[0140] Step 23: Based on the reasoning results of the teacher model and the student model, the initial analysis model is trained by knowledge distillation to obtain the feature analysis model.
[0141] In some embodiments, the feature indicators may include: financial scenario category, time characteristics, and transaction relationship characteristics.
[0142] Large AI models (or simply large models) refer to a class of artificial intelligence models with a large number of parameters, constructed from artificial neural networks. Large models are typically trained on large datasets using self-supervised or semi-supervised learning. The primary term for large models is Large Language Models (LLMs). With technological advancements, the concepts of visual large models, multimodal large models, and basic scientific large models have gradually expanded to include these.
[0143] In some embodiments, the large model can be a large language model, more specifically, it can be at least one of the following large language models: DeepSeek, GPT, and Qwen. In the large language model, by inputting corresponding prompt words, for example, the feature indicators may include: financial scenario category, time characteristics, and transaction relationship characteristics. If the input prompt word is "Analyze the financial scenario category, time characteristics, and transaction relationship characteristics in the transaction request," the output results of the large language model, including the financial scenario category, time characteristics, and transaction relationship characteristics, can be obtained.
[0144] The following examples illustrate this:
[0145] See Figure 5 and Figure 6 As shown, knowledge distillation is the process of transferring knowledge from a pre-trained heterogeneous large model (e.g., 7B-Qwen) to a small model (e.g., 3B-Phi3). Learning between heterogeneous models is accomplished through high-order features, attention mechanisms, and feature alignment of the input data. This invention combines innovative techniques such as hierarchical feature mapping, contrastive learning, and attention distillation to ensure that the small model, after receiving knowledge from the large model, can be effectively applied to blacklist identification tasks in financial business. Simultaneously, a comprehensive loss function is used to optimize the learning process, ensuring high efficiency.
[0146] Knowledge distillation specifically includes:
[0147] 1. Input data processing
[0148] One example of a dataset is:
[0149] Input: On March 11, 2023, user A made three cross-province transfers, involving large sums of money, most of which were conducted in the early morning.
[0150] Output: Determine whether the user is on the blacklist.
[0151] Input data: Assume the input data x consists of three transfer records of user A on March 1, 2021, including inter-provincial transfers, mainly occurring in the early morning. The goal is to determine whether this user is on a blacklist.
[0152] Both the large and small models accept the same input, and the shape of the input data is defined as: x∈R B×L×D Where: B is the batch size. T=3 represents three transactions, which is the time step and the time series information of the transfer behavior. D is the dimension of the input data x, such as the amount, time, and location of each transfer. The input data X will be fed into the 7B-Qwen large model and the 3B-Phi3 small model respectively.
[0153] 2. Hierarchical mapping between heterogeneous models
[0154] To address the structural differences between heterogeneous models (large and small models), this invention proposes an innovative feature mapping and alignment mechanism. In large models, features are generated into high-order feature representations through multiple layers of Transformer Blocks, while in small models, a mapping function f is required. L To simplify it:
[0155]
[0156] Within this technical framework, the feature mapping and alignment mechanism simplifies high-order features generated in the complex structure of large models through hierarchical feature mapping and skip connections, while preserving their feature representation in various transaction scenarios. For example, regarding the frequent large-amount cross-province transfers by users within a certain time period (such as early morning), the large model 7B-Qwen of this invention can extract multi-dimensional features such as transaction amount, transaction time, and transaction location, and generate high-order feature representations through multiple layers of TransformerBlocks. During knowledge distillation, these high-order features are mapped through the mapping function f. L Transferred to the small model 3B-Phi3: This is the output of the l-th layer of the large model. This layer captures high-risk factors in transactions, such as large inter-provincial transfers and frequent nighttime transactions. In this process, the model can extract key high-risk features such as abnormal transaction times (e.g., transactions in the early morning) and inter-regional transfer amounts (e.g., large transfers from one city to another), through the mapping function f. L This allows the model to retain key features in complex transaction scenarios (such as cross-province or multiple transactions at night) while reducing the computational complexity and time consumption of model inference. This enables the small model to efficiently handle abnormal behavior detection in real-time transactions, such as quickly determining whether a user poses a risk of money laundering or fraud. L and b LThese are the mapping parameters, crucial factors determining how high-order features are extracted from a large model and mapped to a smaller model. These parameters can be adjusted to suit different scenarios (a higher weight can be assigned to the "transaction amount" feature, as unusual amounts are often key features of money laundering or fraud; the weights for "transaction time" and "transaction location" can be increased in specific high-risk scenarios such as cross-province or nighttime transactions to enhance their contribution to model predictions). This is achieved through the innovative mapping function f. L This approach preserves the complexity of high-order features (such as large cross-province transactions at night or multiple cross-province transactions within a short period) while reducing dimensionality. The formula indicates that in layer l, the high-order features of the large model are transformed into a low-dimensional space through a learnable mapping function, allowing the smaller model to learn them.
[0157] 3. Inter-layer jump connection
[0158] In the aforementioned feature mapping process, this invention introduces an inter-layer skip connection mechanism for the large model to alleviate the gradient vanishing problem and accelerate model learning. For example, when a large model processes inter-provincial transactions, it typically focuses on transaction amount and inter-provincial frequency features at multiple levels. The small model, through a simplified skip connection mechanism, can learn these features simultaneously, ensuring that the comprehensive analytical capability for transaction amount and inter-provincial features is preserved in a low-dimensional space. The large model employs an inter-layer skip connection mechanism. The skip connection formula for the large model is:
[0159]
[0160] The small model uses a simplified version of skip connections during learning, with the following formula:
[0161]
[0162] Among them W s It is a simplified skip connection weight.
[0163] Specifically, in the following financial scenarios, users exhibit a high correlation in characteristics such as transaction amount, frequency, and time distribution across multiple overnight inter-provincial transactions. For example, larger transaction amounts typically occur in the early morning hours and are accompanied by multiple inter-provincial transfer records. When processing these transaction characteristics, the large model captures the following information at different levels:
[0164] Layer 1: Extract user transaction amount distribution information (such as frequent large-amount transfers).
[0165] Layer 2: Capture transaction time characteristics (such as higher transaction frequency in the early morning).
[0166] Layer 3: Analyze the spatial distribution characteristics of inter-provincial transactions.
[0167] For example, the formula representation in a large model, and the feature representation of a large model at layer l+1. The feature representation of the previous layer l Compared with the current level features extracted by the Transformen module Together they form a cohesive whole. By directly passing features from the previous layer to the current layer, the problem of gradients decreasing layer by layer in deep models can be avoided, thus ensuring that the model can better preserve cross-layer information when dealing with complex transaction behaviors.
[0168] In this embodiment of the invention, a training data set is obtained by acquiring a set of historical transaction requests and extracting the transaction features of each historical transaction request from the set. A large-scale artificial intelligence model is used as the teacher model, and an initial analysis model is used as the student model. The teacher model is invoked to perform inference based on the training data set, obtaining the feature indicators of each historical transaction request as the teacher model's inference result. Furthermore, the training data is input into the initial analysis model, obtaining the feature indicators of each historical transaction request output by the initial analysis model as the student model's inference result. Based on the teacher model's inference result and the student model's inference result, the initial analysis model is trained using knowledge distillation to obtain a feature analysis model. This embodiment of the invention trains a feature analysis model capable of accurately analyzing feature indicators. Moreover, by utilizing model distillation technology, the knowledge of the large model is extracted and transferred to a small-scale feature analysis model, significantly reducing the demand for computing resources while maintaining model performance, significantly improving the inference speed, and enhancing the rapid response capability for high-concurrency scenarios such as electronic payments and real-time transactions.
[0169] In some embodiments, the loss function for knowledge distillation is determined based on at least one of the following loss functions:
[0170] Contrast learning loss function, attention distillation loss function, soft label loss function, hard label loss function.
[0171] Contrastive learning loss function:
[0172] To enable the smaller model to learn features similar to the larger model, a contrastive learning loss is used, encouraging similar samples to have closer output distances. The formula for the contrastive learning loss function is as follows:
[0173]
[0174] Where: L contrastive : Represents the total value of the contrastive learning loss. i and j: Represent sample indices, for example, i represents the first sample, and j represents the other samples compared with the first sample. y i and y j : Represents the labels of sample i and sample j. If y i =yj If the loss function is 0, it means that the two samples belong to the same category (for example, both belong to high-risk transactions, such as one being a normal transaction and the other being an abnormal transaction). In this case, the loss function will make the model learn the feature representations of the two samples as closely as possible. Representing large models With small models Similarity in feature representation (e.g., using cosine similarity); This represents the sum of similarities between the large model and all small model samples, used to standardize the similarity value.
[0175] Suppose the model has two user samples: user A and user B; user A is marked as a "blacklisted user" and their transaction behavior has the following characteristics:
[0176] Transaction amount characteristics: User A's transaction amounts are relatively large, with single transaction amounts exceeding 100,000 yuan multiple times, for example: [100,000 yuan, 150,000 yuan, 200,000 yuan].
[0177] Transaction time characteristics: User A's transaction time is mainly concentrated in the early morning period (1 am to 3 am), for example: [1 am, 1 am, 2 am].
[0178] Transaction location characteristics: User A's transfer destinations are mainly cities outside the province, such as "Shanghai -> Guangzhou" and "Beijing -> Shenzhen".
[0179] Transaction frequency characteristics: User A made multiple large transfers in a short period of time (e.g., within a week), averaging 2 transfers per day.
[0180] Correspondingly, User B, as an ordinary user, exhibits the following characteristics in their transaction behavior:
[0181] Transaction amount characteristics: User B's transaction amounts are relatively small, usually between 500 yuan and 2000 yuan per transaction, for example: [500 yuan, 1000 yuan, 2000 yuan].
[0182] Transaction time characteristics: User B's transaction time is mainly concentrated during working hours (9:00 to 18:00), for example: [10:00, 14:00, 16:00].
[0183] Transaction location characteristics: User B's transactions all take place within the same city, with no cross-provincial transactions.
[0184] Transaction frequency characteristics: User B has a low transaction frequency, for example, an average of one transaction per week.
[0185] ① In contrastive learning, assume that the feature representations of user A and user B generated by the large model are as follows:
[0186] Large model's feature representation of user A
[0187] Large model's feature representation of user B
[0188] ② Correspondingly, the feature representations learned by the small model are as follows:
[0189] The small model represents the features of user A.
[0190] The small model represents the features of user B.
[0191] ③ Through the comparative learning loss formula:
[0192]
[0193] When y A =y A When, it indicates that the present invention aims to achieve similarity between the large model and the small model for the feature representations (such as large transfer amounts, early morning transaction times, cross-provincial transaction locations, etc.) of the same blacklisted user A. The value approaches 1, meaning that the two models should represent the same user's features as closely as possible.
[0194] When y A ≠y B In this invention, it is desirable that the large model and the small model distinguish the feature representations of blacklisted user A and ordinary user B as much as possible, that is... A value close to 0 indicates that the feature representations of the two should have significant differences in the model.
[0195] Specifically, for blacklisted user A (large cross-province transactions, transactions in the early morning), the smaller model needs to learn a feature distribution similar to that of the larger model to ensure that the model can mark users with similar transaction characteristics as high-risk. For ordinary user B (small local transactions, daytime transactions), the smaller model needs to distinguish its features from those of blacklisted user A to ensure that ordinary users are not mistakenly marked as high-risk users.
[0196] Attention distillation loss function:
[0197] In multi-head attention mechanisms, by comparing the attention weights of the large and small models, the small model can learn the contextual relationships of the large model.
[0198]
[0199] in, and These are the attention matrices of the large and small models at layer ι, respectively. The attention distillation loss L is obtained through this attention distillation. attention This ensures that the smaller model learns the attention distribution of the larger model when handling different inputs such as cross-province transactions and monetary amounts. For example, if the larger model pays more attention to cross-province transactions, the smaller model can improve its accuracy in blacklist determination by learning this attention weight.
[0200] The core idea of attention distillation loss is to allow the smaller model to learn the larger model's attention to different features (i.e., attention distribution) at the feature level. Assuming that in the scenario above, when the larger model processes user A's transaction behavior, the attention matrix generated by the l-th layer is... Their focus on the three main characteristics of transaction amount, transaction time, and transaction location is as follows:
[0201] The attention matrix of the l-th layer of the large model
[0202]
[0203] The matrix indicates that when processing user A's transaction behavior, the large model pays more attention to the transaction amount (weight 0.5) and transaction time (weight 0.3), while paying less attention to the transaction location (weight 0.2).
[0204] The attention matrix of the l-th layer of the small model
[0205]
[0206] The matrix indicates that the smaller model currently pays equal attention to transaction amount (weight 0.4) and transaction time (weight 0.4), while its attention to transaction location is consistent with that of the larger model (weight 0.2).
[0207] Loss through attention distillation formula:
[0208]
[0209] The formula represents the Euclidean distance (L2 norm) between the attention weight distribution of the small model at layer l and the weight distribution of the large model. This invention aims to minimize this distance, meaning to make the attention distribution of the small model as close as possible to that of the large model. In the above calculation:
[0210] L attention =(0.5-0.4) 2 +(0.3-0.4) 2 +(0.2-0.2) 2 =0.01 + 0.01 + 0 = 0.02
[0211] This loss value represents the difference in attention distribution between the small model and the large model. By minimizing this loss value, this invention aims to enable the small model to generate an attention distribution similar to that of the large model when processing user A's transaction behavior (i.e., paying more attention to transaction amount and transaction time features), thereby improving the small model's ability to identify high-risk users.
[0212] Soft-label loss function, hard-label loss function:
[0213] Soft label loss (function): The soft label loss is calculated by using KL divergence to determine the difference between the soft labels output by the large model and the output by the small model.
[0214] L soft =KL(p T ||p S )
[0215] Where p T It is the output probability distribution of the large model, p S The output probability distribution of the small model:
[0216] Suppose that when the system detects large cross-provincial transactions, the large model p T Outputting a risk probability of 0.8 for a certain transaction indicates that the transaction is highly suspicious. The small model p... S The output risk probability might be 0.6, indicating that the small model's risk assessment of the transaction is not accurate enough. By calculating the KL divergence between the output probability distributions of the large and small models, the output of the small model can be optimized to gradually approach the large model's high-risk judgment for complex scenarios (such as large-scale cross-province nighttime transactions).
[0217] Hard label loss (function): Hard label loss uses cross-entropy loss to calculate the difference between the output of the small model and the true label.
[0218]
[0219] Where y i The hard-label loss incorporates the actual risk labels, reflecting the small model's performance on real transaction data. Each transaction has a known risk label y. i For reference only.
[0220] For example, if a transaction is marked as "high-risk" (such as frequent overnight inter-provincial transfers), the small model outputs the risk probability p of the transaction based on the characteristics of the current input transaction. S Cross-entropy loss is used to measure the deviation between the small model and the true label, ensuring that it can accurately identify features of similar high-risk transactions and make correct judgments quickly, reducing misjudgments.
[0221] Comprehensive loss function:
[0222] By combining multiple loss functions, the final total loss function is defined as follows:
[0223] L total =α1L contrastive +α2L attention +α3L soft +α4L hard
[0224] Here, α1, α2, α3, and α4 are hyperparameters used to control the weights of each loss function.
[0225] This innovative algorithm, in the knowledge distillation process within financial scenarios, effectively addresses the challenge of lightweighting the model while preserving the complex business knowledge of the larger model through knowledge distillation between heterogeneous models (7B-Qwen and 3B-Phi3). Utilizing techniques such as hierarchical feature mapping, contrastive learning, and attention distillation, it achieves this. Through these mechanisms, the smaller model can maintain similar accuracy to the larger model when handling complex financial tasks such as blacklist identification, thus improving the reliability of the identification and its adaptability to various transaction scenarios.
[0226] Specifically, in financial risk control scenarios involving "blacklist and whitelist user identification," this algorithm can effectively distinguish the behavioral patterns between high-risk transaction users (blacklisted users) and ordinary users (whitelisted users). For example, when dealing with blacklisted users characterized by frequent large-amount inter-provincial transfers and transactions outside of normal time periods:
[0227] Hierarchical Feature Mapping: Through a hierarchical feature mapping mechanism, the small model can learn feature representations at different levels from the large model, such as low-level features (transaction amount and frequency), mid-level features (transaction time and location), and high-level features (transaction frequency and amount fluctuations). These features are mapped to different levels of the small model, enabling it to effectively capture the typical behavioral characteristics of blacklisted users even with limited resources.
[0228] Contrastive learning loss function: By using contrastive learning loss, the smaller model can generate feature representations similar to those of the larger model when learning different transaction scenarios (such as large inter-provincial transfers and small local transactions). For example, when processing a large inter-provincial transfer by a blacklisted user, the larger model might generate highly correlated feature representations for characteristics such as transaction amount, transaction time, and transaction location. Through contrastive learning, the smaller model can make these feature distributions closer to those of the larger model, thereby improving the accuracy of identifying high-risk users.
[0229] Attention distillation loss function: In scenarios such as cross-provincial transactions and frequent large-amount transfers at night, the smaller model learns the larger model's focus on different features through attention distillation loss. For example, when dealing with blacklisted users, the larger model may pay more attention to features such as transaction amount and transaction time, while assigning lower weight to transaction location features. By learning the attention distribution of the larger model, the smaller model can allocate more attention to high-risk features during the discrimination process, such as the early morning hours and large-amount cross-provincial transactions, thereby improving the model's discrimination accuracy in specific scenarios.
[0230] This invention provides a device for determining financial risk. See [link to relevant documentation]. Figure 7 As shown, Figure 7 This is a schematic diagram of the financial risk determination device according to an embodiment of the present invention. The financial risk determination device 70 includes:
[0231] The reasoning module 71 is used to respond to a received user transaction request, extract the transaction features of the transaction request, call the feature analysis model to reason about the transaction features, and obtain the feature index of the transaction request; wherein, the feature analysis model is a student model obtained after knowledge distillation using a large artificial intelligence model as the teacher model;
[0232] The routing module 72 is used to select at least one expert model as the target expert model from the pre-trained hybrid expert models for financial risk assessment based on the feature indicators, wherein the hybrid expert models include multiple expert models for assessing financial risk.
[0233] The execution module 73 is used to call the target expert model to reason about the transaction characteristics and obtain the financial risk assessment result.
[0234] In some embodiments, the feature indicators include: financial scenario category, time characteristics, and transaction relationship characteristics;
[0235] The routing module 72 is also used to select expert models that conform to the financial scenario category in the hybrid expert model to obtain a set of candidate expert models;
[0236] The routing module 72 is further configured to determine whether the transaction request is a time-intensive request based on the time characteristics. If the transaction request is a time-intensive request, the model with a Long Short-Term Memory (LSTM) network architecture is selected from the set of candidate expert models as the first expert model.
[0237] The routing module 72 is further configured to determine whether the transaction request is a complex relationship request based on the transaction relationship characteristics. If the transaction request is a complex relationship request, the model with the model architecture of Graph Convolutional Network (GCN) selected from the set of candidate expert models is the second expert model.
[0238] The routing module 72 is further configured to use the first expert model and the second expert model as the target expert model.
[0239] In some embodiments, the execution module 73 is further configured to integrate the reasoning results of all the target expert models on the transaction features to obtain the financial risk determination result.
[0240] The financial risk determination device provided in this embodiment of the invention can realize all the processes implemented in the financial risk determination method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0241] This invention provides a training device for a feature analysis model, see [link to documentation]. Figure 8 As shown, Figure 8 This is a schematic diagram of the training device for the feature analysis model according to an embodiment of the present invention. The training device 80 for the feature analysis model includes:
[0242] The acquisition module 81 is used to acquire a set of historical transaction requests and extract the transaction features of each historical transaction request in the set of historical transaction requests to obtain a training data set.
[0243] The execution module 82 is used to use the large artificial intelligence model as the teacher model and the initial analysis model as the student model, call the teacher model to perform inference based on the training data set, and obtain the feature indicators of each of the historical transaction requests as the inference result of the teacher model; and input the training data into the initial analysis model to obtain the feature indicators of each of the historical transaction requests output by the initial analysis model as the inference result of the student model.
[0244] The distillation training module 83 is used to perform knowledge distillation training on the initial analysis model based on the reasoning results of the teacher model and the reasoning results of the student model to obtain the feature analysis model.
[0245] In some embodiments, the loss function for knowledge distillation is determined based on at least one of the following loss functions:
[0246] Contrast learning loss function, attention distillation loss function, soft label loss function, hard label loss function.
[0247] The feature analysis model apparatus provided in this embodiment of the invention can implement all the processes implemented in the feature analysis model method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0248] This invention provides an electronic device 90, see [link to relevant documentation]. Figure 9 As shown, Figure 9This is a schematic diagram of the electronic device 90 according to an embodiment of the present invention, including a processor 91, a memory 92, and a program or instructions stored in the memory 92 and executable on the processor 91. When the program or instructions are executed by the processor, they implement the steps in any financial risk determination method of the present invention, or implement the steps in any feature analysis model training method of the present invention.
[0249] This invention provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement various processes of an embodiment of the financial risk determination method as described above, or various processes of an embodiment of the feature analysis model training method as described above, and can achieve the same technical effect. To avoid repetition, these will not be described again here.
[0250] The readable storage medium may include, for example, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk. In some examples, the readable storage medium may be a non-transient readable storage medium.
[0251] This invention also provides a computer program product, including computer instructions, which, when executed by a processor, implement various processes of an embodiment of the financial risk determination method as described above, or implement various processes of an embodiment of the feature analysis model training method as described above, and can achieve the same technical effect. To avoid repetition, these will not be described again here.
[0252] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0253] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0254] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
Claims
1. A method for determining financial risk, characterized in that, include: In response to receiving a user's transaction request, the system extracts the transaction features of the transaction request, calls a feature analysis model to infer the transaction features, and obtains the feature indicators of the transaction request; wherein, the feature analysis model is a student model obtained after knowledge distillation using a large artificial intelligence model as the teacher model; Based on the aforementioned feature indicators, at least one expert model is selected as the target expert model from the pre-trained hybrid expert models used for financial risk assessment. The hybrid expert models include multiple expert models used for assessing financial risk. The target expert model is invoked to infer the transaction characteristics and obtain the financial risk assessment result.
2. The method for determining financial risk according to claim 1, characterized in that, The characteristic indicators include: financial scenario category, time characteristics, and transaction relationship characteristics; Based on the aforementioned feature indicators, at least one expert model is selected as the target expert model from the pre-trained hybrid expert models used for financial risk assessment, including: Select the expert model that matches the financial scenario category from the hybrid expert model to obtain the candidate expert model set; Based on the time characteristics, determine whether the transaction request is a time-intensive request. If the transaction request is a time-intensive request, select a model with a Long Short-Term Memory (LSTM) network architecture from the set of candidate expert models as the first expert model. Based on the characteristics of the transaction relationship, it is determined whether the transaction request is a complex relationship request. If the transaction request is a complex relationship request, the model with the graph convolutional network (GCN) architecture selected from the set of candidate expert models is the second expert model. The first expert model and the second expert model are used as the target expert model.
3. The method for determining financial risk according to claim 1, characterized in that, The target expert model is invoked to infer the transaction characteristics, resulting in a financial risk assessment, including: The financial risk assessment result is obtained by integrating the reasoning results of all the target expert models on the transaction characteristics.
4. A training method for a feature analysis model, characterized in that, include: Obtain a set of historical transaction requests, and extract the transaction features of each historical transaction request in the set of historical transaction requests to obtain a training data set; Using a large artificial intelligence model as the teacher model and an initial analysis model as the student model, the teacher model is invoked to perform inference based on the training data set to obtain the feature indicators of each of the historical transaction requests as the inference result of the teacher model; and the training data is input into the initial analysis model to obtain the feature indicators of each of the historical transaction requests output by the initial analysis model as the inference result of the student model. Based on the reasoning results of the teacher model and the student model, the initial analysis model is trained by knowledge distillation to obtain the feature analysis model.
5. The training method for the feature analysis model according to claim 4, characterized in that, The loss function for knowledge distillation is determined based on at least one of the following loss functions: Contrast learning loss function, attention distillation loss function, soft label loss function, hard label loss function.
6. A device for determining financial risk, characterized in that, include: The inference module is used to respond to a received user transaction request, extract the transaction features of the transaction request, call the feature analysis model to infer the transaction features, and obtain the feature indicators of the transaction request; wherein, the feature analysis model is a student model obtained after knowledge distillation using a large artificial intelligence model as the teacher model; The routing module is used to select at least one expert model as the target expert model from the pre-trained hybrid expert models for financial risk assessment based on the feature indicators. The hybrid expert models include multiple expert models for assessing financial risk. The execution module is used to call the target expert model to reason about the transaction characteristics and obtain the financial risk assessment result.
7. A training device for a feature analysis model, characterized in that, include: The acquisition module is used to acquire a set of historical transaction requests and extract the transaction features of each historical transaction request in the set of historical transaction requests to obtain a training data set. The execution module is used to use a large artificial intelligence model as a teacher model and an initial analysis model as a student model. It calls the teacher model to perform inference based on the training data set to obtain the feature indicators of each of the historical transaction requests as the inference result of the teacher model. It also inputs the training data into the initial analysis model to obtain the feature indicators of each of the historical transaction requests output by the initial analysis model as the inference result of the student model. The distillation training module is used to perform knowledge distillation training on the initial analysis model based on the reasoning results of the teacher model and the reasoning results of the student model, so as to obtain the feature analysis model.
8. An electronic device, characterized in that: It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps in the financial risk determination method as described in any one of claims 1 to 3, or implement the steps in the feature analysis model training method as described in any one of claims 4 to 5.
9. A readable storage medium, characterized in that: The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps in the financial risk determination method as described in any one of claims 1 to 3, or implement the steps in the feature analysis model training method as described in any one of claims 4 to 5.
10. A computer program product, characterized in that, It includes computer instructions, which, when executed by a processor, implement the steps in the financial risk determination method as described in any one of claims 1 to 3, or implement the steps in the feature analysis model training method as described in any one of claims 4 to 5.
Citation Information
Patent Citations
Financial risk assessment method and related equipment
CN119963311A
Characteristic distillation method, device, equipment and medium of multi-modal large model
CN120338040A
Cited By
Model training method, vehicle control method, device, equipment and medium
CN121214384A