A post-loan risk transmission early warning method based on a neural network model
Patent Information
- Application Number
- CN202611133526.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-20
AI Technical Summary
现有方法通常将企业看作孤立样本,不能把企业点表和关系边表共同作为模型输入,导致产业链传导风险识别不足
[0026]本发明提供的一种基于神经网络模型的贷后风险传导预警方法,所述预警方法包括:获取企业节点数据和企业关系边数据;对企业节点变量进行清洗、缺失值填充、类别变量编码和特征拼接;按照时间片构建企业产业链动态图;将图数据输入带边特征的异构图注意力神经网络,得到每一企业节点的多维风险预测值;根据不同风险变量对应阈值生成预警信号,并在需要时输出风险传导路径。能够把企业基本属性、产业链关联关系、制造业生产经营数据以及历史风险事件统一转化为图数据,并通过深度学习模型进行多任务风险预测和风险传导路径识别的贷后风险传导预警方法。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of post-loan supply chain risk transmission early warning models, and in particular to a post-loan risk transmission early warning method based on a neural network model. Background Technology
[0002] Post-loan risk monitoring in banks typically requires the continuous identification of abnormal changes in the operations, credit, business registration, judicial and administrative supervision, and supply chain transactions of borrowers. Traditional post-loan risk control often focuses on a single enterprise as the analysis object, relying mainly on static or semi-static variables such as financial statements, credit records, business penalties, and lists of enterprises with abnormal operations. This makes it difficult to identify the risk transmission between enterprises caused by relationships such as equity control, supply procurement, guarantee cooperation, and upstream and downstream transactions.
[0003] In the manufacturing sector, corporate risk is not limited to individual financial deterioration; it can also spread to related companies along the production and operation chain, including declining production capacity, reduced orders, transaction disruptions, supplier defaults, abnormal customer concentration, insufficient R&D investment, and a decrease in patent or innovation activities. If banks only monitor the risk of the borrower itself during post-loan management, they often fail to detect in advance the indirect risks caused by abnormalities in upstream or downstream companies in the supply chain.
[0004] Existing solutions mainly fall into three categories: The first category is post-loan early warning methods based on expert rules or scoring cards, which generate risk levels by setting thresholds for financial indicators, rules for credit abnormalities, and rules for industrial and commercial penalties; the second category is enterprise risk scoring methods based on traditional machine learning, such as logistic regression, random forest, and XGBoost, which input individual enterprise features into the model and output a comprehensive risk score; the third category is supply chain risk assessment methods based on ordinary graph convolutional networks or simple association rules, which use enterprise relationship networks for neighbor risk statistics or first-order neighbor feature aggregation.
[0005] Traditional post-loan risk control focuses only on individual enterprises and struggles to identify the transmission of supply chain risks caused by equity and supply relationships.
[0006] The existing models do not make sufficient use of manufacturing production and operation data, so that the models can comprehensively characterize the impact of enterprises' production capacity, transaction capacity and innovation capacity on future risks.
[0007] Ordinary rule-based models or shallow machine learning models cannot directly learn the problems of multi-hop associations, edge type differences, and edge weight differences in point-edge relationship networks.
[0008] The coarse granularity of post-loan monitoring results prevents the model from outputting the probability or score of various risk events such as administrative penalties, business abnormalities, credit penalties, and litigation-related defaults within the next month or other set windows.
[0009] For issues that are difficult to interpret in the early warning results, a graph attention weighting and path extraction mechanism is used to output the associated nodes and risk transmission paths that have a significant impact on the risk score of the target enterprise.
[0010] Existing bank post-loan risk monitoring systems typically use customer numbers, enterprise unified social credit codes, or credit entity numbers as primary keys. They collect enterprise information such as business registration, legal records, credit information, finances, and public opinion on a daily, weekly, or monthly basis, and then generate early warning scores through rule thresholds or supervised learning models. While such solutions are easy to deploy, their data organization is mainly based on "enterprise-indicator" tables, which cannot fully express the control, supply, transaction, and collaboration relationships between "enterprises."
[0011] In supply chain finance or industrial chain credit scenarios, some solutions calculate the correlation between core enterprises, upstream and downstream enterprises, and guarantor enterprises, and then manually aggregate the risks of related enterprises according to rules. However, such methods typically only process direct neighbors or a few fixed relationships and cannot automatically learn the transmission strength of risk signals under different edge types, different edge weights, and different time slices.
[0012] Some solutions use ordinary graph convolutional networks for risk assessment, but ordinary GCNs or simple graph aggregation models often assume that the edge types are the same or that the edge weights are weak, making it difficult to handle heterogeneous edges such as equity relationships and supply relationships at the same time, and also difficult to retain attention weights that are useful for early warning interpretation.
[0013] (3) Objectively evaluate the shortcomings of existing technologies Existing methods typically treat enterprises as isolated samples and cannot use both the enterprise point table and the relationship edge table as input to the model, resulting in insufficient identification of supply chain transmission risks.
[0014] Existing methods do not make sufficient use of manufacturing production and operation data, and it is difficult to transform operational status variables such as production capacity, transaction capacity, and innovation capacity into learnable node features.
[0015] Existing graph models handle edge relationships in a coarse manner and cannot differentiate information transmission based on edge types and weights, such as equity and supply.
[0016] Existing early warning results are mostly based on a single comprehensive score, which cannot meet the requirements of banks in post-loan scenarios for separately monitoring, setting thresholds, and handling multiple types of risk events.
[0017] The existing model lacks path tracing capabilities after deployment, making it difficult for business personnel to determine whether the warning signal is caused by an anomaly within the enterprise itself or by transmission from upstream, downstream, or equity-related enterprises. Summary of the Invention
[0018] In view of the above problems, the present invention is proposed to provide a post-loan risk transmission early warning method based on a neural network model to overcome or at least partially solve the above problems.
[0019] According to one aspect of the present invention, a post-loan risk transmission early warning method based on a neural network model is provided, the early warning method comprising: Obtain enterprise node data and enterprise relationship edge data; The enterprise node variables are cleaned, missing values are filled, categorical variables are encoded, and features are concatenated. Construct a dynamic diagram of the enterprise's supply chain based on time slices; By inputting graph data into a heterogeneous graph attention neural network with edge features, a multidimensional risk prediction value for each enterprise node is obtained. Early warning signals are generated based on the threshold values corresponding to different risk variables, and the risk transmission path is output when necessary.
[0020] Optionally, obtaining enterprise node data and enterprise relationship edge data specifically includes: Construct a dot table to store basic information and risk monitoring characteristics of an entity enterprise, including auxiliary fields such as node_id, ymon_seq, and node_type, as well as registered capital (x_regcap), enterprise age (x_age_mon), registered province (x_regorgprovince), and industry category (x_industryphyall) fields for industry and commerce; the dot table also includes manufacturing production and operation data; The point table includes historical risk variables statistically analyzed across different observation windows; The edge table is used to store relationship information between enterprises, including source node source_id, target node target_id, relationship type relationship_type, relationship weight or edge feature edge_feats; Relationship types include equity relationships and supply relationships; The relationship weight is derived from the equity stake and the existence of a supply relationship.
[0021] Optionally, the process of cleaning, filling in missing values, encoding categorical variables, and concatenating features for enterprise node variables specifically includes: Node_id, ymon_seq, and node_type are used as auxiliary fields and not directly as features for model learning; registered capital and other scale variables are used as first-class numerical variables; window statistics variables such as enterprise age, business registration changes, administrative penalties, abnormal operations, and credit penalties are used as second-class numerical variables; and the province of registration and industry category are used as categorical variables. Missing value handling: Fill missing values for numeric variables, preferably with 0; convert categorical variables to string type first, and then classify missing or outlier values into fixed categories. Categorical variable coding: One-hot coding is performed on the registered provinces and industry categories, and dummy variable columns that appeared in the training phase but did not appear in the current data are filled in using a preset list of provinces and industry categories, and then arranged in a fixed order; Feature concatenation: Auxiliary fields, numerical variables, categorical dummy variables, and manufacturing production and operation features are concatenated to generate a cleaned node file; the edge table retains the source node, target node, edge type, and edge feature fields.
[0022] Optionally, the construction of the enterprise supply chain dynamic map according to time slices specifically includes: After reading the node and edge files, if the node data contains the ymon_seq time field, extract the corresponding node and edge relationships according to the time slice and construct multiple dynamic graphs; If the time field does not exist, a single global graph is constructed. When constructing the graph, a mapping is established from the enterprise node_id to the node index in the graph, and a DGL heterogeneous graph is constructed according to the relationship type in the edge table, so that different relationship types correspond to different canonical edge types (canonical_etype). For each edge type, read its corresponding edge feature edge_feats; Edge features are either one-dimensional weights or multi-dimensional vectors; When the edge features are one-dimensional, they are first expanded into a two-dimensional matrix and then input into the edge feature mapping layer.
[0023] Optionally, the step of inputting graph data into a heterogeneous graph attention neural network with edge features to obtain a multidimensional risk prediction value for each enterprise node specifically includes: The EdgeGATConv edge-attention convolution module includes: The EdgeGATConv module takes graph structure, node features, and edge features as input; The module calls GATConv to perform attention aggregation on the features of adjacent nodes and returns the node representation and attention score; The code performs a linear mapping on the edge features and concatenates them with the source node representation to generate an intermediate representation related to the edges; In the current implementation, the intermediate representation does not directly participate in subsequent message passing; The module uses update_all to multiply the source node representation by the edge features and sum them over the target node to obtain the updated node representation. It also returns the attention score generated by GATConv for interpretation and analysis. HeteroGATLayer, a heterogeneous graph attention layer; For each edge relationship type, an EdgeGATConv submodule is established. During forward propagation, the canonical_etypes in the graph are traversed. For each "source node type - edge type - target node type", the output is calculated separately. The outputs of different relationships received by the same target node type are added together to form an aggregated representation of the node type. HeteroGAT, a multi-layer heterogeneous graph attention network: The first layer of the model maps the original input dimension to hidden_size×num_heads; subsequent layers continue to perform heterogeneous edge attention propagation. Each layer is followed by an ELU activation function; the output layer uses a single-head attention graph to propagate the results while retaining a list of attention scores from each layer. The MLP output, which fuses the original features and the graph representation, concatenates the last layer graph representation h with the original input features inputs along the feature dimension to form combined_input, which is then input into a multi-layer MLP. MLP includes Linear, LeakyReLU, Linear, LeakyReLU, Linear, LeakyReLU, and Linear in sequence, and finally outputs the dimension out_size; Node classification encapsulation: The model parameters are encapsulated using HeteroGATForNodeClassification, including in_size, hidden_size, out_size, num_heads, num_layers, edge_feat_size, edge_types, and mlp_hidden_size.
[0024] Optionally, the step of generating early warning signals based on thresholds corresponding to different risk variables and outputting the risk transmission path when necessary specifically includes: Model training and weight persistence: During the training phase, samples are constructed using historical enterprise node data, historical enterprise relationship edge data, and future risk event labels; The label is defined as whether the enterprise has experienced multiple events such as administrative penalties, abnormal operations, credit penalties, litigation-related breaches of trust, or serious deterioration of operations within the next month or other business-defined window. The model is trained using a multi-label binary classification loss or a loss function with class weights; After training is complete, the model parameters and structural parameters are saved to form the trained_model.pth model file; Risk signal triggering and path extraction.
[0025] Optionally, the risk signal triggering and path extraction specifically include: For each risk variable output by the model, the bank can set a threshold θ based on business tolerance, historical default distribution, manual review capacity, or regulatory requirements. i; When the i-th risk output value p_i of an enterprise node is greater than or equal to the threshold θ_i, a risk signal is generated, which includes the enterprise identifier, time slice, risk type, risk score, trigger threshold, and trigger time. When the is_path parameter is enabled, risk path extraction is performed based on the saved attention score for enterprises whose prediction results exceed the threshold. The path length is controlled by the ascent_levels parameter; The output file path.txt or path_timeslice.txt records the paths of related companies that have a significant impact on the risk of the target company.
[0026] This invention provides a post-loan risk transmission early warning method based on a neural network model. The method includes: acquiring enterprise node data and enterprise relationship edge data; cleaning, filling missing values, encoding categorical variables, and concatenating features for enterprise node variables; constructing a dynamic graph of the enterprise supply chain according to time slices; inputting the graph data into a heterogeneous graph attention neural network with edge features to obtain a multi-dimensional risk prediction value for each enterprise node; generating early warning signals based on thresholds corresponding to different risk variables; and outputting risk transmission paths when needed. This post-loan risk transmission early warning method can uniformly transform basic enterprise attributes, supply chain relationships, manufacturing production and operation data, and historical risk events into graph data, and perform multi-task risk prediction and risk transmission path identification through a deep learning model.
[0027] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A flowchart illustrating a post-loan risk transmission early warning method based on a neural network model, provided as an embodiment of the present invention; Figure 2This is a schematic diagram of a heterogeneous graph neural network structure provided in an embodiment of the present invention, illustrating the connection relationships between node input features, edge features, heterogeneous graph structure, EdgeGATConv, HeteroGATLayer, multi-layer attention propagation, original feature concatenation, MLP multi-task output, and attention path interpretation. Figure 3 This is a schematic diagram of the structure of the bank post-loan supply chain risk transmission early warning system provided in an embodiment of the present invention. The schematic diagram shows data sources such as point tables, edge tables, and historical tags, as well as the data flow between the data access module, variable processing module, dynamic graph construction module, heterogeneous graph neural network inference module, threshold judgment module, path interpretation module, and early warning output module. Detailed Implementation
[0030] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0031] The terms "comprising" and "having," and any variations thereof, in the specification, embodiments, claims, and drawings of this invention are intended to cover non-exclusive inclusion, such as including a series of steps or units.
[0032] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0033] like Figure 1 As shown, this invention provides a method for early warning of supply chain risk transmission for post-loan risk monitoring in banks. The method first acquires enterprise node data and enterprise relationship edge data; secondly, it cleans, fills in missing values, encodes categorical variables, and concatenates features for enterprise node variables; thirdly, it constructs a dynamic graph of the enterprise supply chain according to time slices; then, it inputs the graph data into a heterogeneous graph attention neural network with edge features to obtain a multidimensional risk prediction value for each enterprise node; finally, it generates early warning signals based on thresholds corresponding to different risk variables and outputs the risk transmission path when needed.
[0034] like Figure 2 The diagram shows a heterogeneous graph neural network structure, illustrating the connections between node input features, edge features, heterogeneous graph structure, EdgeGATConv, HeteroGATLayer, multi-layer attention propagation, original feature concatenation, MLP multi-task output, and attention path interpretation.
[0035] 2. Data Layer Design 2.1 Point Table The dot table is used to store basic information and risk monitoring characteristics of an entity enterprise. It includes at least auxiliary fields such as `node_id`, `ymon_seq`, and `node_type`, as well as industrial and commercial fields such as `registered capital` (`x_regcap`), `enterprise age` (`x_age_mon`), `registered province` (`x_regorgprovince`), and `industry category` (`x_industryphyall`). The dot table can also include manufacturing production and operation data, such as capacity utilization, output of major products, operating rate, inventory turnover, order amount, purchase amount, sales amount, frequency of upstream and downstream transactions, R&D investment, number of patent applications, and number of new products, to form characteristics of production capacity, transaction capacity, and innovation capacity.
[0036] 2.2 Historical Characteristics of Risk The point table also includes historical risk variables statistically analyzed by different observation windows, such as the number of business registration changes (x_ys_alters_cnt), the number of administrative penalties or cases (x_ys_entcasebase), the number of business abnormalities (x_ys_exceptions), the number of revocations, cancellations, or risks without cause (x_ys_caseless), the number of credit penalties (x_fh_credit_chufa), and the number of risks related to shareholders or related parties (x_fh_satparty), etc.
[0037] 2.3 Side Table The edge table stores relationship information between enterprises, including at least the source node (source_id), target node (target_id), relationship type (relation_type), and relationship weight or edge features (edge_feats). Relationship types include equity relationships and supply relationships; relationship weights can be obtained from equity percentages and the existence of a supply relationship.
[0038] 3. Input variable processing 3.1 Field Hierarchy node_id, ymon_seq, and node_type are used as auxiliary fields and are not directly used as features for model learning; registered capital and other scale variables are used as first-class numerical variables; window statistical variables such as enterprise age, business registration changes, administrative penalties, abnormal operations, and credit penalties are used as second-class numerical variables; and the province of registration and industry category are used as categorical variables.
[0039] 3.2 Handling Missing Values For numerical variables, fill in missing values, preferably with 0, to avoid inference failures caused by missing enterprise fields in the bank's batch production environment; for categorical variables, first convert them to string type, and then uniformly classify missing or outlier values into fixed categories.
[0040] 3.3 Categorical Variable Coding One-hot encoding is performed on the registered provinces and industry categories. Dumb variables that appeared in the training phase but not in the current data are filled in using a preset list of provinces and industry categories. These are then arranged in a fixed order to ensure that the input dimension of the model inference is consistent with that of the training phase.
[0041] 3.4 Feature splicing The auxiliary fields, numerical variables, categorical dummy variables, and manufacturing production and operation characteristics are concatenated to generate a cleaned node file; the edge table retains the source node, target node, edge type, and edge feature fields for subsequent graph data construction.
[0042] 4. Graph Data Construction After reading the node and edge files, if the node data contains a `ymon_seq` time field, the corresponding node and edge relationships are extracted according to time slices to construct multiple dynamic graphs; otherwise, a single global graph is constructed. During graph construction, a mapping is established from enterprise `node_id` to the node index within the graph, and a DGL heterogeneous graph is constructed based on the relationship types in the edge table, ensuring that different relationship types correspond to different canonical edge types (`canonical_etype`).
[0043] For each edge type, its corresponding edge features, edge_feats, are read. Edge features can be one-dimensional weights or multi-dimensional vectors. When the edge features are one-dimensional, they are first expanded into a two-dimensional matrix and then input into the edge feature mapping layer.
[0044] 5. Heterogeneous Side Attention Graph Neural Network Structure 5.1 EdgeGATConv edge attention convolution module The EdgeGATConv module takes graph structure, node features, and edge features as input. First, the module calls GATConv to perform attention aggregation on the features of adjacent nodes, returning the node representation and attention score. Then, the code performs a linear mapping on the edge features and concatenates them with the source node representation to generate an intermediate edge-related representation; however, in the current implementation, this intermediate representation does not directly participate in subsequent message passing. Finally, the module uses update_all to multiply the source node representation by the edge features and sum over the target node to obtain the updated node representation, while returning the attention score generated by GATConv for interpretation and analysis.
[0045] 5.2 HeteroGATLayer Attention Layer for Heterogeneous Graphs An EdgeGATConv submodule is created for each edge relation type. During forward propagation, the canonical_etypes in the graph are traversed, and the output is calculated for each "source node type - edge type - target node type". The outputs of different relations received for the same target node type are added together to form an aggregated representation of that node type.
[0046] 5.3 HeteroGAT Multilayer Heterogeneous Graph Attention Network The first layer of the model maps the original input dimension to hidden_size × num_heads; subsequent layers continue to propagate heterogeneous edge attention; and the ELU activation function is used after each layer. The output layer uses single-head attention to form a graph propagation result, while retaining a list of attention scores for each layer.
[0047] 5.4 MLP Output of Original Feature and Graph Representation Fusion To balance the characteristics of the enterprise itself and the propagation characteristics of the industry chain, the final graph representation h is concatenated with the original input features inputs along the feature dimension to form combined_input, which is then input into a multi-layer MLP. The MLP sequentially includes Linear, LeakyReLU, Linear, LeakyReLU, Linear, LeakyReLU, and Linear, with the final output dimension out_size, which can be set to 20 or other numbers of risk variables.
[0048] 5.5 Node Classification and Encapsulation The model parameters are encapsulated using HeteroGATForNodeClassification, including in_size, hidden_size, out_size, num_heads, num_layers, edge_feat_size, edge_types, and mlp_hidden_size, which facilitates saving after training and loading during the inference phase.
[0049] 6. Model Training and Weight Persistence During the training phase, samples are constructed using historical enterprise node data, historical enterprise relationship edge data, and future risk event labels. Labels can be defined as whether an enterprise will experience various events within the next month or other business-defined window, such as administrative penalties, operational abnormalities, credit penalties, litigation-related breaches of trust, or severe operational deterioration. The model can be trained using multi-label binary classification loss or a loss function with class weights to accommodate imbalanced samples of rare risk events. After training, the model parameters and structural parameters are saved, forming model files such as trained_model.pth.
[0050] 7. Method Implementation and Reasoning During implementation, node_path, edge_path, model_directory, and logs_directory can be specified via command-line arguments. The execution flow reads the raw node data, performs variable cleaning and one-hot encoding, and generates the node feature files required by the model. Then, it reads the cleaned node table and edge table, loads the model weights trained_model.pth, and calls build_dynamic_graph and predict at each time slice to complete batch inference.
[0051] If the ymon_seq field is detected, the method outputs the risk score for each enterprise in each time slice; if the ymon_seq field is not detected, a global graph is constructed and the risk scores for all enterprises are output. The output file risk.csv should include at least node_id, ymon_seq (if present), and risk variables such as risk01-riskNN.
[0052] 8. Risk Signal Triggering and Path Extraction For each risk variable output by the model, the bank can set a threshold θ based on business tolerance, historical default distribution, manual review capacity, or regulatory requirements. i. When the i-th risk output value p_i of the enterprise node is greater than or equal to the threshold θ_i, a risk signal is generated, which includes the enterprise identifier, time slice, risk type, risk score, trigger threshold, and trigger time.
[0053] When the `is_path` parameter is enabled, risk path extraction is performed based on the saved attention scores for companies whose prediction results exceed a threshold. The path length is controlled by the `ascent_levels` parameter, which defaults to 3. The output file `path.txt` or `path_timeslice.txt` records the paths of related companies that have a significant impact on the risk of the target company. This information can be used to explain the source of risk and assist account managers in conducting post-loan verification.
[0054] like Figure 3 As shown, this is a schematic diagram of the structure of the bank's post-loan supply chain risk transmission and early warning system. The diagram shows data sources such as point tables, edge tables, and historical tags, as well as the data flow between the data access module, variable processing module, dynamic graph construction module, heterogeneous graph neural network inference module, threshold judgment module, path interpretation module, and early warning output module.
[0055] This invention, as a post-loan risk transmission early warning method, includes the following data flow: acquiring enterprise point tables, enterprise edge tables, manufacturing production and operation data, and historical risk labels; processing variables in the point tables and generating standardized node features; constructing a heterogeneous dynamic graph based on the edge tables and time slices; loading the trained model parameters and performing heterogeneous graph attention inference; outputting a multi-dimensional risk score; generating an early warning signal based on a threshold; and outputting the risk transmission path when path extraction is enabled. The files risk.csv, path.txt, the early warning library, or the bank's existing post-loan platform are only used as storage or receiving objects for the method's output results and are not considered as the product or system protection subject of this application.
[0056] Beneficial effects: 1. Expanding from monitoring individual enterprises to monitoring supply chain networks. This invention constructs a graph data relationship network using point tables and edge tables, enabling banks to simultaneously observe the risks of the lending enterprise itself and the risks of related enterprises, thus solving the problem of traditional post-loan monitoring neglecting the transmission of risks through the supply chain.
[0057] 2. More suitable for post-loan scenarios in the manufacturing industry. This invention introduces manufacturing production and operation variables such as production capacity, transaction capacity, and innovation capacity in addition to industrial and commercial, industry, and risk attributes, enabling the model to identify the impact of changes in capacity, orders, transactions, and innovation activities on the future risks of enterprises.
[0058] 3. It can distinguish different relationship types and relationship strengths. This invention adopts a heterogeneous graph attention structure with edge features to model different edge types such as equity relationships and supply relationships, and uses edge weights or edge features to participate in message passing. Therefore, it can better characterize the transmission of real industrial chain risks than ordinary graph convolution or simple neighbor weighting.
[0059] 4. Balancing Enterprise Characteristics and Network Propagation Characteristics. The model concatenates the latent representation after graph propagation with the original node characteristics before outputting the risk results. This preserves the enterprise's own business registration, industry, production and operation, and historical risk information, while also utilizing the propagation information in the interconnected network.
[0060] 5. Supports multi-dimensional, fine-grained early warning. This invention can output 20 or more risk variables, such as the probability of administrative penalties, the probability of operational abnormalities, and the probability of credit penalties in the next month. Banks can set different handling rules for different risk events.
[0061] 6. Supports dynamic inference over time slices. The model can be constructed and inferred periodically based on time fields such as ymon_seq, making it suitable for banks' daily batch processing, monthly post-loan inspections, and incremental risk monitoring.
[0062] 7. Possesses the ability to explain risk transmission paths. This invention retains attention scores during reasoning and can output the correlation paths that have a significant impact on the enterprises receiving early warnings, making it easier for business personnel to trace the source of risks and improving the auditability and interpretability of early warning results.
[0063] 8. Facilitates deployment in bank production environments. The prediction script supports parameterized configuration of node files, edge files, model directories, and log directories, and outputs risk.csv and path files, which can be integrated with the bank's post-loan supply chain risk transmission early warning system's internal early warning library and business processing procedures.
[0064] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for early warning of post-loan risk transmission based on a neural network model, characterized in that, The early warning method includes: Obtain enterprise node data and enterprise relationship edge data; The enterprise node variables are cleaned, missing values are filled, categorical variables are encoded, and features are concatenated. Construct a dynamic diagram of the enterprise's supply chain based on time slices; By inputting graph data into a heterogeneous graph attention neural network with edge features, a multidimensional risk prediction value for each enterprise node is obtained. Early warning signals are generated based on the threshold values corresponding to different risk variables, and the risk transmission path is output when necessary.
2. The method for early warning of post-loan risk transmission based on a neural network model according to claim 1, characterized in that, The acquisition of enterprise node data and enterprise relationship edge data specifically includes: Construct a dot table to store basic information and risk monitoring characteristics of an entity enterprise, including auxiliary fields such as node_id, ymon_seq, and node_type, as well as registered capital (x_regcap), enterprise age (x_age_mon), registered province (x_regorgprovince), and industry category (x_industryphyall) fields for industry and commerce; the dot table also includes manufacturing production and operation data; The point table includes historical risk variables statistically analyzed across different observation windows; The edge table is used to store relationship information between enterprises, including source node source_id, target node target_id, relationship type relationship_type, relationship weight or edge feature edge_feats; Relationship types include equity relationships and supply relationships; The relationship weight is derived from the equity stake and the existence of a supply relationship.
3. The method for early warning of post-loan risk transmission based on a neural network model according to claim 1, characterized in that, The specific steps of cleaning, filling missing values, encoding categorical variables, and concatenating features for enterprise node variables include: Node_id, ymon_seq, and node_type are used as auxiliary fields and not directly as features for model learning; registered capital and other scale variables are used as first-class numerical variables; window statistics variables such as enterprise age, business registration changes, administrative penalties, abnormal operations, and credit penalties are used as second-class numerical variables; and the province of registration and industry category are used as categorical variables. Missing value handling: Fill missing values for numeric variables, preferably with 0; convert categorical variables to string type first, and then classify missing or outlier values into fixed categories. Categorical variable coding: One-hot coding is performed on the registered provinces and industry categories, and dummy variable columns that appeared in the training phase but did not appear in the current data are filled in using a preset list of provinces and industry categories, and then arranged in a fixed order; Feature concatenation: Auxiliary fields, numerical variables, categorical dummy variables, and manufacturing production and operation features are concatenated to generate a cleaned node file; the edge table retains the source node, target node, edge type, and edge feature fields.
4. The method for early warning of post-loan risk transmission based on a neural network model according to claim 1, characterized in that, The construction of a dynamic enterprise supply chain diagram based on time slices specifically includes: After reading the node and edge files, if the node data contains the ymon_seq time field, extract the corresponding node and edge relationships according to the time slice and construct multiple dynamic graphs; If the time field does not exist, a single global graph is constructed. When constructing the graph, a mapping is established from the enterprise node_id to the node index in the graph, and a DGL heterogeneous graph is constructed according to the relationship type in the edge table, so that different relationship types correspond to different canonical edge types (canonical_etype). For each edge type, read its corresponding edge feature edge_feats; Edge features are either one-dimensional weights or multi-dimensional vectors; When the edge features are one-dimensional, they are first expanded into a two-dimensional matrix and then input into the edge feature mapping layer.
5. The method for early warning of post-loan risk transmission based on a neural network model according to claim 1, characterized in that, The step of inputting graph data into a heterogeneous graph attention neural network with edge features to obtain a multidimensional risk prediction value for each enterprise node specifically includes: The EdgeGATConv edge-attention convolution module includes: The EdgeGATConv module takes graph structure, node features, and edge features as input; The module calls GATConv to perform attention aggregation on the features of adjacent nodes and returns the node representation and attention score; The code performs a linear mapping on the edge features and concatenates them with the source node representation to generate an intermediate representation related to the edges; In the current implementation, the intermediate representation does not directly participate in subsequent message passing; The module uses update_all to multiply the source node representation by the edge features and sum them over the target node to obtain the updated node representation. It also returns the attention score generated by GATConv for interpretation and analysis. HeteroGATLayer, a heterogeneous graph attention layer; For each edge relationship type, an EdgeGATConv submodule is established. During forward propagation, the canonical_etypes in the graph are traversed. For each "source node type - edge type - target node type", the output is calculated separately. The different relationship outputs received by the same target node type are added together to form an aggregated representation of the node type. HeteroGAT, a multi-layer heterogeneous graph attention network: The first layer of the model maps the original input dimension to hidden_size×num_heads; subsequent layers continue to perform heterogeneous edge attention propagation. Each layer is followed by an ELU activation function; the output layer uses a single-head attention graph to propagate the results while retaining a list of attention scores from each layer. The MLP output, which fuses the original features and the graph representation, concatenates the last layer graph representation h with the original input features inputs along the feature dimension to form combined_input, which is then input into a multi-layer MLP. MLP includes Linear, LeakyReLU, Linear, LeakyReLU, Linear, LeakyReLU, and Linear in sequence, and finally outputs the dimension out_size; Node classification encapsulation: The model parameters are encapsulated using HeteroGATForNodeClassification, including in_size, hidden_size, out_size, num_heads, num_layers, edge_feat_size, edge_types, and mlp_hidden_size.
6. The method for early warning of post-loan risk transmission based on a neural network model according to claim 1, characterized in that, The specific steps of generating early warning signals based on thresholds corresponding to different risk variables and outputting risk transmission paths when necessary include: Model training and weight persistence: During the training phase, samples are constructed using historical enterprise node data, historical enterprise relationship edge data, and future risk event labels; The label is defined as whether the enterprise has experienced multiple events such as administrative penalties, abnormal operations, credit penalties, litigation-related breaches of trust, or serious deterioration of operations within the next month or other business-defined window. The model is trained using a multi-label binary classification loss or a loss function with class weights; After training is complete, the model parameters and structural parameters are saved to form the trained_model.pth model file; Risk signal triggering and path extraction.
7. The method for early warning of post-loan risk transmission based on a neural network model according to claim 6, characterized in that, The risk signal triggering and path extraction specifically include: For each risk variable output by the model, the bank can set a threshold θ based on business tolerance, historical default distribution, manual review capacity, or regulatory requirements. i; When the i-th risk output value p_i of an enterprise node is greater than or equal to the threshold θ_i, a risk signal is generated, which includes the enterprise identifier, time slice, risk type, risk score, trigger threshold, and trigger time. When the is_path parameter is enabled, risk path extraction is performed based on the saved attention score for enterprises whose prediction results exceed the threshold. The path length is controlled by the ascent_levels parameter; The output file path.txt or path_timeslice.txt records the paths of related companies that have a significant impact on the risk of the target company.