Layout congestion prediction method and device based on Regression Vision Transform

The R-ViT model, integrating Transformer and convolutional components with GAN-based data augmentation and adaptive loss functions, addresses the limitations of CNNs in IC layout congestion prediction, enhancing accuracy and efficiency in the face of data challenges and improving design cycle efficiency.

CN119692286AInactive Publication Date: 2025-03-25GUANGDONG UNIV OF TECH

Patent Information

Application Number
CN202411757643.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Current deep learning models for IC layout congestion prediction face limitations due to their reliance on traditional convolutional neural networks (CNNs), which struggle with global feature extraction, and the challenge of data scarcity and quality in the IC design domain, leading to reduced prediction accuracy and longer design cycles.

Method used

The proposed solution employs a Regression Vision Transformer (R-ViT) model that combines Transformer architecture with convolutional modules, utilizing Generative Adversarial Networks (GANs) for data augmentation and transfer learning to enhance feature extraction and prediction accuracy, and introduces an adaptive Huber loss function for optimized training.

Benefits of technology

This approach significantly improves prediction accuracy and reduces training time by leveraging the strengths of Transformer architectures in global feature modeling and addressing data scarcity issues, while maintaining acceptable inference times for real-time applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692286A_ABST
    Figure CN119692286A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a layout congestion prediction method and a layout congestion prediction device based on Regression VisionTransform. The method comprises the following steps: acquiring a target data set containing real data; training a GAN model through the target data set to obtain a feature graph generator and a tag graph generator; generating a source data set containing virtual data by adopting the feature graph generator and the tag graph generator; pre-training of an R-ViT model is carried out through the source data set, transfer learning is carried out on the pre-trained R-ViT model, and a fine-tuned R-ViT model is obtained; and inputting the target data set into a fine-tuned R-ViT model to obtain predicted wiring information, realizing congestion prediction, building a prediction model by using a Transform architecture in combination with a convolution module, and training a prediction model with equivalent performance and accurate prediction in a relatively short training time through GAN data enhancement, transfer learning and an early stop method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a layout congestion prediction device based on Regression Vision Transformer, a layout congestion prediction method based on Regression Vision Transformer, a computer device and a computer-readable storage medium. Background Art

[0002] In the modern IC back-end design process, design engineers obtain physical verification information of preliminary chip designs through the simulation function of EDA tools. EDA tools are used alternately in different design stages to obtain routability information at each stage, such as layout congestion details, design rule check (DRC) feedback, and voltage drop data. Based on this information, the applicability of the previous design scheme is evaluated to determine whether redesign is needed. However, with the continuous reduction of feature sizes and the increasing complexity of circuit structures, the volume of layout information is also increasing. Traditional simulation algorithms used by EDA usually require a lot of resources and time. Once design problems are found in subsequent steps, it is necessary to return to the previous stage for redesign, which will greatly extend the design closed-loop cycle. Therefore, an early prediction method for layout routability based on machine learning is proposed to timely identify design problems and prevent the design cycle from being extended. Figure 1 A comparative example of IC back-end design flow is shown. The conventional flow and the flow improved by the predictive model are shown in Figure 2. Figure 1 a and Figure 1 The prediction model uses the feature information obtained from the early physical design stage to predict the layout congestion in advance. This method optimizes the design process and avoids too many repeated design stages.

[0003] At present, machine learning (ML) is first applied to the problem of integrated circuit layout prediction. For example, a nonlinear learner is established based on the support vector machine model (SVM) to fit the nonlinear mapping from feature data to congestion data to achieve congestion prediction. The logistic regression model (LR) uses the logical function sigmoid to classify the congested and non-congested areas of the layout to achieve congestion prediction. However, this type of ML model is heavily dependent on manual data, and its prediction accuracy becomes very low as the layout scale increases. With the rise of deep learning (DL) algorithms, further application opportunities have been brought to this field. For example, a fully convolutional neural network (FCN) model has been proposed to use its deconvolution characteristics to generate congestion heat maps with semantic segmentation;

[0004] The DL models used in existing technologies, such as FCN and CGAN, have improved in predictive performance, but still face two major disadvantages: First, the main structure of the above models is convolutional neural network (CNN). Due to the structural characteristics of the convolution kernel, even with the introduction of improvements such as attention mechanisms, these models may still have limitations in extracting global information features from data. Secondly, for deep learning models, the number of training parameters is usually in the millions. Sufficient and high-quality data is the key to successfully training a model. Insufficient data may lead to overfitting, while low-quality data will have an adverse effect on training results. Due to the confidentiality of IC design layout, publicly available layout data is relatively scarce, and obtaining large-scale high-quality data sets has become a major challenge. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a layout congestion prediction method based on Regression Vision Transformer, a layout congestion prediction device based on Regression Vision Transformer, a computer device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.

[0006] In order to solve the above problems, an embodiment of the present invention discloses a layout congestion prediction method based on Regression Vision Transformer, the method comprising:

[0007] Get the target data set containing real data;

[0008] Training the GAN model with the target data set to obtain a feature map generator and a label map generator;

[0009] Using the feature map generator and the label map generator to generate a source data set containing virtual data;

[0010] Pre-training the R-ViT model using the source data set, and performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model;

[0011] The target data set is input into the fine-tuned R-ViT model to obtain predicted routability information and realize congestion prediction.

[0012] Preferably, the training of the GAN model by the target data set to obtain a feature map generator and a label map generator includes:

[0013] The GAN model includes a GAN1 model and a GAN2 model;

[0014] The GAN1 model uses the TranConv module to process the input target data set, gradually restore the dimensions of the fake data, imitate the characteristics of the real data, and randomly generate feature maps;

[0015] The GAN2 model generates a congestion heat map based on the feature map generated by the GAN1 model, extracts input features through the ConvPool module of the encoding part, restores the dimension through alternating TranConv and Conv modules, combines shallow features with deep features through skip connections, optimizes the conversion process from feature map to congestion map, generates a synthetic label map through a Sigmoid activation layer, and obtains a feature map generator and a label map generator.

[0016] Preferably, the pre-training of the R-ViT model using the source data set and transfer learning of the pre-trained R-ViT model to obtain a fine-tuned R-ViT model includes:

[0017] The feature map in the source data set is divided into a sequence of image blocks, each image block is flattened into a D-dimensional vector, a low-dimensional image block sequence is generated by linear projection, and the position code is added to the image block sequence to generate a token sequence; wherein the R-ViT model includes an encoder, a decoder, and an upsampling layer;

[0018] The input token sequence is passed through an encoder composed of L layers of basic modules to generate a coding sequence rich in contextual information; each layer of the encoder consists of a multi-head self-attention module and a multi-layer perceptron module;

[0019] The decoder consists of M layers of basic modules and a set of K learnable embedding masks;

[0020] The embedded mask and the encoding sequence rich in context information are processed by the decoder, and then the output is L2 normalized to generate the final output first mask and second mask to generate a mask block sequence;

[0021] The mask block sequence is upsampled by bilinear interpolation to restore the original image size and have K channels, a 1x1 convolution is applied to compress the original image into a single channel, and a sigmoid activation layer is used to predict the congestion heat map.

[0022] Preferably, the loss function of the R-ViT model is an adaptively adjusted smoothed mean absolute error function, including the following formula:

[0023]

[0024] δ2=δ1+βΔδ1;

[0025] Where n is the number of samples, y is the label, is the predicted value, α is the learning rate, δ0 is the previous state, δ1 is the current state, and δ2 is the next state. represents the partial derivative operation, and β is an empirical parameter.

[0026] Preferably, the method comprises:

[0027] Before each multi-head self-attention module and multi-layer perceptron module, layer normalization is performed, and residual connections are added after each block;

[0028] In the multi-head self-attention module, three point-to-point linear layers map tokens to projection representations, called query vectors, key vectors, and value vectors, respectively. Attention is calculated by calculating scaled dot products. After concatenating the results of each head calculation, the final multi-head attention output is obtained through a linear transformation matrix module.

[0029] The embodiment of the present invention discloses a layout congestion prediction device based on Regression Vision Transformer, the device comprising:

[0030] A first acquisition module is used to acquire a target data set containing real data;

[0031] A training module, used to train the GAN model using the target data set to obtain a feature map generator and a label map generator;

[0032] A generating module, used for generating a source data set containing virtual data by using the feature map generator and the label map generator;

[0033] A transfer learning module, used for pre-training the R-ViT model using the source data set, and performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model;

[0034] The prediction module is used to input the target data set into the fine-tuned R-ViT model to obtain predicted routability information and realize congestion prediction.

[0035] Preferably, the GAN model includes a GAN1 model and a GAN2 model; and the training module includes:

[0036] A generation submodule, for processing the input target data set using the TranConv module through the GAN1 model, gradually restoring the dimensions of the fake data, imitating the features of the real data, and randomly generating feature maps;

[0037] The label map submodule used in the GAN2 model generates a congestion heat map based on the feature map generated by the GAN1 model, extracts input features through the ConvPool module of the encoding part, and then restores the dimension through alternating TranConv and Conv modules, and combines shallow features with deep features through jump connections, optimizes the conversion process from feature map to congestion map, generates a synthetic label map through a Sigmoid activation layer, and obtains a feature map generator and a label map generator.

[0038] Preferably, the transfer learning module includes:

[0039] A partitioning submodule, for partitioning the feature map in the source data set into a sequence of image blocks, each image block is flattened into a D-dimensional vector, a low-dimensional sequence of image blocks is generated by linear projection, and a position code is added to the sequence of image blocks to generate a token sequence; wherein the R-ViT model includes an encoder, a decoder, and an upsampling layer;

[0040] The encoding generation submodule is used to generate a context-rich encoding sequence from the input token sequence through an encoder composed of L layers of basic modules; each layer of the encoder is composed of a multi-head self-attention module and a multi-layer perceptron module;

[0041] Set up submodules, where the decoder consists of M layers of basic modules and a set of K learnable embedding masks;

[0042] A mask generation submodule is used to process the embedded mask and the encoding sequence rich in context information to the decoder, and then the output is L2 normalized to generate the final output first mask and second mask to generate a mask block sequence;

[0043] A prediction submodule is used to upsample the mask block sequence by bilinear interpolation to restore the original image size and have K channels, apply 1x1 convolution to compress the original image into a single channel, and use a sigmoid activation layer to predict a congestion heat map.

[0044] An embodiment of the present invention discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned layout congestion prediction method based on Regression Vision Transformer when executing the computer program.

[0045] An embodiment of the present invention discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned layout congestion prediction method based on Regression Vision Transformer are implemented.

[0046] The embodiments of the present invention include the following advantages:

[0047] The layout congestion prediction method based on Regression Vision Transformer in the embodiment of the present invention comprises: acquiring a target data set containing real data; training a GAN model through the target data set to obtain a feature map generator and a label map generator; using the feature map generator and the label map generator to generate a source data set containing virtual data; pre-training an R-ViT model through the source data set, performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model; inputting the target data set into the fine-tuned R-ViT model to obtain predicted routability information, realizing congestion prediction, building a prediction model using a Transformer architecture combined with a convolutional module, using Adaptive Huber Loss as a loss function, optimizing the model using an Adam optimizer, and training a prediction model with comparable performance and accurate prediction in a shorter training time through GAN data enhancement, transfer learning, and early stopping. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0049] Figure 1 This is a schematic diagram of the process comparison of an IC back-end design in the prior art;

[0050] Figure 2 It is a schematic diagram of an embodiment of a layout congestion prediction method based on Regression Vision Transformer according to an embodiment of the present invention;

[0051] Figure 3 This is an overall framework diagram of a model training according to an embodiment of the present invention;

[0052] Figure 4 is a structural schematic diagram of a GAN model according to an embodiment of the present invention;

[0053] Figure 5 is a structural schematic diagram of an R-ViT model according to an embodiment of the present invention;

[0054] Figure 6 is a schematic structural diagram of an encoder according to an embodiment of the present invention;

[0055] Figure 7is a schematic diagram of the structure of an upsampling layer in an embodiment of the present invention;

[0056] Figure 8 is a schematic diagram of true and false data in an embodiment of the present invention;

[0057] Fig. 9 is a schematic diagram of determining the number of training times using an early stopping method according to an embodiment of the present invention;

[0058] Fig.10 is a schematic diagram of a trade-off relationship between accuracy and prediction inference time in an embodiment of the present invention;

[0059] Fig.11 is a schematic diagram of visualizing the prediction effect of different models in an embodiment of the present invention;

[0060] Fig.12 It is a predicted ROC curve graph and PRC curve graph under different loss functions of an embodiment of the present invention;

[0061] Fig.13 is a schematic diagram of a layout congestion prediction device based on Regression Vision Transformer according to an embodiment of the present invention;

[0062] Fig.14 The diagram is a diagram of the internal structure of a computer device according to an embodiment. DETAILED DESCRIPTION

[0063] In order to make the technical problems, technical solutions and beneficial effects solved by the embodiments of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0064] In a core concept of an embodiment of the present invention, the present invention proposes a prediction model based on a Transformer structure to further enhance the modeling capability of global relationships and better capture the relationship features of different regions of the layout, thereby further improving the accuracy of prediction. Furthermore, a data enhancement model is built using a GAN model, and pre-training is performed using the generated data to assist in speeding up the entire training process. By introducing a regression prediction model based on a Transformer structure (Regression-Vision Transformer, R-ViT), the limitations of traditional convolutional neural networks (CNN) in global feature extraction are overcome, thereby improving the modeling capability of relationship features of different regions of the layout and further improving the accuracy of prediction. At the same time, in response to the current situation of scarce IC design layout data, the present invention also solves the problems of insufficient data and data quality by using a generative adversarial network (GAN) for data enhancement, thereby improving the effect of the training model and speeding up the entire training process.

[0065] Reference Figure 2 , shows a schematic diagram of an embodiment of a layout congestion prediction method based on Regression Vision Transformer according to an embodiment of the present invention, which may specifically include the following steps:

[0066] Step S101, obtaining a target data set containing real data;

[0067] In the embodiment of the present invention, the layout congestion prediction method based on Regression Vision Transformer can be applied to terminal hardware, and the operating system running on the terminal hardware may include Linux, Windows, etc., and the present invention does not impose too many restrictions on this;

[0068] In the embodiment of the present invention, firstly, a target data set containing real data can be obtained, such as Figure 3 The overall framework diagram of the model training of the embodiment of the present invention shown in FIG. 1 is a diagram of the overall framework of the model training of the embodiment of the present invention; the present invention uses a target data set containing real data to train the GAN model to obtain a feature map generator and a label map generator. These generators can generate a large amount of synthetic data to form a source data set. Subsequently, the R-ViT model constructed by the present invention is preliminarily pre-trained on the source data set. Finally, the R-ViT model is fine-tuned on the target data set.

[0069] Step S102: training a GAN model using the target data set to obtain a feature map generator and a label map generator;

[0070] In the embodiment of the present invention, the step of training the GAN model with the target data set to obtain a feature map generator and a label map generator includes:

[0071] The GAN model includes a GAN1 model and a GAN2 model;

[0072] The GAN1 model uses the TranConv module to process the input target data set, gradually restore the dimensions of the fake data, imitate the characteristics of the real data, and randomly generate feature maps;

[0073] The GAN2 model generates a congestion heat map based on the feature map generated by the GAN1 model, extracts input features through the ConvPool module of the encoding part, restores the dimension through alternating TranConv and Conv modules, combines shallow features with deep features through skip connections, optimizes the conversion process from feature map to congestion map, generates a synthetic label map through a Sigmoid activation layer, and obtains a feature map generator and a label map generator.

[0074] like Figure 4 As shown in the figure, the GAN data enhancement model is a double GAN structure (Double-GAN, D-GAN), that is, it consists of two main generative adversarial networks (GAN): GAN1 model and GAN2 model. GAN1 is responsible for randomly generating feature maps, using five TranConv modules to process the input random variable z, gradually restoring the dimension of the fake data, and imitating the characteristics of the real data as much as possible. GAN2 generates a congestion heat map based on the feature map generated by GAN1. The input features are extracted through the ConvPool module of the encoding part, and the dimensions are restored through alternating TranConv and Conv modules. The shallow features are combined with the deep features through jump connections to optimize the conversion process from feature maps to congestion maps. Finally, GAN2 generates a synthetic label map through a Sigmoid activation layer. The discriminator structure is similar to GAN1, which is used to distinguish the true and false of the input and provide feedback for the generation process.

[0075] Step S103: using the feature map generator and the label map generator to generate a source data set containing virtual data;

[0076] The virtual data in the source data set includes a fake feature map and a fake label map.

[0077] Step S104: pre-training the R-ViT model using the source data set, and performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model;

[0078] In the embodiment of the present invention, the R-ViT model is pre-trained by the source data set, and the pre-trained R-ViT model is transferred to learn to obtain a fine-tuned R-ViT model, including:

[0079] The feature map in the source data set is divided into a sequence of image blocks, each image block is flattened into a D-dimensional vector, a low-dimensional image block sequence is generated by linear projection, and the position code is added to the image block sequence to generate a token sequence; wherein the R-ViT model includes an encoder, a decoder, and an upsampling layer;

[0080] The input token sequence is passed through an encoder composed of L layers of basic modules to generate a coding sequence rich in contextual information; each layer of the encoder consists of a multi-head self-attention module and a multi-layer perceptron module;

[0081] The decoder consists of M layers of basic modules and a set of K learnable embedding masks;

[0082] The embedded mask and the encoding sequence rich in context information are processed by the decoder, and then the output is L2 normalized to generate the final output first mask and second mask to generate a mask block sequence;

[0083] The mask block sequence is upsampled by bilinear interpolation to restore the original image size and have K channels, a 1x1 convolution is applied to compress the original image into a single channel, and a sigmoid activation layer is used to predict the congestion heat map.

[0084] In a preferred embodiment of the present invention, the method includes:

[0085] Before each multi-head self-attention module and multi-layer perceptron module, layer normalization is performed, and residual connections are added after each block;

[0086] In the multi-head self-attention module, three point-to-point linear layers map tokens to projection representations, called query vectors, key vectors, and value vectors, respectively. Attention is calculated by calculating scaled dot products. After concatenating the results of each head calculation, the final multi-head attention output is obtained through a linear transformation matrix module.

[0087] like Figure 5 The structural diagram of the R-ViT prediction model shown in Figure 1 shows that the R-ViT prediction model mainly consists of three components: encoder, decoder, and upsampling layer. The core idea of ​​the R-ViT prediction model is to split the input image into multiple image blocks and map each image block to a vector of fixed length. In this way, the image data is converted into a sequence-like format.

[0088] Before feeding the data into R-ViT, the feature map x∈R H×W×C , H=W=256, C=3 is divided into a series of image block sequences The size of each image block is P 2 , the total number of image blocks is N = (H × W) / P 2Each image block is flattened into a D-dimensional vector, and then a low-dimensional sequence embedding x0 = [Ex1, ..., Ex N ]∈R N×D , In order to capture the position information of each image block, a set of learnable position encodings pos=[pos1,...,pos N ]∈R N×D These positional codes are added to the sequence of image blocks to generate tokens z0=x0+pos, effectively converting the image data into sequence data. This data sequence then passes through a series of encoders, decoders, and upsampling layers to ultimately generate a prediction result.

[0089] like Figure 6 The schematic diagram of the encoder structure is shown in Figure 1. Specifically, the input token sequence z0 is passed through an encoder composed of L layers of basic modules to generate a context-rich encoding sequence z L ∈R N×D , which contains contextual information from the previous and next tokens.

[0090] The encoder of each layer consists of a multi-head self-attention (MSA) module and a multi-layer perceptron (MLP, multi-layer fully connected layer) block. Before each module, layer normalization (LN) is performed, and residual connections are added after each block. This process can be expressed by the following mathematical formula:

[0091]

[0092] In the multi-head self-attention module, three point-to-point linear layers (Linear) map tokens to projection representations, called query (Q) vectors, key (K) vectors, and value (V) vectors, respectively. Attention is calculated by calculating the scaled dot product (Scaled Dot-Product). Finally, the results of each head calculation are concatenated (Concat) and the final multi-head attention output is obtained through a linear transformation matrix module (Multi-Head Attention). The formula for the scaled dot product attention mechanism is:

[0093]

[0094] Where d is the dimension of the key vector K, and the encoder receives a sequence z=[z1,....,z N ], and then processed by a series of L-layer basic modules, and finally output a coding sequence z rich in context information L =[z L,1 ,....,zL,N ].

[0095] like Figure 7 The structural diagram of the upsampling layer is shown in the figure. The decoder is also composed of M layers of basic modules, and a set of K learnable embedding masks cls = [cls1,...,cls K ]∈R K×D , used in the decoder to capture semantic categories. These masks are related to z L =[z L,1 ,....,z L,N ] is input to the decoder for processing, and then the output is L2 normalized to generate the final output c∈R K×D and z M ∈R N×D Mask. By multiplying these two outputs, a sequence of masked blocks is generated, expressed as:

[0096] The upsampling layer is Figure 6 As shown. Each mask block is upsampled by bilinear interpolation to restore the original image size and have K channels. Subsequently, a 1x1 convolution is applied to compress it into a single channel. Finally, a sigmoid activation layer is used to predict the congestion heatmap.

[0097] The upsampling layer in the present invention uses a convolutional activation module instead of a softmax and layer normalization (LN) layer. The advantages of this method are multifaceted. First, compared to the Transformer model, the convolutional neural network (CNN) has an inherent translation equivariance advantage, which means that CNN can converge efficiently even on smaller data sets. This feature helps to alleviate the data scarcity problem faced in this scenario. Secondly, processing the input feature map through the R-ViT model can capture rich long-range contextual semantic information, thereby achieving better feature extraction. The introduction of the convolutional module alleviates some of the shortcomings of the Transformer architecture when processing small and medium-sized data sets. In addition, this combined method is more suitable for solving regression problems by utilizing the spatial perception ability of CNN and the global context capture ability of ViT.

[0098] Step S105: input the target data set into the fine-tuned R-ViT model to obtain predicted routability information and implement congestion prediction.

[0099] In the embodiment of the present invention, the loss function of the R-ViT model is an adaptively adjusted smoothed mean absolute error function, including the following formula:

[0100]

[0101]

[0102] δ2=δ1+βΔδ1;

[0103] Where n is the number of samples, y is the label, is the predicted value, α is the learning rate, δ0 is the previous state, δ1 is the current state, and δ2 is the next state. represents the partial derivative operation, and β is an empirical parameter.

[0104] Specifically, in order to better train the regression ViT model, the loss functions adopted in the present invention are mean square error (MSE), mean absolute error (MAE), and smooth mean absolute error (Huber Loss) as comparison. At the same time, the present invention proposes a smooth mean absolute error hanshu (Adaptive Huber Loss) with adaptive adjustment.

[0105] Let: n is the number of samples, y is the label, is the predicted value.

[0106] 1. The expression of MAE is as follows:

[0107]

[0108] MAE treats all errors equally, giving the same gradient to small and large errors. In addition, since the absolute value function is not differentiable at zero, MAE is not smooth in some places, which may make the optimization process more difficult, leading to convergence problems.

[0109] 2. The expression of MSE is as follows:

[0110]

[0111] Since the error is squared, MSE gives higher weight to larger errors. This means that even a few outliers can significantly increase the loss value and affect the performance of the model. In other words, MSE is very sensitive to outliers.

[0112] 3. Huber Loss expression is as follows:

[0113]

[0114] The Huber Loss function cleverly combines the advantages of MSE and MAE. When the prediction error is within a certain threshold, Huber Loss behaves as MSE; when the error exceeds the threshold, it behaves as MAE. Compared with MSE, it is less sensitive to outliers, and because it is differentiable at each point, it is smoother than MAE, so it performs better in gradient-based optimization methods. However, the choice of threshold hyperparameter is critical. It determines the balance between MSE and MAE, which in turn affects the performance of the model. When the threshold is small, it tends to behave as MAE; when the threshold is large, it behaves as MSE.

[0115] 4. The adaptive huber loss expression of the embodiment of the present invention is as follows:

[0116]

[0117]

[0118] δ2=δ1+βΔδ1;

[0119] In order to control the threshold during model training and achieve dynamic changes, the present invention proposes an adaptive HuberLoss. Unlike fixed hyperparameters, the threshold δ is set as a learnable parameter. Based on the above three formulas, the correction of δ can be calculated by gradient. Note that α is the learning rate, δ0 represents the previous state, δ1 represents the current state, and δ2 represents the next state. Large errors provide a penalty to reduce the increment when δ is large. With the subtle adjustment of the Adam optimization algorithm, δ is continuously refined during the training process to ensure that the model always moves along the optimal path. Therefore, although the structure of Huber Loss remains unchanged, the adaptive Huber Loss of an embodiment of the present invention can be dynamically adjusted based on real-time loss feedback to better adapt to the complex requirements of the task.

[0120] The algorithm test experiment of the present invention was completed on a server equipped with GPU: NVIDIA GA100 40GB; CPU: Intel(R) Xeon(R) Platinum 8368CPU@2.40GHz 152; Memory: 1TB; Operating System: Ubuntu20.04.6; Programming Language: Python3.10.4; Pytorch1.13.1. The present invention uses the CircuitNet dataset to evaluate the performance improvement of the present invention. The dataset was developed by Peking University and is based on the layout data of 6 open source RISC-V designs. By adjusting the combination of different settings, more than 10,000 data samples were generated. The verification work of the present invention used a dataset in CircuitNet specifically for congestion prediction. The content of this dataset is mainly the physical features of the circuit extracted from the IC layout, such as pin density, macro layout area, etc. Each feature map corresponds to a label map (indicating congestion hotspots)

[0121] First, the D-GAN data augmentation model built by training the dataset is used to obtain the source dataset, which is mainly composed of generated data, corresponding to the target dataset composed of real data, such as Figure 7 shown.

[0122] Next, the built Regression-ViT congestion prediction model is placed on the source dataset for pre-training.

[0123] Using transfer learning technology, the pre-trained R-ViT is placed on the target dataset for formal training.

[0124] Through Figure 8 The early stopping method shown determines that the optimal number of model training is 20 epochs, thereby saving training costs.

[0125] Comparative experiments were conducted with commonly used CNN structure prediction models, such as FCN, CGAN, SegNet, ConvNeXt, etc. The test data is shown below, and the visualization effect is compared. Fig.10 As shown:

[0126] Table 1: Comparison of different model structure similarity, root mean square error, receiver characteristic curve area, precision-recall curve area, and total training time indicators

[0127] Table 2: Comparison of confusion matrix, accuracy, and inference prediction time results of different models

[0128]

[0129] The data in Tables 1 and 2 show that after the improvement, compared with the previous similar CNN architecture model, the test indicators of the prediction effect have been improved, not only in terms of accuracy, but also in terms of shortening the required training time.

[0130] Visualization of experimental results analysis: Fig. 9 As shown in the figure, the improvement of the model's accuracy is achieved by sacrificing the prediction and inference time compared to other models. This is a trade-off, but with the acceleration of the GPU, the sacrifice brought by this inference time is very small, and the average delay does not exceed 20 milliseconds, so it is acceptable.

[0131] Depend on Fig.11 It can be seen that after adopting Huber loss, ROC-AUC is significantly improved, but PRC-AUC decreases. By drawing curves and analyzing the calculation formula, we draw the following conclusions: Although MAE performs well on ROC and MSE performs well on PRC-AUC, Huber loss provides balanced performance on ROC and PRC. The adaptive Huber loss function proposed in the present invention has a ROC curve above other curves and has a higher TPR (true positive rate) on the y-axis. According to the calculation formula of TPR, a higher TPR means that the number of correctly identified congested areas is larger, which indicates that the model performs better in identifying congested areas. However, this also means that the model is more likely to misjudge non-congested areas as congested areas, resulting in a significant increase in FP (false positive). Although TP (true positive) has increased, the increase is less than that of FP. According to the accuracy calculation formula, the accuracy decreases due to the increase in the denominator. This indirectly leads to a decrease in the PRC curve, which leads to a decrease in PRC-AUC. A higher recognition rate of congested areas is an advantage of high ROC-AUC, but it also means that some non-congested areas are misjudged as congested areas. In other words, although the Adaptive Huber Loss proposed by the present invention sacrifices an acceptable level of accuracy, it greatly improves the recognition rate of congested areas.

[0132] The layout congestion prediction method based on Regression Vision Transformer in the embodiment of the present invention comprises: acquiring a target data set containing real data; training a GAN model through the target data set to obtain a feature map generator and a label map generator; using the feature map generator and the label map generator to generate a source data set containing virtual data; pre-training an R-ViT model through the source data set, performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model; inputting the target data set into the fine-tuned R-ViT model to obtain predicted routability information, realizing congestion prediction, building a prediction model using a Transformer architecture combined with a convolutional module, using Adaptive Huber Loss as a loss function, optimizing the model using an Adam optimizer, and training a prediction model with comparable performance and accurate prediction in a shorter training time through GAN data enhancement, transfer learning, and early stopping.

[0133] The present invention adopts a regression model based on the Transformer architecture, and utilizes the powerful global information modeling capability of the Transformer to better capture the complex relationship between different areas of the integrated circuit layout, thereby improving the accuracy of congestion prediction. In existing deep learning models, commonly used loss functions (such as mean square error MSE and mean absolute error MAE) have their own limitations. For example, MSE is too sensitive to outliers, and MAE does not have smooth gradient changes when dealing with large errors, which may lead to optimization difficulties. In order to overcome these problems, the present invention introduces an adaptive Huber Loss (Adaptive Huber Loss), which can dynamically adjust the threshold according to feedback during training, taking into account the advantages of MSE and MAE, and is not sensitive to large errors, but also maintains a smooth optimization process, thereby obtaining better convergence effects in training.

[0134] In integrated circuit design, due to data scarcity and confidentiality issues, it is challenging to obtain large-scale, high-quality layout data sets. Traditional deep learning models often rely on a large amount of high-quality data for training. Insufficient data may lead to overfitting or poor training results. In order to solve this problem, the present invention uses a generative adversarial network (GAN) to perform data enhancement and generate synthetic data to expand the data set, thereby improving the training effect of the model. In addition, the present invention also combines transfer learning technology, which improves the adaptability of the model to new data by pre-training on the source data set and fine-tuning on the target data set, further improving the training efficiency.

[0135] Compared with traditional deep learning models, the R-ViT model of the present invention has improved accuracy and significantly shortened training time. By adopting the early stopping method, the present invention can reduce unnecessary calculations in the training process and reduce training costs without sacrificing prediction performance. In addition, despite the use of a more complex model structure (combination of Transformer and convolution modules), the inference time of the model is still maintained within an acceptable range under GPU acceleration, ensuring real-time prediction capabilities.

[0136] Through experimental verification, the R-ViT model proposed in this invention has improved all performance indicators compared with traditional CNN architecture models (such as FCN, CGAN, SegNet, ConvNeXt), especially in key indicators such as accuracy, ROC-AUC, and PRC-AUC, showing better results. This shows that the present invention not only improves the prediction accuracy, but also effectively shortens the training time, and has strong practical application value.

[0137] It should be noted that, for the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that this embodiment is not limited by the order of the actions described, because according to this embodiment, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this embodiment.

[0138] Reference Fig.13 , shows a structural block diagram of an embodiment of a layout congestion prediction device based on Regression Vision Transformer of this embodiment, which may specifically include the following modules:

[0139] A first acquisition module 301 is used to acquire a target data set containing real data;

[0140] A training module 302 is used to train a GAN model using the target data set to obtain a feature map generator and a label map generator;

[0141] A generating module 303, configured to generate a source data set containing virtual data by using the feature map generator and the label map generator;

[0142] A transfer learning module 304 is used to pre-train the R-ViT model using the source data set, and perform transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model;

[0143] The prediction module 305 is used to input the target data set into the fine-tuned R-ViT model to obtain predicted routability information and realize congestion prediction.

[0144] Preferably, the GAN model includes a GAN1 model and a GAN2 model; and the training module includes:

[0145] A generation submodule, for processing the input target data set using the TranConv module through the GAN1 model, gradually restoring the dimensions of the fake data, imitating the features of the real data, and randomly generating feature maps;

[0146] The label map submodule used in the GAN2 model generates a congestion heat map based on the feature map generated by the GAN1 model, extracts input features through the ConvPool module of the encoding part, and then restores the dimension through alternating TranConv and Conv modules, and combines shallow features with deep features through jump connections, optimizes the conversion process from feature map to congestion map, generates a synthetic label map through a Sigmoid activation layer, and obtains a feature map generator and a label map generator.

[0147] Preferably, the transfer learning module includes:

[0148] A partitioning submodule, for partitioning the feature map in the source data set into a sequence of image blocks, each image block is flattened into a D-dimensional vector, a low-dimensional sequence of image blocks is generated by linear projection, and a position code is added to the sequence of image blocks to generate a token sequence; wherein the R-ViT model includes an encoder, a decoder, and an upsampling layer;

[0149] The encoding generation submodule is used to generate a context-rich encoding sequence from the input token sequence through an encoder composed of L layers of basic modules; each layer of the encoder is composed of a multi-head self-attention module and a multi-layer perceptron module;

[0150] Set up submodules, where the decoder consists of M layers of basic modules and a set of K learnable embedding masks;

[0151] A mask generation submodule is used to process the embedded mask and the encoding sequence rich in context information to the decoder, and then the output is L2 normalized to generate the final output first mask and second mask to generate a mask block sequence;

[0152] A prediction submodule is used to upsample the mask block sequence by bilinear interpolation to restore the original image size and have K channels, apply 1x1 convolution to compress the original image into a single channel, and use a sigmoid activation layer to predict a congestion heat map.

[0153] Preferably, the loss function of the R-ViT model is an adaptively adjusted smoothed mean absolute error function, including the following formula:

[0154]

[0155]

[0156] δ2=δ1+βΔδ1;

[0157] Where n is the number of samples, y is the label, is the predicted value, α is the learning rate, δ0 is the previous state, δ1 is the current state, and δ2 is the next state. represents the partial derivative operation, and β is an empirical parameter.

[0158] Preferably, the device comprises:

[0159] The layer normalization module is used to perform layer normalization before each multi-head self-attention module and multi-layer perceptron module, and add residual connections after each block;

[0160] The attention output module is used in the multi-head self-attention module. Three point-to-point linear layers map tokens to projection representations, called query vectors, key vectors, and value vectors, respectively. Attention is calculated by calculating the scaled dot product. After splicing the results of each head calculation, the final multi-head attention output is obtained through the linear transformation matrix module.

[0161] Each module in the above-mentioned layout congestion prediction device based on Regression Vision Transformer can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0162] The layout congestion prediction device based on Regression Vision Transformer provided above can be used to execute the layout congestion prediction method based on Regression Vision Transformer provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0163] In one embodiment, a computer device is provided, wherein the computer device includes a medical infusion device, and its internal structure diagram can be as follows: Fig.14As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a layout congestion prediction device method based on Regression Vision Transformer is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0164] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0165] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the above embodiment are implemented:

[0166] Get the target data set containing real data;

[0167] Training the GAN model with the target data set to obtain a feature map generator and a label map generator;

[0168] Using the feature map generator and the label map generator to generate a source data set containing virtual data;

[0169] Pre-training the R-ViT model using the source data set, and performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model;

[0170] The target data set is input into the fine-tuned R-ViT model to obtain predicted routability information and realize congestion prediction.

[0171] Preferably, the training of the GAN model by the target data set to obtain a feature map generator and a label map generator includes:

[0172] The GAN model includes a GAN1 model and a GAN2 model;

[0173] The GAN1 model uses the TranConv module to process the input target data set, gradually restore the dimensions of the fake data, imitate the characteristics of the real data, and randomly generate feature maps;

[0174] The GAN2 model generates a congestion heat map based on the feature map generated by the GAN1 model, extracts input features through the ConvPool module of the encoding part, restores the dimension through alternating TranConv and Conv modules, combines shallow features with deep features through skip connections, optimizes the conversion process from feature map to congestion map, generates a synthetic label map through a Sigmoid activation layer, and obtains a feature map generator and a label map generator.

[0175] Preferably, the pre-training of the R-ViT model using the source data set and transfer learning of the pre-trained R-ViT model to obtain a fine-tuned R-ViT model includes:

[0176] The feature map in the source data set is divided into a sequence of image blocks, each image block is flattened into a D-dimensional vector, a low-dimensional image block sequence is generated by linear projection, and the position code is added to the image block sequence to generate a token sequence; wherein the R-ViT model includes an encoder, a decoder, and an upsampling layer;

[0177] The input token sequence is passed through an encoder composed of L layers of basic modules to generate a coding sequence rich in contextual information; each layer of the encoder consists of a multi-head self-attention module and a multi-layer perceptron module;

[0178] The decoder consists of M layers of basic modules and a set of K learnable embedding masks;

[0179] The embedded mask and the encoding sequence rich in context information are processed by the decoder, and then the output is L2 normalized to generate the final output first mask and second mask to generate a mask block sequence;

[0180] The mask block sequence is upsampled by bilinear interpolation to restore the original image size and have K channels, a 1x1 convolution is applied to compress the original image into a single channel, and a sigmoid activation layer is used to predict the congestion heat map.

[0181] Preferably, the loss function of the R-ViT model is an adaptively adjusted smoothed mean absolute error function, including the following formula:

[0182]

[0183]

[0184] δ2=δ1+βΔδ1;

[0185] Where n is the number of samples, y is the label, is the predicted value, α is the learning rate, δ0 is the previous state, δ1 is the current state, and δ2 is the next state. represents the partial derivative operation, and β is an empirical parameter.

[0186] Preferably, the method comprises:

[0187] Before each multi-head self-attention module and multi-layer perceptron module, layer normalization is performed, and residual connections are added after each block;

[0188] In the multi-head self-attention module, three point-to-point linear layers map tokens to projection representations, called query vectors, key vectors, and value vectors, respectively. Attention is calculated by calculating scaled dot products. After concatenating the results of each head calculation, the final multi-head attention output is obtained through a linear transformation matrix module.

[0189] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above embodiment are implemented:

[0190] Get the target data set containing real data;

[0191] Training the GAN model with the target data set to obtain a feature map generator and a label map generator;

[0192] Using the feature map generator and the label map generator to generate a source data set containing virtual data;

[0193] Pre-training the R-ViT model using the source data set, and performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model;

[0194] The target data set is input into the fine-tuned R-ViT model to obtain predicted routability information and realize congestion prediction.

[0195] Preferably, the training of the GAN model by the target data set to obtain a feature map generator and a label map generator includes:

[0196] The GAN model includes a GAN1 model and a GAN2 model;

[0197] The GAN1 model uses the TranConv module to process the input target data set, gradually restore the dimensions of the fake data, imitate the characteristics of the real data, and randomly generate feature maps;

[0198] The GAN2 model generates a congestion heat map based on the feature map generated by the GAN1 model, extracts input features through the ConvPool module of the encoding part, restores the dimension through alternating TranConv and Conv modules, combines shallow features with deep features through skip connections, optimizes the conversion process from feature map to congestion map, generates a synthetic label map through a Sigmoid activation layer, and obtains a feature map generator and a label map generator.

[0199] Preferably, the pre-training of the R-ViT model using the source data set and transfer learning of the pre-trained R-ViT model to obtain a fine-tuned R-ViT model includes:

[0200] The feature map in the source data set is divided into a sequence of image blocks, each image block is flattened into a D-dimensional vector, a low-dimensional image block sequence is generated by linear projection, and the position code is added to the image block sequence to generate a token sequence; wherein the R-ViT model includes an encoder, a decoder, and an upsampling layer;

[0201] The input token sequence is passed through an encoder composed of L layers of basic modules to generate a coding sequence rich in contextual information; each layer of the encoder consists of a multi-head self-attention module and a multi-layer perceptron module;

[0202] The decoder consists of M layers of basic modules and a set of K learnable embedding masks;

[0203] The embedded mask and the encoding sequence rich in context information are processed by the decoder, and then the output is L2 normalized to generate the final output first mask and second mask to generate a mask block sequence;

[0204] The mask block sequence is upsampled by bilinear interpolation to restore the original image size and have K channels, a 1x1 convolution is applied to compress the original image into a single channel, and a sigmoid activation layer is used to predict the congestion heat map.

[0205] Preferably, the loss function of the R-ViT model is an adaptively adjusted smoothed mean absolute error function, including the following formula:

[0206]

[0207]

[0208] δ2=δ1+βΔδ1;

[0209] Where n is the number of samples, y is the label, is the predicted value, α is the learning rate, δ0 is the previous state, δ1 is the current state, and δ2 is the next state. represents the partial derivative operation, and β is an empirical parameter.

[0210] Preferably, the method comprises:

[0211] Before each multi-head self-attention module and multi-layer perceptron module, layer normalization is performed, and residual connections are added after each block;

[0212] In the multi-head self-attention module, three point-to-point linear layers map tokens to projection representations, called query vectors, key vectors, and value vectors, respectively. Attention is calculated by calculating scaled dot products. After concatenating the results of each head calculation, the final multi-head attention output is obtained through a linear transformation matrix module.

[0213] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0214] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0215] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0216] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0217] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0218] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0219] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0220] The above describes in detail a layout congestion prediction method based on Regression Vision Transformer, a layout congestion prediction device based on Regression Vision Transformer, a computer device and a computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A layout congestion prediction method based on Regression Vision Transformer, characterized in that: The method comprises: Get the target data set containing real data; Training the GAN model with the target data set to obtain a feature map generator and a label map generator; Using the feature map generator and the label map generator to generate a source data set containing virtual data; Pre-training the R-ViT model using the source data set, and performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model; The target data set is input into the fine-tuned R-ViT model to obtain predicted routability information and realize congestion prediction.

2. The layout congestion prediction method based on RegressionVision Transformer according to claim 1, characterized in that: The step of training the GAN model through the target data set to obtain a feature map generator and a label map generator includes: The GAN model includes a GAN1 model and a GAN2 model; The GAN1 model uses the TranConv module to process the input target data set, gradually restore the dimensions of the fake data, imitate the characteristics of the real data, and randomly generate feature maps; The GAN2 model generates a congestion heat map based on the feature map generated by the GAN1 model, extracts input features through the ConvPool module of the encoding part, restores the dimension through alternating TranConv and Conv modules, combines shallow features with deep features through skip connections, optimizes the conversion process from feature map to congestion map, generates a synthetic label map through a Sigmoid activation layer, and obtains a feature map generator and a label map generator.

3. The layout congestion prediction method based on RegressionVision Transformer according to claim 1, characterized in that: The pre-training of the R-ViT model by the source data set and transfer learning of the pre-trained R-ViT model to obtain a fine-tuned R-ViT model include: The feature map in the source data set is divided into a sequence of image blocks, each image block is flattened into a D-dimensional vector, a low-dimensional image block sequence is generated by linear projection, and the position code is added to the image block sequence to generate a token sequence; wherein the R-ViT model includes an encoder, a decoder, and an upsampling layer; The input token sequence is passed through an encoder composed of L layers of basic modules to generate a coding sequence rich in contextual information; each layer of the encoder consists of a multi-head self-attention module and a multi-layer perceptron module; The decoder consists of M layers of basic modules and a set of K learnable embedding masks; The embedded mask and the encoding sequence rich in context information are processed by the decoder, and then the output is L2 normalized to generate the final output first mask and second mask to generate a mask block sequence; The mask block sequence is upsampled by bilinear interpolation to restore the original image size and have K channels, a 1x1 convolution is applied to compress the original image into a single channel, and a sigmoid activation layer is used to predict the congestion heat map.

4. The layout congestion prediction method based on RegressionVision Transformer according to claim 1, characterized in that: The loss function of the R-ViT model is an adaptively adjusted smoothed mean absolute error function, including the following formula: δ2=δ1+βΔδ1; Where n is the number of samples, y is the label, is the predicted value, α is the learning rate, δ0 is the previous state, δ1 is the current state, and δ2 is the next state. represents the partial derivative operation, and β is an empirical parameter.

5. The layout congestion prediction method based on RegressionVision Transformer according to claim 3, characterized in that: The method comprises: Before each multi-head self-attention module and multi-layer perceptron module, layer normalization is performed, and residual connections are added after each block; In the multi-head self-attention module, three point-to-point linear layers map tokens to projection representations, called query vectors, key vectors, and value vectors, respectively. Attention is calculated by calculating scaled dot products. After concatenating the results of each head calculation, the final multi-head attention output is obtained through a linear transformation matrix module.

6. A layout congestion prediction device based on Regression Vision Transformer, characterized in that: The device comprises: A first acquisition module is used to acquire a target data set containing real data; A training module, used to train the GAN model using the target data set to obtain a feature map generator and a label map generator; A generating module, used for generating a source data set containing virtual data by using the feature map generator and the label map generator; A transfer learning module, used for pre-training the R-ViT model using the source data set, and performing transfer learning on the pre-trained R-ViT model to obtain a fine-tuned R-ViT model; The prediction module is used to input the target data set into the fine-tuned R-ViT model to obtain predicted routability information and realize congestion prediction.

7. The layout congestion prediction device based on RegressionVision Transformer according to claim 6, characterized in that: The GAN model includes a GAN1 model and a GAN2 model; The training module includes: A generation submodule, for processing the input target data set using the TranConv module through the GAN1 model, gradually restoring the dimensions of the fake data, imitating the features of the real data, and randomly generating feature maps; The label map submodule used in the GAN2 model generates a congestion heat map based on the feature map generated by the GAN1 model, extracts input features through the ConvPool module of the encoding part, and then restores the dimension through alternating TranConv and Conv modules, and combines shallow features with deep features through jump connections, optimizes the conversion process from feature map to congestion map, generates a synthetic label map through a Sigmoid activation layer, and obtains a feature map generator and a label map generator.

8. The layout congestion prediction device based on RegressionVision Transformer according to claim 6, characterized in that: The transfer learning module includes: A partitioning submodule, for partitioning the feature map in the source data set into a sequence of image blocks, each image block is flattened into a D-dimensional vector, a low-dimensional sequence of image blocks is generated by linear projection, and a position code is added to the sequence of image blocks to generate a token sequence; wherein the R-ViT model includes an encoder, a decoder, and an upsampling layer; The encoding generation submodule is used to generate a context-rich encoding sequence from the input token sequence through an encoder composed of L layers of basic modules; each layer of the encoder is composed of a multi-head self-attention module and a multi-layer perceptron module; Set up submodules, where the decoder consists of M layers of basic modules and a set of K learnable embedding masks; A mask generation submodule is used to process the embedded mask and the encoding sequence rich in context information to the decoder, and then the output is L2 normalized to generate the final output first mask and second mask to generate a mask block sequence; A prediction submodule is used to upsample the mask block sequence by bilinear interpolation to restore the original image size and have K channels, apply 1x1 convolution to compress the original image into a single channel, and use a sigmoid activation layer to predict a congestion heat map.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the layout congestion prediction method based on RegressionVisionTransformer described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the layout congestion prediction method based on RegressionVision Transformer described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Transform-GAN-based packaging format layout intelligent design method

    CN117745887A

Cited By

  • Design rule detection and model training method and device, and electronic equipment

    CN120542374A