Enterprise credit rating method based on relationship between enterprises

By integrating inter-enterprise relationships and tabular data through a dynamic heterogeneous graph model, the problems of heterogeneous data fusion and dynamic capture of credit risk are solved, achieving more efficient credit rating prediction.

CN121213221APending Publication Date: 2025-12-26BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511358882.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

Existing corporate credit rating methods are unable to effectively integrate heterogeneous data, fail to construct cross-source semantic association networks, and traditional static indicator systems are unable to capture the dynamic evolution of credit risk factors.

Method used

We adopt a credit rating framework based on inter-firm relationships, use a dynamic heterogeneous graph model to fuse tabular and graph-structured data, introduce a time-aware node embedding and update mechanism, and use a graph neural network to predict corporate credit ratings.

Benefits of technology

It significantly improves the accuracy and robustness of credit assessment, better captures the temporal dynamics of credit risk, and enhances the model's predictive ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121213221A_ABST
    Figure CN121213221A_ABST
Patent Text Reader

Abstract

The invention discloses an enterprise credit rating method based on the relationship between enterprises, and belongs to the field of enterprise credit rating. The method comprises the following steps: collecting input data of a plurality of related enterprises in a certain industry to obtain table data and a daily frequency stock income sequence of each enterprise, and carrying out feature coding on the table data of each enterprise to obtain a node feature matrix of all enterprises; meanwhile, based on the daily frequency income sequence of the enterprises, the relationship between the enterprises is extracted, and an enterprise association graph is constructed. And then enterprise association graph data and table data are integrated into a unified graph structure, and a graph neural network carries out enterprise credit rating prediction based on a time sequence graph learning strategy of a rolling window. And when a new enterprise input data set exists, constructing a time sequence dynamic heterogeneous graph, and applying the trained graph neural network model to enterprise credit evaluation. According to the method, the capability of capturing enterprise credit risk time-varying features is enhanced, and the effectiveness and accuracy of enterprise credit rating are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of corporate credit rating, specifically referring to a corporate credit rating method based on inter-corporate relationships. Background Technology

[0002] Corporate credit ratings play a crucial role in the financial industry, measuring a company's ability to repay debt and the credit risk it faces. Assessing a company's credit rating is typically based on several key factors. The most important of these is financial statements, such as income statements and balance sheets, which provide a snapshot of a company's financial health. In addition, financial ratios such as liquidity and operational efficiency are also considered. Beyond these quantitative indicators, rating agencies also consider qualitative factors, such as the company's strategic positioning, growth trajectory, and management capabilities. Macroeconomic factors, such as interest rate fluctuations, exchange rate changes, and adjustments in government fiscal policies, also impact corporate credit ratings.

[0003] While traditional methods rely on statistical analysis and human supervision, the rise of financial artificial intelligence marks the formal entry of credit risk modeling into the machine learning paradigm. Machine learning models can automatically learn patterns from data, thus avoiding the dependence on human assumptions and parameter settings inherent in traditional statistical methods. With breakthroughs in deep learning technology, neural networks are gradually becoming the mainstream solution for corporate credit rating.

[0004] Corporate credit rating methods can be broadly classified into three categories: statistical models, machine learning models, and neural network models.

[0005] Statistical models construct rating systems based on corporate financial indicators to analyze and classify credit ratings. Commonly used models include the ZETA model (Altman et al., 1977), the analytic hierarchy process (AHP) (Yurdakul and Ic, 2005), multivariate discriminant analysis (Reichert et al., 1983), multivariate adaptive regression splines (Friedman, 1991), and logistic regression (Laitinen, 1999). These methods rely on statistical data and are often limited by human assumptions and parameter settings.

[0006] Machine learning models have made significant progress in credit rating tasks, including support vector machines (Cao et al., 2006), decision trees (Gu and Yang, 2019), random forests, and XGBoost (Chornous and Nikolskyi, 2018). These methods rely on feature engineering and struggle to fully utilize qualitative information.

[0007] Neural network models have become a hot topic in corporate credit rating. In 2020, Golbayani et al. first introduced CNN and LSTM into corporate credit rating, studying the impact of feature selection and time series data on the results, and verifying the effectiveness of deep learning in rating. In the same year, Chen and Long proposed the SMAGRU model, which significantly improved the accuracy and convergence speed of multi-class rating by capturing time series features and assigning weights to market benchmarks. Also in 2020, Feng et al. proposed the CCR-GNN model, which, after one-hot encoding of qualitative data, fused it with quantitative financial data through an embedding layer and fed it into the network for training, demonstrating the advantages of graph neural networks in credit rating. In 2023, Roy proposed an ESG-based credit rating model by using the best-worst method (BWM) to determine criterion weights based on the correlation between features. In the same year, Tavakoli et al. used deep learning models such as CNN, LSTM, GRU, and BERT for credit rating prediction. In 2024, Feng et al. proposed the HHGNN model, which uses hierarchical heterogeneous graphs to characterize the hierarchy and heterogeneity of enterprise features and designs an adversarial learning module to fully utilize unlabeled samples in financial data. Also in 2024, Wang et al. proposed a credit scoring method based on horizontal federated learning, combining knowledge transfer techniques to address data privacy protection and class imbalance issues among financial institutions.

[0008] The complexity of business operations strongly suggests that multi-source data must be integrated when predicting corporate credit ratings. Models based solely on a single data source may overlook complex patterns and correlations, while fusing data from different domains not only improves predictive accuracy but also enhances model robustness, thereby improving the quality of credit risk management decisions. (e.g., 2019; Roy, 2023; Feng et al., 2024). As research has deepened, scholars have found that when a particular industry market experiences a downturn, the credit ratings of related companies often deteriorate simultaneously. It is noteworthy that rating agencies, when assessing corporate risk, not only focus on individual operational data but also systematically consider the synergistic effects within the industry chain. When a core enterprise faces financial difficulties, key indicators such as accounts receivable turnover and cash flow stability of its upstream and downstream partners will also be under pressure. The network structure between enterprises amplifies the transmission of credit risk. Droege et al. (2022) analyzed the impact of inter-firm competition and cooperation on credit ratings using the number of competitive and cooperative agreements signed by enterprises annually as an indicator; Liu and Park (2020) used the Herfindahl-Hirschman Index (HHI) to measure the degree of inter-firm dependence.

[0009] However, the above methods still have limitations. First, the fusion of heterogeneous data often remains at the level of feature learning through simple indicators, failing to build a cross-source semantic association network, resulting in insufficient activation of information synergy effects. Second, traditional static indicator systems are difficult to capture the dynamic evolution of credit risk factors, and time-series features such as the reconstruction of relationship networks over time are oversimplified by the model. Summary of the Invention

[0010] This invention proposes a corporate credit rating framework based on inter-firm relationships. This framework uses a dynamic heterogeneous graph containing two types of edges to model these relationships. The framework effectively integrates tabular and graph-structured data, achieving cross-source heterogeneous data fusion. Furthermore, a time-aware node embedding and update mechanism is introduced to enable dynamic graph learning. The proposed model takes corporate financial and non-financial data, as well as daily stock return sequences, as input and outputs the corresponding corporate credit rating.

[0011] The specific steps of the corporate credit rating methodology based on inter-firm relationships are as follows:

[0012] Step 1: Collect input data from several relevant companies in a certain industry to obtain tabular data and daily stock return series for each company;

[0013] Each company's input data consists of two parts: tabular data containing financial and non-financial characteristics, and daily stock return series.

[0014] For company C i Its tabular data is represented as feature vector X i :

[0015] X i ={x i1 ,x i2 ,x i3 ,…,x id}

[0016] Where, x id This represents the d-th characteristic value of the enterprise.

[0017] For company C i Its daily stock return sequence is denoted as

[0018] R i ={r i1 ,r i2 ,r i3 ,…,r it}

[0019] Where, r it This represents the stock return on day t.

[0020] Step 2: Based on the daily revenue sequence of enterprises, extract the relationships between enterprises and construct an enterprise relationship graph;

[0021] Step 2.1: Convert the daily closing stock price into daily return and calculate the standard deviation of the daily return.

[0022] For company C at time t u The formula for calculating its standard deviation is:

[0023] c ut =σ(r) ut ,r u(t-1) ,…,r u(t-T) )

[0024] Where r ut Company C u The daily profit on day t, where T is the length of the lookback window.

[0025] Step 2.2, transfer company C u The daily return volatility sequence is defined as:

[0026]

[0027] Step 2.3: Calculate the distance correlation coefficient between any two companies based on the daily return fluctuation series of each company, and quantitatively measure the strength of the fluctuation correlation between the two companies in a specific period.

[0028] For any two companies C u With C v For their respective daily return volatility sequences l u and l v Calculate the Euclidean distance between any two data points i and j at any two different time points in the dataset, thus obtaining two corresponding distance matrices A. ij and B ij :

[0029] A ij =||l u,i -l u,j ||,B ij =||l v,i -l v,j ||

[0030] Subsequently, the two distance matrices are centered:

[0031]

[0032] in, and Let represent the mean of the i-th row and j-th column of matrix A, respectively. Let be the population mean of matrix A.

[0033] Next, calculate l u With l v Distance covariance:

[0034]

[0035] Where n is l u With l v The number of data points in the data.

[0036] At the same time, calculate l respectively u With l v Distance variance:

[0037]

[0038] Ultimately, Company C received u With C v Distance correlation coefficient:

[0039]

[0040] Step 2.4: For a total of N companies, calculate the distance correlation coefficient between any two companies to obtain the company distance correlation matrix D, and determine the relationship between companies based on the matrix values ​​to obtain the company association graph;

[0041] Set a correlation threshold θ between the companies and determine the relationship between the values ​​in matrix D and the threshold θ. If the correlation coefficient is greater than the threshold θ, the two companies are considered related (+); if the correlation coefficient is less than θ, the two companies are considered unrelated (-). The edge set E of the company association graph contains two types of relationships: E + E represents an associated edge. - Indicates an edge that is not associated;

[0042] The final enterprise relationship diagram is represented as follows:

[0043] G=(V,{E + E -})

[0044] Where V represents the set of firms.

[0045] Step 3: Based on the tabular data of each enterprise, perform feature encoding to obtain the node feature matrix of all enterprises;

[0046] Step 3.1, extract the table data X for each company. i The encoding is a fixed-dimensional vector, which serves as the initial feature of the graph nodes.

[0047] Each sample X i ={x i1 ,x i2 ,x i3 ,…,xid} is considered as a sequence of d numerical features, for each of its scalar features x ij First, an embedding vector is obtained through a learnable linear mapping, and then positional encoding is superimposed:

[0048] e ij =φ(x ij )+P j

[0049] in For x ij linear projection, The position encoding is the j-th feature, and h is the embedding dimension.

[0050] This leads to the company C i Input embedding matrix:

[0051] E i =[e i1 ,e i2 ,…,e id ] T

[0052] Step 3.2: A Transformer-based encoder is used to learn feature representations from the tabular data to obtain the feature embeddings for each company.

[0053] E i The data is fed into the Transformer encoder, where the core computation is multi-head self-attention:

[0054]

[0055] Among them W Q W K , It is a learnable projection matrix.

[0056] The scaling dot product attention is calculated as follows:

[0057] To prevent excessively large values, softmax(·) normalizes the attention weights.

[0058] Bullish attention is represented as:

[0059] MultiHead(E i = Concat(head1,…,head) M W O

[0060] M represents the number of attention heads, W O This is for outputting the projection matrix.

[0061] Each Transformer layer also contains a feedforward network (FFN) and residual connections, so the final output of the encoder is:

[0062] Z i =LayerNorm(E i +MultiHead(E i )+FFN(·))Z i For company C i Contextual feature embedding; LayerNorm represents layer normalization; FFN(·) is a position feedforward network with nonlinear activation.

[0063] To obtain a uniform representation for each enterprise, average pooling is performed on the d feature embeddings:

[0064]

[0065] h i As company C i The final embedding is used for graph node features; Z i [j] represents the encoder output corresponding to the j-th feature.

[0066] Step 3.3, the node feature matrix of all enterprises is as follows:

[0067]

[0068] Step 4: Integrate the enterprise relationship graph data and tabular data into a unified graph structure. The graph neural network uses a time series graph learning strategy based on a rolling window to predict enterprise credit rating.

[0069] Step 4.1: Create a time sequence diagram and divide it using a rolling time window mechanism:

[0070] Each time, select F consecutive months of enterprise relationship diagram data and tabular data to construct a time series diagram sequence {G1, G2, ..., G...}. F Each graph Gt = (Vt, Ei) represents the graph structure at time t, where nodes correspond to enterprises, node features are derived from tabular data, and node labels are credit ratings.

[0071] The time series graph is divided into continuous dynamic graph snapshots by time windows. Within each window, earlier nodes are assigned to the training set, and later nodes to the test set. Node labels in the training set are visible, while test set labels remain hidden and are strictly separated according to chronological order.

[0072] Step 4.2: After the graph neural network model learns dynamic patterns using the training and test sets within each time window, it updates the parameters based on the results of the current window.

[0073] At level l and time t, the graph structure is represented as follows: in This represents a set of related edges. Represents the set of unrelated edges; based on the characteristics of node i at level l-1 and time t. Attention scores are obtained by aggregating messages on both associated and unassociated subgraphs using an attention mechanism.

[0074]

[0075] Among them W (l,+) W (l,-) Let a be the linear transformation matrix corresponding to the existence and non-existence of edges; (l,+) With a (l,-) These are trainable vectors used to calculate attention scores; and This represents the attention score from node j to node i; ReLU is the activation function used to enhance expressive power.

[0076] Subsequently, the attention score was normalized using softmax to obtain the attention coefficient:

[0077]

[0078] in and Let represent the sets of associated and unassociated neighbors connected to node i at time t, respectively.

[0079] Next, the messages from the two types of edges are aggregated separately to calculate the feature representation of node i:

[0080]

[0081] Finally, the feature representations of the two types of edges are fused:

[0082]

[0083] For each type of edge, M attention heads are used:

[0084]

[0085] Among them W (l,+,m) With W (l,-,m) For the linear transformation corresponding to the m-th attention head, and This represents the attention coefficient for each head.

[0086] The fused feature representations are fed into the classification layer to predict credit ratings, and the parameters of the graph neural network are updated based on the prediction results of the training set and the true labels.

[0087] Predicted results vs. true labels y i Cross-entropy loss between:

[0088]

[0089] Prediction probability vector This represents the predicted probability that company i belongs to each credit rating.

[0090] By minimizing the loss function, the optimal graph neural network model parameters can be obtained.

[0091] The updated graph neural network is used to predict the credit rating of the test set within the time window, and the label information of the test set is obtained.

[0092] Step 4.3: For each node i, the output representation is fused according to its current window time step T to update the attention weights of the graph neural network;

[0093] Output representation for node i at time step T Fusion to generate time-aware representations:

[0094]

[0095] Where attention weight β t Calculated by the following formula:

[0096]

[0097] Where q is a globally learnable query vector, and W t Let β be the projection matrix at each time step. t This indicates the model's level of attention to the t-th time step.

[0098] This mechanism adaptively assigns weights to different time steps based on the changing trends of each node, thereby fully extracting key time-series information and improving the ability to model dynamic structures.

[0099] Step 4.4: According to the rolling time window mechanism, retain the nodes and predicted labels of the test set of the previous time window as the training set of the next time window, and complete the training set and test set of the next window according to the window division. Repeat the training process of steps 4.2 and 4.3 for the updated graph neural network.

[0100] Step 4.5: When scrolling to the last time window, obtain the embedding of enterprise i at the final time F and the final layer L. The predicted credit rating at this time is:

[0101]

[0102] in and Here, K represents the learnable weight matrix and bias of the classifier, K is the number of credit ratings, and d is the weight matrix of the classifier. h The dimension represented by the node.

[0103] From the prediction probability vector The credit rating with the highest probability is selected as the final predicted label for company i.

[0104]

[0105] in Predict the probability vector for firm i The kth element.

[0106] Step 5: When a new enterprise input dataset is available, construct a time-series dynamic heterogeneous graph and use the trained graph neural network model to evaluate enterprise credit.

[0107] The advantages of this invention are:

[0108] (1) This invention proposes a novel enterprise credit rating framework that integrates heterogeneous data. Addressing the heterogeneity of enterprise relationship graphs and multimodal feature tables, a unified graph representation framework is innovatively constructed. Enterprises are modeled as nodes in the graph, and structured data such as financial indicators and non-financial attributes are encoded into node feature vectors through feature engineering. Simultaneously, edges are constructed based on the presence or absence of relationships between enterprises, forming a heterogeneous graph that allows different types of feature information to propagate along the graph. This architecture effectively integrates the topological relationships between enterprises and individual characteristics, exhibiting complementary learning advantages for complex relationship features in node-level classification.

[0109] (2) During the training phase, this invention employs a dynamic time-series graph prediction method. To characterize the temporal dynamics of credit rating, a time-series graph learning strategy based on a rolling window is designed. Utilizing the dynamic propagation mechanism of graph neural networks, the model can adaptively capture the temporal evolution pattern of corporate credit status and achieve iterative parameter optimization through the rolling window mechanism. This method significantly enhances the ability to capture the time-varying characteristics of credit risk and establishes a sustainable credit prediction process.

[0110] (3) Experimental results show that the proposed method significantly improves the performance of credit assessment. Systematic experiments based on multi-source datasets show that, compared with traditional deep learning methods, the proposed method improves key indicators such as accuracy and F1 score by about 20%; compared with static graph neural network models, the improvement is 5%–20%. Ablation studies further verify the effectiveness of heterogeneous data fusion mechanism and dynamic graph modeling. Attached Figure Description

[0111] Figure 1This is a schematic diagram of the enterprise credit rating framework based on inter-enterprise relationships proposed in this invention;

[0112] Figure 2 This is a comparison chart of the impact of different scrolling window sizes on model performance in time series graph learning, as shown in this embodiment of the invention. Detailed Implementation

[0113] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0114] This invention proposes a novel corporate credit rating framework that enables the fusion modeling of cross-source heterogeneous data. This framework delves into the potential relationships between financial indicators, non-financial factors, and corporate networks through the collaborative representation of graph topological features and tabular features. Compared to static analysis paradigms, it also introduces a dynamic graph learning mechanism with a time-aware node embedding and update strategy, providing a new technical path for mining the heterogeneous correlations and temporal evolution of credit risk factors.

[0115] The specific steps of the corporate credit rating methodology based on inter-firm relationships are as follows:

[0116] Step 1: Collect input data from several relevant companies in a certain industry to obtain tabular data and daily revenue series for each company;

[0117] Each company's input data consists of two parts: tabular data containing financial and non-financial characteristics, and daily stock return series.

[0118] Tabular data: A company's tabular data comprises multi-dimensional financial and non-financial indicators to comprehensively assess its operational performance and overall condition. For company C... i Its tabular data is represented as feature vector X i :

[0119] X i ={x i1 ,x i2 ,x i3 ,…,x id}

[0120] Where, x id This represents the d-th characteristic value of the enterprise.

[0121] Daily Stock Returns: The daily stock return series for each company depicts the fluctuations in its daily closing stock price. For company C... i Its daily return sequence is denoted as

[0122] R i ={r i1 ,r i2 ,r i3 ,…,r it}

[0123] Where, r it This represents the stock return on day t.

[0124] Step 2: Based on the daily revenue sequence of enterprises, extract the relationships between enterprises and construct an enterprise relationship graph;

[0125] First, convert stock prices into daily returns and calculate the standard deviation of daily closing price returns. For company C at time t... u The formula for calculating its standard deviation is:

[0126] c ut =σ(r) ut ,r u(t-1) ,…,r u(t-30) )

[0127] Where r ut Company C u Daily earnings on day t.

[0128] Next, Company C u The daily return volatility sequence is defined as:

[0129]

[0130] T represents the length of the playback window, which is usually set to one month.

[0131] Daily return volatility series reflects changes in a company's stock price over time, serving as a key indicator of market perception and financial stability, and providing valuable insights into each company's credit risk. To quantitatively measure the strength of the correlation between the volatility of two companies over a specific period, the distance correlation coefficient is used.

[0132] Next, calculate the C of any two companies. u With C v The distance correlation coefficient between them. The first step is to construct the distance matrix. For each sequence l u and l v Calculate the Euclidean distance between any two data points i and j at any two different time points in the dataset, thus obtaining two corresponding distance matrices A. ij and B ij :

[0133] A ij =||l u,i -l u,j ||,B ij =||l v,i -l v,j ||

[0134] Subsequently, the two distance matrices are centered:

[0135]

[0136] in and Let represent the mean of the i-th row and j-th column of matrix A, respectively. Let be the population mean of matrix A.

[0137] Next, calculate l u With l v Distance covariance:

[0138]

[0139] Where n is l u With l v The number of data points in the data.

[0140] At the same time, calculate l respectively u With l v Distance variance:

[0141]

[0142] Ultimately, Company C received u With C v Distance correlation coefficient:

[0143]

[0144] For a total of N companies, the distance correlation coefficient between any two companies is calculated, resulting in a company distance correlation matrix D. The relationships between companies are then determined based on the matrix values: a correlation threshold θ is set; if the correlation coefficient is greater than the threshold θ, the two companies are considered related (+); if it is less than θ, they are considered unrelated (-). To suppress noise, edges with correlation coefficients below the required threshold are discarded. The final company correlation graph is as follows:

[0145] G=(V,{E + E -})

[0146] The edge set E contains two types of relations: E + E- and E- respectively indicate whether there is an associated edge.

[0147] Step 3: Based on the tabular data of each enterprise, perform feature encoding to obtain the node feature matrix of all enterprises;

[0148] To build a graph structure among enterprises, first, the tabular data of each company is X... i The encoding is a fixed-dimensional vector, which serves as the initial feature of the graph nodes.

[0149] Each sample Xi ={x i1 ,x i2 ,x i3 ,…,x id The scalar feature x is considered as a sequence of d numerical features. For each scalar feature x... ij First, an embedding vector is obtained through a learnable linear mapping, and then positional encoding is superimposed:

[0150] e ij =φ(x ij )+P j

[0151] in For x ij linear projection, The position of the j-th feature is encoded, and h is the embedding dimension. This yields the enterprise C. i Input embedding matrix:

[0152] E i =[e i1 ,e i2 ,…,e id ] T

[0153] A Transformer-based encoder is used to learn feature representations from tabular data. E i The data is fed into the Transformer encoder, where the core computation is multi-head self-attention:

[0154]

[0155] Among them W Q W K , The projection matrix is ​​learnable. The scaled dot product attention is calculated as follows:

[0156]

[0157] To prevent excessively large values, softmax(·) normalizes the attention weights. Multi-head attention is represented as:

[0158] MultiHead(E i = Concat(head1,…,head) M W O

[0159] M represents the number of attention heads, W O This is the output projection matrix. Each Transformer layer also contains a feedforward network (FFN) and residual connections. The final output of the encoder is:

[0160] Zi =LayerNorm(E i +MultiHead(E i )+FFN(·))Z i For company C i The contextual feature embeddings are used; LayerNorm represents the normalization layer; FFN(·) is a positional feedforward network with non-linear activation. To obtain a uniform representation for each enterprise, average pooling is performed on the d feature embeddings:

[0161]

[0162] h i As company C i The final embedding is used for graph node features; Z i [j] represents the encoder output corresponding to the j-th feature.

[0163] The node feature matrix for all enterprises is as follows:

[0164]

[0165] Step 4: Integrate the enterprise relationship graph data and tabular data into a unified graph structure. The graph neural network uses a time series graph learning strategy based on a rolling window to predict enterprise credit rating.

[0166] In this module, enterprise relationship graph data and tabular data are integrated into a unified graph structure, node representations are updated across multiple time steps, and two types of edge information are introduced from the heterogeneous graph.

[0167] Step 4.1: Employ a sliding window mechanism: Select consecutive F months of data each time to construct a time series graph sequence {G1, G2, ..., G...}. F Each graph Gt = (Vt, Et) represents the graph structure at time t, where nodes correspond to enterprises, node features are derived from tabular data, and node labels are credit ratings.

[0168] The data is divided into continuous dynamic graph snapshots according to time windows. Within each window, nodes from earlier periods are assigned to the training set, while nodes from later periods are assigned to the test set. Crucially, node labels in the training set are visible, while those in the test set remain hidden throughout, and the data is strictly divided chronologically to prevent information leakage.

[0169] Step 4.2: After learning the dynamic pattern within each window, the graph neural network model updates its parameters based on the results of the current window.

[0170] Specifically, at level l and time t, the graph structure is represented as follows: in Represents the set of positively associated edges. This represents the set of negatively associated edges. The feature representation of node i at layer (l-1) and time t is... Message aggregation is performed on the positive and negative correlation subgraphs using an attention mechanism respectively:

[0171]

[0172] Among them W (l,+) W (l,-) Let a be the linear transformation matrix corresponding to the positive and negative edges; (l,+) With a (l,-) These are trainable vectors used to calculate attention scores; and This represents the attention score from node j to node i; ReLU is the activation function used to enhance expressive power.

[0173] Subsequently, the attention score was normalized using softmax to obtain the attention coefficient:

[0174]

[0175] in and Let represent the sets of associated and unassociated neighbors connected to node i at time t, respectively.

[0176] Next, the messages from both types of edges are aggregated to calculate the representation of node i:

[0177]

[0178] Finally, the two edge representations are merged:

[0179]

[0180] To further enhance the model's learning ability, a multi-head attention mechanism is employed. For each type of edge, M attention heads are used:

[0181]

[0182] Among them W (l,+,m) With W (l,-,m) For the linear transformation corresponding to the m-th attention head, and This represents the attention coefficient for each head.

[0183] The fused feature representations are fed into the classification layer to predict credit ratings, and the parameters of the graph neural network are updated based on the prediction results of the training set and the true labels.

[0184] Predicted results vs. true labels y i Cross-entropy loss between:

[0185]

[0186] Among them, the prediction probability vector This represents the predicted probability that company i belongs to each credit rating.

[0187] By minimizing the loss function, the optimal graph neural network model parameters can be obtained.

[0188] The updated graph neural network is used to predict the credit rating of the test set within the time window, and the label information of the test set is obtained.

[0189] Step 4.3: In order to characterize the dynamic changes of node representations over multiple time steps, an attention-based temporal modeling mechanism is introduced to update the attention weights of the graph neural network.

[0190] For each node i, the output of time step T is represented as... Fusion to generate time-aware representations:

[0191]

[0192] Where attention weight β t Calculated by the following formula:

[0193]

[0194] Where q is a globally learnable query vector; W t β is the projection matrix at each time step; t This indicates the model's level of attention to the t-th time step.

[0195] This mechanism adaptively assigns weights to different time steps based on the changing trends of each node, thereby fully extracting key time-series information and improving the ability to model dynamic structures.

[0196] Step 4.4: According to the rolling time window mechanism, retain the nodes and predicted labels of the test set of the previous time window as the training set of the next time window, and complete the training set and test set of the next window according to the window division. Repeat the training process of steps 4.2 and 4.3 for the updated graph neural network to form a rolling incremental learning mechanism, realize the continuous accumulation of knowledge, and maintain the temporal dependency constraint.

[0197] Step 4.5: After multi-timestep learning, obtain the embedding of enterprise i at the final time F and the final layer L in the last time window. These embeddings are fed into a classification layer to predict credit ratings:

[0198]

[0199] in and Here, d represents the learnable weight matrix and bias of the classifier, where K is the number of credit ratings; h The dimension represented by the node.

[0200] The final predicted label is:

[0201]

[0202] in Predict the k-th element of the probability vector for company i. Select the credit rating with the highest probability as the final predicted rating for company i.

[0203] Step 5: When a new enterprise input dataset is available, construct a time-series dynamic heterogeneous graph and use the trained graph neural network model to evaluate enterprise credit.

[0204] Example

[0205] I. Comparative Experiment

[0206] 1.1 Selecting the dataset

[0207] The data in the experiment primarily came from: Wind Financial Terminal, Guotai An CSMAR Financial Database, Eastmoney Choice Database, publicly available data from the National Bureau of Statistics, and the People's Bank of China. The dataset covers A-share listed companies that issued bonds between 2016 and 2023, containing 151 financial indicators and 16 non-financial indicators, totaling 167 indicators and forming 62,389 monthly records. The data specifically includes:

[0208] • Corporate financial characteristics: financial indicators such as profitability, leverage, size, liquidity, growth, operational efficiency, and asset structure;

[0209] • Corporate governance characteristics: Indicators related to senior management and the board of directors;

[0210] • Macroeconomic indicators: covering macroeconomic variables such as China's economy, currency, and cash flow, as well as leading indicators reflecting the economic cycle.

[0211] The rating labels are sourced from institutions such as China Chengxin International (CCXI) and China Lianhe Credit Rating (CLCR), and are divided into nine levels: AAA, AA+, AA, A, BBB, BB, B, CCC, CC, and C. In addition, the daily closing prices of corresponding A-share listed companies from 2016 to 2023 were captured, and daily stock returns were calculated based on this.

[0212] 1.2 Experimental Setup

[0213] 1.2.1 Parameter Settings

[0214] The tabular data features are encoded into 64-dimensional embeddings using a 4-head Transformer, and the hidden layer dimension of the feedforward network is set to 256. The temporal dynamic graph learning part uses a 4-month sliding window to capture the temporal pattern, with independent 64×64 parameter matrices used for positive and negative edges. Within each sliding window, the credit rating of unlabeled nodes in the fourth month is predicted using the credit ratings of nodes labeled in the previous three months.

[0215] 1.2.2 Comparison with baseline

[0216] We selected previous models that have used heterogeneous data fusion in the field of credit assessment, as well as several graph neural network baselines, including MLP, CNN, LSTM, GCN, GAT, and HHGNN.

[0217] 1.2.3 Evaluation Indicators

[0218] Accuracy, recall, and F1 score are used as evaluation metrics. Accuracy measures the percentage of correct predictions and reflects the model's overall classification ability; recall examines the model's coverage of positive samples for a certain credit rating, paying particular attention to the risk of missed detections; the F1 score combines precision and recall and is particularly suitable for scenarios with class imbalance.

[0219] 1.3 Experimental Results

[0220] The performance of each model was compared on the experimental dataset, and the results are shown in Table 1. The results show that while the model relying solely on tabular data performs reasonably well for some credit ratings, it has significant limitations in distinguishing between high-rated (e.g., AAA) and low-rated (e.g., C) samples, especially with significant fluctuations in recall and F1 score, indicating insufficient learning ability for extreme cases or complex features. In contrast, the model incorporating graph structure data performs better overall, verifying the importance of heterogeneous data fusion in credit relationship modeling. Graph structures can effectively capture implicit associations between entities, thereby improving rating accuracy. The method of this invention further deeply integrates temporal features with graph structure information, achieving significant advantages in both overall accuracy (0.916) and recall (0.905). This indicates that introducing temporal dynamic features can better capture the evolution of credit rating, while the collaborative optimization of heterogeneous data further strengthens the model's ability to jointly model local features and global relationships, ultimately demonstrating stronger robustness and generalization ability in complex scenarios.

[0221] Table 1. Results of the present invention and the baseline model on the experimental dataset for corporate credit rating.

[0222]

[0223] Second, window size comparison.

[0224] Since the method of this invention uses time-series dynamic graph learning, the choice of scrolling window size is crucial. Experiments were conducted for different window sizes. Figure 2 The diagram illustrates the impact of window size on model performance: the vertical axis represents the evaluation metric, and the horizontal axis represents the window size. Experimental results show that model performance initially increases and then decreases as the window size increases: performance gradually improves as the window size increases from 1 month to 3 months; peak performance is achieved when the window size is 4 months, striking the optimal balance between computational efficiency and feature capture capability, resulting in the best overall performance. Further increasing the window size leads to a decrease in performance metrics, indicating potential overfitting or information redundancy. Therefore, setting the window size to 4 months yields the best model performance.

[0225] III. Ablation Experiment

[0226] The contribution of each module in the method was evaluated through ablation experiments. As shown in the second row of Table 2, performance significantly decreased after removing the tabular data encoding layer, because this encoder is specifically used to extract the financial and non-financial features of enterprises. The results in the third row indicate that removing the temporal graph attention layer severely impacts model performance, as this layer captures the dynamic evolution of relationships between enterprises, especially long-term temporal changes. The data in the fourth row further illustrates that the model cannot achieve optimal performance after removing the heterogeneous graph attention mechanism, which is responsible for differentially modeling the importance of different types of relationships.

[0227] Table 2. Enterprise credit rating results obtained from ablation experiments.

[0228]

[0229] IV. Conclusion

[0230] This invention proposes a novel corporate credit rating framework that integrates heterogeneous cross-source data through a dynamic temporal graph learning architecture. This framework fuses tabular financial and non-financial data with corporate-level stock return fluctuation sequences to construct a multivariate relationship graph that simultaneously characterizes both local corporate features and inter-corporate relationships. The model utilizes a temporal attention mechanism and a heterogeneous graph neural network to dynamically model the evolution of corporate credit risk over time.

[0231] Extensive experiments on real-world datasets of A-share listed companies demonstrate that our proposed method significantly outperforms traditional machine learning models and state-of-the-art graph neural networks. Compared to static models, our method achieves significant improvements in both prediction accuracy and robustness, particularly excelling in extreme credit ratings such as AAA and C. Ablation studies further validate the effectiveness of our dynamic temporal modeling and heterogeneous data fusion strategy.

[0232] This study provides a more refined, adaptive, and structure-aware credit rating paradigm for the field of financial risk assessment. Future work could explore incorporating unstructured data such as news texts and ESG reports, and extend the time-series modeling framework to scenarios such as macroeconomic shock response and long-term trend adaptation.

Claims

1. A corporate credit rating method based on inter-firm relationships, characterized in that, The specific steps are as follows: Step 1: Collect input data from several relevant companies in a certain industry to obtain tabular data and daily stock return sequences for each company, and perform feature encoding on the tabular data of each company to obtain the node feature matrix of all companies. Step 2: Based on the daily revenue sequence of enterprises, extract the relationships between enterprises and construct an enterprise relationship graph; Step 2.1: Calculate the distance correlation coefficient between any two companies based on the daily return series of each company to quantitatively measure the strength of the volatility correlation between the two companies within a specific period; Step 2.2: For a total of N companies, based on the distance correlation coefficient between any two companies, obtain the company distance correlation matrix D, and determine the relationship between companies based on the matrix values ​​to obtain the company association graph; The enterprise relationship diagram is represented as follows: G=(V,{E + ,E - }) Where V is the set of firms; the edge set E of the firm association graph contains two types of relations: E + E represents an associated edge. - Indicates an edge that is not associated; Step 3: Integrate the enterprise relationship graph data and tabular data into a unified graph structure. The graph neural network uses a time series graph learning strategy based on a rolling window to predict enterprise credit rating. Step 3.1: Establish a time sequence diagram and divide it using a rolling time window mechanism: Each time, select F consecutive months of enterprise relationship diagram data and tabular data to construct a time series diagram sequence {G1, G2, ..., G...}. F Each graph Gt = (Vt, Et) represents the graph structure at time t, where nodes correspond to enterprises, node features are derived from tabular data, and node labels are credit ratings. The time series graph is divided into continuous dynamic graph snapshots according to time windows; within each window, the earlier nodes are assigned to the training set, and the later nodes are assigned to the test set; the node labels in the training set are visible, while the labels in the test set are always hidden and strictly divided according to time order. Step 3.2: After the graph neural network model learns dynamic patterns through the training set and test set within each time window, it updates the parameters based on the results of the current window. At level l and time t, the graph structure is represented as follows: in This represents a set of related edges. Represents the set of unrelated edges; based on the characteristics of node i at level l-1 and time t. Attention scores are obtained by aggregating messages on both associated and unassociated subgraphs using an attention mechanism. Among them W (l,+) W (l,-) Let a be the linear transformation matrix corresponding to the existence and non-existence of edges; (l,+) With a (l,-) These are trainable vectors used to calculate attention scores; and Represents the attention score from node j to node i; ReLU is the activation function. Subsequently, the attention score was normalized using softmax to obtain the attention coefficient: in and Let represent the sets of associated and unassociated neighbors connected to node i at time t, respectively; Next, the messages from the two types of edges are aggregated separately to calculate the feature representation of node i: Finally, the feature representations of the two types of edges are fused: For each type of edge, M attention heads are used: Among them W (l,+,m) With W (l,-,m) For the linear transformation corresponding to the m-th attention head, and This represents the attention coefficient for each head; The fused feature representations are fed into the classification layer to predict credit ratings, and the parameters of the graph neural network are updated based on the prediction results of the training set and the true labels. Predicted results vs. true labels y i Cross-entropy loss between: Prediction probability vector This represents the predicted probability that company i belongs to each credit rating. By minimizing the loss function, the optimal graph neural network model parameters can be obtained at this point. The updated graph neural network is used to predict the credit rating of the test set within the time window, and the label information of the test set is obtained. Step 3.3: For each node i, the output representation is fused according to its current window time step T to update the attention weights of the graph neural network; Output representation for node i at time step T Fusion to generate time-aware representations: Where attention weight β t Calculated by the following formula: Where q is a globally learnable query vector, and W t Let β be the projection matrix at each time step. t This indicates the model's level of attention to the t-th time step; This mechanism adaptively assigns weights to different time steps based on the changing trends of each node; Step 3.4: According to the rolling time window mechanism, retain the nodes and predicted labels of the test set of the previous time window as the training set of the next time window, and complete the training set and test set of the next window according to the window division. Repeat the training process of steps 3.2 and 3.3 for the updated graph neural network. Step 3.5: When scrolling to the last time window, obtain the embedding of enterprise i at the final time F and the final layer L. The predicted credit rating at this time is: in and Here, K represents the learnable weight matrix and bias of the classifier, K is the number of credit ratings, and d is the weight matrix of the classifier. h The dimension represented by the node; From the prediction probability vector The credit rating with the highest probability is selected as the final predicted label for company i. in Predict the probability vector for firm i The kth element; Step four: When a new enterprise input dataset is available, construct a time-series dynamic heterogeneous graph and use the trained graph neural network model to evaluate enterprise credit.

2. The enterprise credit rating method based on inter-enterprise relationships according to claim 1, characterized in that, The input data for the enterprise consists of two parts: tabular data containing financial and non-financial characteristics, and daily stock return series; For company C i Its tabular data is represented as feature vector X i : X i ={x i1 ,x i2 ,x i3 ,…,x id } Where, x id This represents the d-th characteristic value of the enterprise; For company C i Its daily stock return sequence is denoted as R i ={r i1 ,r i2 ,r i3 ,…,r it} Where, r it This represents the stock return on day t.

3. The enterprise credit rating method based on inter-enterprise relationships according to claim 1, characterized in that, The company's daily revenue sequence is as follows: Among them, c ut Company C representing time t u The standard deviation of daily returns, c ut =σ(r) ut ,r u(t-1) ,…,r u(t-T) ), r ut Company C u The daily profit on day t, where T is the length of the lookback window.

4. The enterprise credit rating method based on inter-enterprise relationships according to claim 1, characterized in that, The specific encoding process for the node feature matrix of all enterprises is as follows: Step 3.1, extract the table data X for each company. i Encode it as a fixed-dimensional vector, which serves as the initial feature of the graph nodes; Each sample X i ={x i1 ,x i2 ,x i3 ,…,x id } is considered as a sequence of d numerical features, for each of its scalar features x ij First, an embedding vector is obtained through a learnable linear mapping, and then positional encoding is superimposed: and ij =ϕ(x ij )+P j in For x ij The linear projection of h, where h is the embedding dimension. Encode the position of the j-th feature. This leads to the company C i Input embedding matrix: Step 3.2: A Transformer-based encoder is used to learn feature representations from the tabular data to obtain the feature embeddings for each company. E i The data is fed into the Transformer encoder, where the core computation is multi-head self-attention: in The projection matrix is ​​learnable; The scaling dot product attention is calculated as follows: To prevent excessively large values, softmax(·) normalizes the attention weights. Bullish attention is represented as: MultiHead(E i )=Concat(head1,…,head M )W O M represents the number of attention heads, W O To output the projection matrix; Each Transformer layer also contains a feedforward network and residual connections, so the final output of the encoder is: Z i =LayerNorm(E i +MultiHead(E i )+FFN(·)) Z i For company C i Contextual feature embedding; LayerNorm represents layer normalization; FFN(·) is a positional feedforward network with nonlinear activation; To obtain a uniform representation for each enterprise, average pooling is performed on the d feature embeddings: h i As company C i The final embedding is used for graph node features; Z i [j] represents the encoder output corresponding to the j-th feature; Step 3.3, the node feature matrix of all enterprises is as follows:

5. The enterprise credit rating method based on inter-enterprise relationships according to claim 1, characterized in that, The process of calculating the distance correlation coefficient between any two companies is as follows: For any two companies C u With C v For their respective daily return volatility sequences l u and l v Calculate the Euclidean distance between any two data points i and j at any two different time points in the dataset, thus obtaining two corresponding distance matrices A. ij and B ij : Subsequently, the two distance matrices are centered: in, and Let represent the mean of the i-th row and j-th column of matrix A, respectively. Let be the population mean of matrix A; Next, calculate l u With l v Distance covariance: Where n is l u With l v The number of data points in the data; At the same time, calculate l respectively u With l v Distance variance: Ultimately, Company C received u With C v Distance correlation coefficient:

6. The enterprise credit rating method based on inter-enterprise relationships according to claim 1, characterized in that, The process for determining the relationships between enterprises in an enterprise association diagram is as follows: Set a threshold θ for enterprise correlation, and determine the relationship between the values ​​in matrix D and the threshold θ. If the distance correlation coefficient is greater than the threshold θ, the two enterprises are considered to be related (+); if the distance correlation coefficient is less than θ, the two enterprises are considered to be unrelated (-).