A heterogeneous graph neural network enterprise risk assessment method based on meta-path perception

By using a heterogeneous graph neural network method based on meta-path awareness, the characteristics of enterprise risk transmission are explicitly modeled and adaptively fused, which solves the problems of bias and insufficient interpretability of assessment results in existing technologies, and achieves more accurate and reliable enterprise risk assessment.

CN123159918APending Publication Date: 2026-11-24SHENYANG INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611466622.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-20
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies cannot explicitly model the risk transmission characteristics of different semantic paths in enterprise risk assessment, lack adaptive weighted fusion capabilities and business-level interpretability, resulting in deviations between assessment results and actual situations and insufficient identification capabilities.

Method used

A heterogeneous graph neural network method based on meta-path awareness is adopted. By predefining multiple meta-paths with business semantics, graph attention network is used to perform intra-path aggregation and inter-path fusion to generate path-specific representation vectors and output explanatory information of risk transmission paths.

Benefits of technology

By explicitly modeling the differences in risk transmission across different semantic paths, adaptive fusion is achieved, enhancing the accuracy and interpretability of assessment results and improving the ability to identify remote risk sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123159918A_ABST
    Figure CN123159918A_ABST
Patent Text Reader

Abstract

This invention discloses a heterogeneous graph neural network-based enterprise risk assessment method based on meta-path awareness. This invention relates to the field of enterprise risk assessment technology and includes the following steps: Data acquisition and preprocessing steps: Collecting raw data from multiple enterprise sources; cleaning, imputing missing values, and standardizing the format of the raw data; extracting enterprise features and various inter-enterprise relationships; outputting a structured enterprise feature table and relationship table; and performing Min-Max normalization on all numerical indicators, using the following formula: x norm =(x - x) min ) / (x max - x min ); where, mapped to the [0,1] interval, Z-score standardization is used as an alternative for indicators without clear upper and lower bounds; heterogeneous graph construction steps: with enterprises as core nodes, combined with auxiliary nodes, and with the relationships in the relation table as edges, construct an enterprise heterogeneous graph containing multiple node types and multiple edge types, and generate an initial feature vector for each node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of enterprise risk assessment technology, specifically to a risk assessment method and system based on meta-path awareness heterogeneous graph neural networks. Background Technology

[0002] With the rapid development of big data, artificial intelligence, and knowledge graph technologies, enterprise digital governance and intelligent risk control have become core supporting technologies in fields such as financial lending, industrial supervision, and supply chain management. Enterprise risk assessment, as a key means of identifying and quantifying the likelihood of corporate default, directly relates to the asset quality of financial institutions, the accuracy of government policy support, and the stable operation of the industrial chain. In recent years, enterprise risk assessment methods based on graph neural networks (GNNs) have gradually become a research hotspot. The core idea is to construct a graph structure representing equity control, supply chain transactions, and guarantee relationships among enterprises, capturing the risk transmission effect between enterprises through message passing between nodes. Academia and industry have accumulated rich experience in heterogeneous graph modeling in fields such as recommender systems and social network analysis, and are transferring this experience to enterprise risk assessment scenarios.

[0003] Focusing on the field of enterprise risk assessment, existing technical solutions based on heterogeneous graph neural networks generally face the following specific technical bottlenecks:

[0004] (1) While existing methods can identify various types of relationships between firms (such as investment, supply, and competition), they typically treat different relationships equally in model design, or distinguish them by learning a separate weight matrix for each relationship type. However, in actual business, different relationship paths result in significant differences in the speed, intensity, and scope of risk transmission. For example, the risk of supply chain disruption may be transmitted to downstream firms within weeks, while the risk transmission of equity relationships often takes months or even longer. Existing technologies lack mechanisms to explicitly model the risk transmission characteristics of different semantic paths, leading to discrepancies between risk assessment results and actual situations.

[0005] (2) When a company becomes associated with other companies through multiple paths with different semantics, existing methods often use simple concatenation, summation, or averaging operations to process this multi-path information. This fixed fusion strategy cannot dynamically adjust the importance weight of each path according to the company's own business characteristics. For example, the operating conditions of a manufacturing company are highly dependent on its core suppliers, and the risk weight of the supply chain path should be significantly higher than that of the investment path; while for a subsidiary controlled by a group, the impact of the parent company's investment path on its risk may be far greater than that of its own supply chain relationship. Existing technologies cannot achieve this adaptive weighted fusion.

[0006] (3) Existing methods output a single risk score or risk level, and users cannot know which business relationship chain the score mainly originates from. In actual business scenarios such as credit approval and post-loan management, risk reviewers not only need to know that "the company is at risk," but also "where the risk comes from," such as whether it is due to the deterioration of the upstream supplier's operations or the market squeeze caused by the competitor obtaining a large amount of financing. Existing technologies lack this kind of business-level interpretability, which reduces the credibility and practical value of the assessment results. In addition, risks are often not directly transmitted through single-hop relationships, but rather accumulate and amplify gradually along multi-hop paths. For example, if company A invests in company B, and company B supplies goods to company C, then the operational fluctuations of company A may indirectly affect company C through company B. Although existing technologies can implicitly transmit information through multi-layer GNNs, it is difficult to explicitly model this multi-hop risk accumulation effect along specific semantic paths, resulting in insufficient ability to identify remote risk sources.

[0007] 2. Existing technical solutions

[0008] Existing technology 1: Enterprise credit risk assessment method based on relational graph convolutional networks

[0009] This solution can refer to Chinese invention patent CN110796269B (A method and system for enterprise credit assessment) and the literature "Credit Risk Prediction of Small and Medium-sized Enterprises Based on Relational Graph Convolutional Network" (Computer Engineering and Applications, Vol. 58, No. 12, 2022, pp. 245-252).

[0010] The core of this solution is to construct an enterprise relationship graph and use a graph convolutional network (R-GCN) to learn the representations of enterprise nodes, ultimately outputting a credit score. The specific steps are as follows:

[0011] Step 1: Enterprise Relationship Graph Construction. From data sources such as business registration, annual reports, and supply chain invoices, extract enterprises as nodes and the following three types of relationships as edges:

[0012] (1) Equity relationship: Company A holds a certain percentage of shares in Company B, and the type is denoted as "equity".

[0013] (2) Supply chain relationship: Company A is a supplier or customer of Company B, and the edge type is denoted as "supply".

[0014] (3) Guarantee relationship: Enterprise A provides a guarantee for the loan of Enterprise B. The side type is recorded as "guarantee".

[0015] The initial feature vector of each enterprise node consists of the following financial indicators: annual revenue, net profit, debt-to-equity ratio, current ratio, total asset turnover, and years of establishment, totaling 6 dimensions. All indicators are mapped to the [0,1] interval using Min-Max normalization.

[0016] Step 2: R-GCN message passing uses a two-layer R-GCN for node representation learning.

[0017] h v k+1 = σ(W self k ·h v k + Σ r∈R Σ u∈N_r(v) (1 / |N_r(v)|)·Wr k ·h u k )

[0018] Among them, h v 0 Let N be the initial feature vector of node v. r (v) represents the set of neighboring nodes of node v under relation r, and σ is the ReLU activation function. After two layers of propagation (k=0,1), each enterprise node obtains a 128-dimensional representation vector h. v 2 .

[0019] Step 3: Credit Score Output. Input the enterprise's representation vector hv2 into a two-layer fully connected network (64 neurons → 1), and output a credit score (0-1000). Mean squared error loss is used during training, and historical default records are used as supervision signals.

[0020] Step 4: Risk Level Classification. The credit score is divided into five levels based on the preset threshold: AAA (≥900), AA (800-900), A (700-800), BBB (600-700), and BB (<600).

[0021] System architecture: Implemented using Python + PyTorch, with DGL library used for graph data processing, a backend database storing enterprise information and relationship edges, and a frontend providing a rating query interface.

[0022] Limitations: Although the scheme distinguishes different relationship types, it does not explicitly model multi-hop semantic paths; the weights of different relationship types are implicitly learned through independent W_r matrices, making it impossible to output the specific contribution of each business path to the score; the fusion of different path information is done by simple summation, lacking adaptive weight adjustment capabilities.

[0023] Existing technology 2: Enterprise risk identification method based on meta-path heterogeneous graph attention network

[0024] This method can be referenced in Chinese invention patent CN114331688A (A method and system for enterprise risk identification based on heterogeneous graph neural networks) and the literature "MAGNN: Metapath Aggregated Graph Neural Network for Heterogeneous Graph Embedding" (WWW 2020, pp. 2331-2341).

[0025] This scheme introduces the concept of meta-paths, extracting neighbor nodes with specific semantics from heterogeneous graphs through predefined meta-paths, and then aggregating them using a graph attention network. The specific steps are as follows:

[0026] Step 1: Metapath Definition. Predefine three metapaths:

[0027] (1) Meta-path P1: Enterprise—Supply→Enterprise—Supply→Enterprise (representing a two-hop supply chain relationship)

[0028] (2) Metapath P2: Enterprise—Equity → Enterprise ← Equity—Enterprise (representing enterprises invested in by the same shareholder)

[0029] (3) Meta-path P3: Enterprise—Guarantee → Enterprise—Guarantee → Enterprise (representing a two-hop guarantee chain)

[0030] Step 2: Meta-path Neighbor Sampling. For each target enterprise, sample neighbor nodes along the three meta-paths P1, P2, and P3. For example, sample other enterprises with a two-hop supply relationship with the enterprise along P1; sample enterprises sharing the same shareholder along P2.

[0031] Step 3: Intra-path aggregation. For each meta-path, the sampled neighbor node features are averaged and pooled to obtain the aggregated representation under that meta-path: m v P = MeanPooling({ h u | u ∈ N P (v)} )where N P (v) is the set of neighbors under the metapath P.

[0032] Step 4: Multi-path feature fusion concatenates the aggregated representations of the three meta-paths and inputs them into a fully connected layer for dimensionality reduction to obtain the final enterprise representation: h v_final = FC( concat(m v P1 , m v P2 , m v P3 ) ).

[0033] Step 5: Risk classification will be performed on hv_final Input a Softmax classifier and output a high-risk / low-risk binary classification result.

[0034] Limitations of this approach:

[0035] (1) The aggregation within each meta-path uses simple average pooling, that is, all neighbor nodes under the same meta-path are assigned the same weight. No deep information propagation mechanism such as graph attention network is used, and it is impossible to distinguish the differences in importance of different neighbor nodes under the same semantic path.

[0036] (2) The multi-path fusion adopts a fixed splicing method, and the weight of each meta-path is fixed at 1. No attention mechanism is introduced to automatically learn the importance weight of each path, and it is impossible to adaptively adjust the contribution of each path according to the characteristics of the enterprise.

[0037] (3) The final output is only the risk category, which is either high risk or low risk. It cannot output the specific contribution ratio of each path and lacks interpretability at the business level.

[0038] In summary, existing technical solutions have the following shortcomings: First, they cannot model the differentiated importance of different neighbor nodes under the same meta-path; second, they cannot adaptively weight and fuse the importance of different meta-paths; third, they cannot output risk transmission path explanations that are understandable at the business level; and fourth, they cannot explicitly capture the accumulated risks on multi-hop semantic paths. Therefore, there is an urgent need for an enterprise risk assessment method with the ability to aggregate differentiated multiple semantic paths, adaptively fuse them, and provide interpretable outputs. Summary of the Invention

[0039] To address the shortcomings of existing technologies, this invention provides a heterogeneous graph neural network-based enterprise risk assessment method based on meta-path awareness. By combining multi-path differentiated aggregation and adaptive fusion, it solves the problem of the difficulty in comprehensively modeling and interpreting multi-source heterogeneous risks in existing technologies.

[0040] To achieve the above objectives, the present invention provides the following technical solution: a heterogeneous graph neural network-based enterprise risk assessment method based on meta-path awareness, comprising the following steps:

[0041] Data collection and preprocessing steps: Collect raw data from multiple enterprise sources, clean the raw data, fill in missing values, and standardize the format. Extract enterprise characteristics and various inter-enterprise relationships, output structured enterprise characteristic tables and relationship tables, and perform Min-Max normalization on all numerical indicators, using the following formula: x norm =(x - x min ) / (x max - x min );

[0042] Among them, mapping to the [0,1] interval, Z-score standardization is used as an alternative for indicators without clear upper and lower bounds;

[0043] Heterogeneous graph construction steps: Using enterprises as core nodes, combined with auxiliary nodes, and the relationships in the relationship table as edges, construct an enterprise heterogeneous graph containing multiple node types and multiple edge types, and generate an initial feature vector for each node;

[0044] Meta-path definition and sampling steps: Predefine several meta-paths with business semantics. Each meta-path is a multi-hop relation path template composed of node type and relation type. For each target enterprise node, perform multi-hop neighbor sampling along each meta-path to obtain the meta-path neighbor subgraph corresponding to each meta-path.

[0045] Intra-path aggregation step: For each meta-path, a graph attention network (GAT) is used to aggregate the feature information of each neighbor node in the meta-path neighbor subgraph to the target enterprise node, generating a path-specific representation vector corresponding to the meta-path.

[0046] The aggregation includes: performing linear transformations h on the target node and its neighboring nodes respectively. v = W P · x v h u = W P · x u The unnormalized attention coefficient e is calculated using the attention weight vector. vu = LeakyReLU( a P T · [h v ||h u ] ), and normalized to α using the Softmax function. vu = softmax_u(e vu ) = exp(e vu ) / Σ {k∈NP(v)} exp(e vk The features of neighboring nodes are weighted and summed based on normalized attention weights and then processed by the ELU activation function. Different meta-paths perform aggregation operations independently.

[0047] Inter-path attention fusion and evaluation steps: Treat the path-specific representation vectors corresponding to multiple meta-paths as independent perspectives representing risk features of different semantic dimensions, input them into the path-level attention mechanism layer, and calculate the path-level attention weight β for each meta-path. P = exp(β P ') / Σ {Q∈{P1,P2,P3,P4}} exp(β Q '), where βP ' = w path T · tanh(W path · m v P + b path The attention weights are used to weight and fuse the path-specific representation vectors of each path to generate a comprehensive enterprise representation vector z. v = Σ {P∈{P1,P2,P3,P4}} β P · m v P The enterprise comprehensive representation vector is input into the scoring network, which outputs the enterprise risk assessment score and the attention weights of each meta-path as explanatory information for the risk transmission path.

[0048] Preferably, for numerical indicators without clearly defined upper and lower bounds, Z-score standardization is used as an alternative to Min-Max normalization. The formula for calculating Z-score standardization is as follows:

[0049] x_std = (x - μ) / σ

[0050] Where μ is the mean of the numerical indicator across all enterprise samples, and σ is the standard deviation of the numerical indicator across all enterprise samples.

[0051] Preferably, the following four meta-paths are predefined in the meta-path definition and sampling step:

[0052] The first element path P1, formally represented as (E, supply, E, supply, E), represents a two-hop supply chain path, where E is the enterprise node type and supply is the supply edge.

[0053] The second-order path P2, formalized as (E, invest, E, supply, E), represents the supply chain path under investment association, where invest is the investment edge;

[0054] The third path P3, formalized as (E, compete, E, invest_rev, E), represents the capital influence path under competitive relationships, where compete is the competitive edge and invest_rev is the reverse of the investment edge.

[0055] The fourth path P4, formalized as (E, guarantee, E, guarantee, E), represents a two-hop guarantee chain path, where guaranteeee is the guarantee edge.

[0056] Preferably, in the meta-path definition and sampling step, for each target enterprise node v, multi-hop neighbor sampling is performed along the four meta-paths using a breadth-first search approach:

[0057] Sampling along P1: The first hop searches for downstream customers along the supply edge from v to obtain N1. The second hop searches for downstream customers along the supply edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P1. P1 (v);

[0058] Sampling along P2: The first hop is to find the invested enterprise N1 along the investment edge from v. The second hop is to find the downstream customer N2 along the supply edge from each node in N1. N2 is then used as the neighbor set N of P2. P2 (v);

[0059] Sampling along P3: The first hop searches for competitors along the competing edge from v to obtain N1. The second hop searches for investor companies along the reverse of the investment edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P3. P3 (v);

[0060] Sampling along P4: The first hop searches for directly guarantor-related enterprises along the guarantee edge from v to obtain N1. The second hop searches for other guarantor-related enterprises besides v along the guarantee edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P4. P4 (v);

[0061] For each meta-path P, the neighbor set N is... P Each node in (v) is connected to the target node v, and a star-shaped subgraph centered on v is constructed as the meta-path neighbor subgraph.

[0062] Preferably, in the path aggregation step, for the meta-path P, a path-specific representation vector m for the target node v is generated. v P Specifically, it includes:

[0063] For the target node v and each neighbor node N P (v), through the learnable weight matrix W P Perform linear transformations to obtain the hidden layer feature vector h. v = W P · x v h u h u = W P · x u ;

[0064] Where x v and x u These are the initial feature vectors of the target node and its neighboring nodes, respectively.

[0065] Through the learnable attention weight vector a P Calculate the unnormalized attention coefficient e of neighbor node u to target node v. vu = LeakyReLU( a P T · [h v || h u ] ), where || represents vector concatenation, and the negative slope of LeakyReLU is 0.2;

[0066] The unnormalized attention coefficients of all neighboring nodes of the target node v are normalized using the Softmax function to obtain the normalized attention weight α. vu = softmax_u(e vu ) = exp(e vu ) / Σ {k∈NP(v)} exp(e vk ) ;

[0067] Based on the normalized attention weight α vu For the hidden feature vector h of the neighboring nodes u After weighted summation and processing with the ELU activation function, the path-specific representation vector m of the target node v under the metapath P is obtained. v P = ELU(Σ {u∈NP(v)} α vu · h u ).

[0068] Preferably, in the path aggregation step, a multi-head attention mechanism is employed, executing K independent attention heads in parallel, each attention head using its own weight matrix W. P k and attention weight vector a P k An intermediate representation vector m is obtained through independent computation. v {P'(k)} The K intermediate representation vectors are concatenated to form the path-specific representation vector m. v P = || {k=1} K m v {P'(k)} Where K=4, each intermediate representation vector has a dimension of 128, and the concatenated path-specific representation vector has a dimension of 512. As an alternative, the average of the K heads is taken, m v P = (1 / K) Σ {k=1} K mv {P'(k)} .

[0069] Preferably, in the inter-path attention fusion and evaluation step, calculating the path-level attention weight β_P for each meta-path specifically includes:

[0070] For each meta-path P, its path-specific representation vector m_v^P is input into a single-layer neural network, and the unnormalized path-level attention score β is calculated. P ' = w path T · tanh( W path · m v P + b path ), where W path ∈ R {d _path × 512} b is a learnable weight matrix. path ∈ R {d_path} w is a learnable bias vector. path ∈ R {d_path} Here, is the learnable weight vector, and tanh is the hyperbolic tangent activation function;

[0071] The unnormalized attention scores of all meta-paths are normalized using the Softmax function to obtain the path-level attention weights β. P = exp(β P ') / Σ {Q∈{P1,P2,P3,P4}} exp(β Q ') ;

[0072] The path-specific representation vector m of each meta-path v P The enterprise comprehensive representation vector z is obtained by weighting and summing the corresponding path-level attention weights β_P. v = Σ {P∈{P1,P2,P3,P4}} β P · m v P .

[0073] Preferably, the explanatory information of the risk transmission path is generated in the following manner:

[0074] Choose β P The path with the highest value is identified as the primary source of risk.

[0075] Tracing back the α values ​​of each neighboring node in the main risk source path vu Choose α vu The two or three largest nodes serve as key points for risk transmission;

[0076] If the primary path is P1, then an explanatory text is generated that includes risk score, risk level, contribution percentage of supply chain path, and transmission chain from upstream supplier to target enterprise.

[0077] If the primary path is P2, then an explanatory text is generated that includes risk score, risk level, contribution percentage of the supply chain path under investment association, and transmission chain from the target company to the customer through the investee company.

[0078] If the main path is P3, then an explanatory text is generated that includes risk score, risk level, contribution ratio of capital influence path under competitive relationship, and transmission chain of competitors obtaining investment from investment institutions.

[0079] If the main path is P4, then an explanatory text is generated that includes risk score, risk level, contribution ratio of the guarantee chain path, and the transmission chain from the target company to the guarantee-related company through the intermediary company.

[0080] The explanation information is output in JSON format or as a card in the front-end interface.

[0081] Preferably, the auxiliary nodes include at least personal nodes and product nodes;

[0082] The individual nodes include legal representatives, shareholders, and senior executives, whose initial feature vectors are randomly initialized 128-dimensional embedding vectors and are updated during model training;

[0083] The initial feature vector of the product node is a randomly initialized 128-dimensional embedding vector and is updated during model training;

[0084] The various inter-firm relationships include at least investment relationships, supply relationships, guarantee relationships, and competitive relationships, and these inter-firm relationships are extracted in the following manner:

[0085] For investment relationships, scan the equity structure table. For each shareholding record, if the shareholding ratio is ≥10%, add a directed edge from the investor to the investee in the graph, with the edge weight being the shareholding ratio / 100.

[0086] For supply relationships, scan the supply chain invoice table and add directed edges in the direction from the supplier to the customer. The edge weight is the proportion of the supplier's annual transaction amount with that customer to the supplier's total transaction amount.

[0087] For guarantee relationships, scan the guarantee record table, add undirected edges, and fix the edge weight to 1;

[0088] For competitive relationships, for any two companies under the same four-digit industry code, calculate the cosine similarity of their main product names using TF-IDF vectors. If the similarity is ≥0.7, add an undirected edge with the edge weight being the similarity value.

[0089] The heterogeneous graph of the enterprise is stored using a heterogeneous graph data structure, which includes: a node feature matrix, used to store the initial feature vectors of all nodes, the node feature matrix having a dimension of (|V|, d), where |V| is the total number of nodes, d is the feature dimension, the feature dimension of enterprise nodes is d=7, and the feature dimension of auxiliary nodes is d=128; an edge index list, stored according to relation type, the edge index list of each relation type is a tensor of (2, |E_r|), where |E_r| is the total number of edges under that relation type, the first line of the tensor is the source node identifier of all edges, and the second line is the target node identifier of all edges; and an edge weight tensor, stored according to relation type, the edge weight tensor of each relation type is a tensor of |E_r| dimensions, storing the weight values ​​of all edges under that relation type in order.

[0090] Preferably, it also includes an end-to-end model training step:

[0091] The scoring network is a three-layer fully connected network, consisting of the following layers:

[0092] The first fully connected layer has 512-dimensional input and 64-dimensional output, with ReLU activation function and a Dropout ratio of 0.2.

[0093] The second fully connected layer has a 64-dimensional input and a 32-dimensional output, with ReLU activation function.

[0094] The third fully connected layer has a 32-dimensional input and a 1-dimensional output, with no activation function, and outputs the raw score: score_raw = MLP(z v The output layer maps the original score to the [0,1] interval using the Sigmoid function and then multiplies it by 100 to obtain a risk assessment score of 0-100: score = 100 × Sigmoid(score_raw) = 100 × (1 / (1 + exp(-score_raw))). Risk levels are then determined based on thresholds: score ≥ 70 is high risk, 50 ≤ score < 70 is medium risk, and score < 50 is low risk.

[0095] The total loss function during training is a weighted sum of the rating regression loss and the risk level classification loss, L_total = λ_reg·L_reg + λ_cls·L_cls, where the rating regression loss L_reg = (1 / N) Σ (score_pred -score_true) 2The mean squared error between the predicted and actual scores is the risk level classification loss L_cls = - (1 / N) Σ y_true · log(y_pred), and the cross-entropy between the predicted and actual risk levels is λ_reg=0.6, λ_cls=0.4.

[0096] The optimizer used is Adam, with an initial learning rate of 0.001 that decays to 0.9 times every 10 epochs. The training batch size is 32, and the maximum number of training epochs is 200. An early stopping strategy is adopted, where training stops if the validation set loss does not decrease for 10 consecutive epochs.

[0097] Beneficial effects

[0098] This invention provides a heterogeneous graph neural network-based enterprise risk assessment method with the following advantages:

[0099] 1. This invention can explicitly model the differences in risk transmission across different business relationship paths, improving the accuracy of risk assessment. Existing technologies treat investment, supply, and guarantee relationships equally, or differentiate them by learning a separate weight matrix for each relationship type. This fails to differentiate the risk transmission speed, intensity, and scope of impact across different semantic paths. In actual business, the risk of supply chain disruption may be transmitted to downstream enterprises in a short period, while the risk transmission of equity relationships usually takes longer. The risk transmission characteristics of different paths are fundamentally different. This invention predefines meta-paths with clear business semantics, independently designs graph attention networks for message passing and aggregation for each meta-path, and generates path-specific representation vectors. This allows the model to explicitly quantify the differentiated contribution of different semantic paths to the risk of the target enterprise. For example, when an upstream supplier experiences operational deterioration, this invention can accurately capture the risk and reflect it in the final score through independent aggregation of supply chain paths, without being overwhelmed by information from other paths, significantly improving the consistency between the assessment results and the actual situation.

[0100] 2. This invention achieves adaptive weighted fusion of multi-path information through a path-level attention mechanism, enabling dynamic adjustment of the contribution of each path based on the enterprise's specific business characteristics. Existing technologies, when processing multiple representation vectors generated from multiple meta-paths, employ fixed fusion strategies such as concatenation or summation, resulting in fixed weights for each meta-path. This fails to dynamically adjust the weights based on the enterprise's industry attributes, equity structure, and other business characteristics. This invention introduces a path-level attention mechanism. The path-specific representation vectors generated from multiple meta-paths are input into the attention layer. An automatically learnable weight matrix calculates the importance score of each meta-path, which is then normalized using Softmax to obtain the path-level attention weight. Weighted fusion is then performed based on this weight. This mechanism allows the model to adaptively adjust the contribution ratio of each path according to the specific business characteristics of the enterprise: for manufacturing enterprises, the model automatically increases the weight of the supply chain path; for subsidiaries controlled by a group, the model automatically increases the weight of the investment path; for enterprises in highly competitive industries, the model automatically increases the weight of the competition-capital path; and for enterprises with dense guarantee relationships, the model automatically increases the weight of the guarantee chain path. This adaptive fusion mechanism makes risk assessment more personalized and accurate, avoiding the loss of important information or noise amplification caused by fixed fusion strategies.

[0101] 3. It provides an explanation of risk transmission paths that are understandable at the business level, enhancing the usability and credibility of the assessment results.

[0102] Existing technologies only output a single risk score or risk category, leaving users unable to understand which business relationship chain the risk primarily originates from. In practical business scenarios such as credit approval and post-loan management, risk reviewers not only need to know "the company is risky," but also "where the risk comes from." This invention, while outputting the company's risk assessment score, also outputs the path-level attention weights of each meta-path as the contribution percentage of each path. Based on the meta-path with the highest weight, it traces back the attention weights within the path, identifies key neighbor nodes, and automatically matches the corresponding explanation template according to the meta-path type. This generates natural language explanation text containing the risk score, risk level, main risk source path and contribution percentage, and specific transmission chain, clearly informing users whether the risk primarily originates from the supply chain path, investment path, competition-capital path, or guarantee path, as well as the specific transmitting company. For example, when the risk mainly comes from the supply chain path, the system clearly outputs the transmission chain "upstream supplier B → target company A" and the supplier's operating status, enabling credit reviewers to understand "where the risk comes from" and take targeted risk mitigation measures accordingly, significantly improving the business guidance value and practical usability of the assessment results.

[0103] 4. Explicitly capturing accumulated risks along multi-hop semantic paths enhances the ability to identify distant risk sources. Existing technologies implicitly transmit information through multi-layer GNNs, which are insufficient for identifying distant risk sources, and distant information suffers from attenuation and loss during layer-by-layer propagation. Alternatively, multi-hop neighbors are obtained through meta-path sampling but only average pooling aggregation is used, failing to retain path order information and multi-hop cumulative effects. This invention uses predefined multi-hop meta-path templates to explicitly sample multi-hop neighbor nodes along specific semantic paths using a breadth-first search approach. During graph attention network aggregation, an attention mechanism distinguishes the importance differences of neighbors with different hop counts, preserving path order information, thereby achieving explicit modeling of the accumulation and amplification effects of risk during multi-hop propagation. For example, when the upstream supplier's upstream experiences operational deterioration, the risk is transmitted along the supply chain through intermediate enterprises to the target enterprise. This invention can explicitly capture this distant risk transmission chain through two-hop supply chain meta-paths, enabling the risk assessment model to "see" risk sources further away, compensating for the problem of layer-by-layer attenuation of distant information in traditional GNN implicit propagation, and enhancing the ability to identify distant risk sources.

[0104] 5. The multi-head attention mechanism enhances the expressive power and stability of path-specific aggregation. This invention employs a multi-head attention mechanism in the path-specific aggregation module, executing multiple independent attention heads in parallel. Each attention head independently calculates the attention distribution of neighboring nodes using its own learnable parameters, and the outputs of each head are concatenated to obtain the final path-specific representation vector. The multi-head mechanism enables the model to capture different feature dimensions of neighboring nodes from multiple subspaces simultaneously, effectively avoiding the feature loss or over-focus on a single dimension that may be caused by single-head attention, thus enhancing the expressive power and training stability of the model. In addition, this invention also provides averaging as an alternative, further enriching the implementation flexibility.

[0105] In summary, this invention, through a complete technical solution of "heterogeneous graph construction—multi-semantic meta-path definition and sampling—differential aggregation of multi-head GAT within a path—adaptive fusion of attention between paths—interpretable output—end-to-end joint training," effectively solves the core technical problems in existing technologies, such as the inability to differentiate the modeling of multi-semantic path risks, the lack of adaptability in multi-path information fusion, the lack of interpretability in evaluation results, and the insufficient ability to identify remote risk sources. It significantly improves the accuracy, adaptability, interpretability, and engineering practicality of enterprise risk assessment. Attached Figure Description

[0106] Figure 1 This is a diagram of the overall architecture of the present invention.

[0107] Figure 2 This is a schematic diagram of the meta-path sampling of the present invention.

[0108] Figure 3This is a structural diagram of the path aggregation module of the present invention. Detailed Implementation

[0109] The technical solutions of 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 embodiments of the present invention, and not all embodiments. 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.

[0110] Please see Figure 1-3 This invention provides a technical solution: a heterogeneous graph neural network-based enterprise risk assessment method based on meta-path awareness, characterized by comprising the following steps:

[0111] Data collection and preprocessing steps: Collect raw data from multiple enterprise sources, clean the raw data, fill in missing values, and standardize the format. Extract enterprise characteristics and various inter-enterprise relationships, output structured enterprise characteristic tables and relationship tables, and perform Min-Max normalization on all numerical indicators, using the following formula: x norm =(xx min ) / (x max -x min );

[0112] Among them, mapping to the [0,1] interval, Z-score standardization is used as an alternative for indicators without clear upper and lower bounds;

[0113] Heterogeneous graph construction steps: Using enterprises as core nodes, combined with auxiliary nodes, and the relationships in the relationship table as edges, construct an enterprise heterogeneous graph containing multiple node types and multiple edge types, and generate an initial feature vector for each node;

[0114] Meta-path definition and sampling steps: Predefine several meta-paths with business semantics. Each meta-path is a multi-hop relation path template composed of node type and relation type. For each target enterprise node, perform multi-hop neighbor sampling along each meta-path to obtain the meta-path neighbor subgraph corresponding to each meta-path.

[0115] Intra-path aggregation step: For each meta-path, a graph attention network (GAT) is used to aggregate the feature information of each neighbor node in the meta-path neighbor subgraph to the target enterprise node, generating a path-specific representation vector corresponding to the meta-path.

[0116] The aggregation includes: performing linear transformations h on the target node and its neighboring nodes respectively. v = W P · x v h u = WP · x u The unnormalized attention coefficient e is calculated using the attention weight vector. vu = LeakyReLU( a P T · [h v ||h u ] ), and normalized to α using the Softmax function. vu = softmax_u(e vu ) = exp(e vu ) / Σ {k∈NP(v)} exp(e vk The features of neighboring nodes are weighted and summed based on normalized attention weights and then processed by the ELU activation function. Different meta-paths perform aggregation operations independently.

[0117] Inter-path attention fusion and evaluation steps: Treat the path-specific representation vectors corresponding to multiple meta-paths as independent perspectives representing risk features of different semantic dimensions, input them into the path-level attention mechanism layer, and calculate the path-level attention weight β for each meta-path. P = exp(β P ') / Σ {Q∈{P1,P2,P3,P4}} exp(β Q '), where β P ' = w path T · tanh(W path · m v P + b path The attention weights are used to weight and fuse the path-specific representation vectors of each path to generate a comprehensive enterprise representation vector z. v = Σ {P∈{P1,P2,P3,P4}} β P · m v P The enterprise comprehensive representation vector is input into the scoring network, which outputs the enterprise risk assessment score and the attention weights of each meta-path as explanatory information for the risk transmission path. For numerical indicators without clear upper and lower bounds, Z-score standardization is used as an alternative to Min-Max normalization. The formula for calculating Z-score standardization is as follows:

[0118] x_std = (x - μ) / σ

[0119] Where μ is the mean of the numerical indicator across all enterprise samples, and σ is the standard deviation of the numerical indicator across all enterprise samples; the following four meta-paths are predefined in the meta-path definition and sampling steps:

[0120] The first element path P1, formally represented as (E, supply, E, supply, E), represents a two-hop supply chain path, where E is the enterprise node type and supply is the supply edge.

[0121] The second-order path P2, formalized as (E, invest, E, supply, E), represents the supply chain path under investment association, where invest is the investment edge;

[0122] The third path P3, formalized as (E, compete, E, invest_rev, E), represents the capital influence path under competitive relationships, where compete is the competitive edge and invest_rev is the reverse of the investment edge.

[0123] The fourth meta-path P4, formalized as (E, guarantee, E, guarantee, E), represents a two-hop guarantee chain path, where guaranteeee is the guarantee edge. In the meta-path definition and sampling steps, for each target enterprise node v, multi-hop neighbor sampling is performed along the four meta-paths using a breadth-first search approach.

[0124] Sampling along P1: The first hop searches for downstream customers along the supply edge from v to obtain N1. The second hop searches for downstream customers along the supply edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P1. P1 (v);

[0125] Sampling along P2: The first hop is to find the invested enterprise N1 along the investment edge from v. The second hop is to find the downstream customer N2 along the supply edge from each node in N1. N2 is then used as the neighbor set N of P2. P2 (v);

[0126] Sampling along P3: The first hop searches for competitors along the competing edge from v to obtain N1. The second hop searches for investor companies along the reverse of the investment edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P3. P3 (v);

[0127] Sampling along P4: The first hop searches for directly guarantor-related enterprises along the guarantee edge from v to obtain N1. The second hop searches for other guarantor-related enterprises besides v along the guarantee edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P4. P4 (v);

[0128] For each meta-path P, the neighbor set N is... PEach node in (v) is connected to the target node v, constructing a star-shaped subgraph centered on v, which serves as the meta-path neighbor subgraph; in the path aggregation step, for the meta-path P, a path-specific representation vector m for the target node v is generated. v P Specifically, it includes:

[0129] For the target node v and each neighbor node N P (v), through the learnable weight matrix W P Perform linear transformations to obtain the hidden layer feature vector h. v = W P · x v h u h u = W P · x u ;

[0130] Where x v and x u These are the initial feature vectors of the target node and its neighboring nodes, respectively.

[0131] Through the learnable attention weight vector a P Calculate the unnormalized attention coefficient e of neighbor node u to target node v. vu = LeakyReLU( a P T · [h v || h u ] ), where || represents vector concatenation, and the negative slope of LeakyReLU is 0.2;

[0132] The unnormalized attention coefficients of all neighboring nodes of the target node v are normalized using the Softmax function to obtain the normalized attention weight α. vu = softmax_u(e vu ) = exp(e vu ) / Σ {k∈NP(v)} exp(e vk ) ;

[0133] Based on the normalized attention weight α vu For the hidden feature vector h of the neighboring nodes u After weighted summation and processing with the ELU activation function, the path-specific representation vector m of the target node v under the metapath P is obtained. v P = ELU(Σ {u∈NP(v)} α vu · h uIn the path aggregation step, a multi-head attention mechanism is used, executing K independent attention heads in parallel, each attention head using its own weight matrix W. P k and attention weight vector a P k An intermediate representation vector m is obtained through independent computation. v {P'(k)} The K intermediate representation vectors are concatenated to form the path-specific representation vector m. v P = || {k=1} K m v {P'(k)} Where K=4, each intermediate representation vector has a dimension of 128, and the concatenated path-specific representation vector has a dimension of 512. As an alternative, the average of the K heads is taken, m v P = (1 / K) Σ {k=1} K m v {P'(k)} In the inter-path attention fusion and evaluation step, calculating the path-level attention weight β_P for each meta-path specifically includes:

[0134] For each meta-path P, its path-specific representation vector m_v^P is input into a single-layer neural network, and the unnormalized path-level attention score β is calculated. P ' = w path T · tanh( W path · m v P + b path ), where W path ∈ R {d _path × 512} b is a learnable weight matrix. path ∈ R {d_path} w is a learnable bias vector. path ∈ R {d_path} Here, is the learnable weight vector, and tanh is the hyperbolic tangent activation function;

[0135] The unnormalized attention scores of all meta-paths are normalized using the Softmax function to obtain the path-level attention weights β. P = exp(β P ') / Σ {Q∈{P1,P2,P3,P4}} exp(β Q ');

[0136] The path-specific representation vector m of each meta-pathv P The enterprise comprehensive representation vector z is obtained by weighting and summing the corresponding path-level attention weights β_P. v = Σ {P∈{P1,P2,P3,P4}} β P · m v P The explanatory information for the risk transmission path is generated in the following manner:

[0137] Choose β P The path with the highest value is identified as the primary source of risk.

[0138] Tracing back the α values ​​of each neighboring node in the main risk source path vu Choose α vu The two or three largest nodes serve as key points for risk transmission;

[0139] If the primary path is P1, then an explanatory text is generated that includes risk score, risk level, contribution percentage of supply chain path, and transmission chain from upstream supplier to target enterprise.

[0140] If the primary path is P2, then an explanatory text is generated that includes risk score, risk level, contribution percentage of the supply chain path under investment association, and transmission chain from the target company to the customer through the investee company.

[0141] If the main path is P3, then an explanatory text is generated that includes risk score, risk level, contribution ratio of capital influence path under competitive relationship, and transmission chain of competitors obtaining investment from investment institutions.

[0142] If the main path is P4, then an explanatory text is generated that includes risk score, risk level, contribution ratio of the guarantee chain path, and the transmission chain from the target company to the guarantee-related company through the intermediary company.

[0143] The explanation information shall be output in JSON format or in the form of front-end interface cards; the auxiliary nodes shall include at least personal nodes and product nodes.

[0144] The individual nodes include legal representatives, shareholders, and senior executives, whose initial feature vectors are randomly initialized 128-dimensional embedding vectors and are updated during model training;

[0145] The initial feature vector of the product node is a randomly initialized 128-dimensional embedding vector and is updated during model training;

[0146] The various inter-firm relationships include at least investment relationships, supply relationships, guarantee relationships, and competitive relationships, and these inter-firm relationships are extracted in the following manner:

[0147] For investment relationships, scan the equity structure table. For each shareholding record, if the shareholding ratio is ≥10%, add a directed edge from the investor to the investee in the graph, with the edge weight being the shareholding ratio / 100.

[0148] For supply relationships, scan the supply chain invoice table and add directed edges in the direction from the supplier to the customer. The edge weight is the proportion of the supplier's annual transaction amount with that customer to the supplier's total transaction amount.

[0149] For guarantee relationships, scan the guarantee record table, add undirected edges, and fix the edge weight to 1;

[0150] For competitive relationships, for any two companies under the same four-digit industry code, calculate the cosine similarity of their main product names using TF-IDF vectors. If the similarity is ≥0.7, add an undirected edge with the edge weight being the similarity value.

[0151] The heterogeneous graph of the enterprise is stored using a heterogeneous graph data structure, which includes: a node feature matrix, used to store the initial feature vectors of all nodes, the node feature matrix having dimensions of (|V|, d), where |V| is the total number of nodes, d is the feature dimension, the feature dimension of enterprise nodes is d=7, and the feature dimension of auxiliary nodes is d=128; an edge index list, stored according to relation type, each relation type's edge index list is a (2, |E_r|) tensor, where |E_r| is the total number of edges under that relation type, the first line of the tensor is the source node identifier of all edges, and the second line is the target node identifier of all edges; an edge weight tensor, stored according to relation type, each relation type's edge weight tensor is a |E_r| dimensional tensor, storing the weight values ​​of all edges under that relation type in sequence; and an end-to-end model training step.

[0152] The scoring network is a three-layer fully connected network, consisting of the following layers:

[0153] The first fully connected layer has 512-dimensional input and 64-dimensional output, with ReLU activation function and a Dropout ratio of 0.2.

[0154] The second fully connected layer has a 64-dimensional input and a 32-dimensional output, with ReLU activation function.

[0155] The third fully connected layer has a 32-dimensional input and a 1-dimensional output, with no activation function, and outputs the raw score: score_raw = MLP(z vThe output layer maps the original score to the [0,1] interval using the Sigmoid function and then multiplies it by 100 to obtain a risk assessment score of 0-100: score = 100 × Sigmoid(score_raw) = 100 × (1 / (1 + exp(-score_raw))). Risk levels are then determined based on thresholds: score ≥ 70 is high risk, 50 ≤ score < 70 is medium risk, and score < 50 is low risk.

[0156] The total loss function during training is a weighted sum of the rating regression loss and the risk level classification loss, L_total = λ_reg·L_reg + λ_cls·L_cls, where the rating regression loss L_reg = (1 / N) Σ (score_pred -score_true) 2 The mean squared error between the predicted and actual scores is the risk level classification loss L_cls = - (1 / N) Σ y_true · log(y_pred), and the cross-entropy between the predicted and actual risk levels is λ_reg=0.6, λ_cls=0.4.

[0157] The optimizer used is Adam, with an initial learning rate of 0.001 that decays to 0.9 times every 10 epochs. The training batch size is 32, and the maximum number of training epochs is 200. An early stopping strategy is adopted, where training stops if the validation set loss does not decrease for 10 consecutive epochs.

[0158] Those skilled in the art can connect the components in this case sequentially. The specific connection and operation sequence should refer to the working principle described below. The detailed connection methods are well-known technologies in the field. The working principle and process are mainly described below.

[0159] Example: This example provides a heterogeneous graph neural network-based enterprise risk assessment method based on meta-path awareness, which is implemented collaboratively by the following five core modules:

[0160] (1) Data acquisition and preprocessing module;

[0161] (2) Heterogeneous graph construction module;

[0162] (3) Metapath definition and sampling module;

[0163] (4) In-path aggregation module;

[0164] (5) Inter-path attention fusion and evaluation module. The technical implementation of each module will be described in detail below with reference to the attached figures.

[0165] Step 1: Data Acquisition and Preprocessing

[0166] This step is performed by the data acquisition and preprocessing module. Its functional goal is to clean and standardize enterprise data from different data sources and convert them into a unified format to provide high-quality input for subsequent heterogeneous graph construction.

[0167] 1.1 Multi-source data access

[0168] A unified data access interface is designed to support JDBC connections to relational databases, RESTful API retrieval of cloud data, and batch import of Excel / CSV files. The collected data includes:

[0169] (1) Enterprise business information: enterprise name, unified social credit code, registered capital, date of establishment, industry classification, registered address, and business status.

[0170] (2) Financial statements: annual revenue, net profit, total assets, total liabilities, debt-to-equity ratio, current ratio, and total asset turnover.

[0171] (3) Shareholding structure: Shareholder name, shareholder type, shareholding ratio, subscribed capital.

[0172] (4) Supply chain invoices: supplier name, customer name, annual transaction amount, and category of goods traded.

[0173] (5) Guarantee record: name of the guarantor, name of the guaranteed company, amount of guarantee, guarantee period, and guarantee method.

[0174] 1.2 Data Cleaning and Missing Data Handling

[0175] For numerical fields such as revenue, profit, and debt-to-equity ratio, calculate the mean and median of this field across all enterprises. If the missing value rate is less than 30%, use the median to fill in the missing values; if the missing value rate is greater than 30%, mark it as unsuitable and set it to zero in subsequent features.

[0176] For categorical fields, such as industry classification, count the most frequently occurring categories and fill in the missing values ​​with the mode.

[0177] For abnormal records that cannot be filled, such as when the key field "Unified Social Credit Code" is empty, they are marked and moved to the abnormal queue, and the system interface prompts the user to manually review or supplement them.

[0178] Duplicate records are detected using the "Unified Social Credit Code" as the primary key. If the code is empty, a fuzzy match is performed using the company name and registered address. If the edit distance is ≤3, the record with the latest update time is retained, and the rest are marked as redundant.

[0179] 1.3 Format Standardization

[0180] The company name should be the full name registered with the Administration for Industry and Commerce, removing abbreviated variations such as Limited Liability Company or Joint-Stock Company.

[0181] Industry classifications are uniformly mapped to the four-digit codes of GB / T 4754-2017 "National Economic Industry Classification", for example, information technology services are mapped to I6500.

[0182] Date fields are uniformly formatted as YYYY-MM-DD, and the year of establishment is automatically calculated based on the current date and the establishment date (in years).

[0183] Equity ratios are uniformly expressed as percentages (0-100), and supply chain transaction amounts are uniformly expressed in ten thousand yuan.

[0184] 1.4 Feature Normalization

[0185] Min-Max normalization is performed on all numerical indicators, using the following formula:

[0186] x norm = (x - x min ) / (x max - x min ), mapped to the [0,1] interval. For indicators without clear upper and lower bounds, Z-score standardization is used as an alternative: x_std = (x - μ) / σ, where μ is the mean and σ is the standard deviation.

[0187] 1.5 Output Data Table

[0188] Two tables are output after preprocessing:

[0189] Enterprise Characteristics Table: Each row contains one enterprise, and the columns include the seven normalized core characteristics: registered capital, years of establishment, annual revenue, net profit, debt-to-equity ratio, current ratio, number of employees, and other auxiliary fields.

[0190] Relationship table: Each row contains one relationship record, including source node ID, target node ID, relationship type (investment / supply / guarantee / competition), and relationship weight.

[0191] Step 2: Heterogeneous Graph Construction

[0192] This step is performed by the heterogeneous graph construction module. Its functional goal is to construct a heterogeneous graph G = (V, E, R) from the preprocessed enterprise data and inter-enterprise relationships, where V is the set of nodes, E is the set of edges, and R is the set of relationship types.

[0193] 2.1 Node Definition and Feature Initialization

[0194] Enterprise Nodes: Enterprise nodes are identified using the unified social credit code or a system-generated enterprise ID. Each enterprise node has an initial feature vector x. v ∈ R 7 It consists of the following 7 dimensions: registered capital (normalized), years of establishment (normalized), annual revenue (normalized), net profit (normalized), debt-to-equity ratio (normalized), current ratio (normalized), and number of employees (normalized).

[0195] Individual nodes: including legal representatives, shareholders, and senior executives. The initial feature vector of each individual node is a randomly initialized 128-dimensional embedding vector, which is updated during model training.

[0196] Product nodes are extracted from the descriptions of the company's main products. The initial feature vector of each product node is a randomly initialized 128-dimensional embedding vector, which is updated during model training.

[0197] The introduction of auxiliary nodes can enrich the semantic information of the graph, for example, by identifying competitive relationships through the path "enterprise—production → product ← production—enterprise".

[0198] 2.2 Edge Definition and Relation Extraction

[0199] Define the following four core relation types:

[0200] The investment relationship is represented by directed edges, with the direction pointing from the investor to the investee. During extraction, the equity structure table is scanned. For each shareholding record, if the shareholding ratio is greater than or equal to 10%, a directed edge is added to the graph pointing from the investor to the investee, with the edge weight being the shareholding ratio divided by 100.

[0201] The supply relationship is represented by directed edges, with the direction from supplier to customer. During extraction, the supply chain invoice table is scanned, and directed edges are added in the direction from supplier to customer. The edge weight is the proportion of that supplier's annual transaction amount with that customer to that supplier's total transaction amount.

[0202] The guarantee relationship is an undirected edge. During extraction, the guarantee record table is scanned. If company A provides a guarantee for company B, an undirected edge is added with a fixed edge weight of 1.

[0203] The competitive relationship is represented by undirected edges. During extraction, for any two companies under the same four-digit industry code, the cosine similarity of their main product names' TF-IDF vectors is calculated. If the similarity is greater than or equal to 0.7, an undirected edge is added, with the edge weight being the similarity value.

[0204] 2.3 Graph Data Structure Storage

[0205] A heterogeneous graph data structure is used for storage: the node feature matrix is ​​used to store the initial feature vectors of all nodes, and each relation type stores a separate edge index list and the corresponding edge weight tensor. Each row of the edge index list corresponds to the source node identifier and the target node identifier of an edge.

[0206] Step 3: Metapath Definition and Sampling

[0207] This step is performed by the meta-path definition and sampling module. Its functional goal is to predefine meta-paths with clear business semantics and sample multi-hop neighbor nodes along each meta-path for each target enterprise to construct a meta-path neighbor subgraph.

[0208] 3.1 Metapath Definition

[0209] This embodiment predefines the following four meta-paths, each corresponding to a specific risk transmission mode:

[0210] The first-order path P1 is a two-hop supply chain path, formally represented as (E, supply, E, supply, E), where E represents the enterprise node type and supply represents the supply edge (directed). The business meaning of this path is "enterprise → supply → enterprise → supply → enterprise", indicating that if the upstream supplier's supplier has operational problems, the risk is transmitted downstream along the supply chain, and may be amplified or attenuated through intermediate enterprises.

[0211] The second-order path P2 is a supply chain path under investment relationships, formally represented as (E, invest, E, supply, E), where invest represents the investment edge (directed). The business meaning of this path is "enterprise → investment → enterprise → supply → enterprise", indicating that the parent company has invested in a certain enterprise, and when the enterprise's customers encounter risks, it may affect the parent company in reverse through the investment relationship.

[0212] The third-order path P3 is a capital influence path under competitive relationships, formally represented as (E, compete, E, invest_rev, E), where compete represents the competition edge (undirected) and invest_rev represents the reverse of the investment edge (i.e., the investee points to the investor). The business meaning of this path is "firm → competition → firm ← investment — firm", indicating that a competitor has received investment from an investment institution, which may enhance its market competitiveness and squeeze the target firm.

[0213] The fourth path P4 is a two-hop guarantee chain path, formally represented as (E, guarantee, E, guaranteeee, E), where guaranteeee represents the guarantee edge (undirected). The business meaning of this path is "enterprise → guarantee → enterprise → guarantee → enterprise", indicating that a default by any enterprise in the guarantee chain may trigger a chain reaction, causing other enterprises in the chain to bear joint liability.

[0214] 3.2 Metapath Neighbor Sampling

[0215] For each target enterprise node v, perform multi-hop neighbor sampling along the four meta-paths mentioned above using a breadth-first search approach:

[0216] P1 Sampling: Two-hop Supply Chain Path

[0217] First hop: Starting from v, find all downstream customers along the supply edge (direction: supplier → customer) to obtain the first hop neighbor set N1 = { u | v → supply u}.

[0218] Second hop: For each u∈N1, find the downstream customer of u along the supply edge to obtain the second hop neighbor set N2 = { w| u → supply w, u∈N1}.

[0219] Add all nodes in N2 to the neighbor set N of P1. P1 (v). If a node appears repeatedly, keep it only once.

[0220] P2 Sampling: Investment-Supply Path

[0221] First hop: Starting from v, search for all invested companies along the investment edge (direction: investor → investee), and obtain the first hop neighbor set N1 = { u | v → invest u}.

[0222] Second hop: For each u∈N1, find the downstream customer of u along the supply edge (direction: supplier → customer) to obtain the second hop neighbor set N2 = { w | u → supply w, u∈N1}.

[0223] Add all nodes in N2 to N. P2 (v).

[0224] P3 Sampling (Competition-Capital Path):

[0225] First hop: Starting from v, search for all competitors along the competition edge (undirected) to obtain the first hop neighbor set N1 = { u | v — compete — u}.

[0226] Second hop: For each u∈N1, search for the enterprise that invests in u along the reverse of the investment edge (i.e., investee → investor), and obtain the second hop neighbor set N2 = { w | w → invest u, u∈N1}.

[0227] Add all nodes in N2 to N. P3 (v).

[0228] P4 Sampling: Two-hop Suppression Chain Path:

[0229] First hop: Starting from v, search for all directly guaranteed related enterprises along the guarantee edge (undirected), and obtain the first hop neighbor set N1 = { u | v — guarantee — u}.

[0230] Second hop: For each u∈N1, search for other guaranteeing companies associated with u along the guarantee edge (excluding v itself), and obtain the second hop neighbor set N2 = { w | u — guarantee — w, w≠v, u∈N1}.

[0231] Add all nodes in N2 to N. P4 (v).

[0232] 3.3 Neighbor Feature Extraction

[0233] For each sampled neighbor node, extract its initial feature vector x. u :

[0234] If the node type is an enterprise node: x u This is the normalized 7-dimensional feature vector.

[0235] If the node type is a personal or product node: x u A randomly initialized 128-dimensional embedding vector is used as a learnable parameter during model training.

[0236] 3.4 Constructing the Meta-Path Neighbor Subgraph

[0237] For each metapath P, set its neighbor set N. PAll nodes in (v) are connected to the target node v, forming a star-shaped subgraph centered at v, which is used for subsequent path aggregation. The edge weights in the subgraph are inherited from the edge weights in the original graph.

[0238] Step 4: Intra-path aggregation

[0239] This step is performed by the path aggregation module, and its functional goal is to use a graph attention network (GAT) to aggregate N for each meta-path P. P The feature information of neighboring nodes in (v) is aggregated into the target node v to generate the path-specific representation vector m under this metapath. v P .

[0240] This module uses Graph Attention Network (GAT) as the basic model for path aggregation. The core idea of ​​GAT is to learn different attention weights for different neighbor nodes, rather than using fixed normalization coefficients like traditional GCN. For a meta-path P, its neighbor subgraph can be regarded as an isomorphic graph. Since the semantics of node type and edge type are fixed for path P, GAT can be applied directly.

[0241] 4.1 Linear Transformation of Neighbor Characteristics

[0242] For the target node v and each of its neighbor nodes u∈N P (v), respectively, perform linear transformations to map the input features to a high-dimensional latent space:

[0243] h v = W P · x v h u = W P · x u

[0244] Where: x v ∈ R {d_in} The initial feature vector of the target node v (d_in=7 or 128, depending on the node type), x u ∈ R {d_in} W is the initial feature vector of neighbor node u. P ∈ R {d_h × d_in} Here is the learnable weight matrix (d_h=128) corresponding to the metapath P, h v , h u ∈ R {d_h} The eigenvectors after linear transformation.

[0245] For enterprise nodes, d_in=7; for individual or product nodes, d_in=128.

[0246] W PThe dimensions will automatically adapt to the input dimensions, and the dimensions can be unified through zero padding or projection layers.

[0247] 4.2 Attention Coefficient Calculation

[0248] Calculate the original attention coefficient (scalar) of neighbor node u to target node v, representing the importance of u's information to v:

[0249] e vu = LeakyReLU( a P T · [h v || h u ] )

[0250] Where: || represents the vector concatenation operation, [h v || h u ] ∈ R {2*d_h}

[0251] This is the attention weight vector corresponding to the meta-path P;

[0252] LeakyReLU is a modified linear unit activation function with leakage, and its negative slope is 0.2.

[0253] e vu Let be a scalar representing the unnormalized attention score.

[0254] 4.3 Attention Coefficient Normalization

[0255] The attention coefficients of all neighbors of the target node v are normalized using the Softmax function, so that the sum of the attention weights of all neighbors is 1:

[0256] α vu = softmax_u(e vu ) = exp(e vu ) / Σ {k∈NP(v)} exp(e vk )

[0257] Where α vu ∈ [0,1] and Σ {u∈NP(v)} α_vu = 1. This patent uses the standard GAT design and does not include the target node itself.

[0258] 4.4 Feature-weighted aggregation

[0259] The feature vectors of neighboring nodes are summed by attention weights, and the intermediate value of the path-specific representation vector is obtained by passing the ELU activation function:

[0260] m v P= ELU( Σ {u∈NP(v)} α vu · h u )

[0261] Where ELU is the exponential linear unit activation function, the formula is: ELU(z) = z if z>0 else α(e z -1), in this embodiment, α=1.0.

[0262] 4.5 Bullish Attention

[0263] To enhance the model's expressiveness and stability, a K-head attention mechanism (K=4) is employed. Each attention head independently executes steps 4.1 to 4.4, using its own W... P k and a P k Parameters. The outputs of the K heads are concatenated to obtain the final path-specific representation vector:

[0264] m v P = || {k=1} K m v {P'(k)} Where || denotes vector concatenation, and m v {P'(k)} ∈ R {d_h} (d_h=128), then m v P ∈ R {K*d_h} = R {512} .

[0265] As an alternative, in a simplified scenario, the average of the K heads can also be taken: m v P = (1 / K) Σ {k=1} K m v {P'(k)} At this point, the output dimension is d_h=128.

[0266] 4.6 Repeat for each metapath

[0267] Performing steps 4.1 to 4.5 independently yields the path-specific representation vectors for the four meta-paths: m v P1 , m v P2 , m v P3 , m v P4 The splicing scheme is adopted, with each element having 512 dimensions.

[0268] Step 5: Inter-path attention fusion and evaluation

[0269] This step is performed by the inter-path attention fusion and evaluation module. Its functional goal is to adaptively weight and fuse the path-specific representation vectors of the four meta-paths to generate a comprehensive enterprise representation vector, output the enterprise risk assessment score, and provide an explanation of the risk transmission path.

[0270] 5.1 Path-level attention weight calculation

[0271] The path-specific representation vectors m of the four meta-paths v P1 , m v P2 , m v P3 , m v P4 Each of the 512 dimensions is considered as four different "views" or "perspectives," with each perspective capturing risk characteristics under different semantic paths. A path-level attention mechanism is introduced to automatically learn the importance weight of each meta-path to the current enterprise risk assessment task.

[0272] First, for each meta-path P, calculate its unnormalized attention score:

[0273] β P ' = w path T · tanh( W path · m v P + b path )

[0274] Among them: W path ∈ R {d_path × 512} For the learnable weight matrix (d_path=128), b path ∈ R {d_path} Let w be a learnable bias vector, tanh be the hyperbolic tangent activation function, and w be the bias vector. path ∈ R {d_path} For a learnable weight vector, β P '∈ R is a scalar representing the unnormalized importance score of the metapath P.

[0275] Then, the scores of the four metapaths are normalized using the Softmax function to obtain the path-level attention weights:

[0276] β P = exp(β P ') / Σ {Q∈{P1,P2,P3,P4}} exp(β Q ')

[0277] Where β P ∈ [0,1] and Σβ P = 1. β P The larger the value, the more important the meta-path P is to the current enterprise's risk assessment.

[0278] 5.2 Weighted Fusion to Generate Comprehensive Representation Vector

[0279] The enterprise-wide comprehensive representation vector is obtained by summing the path-specific representation vectors according to their attention weights.

[0280] z v = Σ {P∈{P1,P2,P3,P4}} β P · m v P

[0281] Where z v ∈ R {512} It integrates information from four meta-paths, and the contribution of different paths is adaptively adjusted by attention weights.

[0282] 5.3 Risk Assessment Score Output

[0283] The comprehensive representation vector z v Input a three-layer fully connected network (Multilayer Perceptron MLP) for scoring regression:

[0284] First layer: Fully connected layer, 512-dimensional input, 64-dimensional output, ReLU activation function, with Dropout (scale 0.2) to prevent overfitting.

[0285] The second layer is a fully connected layer with 64-dimensional input and 32-dimensional output, and the activation function is ReLU.

[0286] The third layer is a fully connected layer with 32-dimensional input and 1-dimensional output, and no activation function.

[0287] Output layer: The raw score output from the third layer is mapped to the [0,1] interval using the Sigmoid function, and then multiplied by 100 to obtain a risk assessment score of 0-100.

[0288] score_raw = MLP(z v ) (Formula 10)

[0289] score = 100 × Sigmoid(score_raw) = 100 × (1 / (1 + exp(-score_raw)))

[0290] A higher score indicates a higher risk. Risk levels are also categorized based on preset thresholds.

[0291] High risk: score ≥ 70

[0292] Medium risk: 50 ≤ score < 70

[0293] Low risk: score < 50

[0294] 5.4 Risk Transmission Path Explanation and Generation

[0295] This embodiment provides interpretable output, specifically including:

[0296] 5.4.1 Output Path-Level Attention Weights: The β weights of each meta-path in the system output. P Values ​​are displayed as bars or percentages. For example:

[0297] P1 (Supply Chain Path): β = 0.52 (52%)

[0298] P2 (Investment-Supply Path): β = 0.23 (23%)

[0299] P3 (Competition-Capital Path): β = 0.15 (15%)

[0300] P4 (Security Chain Path): β = 0.10 (10%)

[0301] 5.4.2 Identify the main risk source path: Select the meta-path with the largest β_P as the main risk source path.

[0302] 5.4.3 Backtracking Key Neighbor Nodes: For the main risk source path, the attention weight α of each neighbor node u to the target node v has been calculated in the path aggregation module. vu The system selects α. vu The two or three largest neighboring nodes serve as key nodes for risk transmission.

[0303] 5.4.4 Generate a propagation chain description: Based on the meta-path template and key neighbor nodes, generate a natural language explanation text. For example:

[0304] If the main path is P1 (supply chain path) and the key neighbor is upstream supplier B, then the output is: "The company's risk score is 78 (high risk), and the main source of risk is the supply chain path (contributing 52%). The specific transmission chain is: upstream supplier B → target company A. Supplier B's recent revenue has decreased by 30% year-on-year, which may affect the stability of its supply to A."

[0305] If the main path is P2 (investment-supply path) and the key neighbor is customer F, then the output is: "The enterprise's risk score is 65 (medium risk). The main source of risk is the supply chain path under the investment relationship (contributing 45%). The specific transmission chain is: target enterprise A → invested enterprise E → customer F. The operating fluctuations of customer F may indirectly affect A through E."

[0306] If the main path is P3 (competition-capital path) and the key neighbor is investor H, then the output is: "The company's risk score is 72 (high risk). The main source of risk is the capital influence path under competitive relationship (contributing 48%). The specific transmission chain is: competitor G receives investment from investment institution H, which may enhance G's market competitiveness and squeeze out A."

[0307] If the main path is P4 (guarantee chain path) and the key neighbor is the guarantor-related enterprise J, then the output is: "The enterprise's risk score is 81 (high risk), and the main source of risk is the guarantee chain path (contributing 55%). The specific transmission chain is: A→I→J. Enterprise J in the guarantee chain has recently defaulted on a loan, which may trigger A's joint guarantee liability."

[0308] 5.4.5 Output Format: The system outputs the above explanation in JSON format or in the form of cards on the front-end interface for use by credit reviewers and risk control analysts.

[0309] Step Six: Model Training

[0310] The entire network is trained in an end-to-end manner, and the loss function consists of two parts:

[0311] Rating Regression Loss: Mean Squared Error (MSE), calculated as the error between predicted and actual ratings, based on historical default rates.

[0312] L_reg = (1 / N) Σ (score_pred - score_true) 2

[0313] Risk level classification loss: Cross-entropy, which maps predicted scores to low / medium / high categories and compares them with the true risk level.

[0314] L_cls = - (1 / N) Σ y_true · log(y_pred)

[0315] The total loss is the weighted sum of the two: L_total = λ_reg·L_reg + λ_cls·L_cls, where in this embodiment, λ_reg = 0.6 and λ_cls = 0.4.

[0316] The training data uses enterprise samples with labeled default records or expert ratings. The optimizer is Adam, with an initial learning rate of 0.001, which decays to 0.9 times the original rate every 10 epochs. The training batch size is 32, the maximum epochs are 200, and an early stopping strategy is adopted: training stops if the validation set loss does not decrease for 10 consecutive epochs.

[0317] Through the above steps, this embodiment realizes a complete process from multi-source data input to risk assessment scores and interpretability output, effectively solving technical problems in existing technologies such as the inability to differentiate and aggregate risks from multiple semantic paths, the inability to adaptively fuse multi-path information, and the lack of interpretability in assessment results.

[0318] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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. Without further limitations, the phrase "comprising an element defined as..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0319] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A heterogeneous graph neural network-based enterprise risk assessment method, characterized in that, Includes the following steps: Data collection and preprocessing steps: Collect raw data from multiple enterprise sources, clean the raw data, fill in missing values, and standardize the format. Extract enterprise characteristics and various inter-enterprise relationships, output structured enterprise characteristic tables and relationship tables, and perform Min-Max normalization on all numerical indicators, using the following formula: x norm = (x - x min ) / (x max - x min ) ; Among them, mapping to the [0,1] interval, Z-score standardization is used as an alternative for indicators without clear upper and lower bounds; Heterogeneous graph construction steps: Using enterprises as core nodes, combined with auxiliary nodes, and the relationships in the relationship table as edges, construct an enterprise heterogeneous graph containing multiple node types and multiple edge types, and generate an initial feature vector for each node; Meta-path definition and sampling steps: Predefine several meta-paths with business semantics. Each meta-path is a multi-hop relation path template composed of node type and relation type. For each target enterprise node, perform multi-hop neighbor sampling along each meta-path to obtain the meta-path neighbor subgraph corresponding to each meta-path. Intra-path aggregation step: For each meta-path, a graph attention network (GAT) is used to aggregate the feature information of each neighbor node in the meta-path neighbor subgraph to the target enterprise node, generating a path-specific representation vector corresponding to the meta-path. The aggregation includes: performing linear transformations h on the target node and its neighboring nodes respectively. v = W P · x v h u = W P ·x u The unnormalized attention coefficient e is calculated using the attention weight vector. vu = LeakyReLU( a P T · [h v || h u ]), and normalized to α using the Softmax function. vu = softmax_u(e vu ) = exp(e vu ) / Σ {k∈NP(v)} exp(e vk The features of neighboring nodes are weighted and summed based on normalized attention weights and then processed by the ELU activation function. Different meta-paths perform aggregation operations independently. Inter-path attention fusion and evaluation steps: Treat the path-specific representation vectors corresponding to multiple meta-paths as independent perspectives representing risk features of different semantic dimensions, input them into the path-level attention mechanism layer, and calculate the path-level attention weight β for each meta-path. P = exp(β P ') / Σ {Q∈{P1,P2,P3,P4}} exp(β Q '), where β P ' = w path T · tanh( W path ·m v P + b path The attention weights are used to weight and fuse the path-specific representation vectors of each path to generate a comprehensive enterprise representation vector z. v = Σ {P∈{P1,P2,P3,P4}} β P · m v P The enterprise comprehensive representation vector is input into the scoring network, which outputs the enterprise risk assessment score and the attention weights of each meta-path as explanatory information for the risk transmission path.

2. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural networks according to claim 1, characterized in that, For numerical indicators without clearly defined upper and lower bounds, Z-score standardization is used as an alternative to Min-Max normalization. The formula for calculating Z-score standardization is as follows: x_std = (x - μ) / σ Where μ is the mean of the numerical indicator across all enterprise samples, and σ is the standard deviation of the numerical indicator across all enterprise samples.

3. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural networks according to claim 1, characterized in that, The following four meta-paths are predefined in the meta-path definition and sampling steps: The first element path P1, formally represented as (E, supply, E, supply, E), represents a two-hop supply chain path, where E is the enterprise node type and supply is the supply edge. The second-order path P2, formalized as (E, invest, E, supply, E), represents the supply chain path under investment association, where invest is the investment edge; The third path P3, formalized as (E, compete, E, invest_rev, E), represents the capital influence path under competitive relationships, where compete is the competitive edge and invest_rev is the reverse of the investment edge. The fourth path P4, formalized as (E, guarantee, E, guarantee, E), represents a two-hop guarantee chain path, where guaranteeee is the guarantee edge.

4. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural networks according to claim 3, characterized in that, In the meta-path definition and sampling steps, for each target enterprise node v, multi-hop neighbor sampling is performed along the four meta-paths using a breadth-first search approach: Sampling along P1: The first hop searches for downstream customers along the supply edge from v to obtain N1. The second hop searches for downstream customers along the supply edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P1. P1 (v); Sampling along P2: The first hop is to find the invested enterprise N1 along the investment edge from v. The second hop is to find the downstream customer N2 along the supply edge from each node in N1. N2 is then used as the neighbor set N of P2. P2 (v); Sampling along P3: The first hop searches for competitors along the competing edge from v to obtain N1. The second hop searches for investor companies along the reverse of the investment edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P3. P3 (v); Sampling along P4: The first hop searches for directly guarantor-related enterprises along the guarantee edge from v to obtain N1. The second hop searches for other guarantor-related enterprises besides v along the guarantee edge from each node in N1 to obtain N2. N2 is then used as the neighbor set N of P4. P4 (v); For each meta-path P, the neighbor set N is... P Each node in (v) is connected to the target node v, and a star-shaped subgraph centered on v is constructed as the meta-path neighbor subgraph.

5. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural networks according to claim 1, characterized in that, In the path aggregation step, for the meta-path P, a path-specific representation vector m for the target node v is generated. v P Specifically, it includes: For the target node v and each neighbor node N P (v), through the learnable weight matrix W P Perform linear transformations to obtain the hidden layer feature vector h. v = W P · x v h u h u = W P · x u ; Where x v and x u These are the initial feature vectors of the target node and its neighboring nodes, respectively. Through the learnable attention weight vector a P Calculate the unnormalized attention coefficient e of neighbor node u to target node v. vu = LeakyReLU( a P T · [h v || h u ] ), where || represents vector concatenation, and the negative slope of LeakyReLU is 0.2; The unnormalized attention coefficients of all neighboring nodes of the target node v are normalized using the Softmax function to obtain the normalized attention weight α. vu = softmax_u(e vu ) = exp(e vu ) / Σ {k∈NP(v)} exp(e vk ) ; Based on the normalized attention weight α vu For the hidden feature vector h of the neighboring nodes u After weighted summation and processing with the ELU activation function, the path-specific representation vector m of the target node v under the metapath P is obtained. v P = ELU(Σ {u∈NP(v)} α vu · h u ).

6. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural networks according to claim 5, characterized in that, In the path aggregation step, a multi-head attention mechanism is employed, executing K independent attention heads in parallel, each attention head using its own weight matrix W. P k and attention weight vector a P k An intermediate representation vector m is obtained through independent computation. v {P'(k)} The K intermediate representation vectors are concatenated to form the path-specific representation vector m. v P = || {k=1} K m v {P '(k)} Where K=4, each intermediate representation vector has a dimension of 128, and the concatenated path-specific representation vector has a dimension of 512. As an alternative, the average of the K heads is taken, m v P = (1 / K) Σ {k=1} K m v {P'(k)} .

7. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural networks according to claim 1, characterized in that, In the inter-path attention fusion and evaluation step, calculating the path-level attention weight β_P for each meta-path specifically includes: For each meta-path P, its path-specific representation vector m_v^P is input into a single-layer neural network, and the unnormalized path-level attention score β is calculated. P ' = w path T · tanh( W path · m v P + b path ), where W path ∈ R {d _path × 512} b is a learnable weight matrix. path ∈ R {d_path} w is a learnable bias vector. path ∈ R {d_path} Here, is the learnable weight vector, and tanh is the hyperbolic tangent activation function; The unnormalized attention scores of all meta-paths are normalized using the Softmax function to obtain the path-level attention weights β. P = exp(β P ') / Σ {Q∈{P1,P2,P3,P4}} exp(β Q ') ; The path-specific representation vector m of each meta-path v P The enterprise comprehensive representation vector z is obtained by weighting and summing the corresponding path-level attention weights β_P. v = Σ {P∈{P1,P2,P3,P4}} β P · m v P .

8. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural networks according to claim 3, characterized in that, The explanatory information for the risk transmission path is generated in the following way: Choose β P The path with the highest value is identified as the primary source of risk. Tracing back the α values ​​of each neighboring node in the main risk source path vu Choose α vu The two or three largest nodes serve as key points for risk transmission; If the primary path is P1, then an explanatory text is generated that includes risk score, risk level, contribution percentage of supply chain path, and transmission chain from upstream supplier to target enterprise. If the primary path is P2, then an explanatory text is generated that includes risk score, risk level, contribution percentage of the supply chain path under investment association, and transmission chain from the target company to the customer through the investee company. If the main path is P3, then an explanatory text is generated that includes risk score, risk level, contribution ratio of capital influence path under competitive relationship, and transmission chain of competitors obtaining investment from investment institutions. If the main path is P4, then an explanatory text is generated that includes risk score, risk level, contribution ratio of the guarantee chain path, and the transmission chain from the target company to the guarantee-related company through the intermediary company. The explanation information is output in JSON format or as a card in the front-end interface.

9. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural network according to claim 1, characterized in that, The auxiliary nodes include at least personal nodes and product nodes; The individual nodes include legal representatives, shareholders, and senior executives, whose initial feature vectors are randomly initialized 128-dimensional embedding vectors and are updated during model training; The initial feature vector of the product node is a randomly initialized 128-dimensional embedding vector and is updated during model training; The various inter-firm relationships include at least investment relationships, supply relationships, guarantee relationships, and competitive relationships, and these inter-firm relationships are extracted in the following manner: For investment relationships, scan the equity structure table. For each shareholding record, if the shareholding ratio is ≥10%, add a directed edge from the investor to the investee in the graph, with the edge weight being the shareholding ratio / 100. For supply relationships, scan the supply chain invoice table and add directed edges in the direction from the supplier to the customer. The edge weight is the proportion of the supplier's annual transaction amount with that customer to the supplier's total transaction amount. For guarantee relationships, scan the guarantee record table, add undirected edges, and fix the edge weight to 1; For competitive relationships, for any two companies under the same four-digit industry code, calculate the cosine similarity of their main product names using TF-IDF vectors. If the similarity is ≥0.7, add an undirected edge with the edge weight being the similarity value. The heterogeneous graph of the enterprise is stored using a heterogeneous graph data structure, which includes: a node feature matrix, used to store the initial feature vectors of all nodes, the node feature matrix having a dimension of (|V|, d), where |V| is the total number of nodes, d is the feature dimension, the feature dimension of enterprise nodes is d=7, and the feature dimension of auxiliary nodes is d=128; an edge index list, stored according to relation type, the edge index list of each relation type is a tensor of (2, |E_r|), where |E_r| is the total number of edges under that relation type, the first line of the tensor is the source node identifier of all edges, and the second line is the target node identifier of all edges; and an edge weight tensor, stored according to relation type, the edge weight tensor of each relation type is a tensor of |E_r| dimensions, storing the weight values ​​of all edges under that relation type in order.

10. The enterprise risk assessment method based on meta-path awareness heterogeneous graph neural network according to claim 1, characterized in that, It also includes end-to-end model training steps: The scoring network is a three-layer fully connected network, consisting of the following layers: The first fully connected layer has 512-dimensional input and 64-dimensional output, with ReLU activation function and a Dropout ratio of 0.

2. The second fully connected layer has a 64-dimensional input and a 32-dimensional output, with ReLU activation function. The third fully connected layer has a 32-dimensional input and a 1-dimensional output, with no activation function, and outputs the raw score: score_raw = MLP(z v The output layer maps the original score to the [0,1] interval using the Sigmoid function and then multiplies it by 100 to obtain a risk assessment score of 0-100: score = 100 × Sigmoid(score_raw) = 100 × (1 / (1 + exp(-score_raw))). Risk levels are then determined based on thresholds: score ≥ 70 is high risk, 50 ≤ score < 70 is medium risk, and score < 50 is low risk. The total loss function during training is a weighted sum of the rating regression loss and the risk level classification loss, L_total = λ_reg·L_reg + λ_cls·L_cls, where the rating regression loss L_reg = (1 / N) Σ (score_pred -score_true) 2 The mean squared error between the predicted and actual scores is the risk level classification loss L_cls = - (1 / N) Σ y_true · log(y_pred), and the cross-entropy between the predicted and actual risk levels is λ_reg=0.6, λ_cls=0.

4. The optimizer used is Adam, with an initial learning rate of 0.001 that decays to 0.9 times every 10 epochs. The training batch size is 32, and the maximum number of training epochs is 200. An early stopping strategy is adopted, where training stops if the validation set loss does not decrease for 10 consecutive epochs.

Citation Information

Patent Citations

  • A method, apparatus, and information processing method and apparatus for generating models.

    CN110796269B

  • Bank counter system business batch operation state detection method and device

    CN114331688A