Data augmentation method and related apparatus
By using the conjunctive paradigm data augmentation method in chip verification, splitting and transforming constraint nodes, and generating new training data, the problem of insufficient training data for the AI model in chip verification is solved, and the performance and solution efficiency of the model are improved. Augmented data that is close to the original data is achieved.
Patent Information
- Application Number
- PCT/CN2024/072335
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-21
- Filing Date
- 2024-01-15
- Publication Date
- 2024-09-26
AI Technical Summary
The existing AI models used in chip verification have poor model performance due to insufficient training data. Especially in logical equivalence verification, it is difficult to effectively improve the model's solving efficiency and accuracy.
Through the data augmentation method of the conjunctive normal form, including obtaining the variable constraint graph, splitting the constraint nodes, performing transformation operations, and merging subgraphs, a new conjunctive normal form is generated as training data, thereby improving the performance of the model and approaching the solution difficulty raw data.
It effectively improves the performance and solving efficiency of the model, ensures that the generated augmented data is close to the original data in structure and difficulty, enhances the model's generalization ability and accuracy, and reduces the model's dependence on feature engineering.
Smart Images

Figure CN2024072335_26092024_PF_FP
Abstract
Description
A data augmentation method and related device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 21, 2023, with application number 202310310023.1 and invention name “A data augmentation method and related device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence (AI) technology, and in particular to a data augmentation method and related devices. Background Art
[0003] In recent years, with the advancement of ultra-large-scale integrated circuit (VLSI) technology and the reduction of process nodes, all aspects of chip development have become increasingly challenging and difficult. As we all know, chip design is a complex process involving multiple steps, including early functional design, logic synthesis, simulation, later physical synthesis, layout, and routing. Throughout the design process, chip verification tools are among the most frequently used to ensure that chip functionality meets expectations.
[0004] As AI-related technologies have achieved good results in many fields such as computer vision and natural language processing, the chip design field has also gradually begun to use AI-driven methods to solve problems in this scenario (such as design space exploration, early yield congestion prediction, formal verification, etc.) to further accelerate the chip design process.
[0005] For example, AI technology is applied to logic equivalence checking (LEC) in chip verification. LEC verifies the logical equivalence of two circuits, while AI technology uses a trained model to verify the logical equivalence of input circuit data. However, models used in chip verification typically require a large amount of training data beforehand. If the circuit data used to train the model is insufficient, the performance of the resulting trained model is often poor.
[0006] Summary of the Invention
[0007] This application provides a data augmentation method that can augment model training data, which is beneficial to improving the performance of the final trained model.
[0008] The first aspect of the present application provides a data augmentation method, which is applied to perform data augmentation on a conjunction normal form. The method includes: obtaining a first variable constraint graph of a conjunction normal form, the conjunction normal form is obtained based on circuit design data, the first variable constraint graph includes multiple variable nodes and multiple constraint nodes, the multiple variable nodes are used to represent variable literals in the conjunction normal form, and the multiple constraint nodes are used to represent constraint clauses in the conjunction normal form. Among them, the multiple variable nodes correspond one-to-one to the multiple variable literals in the conjunction normal form, and the multiple constraint nodes correspond one-to-one to the multiple constraint clauses in the conjunction normal form. In addition, the variable nodes and the constraint nodes in the first variable constraint graph are also connected by edges. In the first variable constraint graph, the connection relationship between the variable node and the constraint node is used to indicate that the variable literal represented by the variable node is located in the constraint clause represented by the constraint node.
[0009] Then, at least one first constraint node in the first variable constraint graph is split to obtain multiple variable constraint subgraphs, wherein each first constraint node is split into multiple constraint nodes, and the constraint nodes obtained after the split are located in different variable constraint subgraphs. In addition, at least one first constraint node does not belong to the first node set in the first variable constraint graph, that is, the first constraint node is selected from constraint nodes outside the first node set in the first variable constraint graph. The first node set includes multiple second constraint nodes, and the constraint clauses represented by the multiple second constraint nodes are the root cause of the unsolvable conjunctive normal form.
[0010] Next, a transformation operation is performed on the plurality of second constraint nodes in the plurality of variable constraint subgraphs to obtain a plurality of transformed variable constraint subgraphs, wherein the transformation operation may specifically refer to performing position and attribute transformation on the nodes.
[0011] Finally, the multiple transformed variable constraint subgraphs are merged to obtain a second variable constraint graph. The second variable constraint graph is used to generate a new conjunctive normal form, which is used as a training sample for training the circuit verification model. For example, the multiple transformed variable constraint subgraphs can be merged by merging the constraint nodes in different transformed variable constraint subgraphs.
[0012] In this approach, the constraint nodes in the variable constraint graph of the conjunctive normal form (CNF) serving as the model input data are split. During the splitting process, the constraint nodes that render the CNF unsolvable are retained. Transformations are then performed on the resulting subgraphs, and the transformed subgraphs are then merged to generate a new CNF. This split-transform-merge operation ensures that the generated augmented data is similar in difficulty to the original data while altering the original data. This augments the model training data and improves the performance of the resulting model.
[0013] In one possible implementation, after obtaining the second variable constraint diagram, the second variable constraint diagram can be transformed into a conjunction normal form to obtain a new conjunction normal form; then the pre-trained model is fine-tuned according to the conjunction normal form and the new conjunction normal form to obtain a fine-tuned model, wherein the pre-trained model is a circuit verification model for processing the conjunction normal form.
[0014] Simply put, before using a pre-trained model to process the conjunction normal form, data augmentation can be performed on the conjunction normal form to be processed based on the data augmentation method provided in this embodiment, and the pre-trained model can be fine-tuned based on the original data and the augmented data, and then the corresponding conjunction normal form can be processed based on the fine-tuned model.
[0015] In this solution, based on the pre-trained model, data augmentation is performed on the conjunction paradigm to be processed, and the pre-trained model is fine-tuned online based on the original data and the augmented data. This enables the model to quickly adjust its processing strategy when facing different data, and provide feature engineering that is more compatible with the current data to be processed, thereby effectively improving the performance of the model.
[0016] In one possible implementation, the fine-tuned model is used to perform one of the following tasks: logical equivalence verification or temporal equivalence verification.
[0017] In one possible implementation, in the process of grouping variable nodes in a variable constraint graph, multiple variable nodes in a first variable constraint graph can be grouped according to the connection relationship between multiple variable nodes and multiple constraint nodes to obtain the group to which each variable node in the multiple variable nodes belongs.
[0018] Then, based on the group to which each variable node belongs, it is determined that the constraint nodes connected to variable nodes from different groups belong to at least one first constraint node. In other words, if a constraint node is connected to variable nodes corresponding to multiple groups, then the constraint node can be determined to belong to the constraint node to be split (i.e., the at least one first constraint node mentioned above).
[0019] In one possible implementation, in the process of grouping multiple variable nodes in a first variable constraint graph based on the connection relationship between the multiple variable nodes and the multiple constraint nodes, a variable index graph may be first constructed based on the connection relationship between the multiple variable nodes and the multiple constraint nodes. The variable index graph only includes multiple variable nodes in the first variable constraint graph, and the multiple variable nodes have a connection relationship. The connection relationship between any two variable nodes in the multiple variable nodes indicates that the two variable nodes are connected to the same constraint node in the first variable constraint graph. That is, the variable index graph and the first variable constraint graph have the same multiple variable nodes; and for any two variable nodes in the variable index graph, if the two variable nodes are connected to the same variable node in the first variable constraint graph, the two variable nodes are connected.
[0020] Secondly, multiple variable nodes are grouped according to the connection density between multiple variable nodes in the variable index graph, wherein the connection density between variable nodes in the same group is greater than the connection density between variable nodes in different groups.
[0021] In this scheme, by learning the composition rules of the original data corresponding to the conjunction normal form (such as the community attributes existing in circuit data) and performing the grouping of variable nodes according to the corresponding composition rules, it is beneficial to subsequently split the constraint nodes according to the grouping of variable nodes, ensuring that the new data generated after the splitting and merging process is structurally close to the original data, and ensuring that the new data and the original data have the same data distribution, thereby effectively improving the performance of the final trained model.
[0022] In one possible implementation, in the process of determining the first constraint node that needs to be split, the number of variable nodes connected to each constraint node in multiple constraint nodes can be determined first; then, at least one first constraint node is determined based on the number of variable nodes connected to each constraint node.
[0023] For example, multiple constraint nodes are sorted in descending order based on the number of variable nodes they connect to, with constraint nodes that connect to more variable nodes being ranked higher and constraint nodes that connect to fewer variable nodes being ranked lower. Then, a preset number of constraint nodes are selected in descending order as the first constraint nodes to be split.
[0024] In this scheme, by selecting the constraint nodes to be split according to the number of variable nodes connected to the constraint nodes, the constraint nodes connected to more variable nodes can be selected as much as possible for splitting, so that the structures of the variable constraint subgraphs obtained by splitting are relatively similar. Ultimately, it is ensured that the variable constraint graph generated after the splitting and merging process is structurally close to the original variable constraint graph, ensuring that the original data and augmented data have the same distribution, thereby effectively improving the performance of the model obtained by subsequent training.
[0025] In one possible implementation, merging multiple transformed variable constraint subgraphs may specifically include: predicting constraint nodes belonging to homologous nodes in multiple transformed variable constraint subgraphs through a prediction model, wherein the prediction model is trained based on multiple variable constraint subgraphs, and multiple constraint nodes in multiple variable constraint subgraphs obtained by splitting the same first constraint node belong to homologous nodes; merging constraint nodes belonging to homologous nodes in multiple transformed variable constraint subgraphs to obtain a second variable constraint graph.
[0026] In simple terms, after the first variable constraint graph is split into multiple variable constraint subgraphs, since the multiple constraint nodes obtained by splitting a constraint node in the first variable constraint graph are distributed in different variable constraint subgraphs, there will be a constraint node belonging to the same source node in each of the different multiple variable constraint subgraphs. By using multiple variable constraint subgraphs as training data for the prediction model, the prediction model can learn which constraint nodes in the multiple variable constraint subgraphs are obtained by splitting the same constraint node (that is, learn which constraint nodes belong to the same source node). In this way, after the prediction model is trained, the prediction model can be used to predict the constraint nodes belonging to the same source nodes in the transformed multiple variable constraint subgraphs, and then merge these constraints belonging to the same source nodes to achieve the merging of the transformed multiple variable constraint subgraphs.
[0027] In this scheme, by adopting the prediction model to learn the splitting rules of the variable constraint subgraph, and then merging the transformed variable constraint subgraphs based on the prediction model, the transformed variable constraint subgraphs can be merged by referring to the original splitting rules of the variable constraint subgraph, so as to ensure that the structure of the second variable constraint graph obtained after the merger is as close as possible to the original first variable constraint graph, thereby ensuring the validity of the augmented data.
[0028] In one possible implementation, after obtaining the second variable constraint graph, a second node set in the second variable constraint graph can be determined, the constraint clauses represented by the constraint nodes included in the second node set are the root cause of the unsolvable conjunctive normal form represented by the second variable constraint graph, and the number of constraint nodes in the second node set is less than a preset threshold; then, the variable nodes connected to the constraint nodes in the second node set are added to the second variable constraint graph to obtain a third variable constraint graph, wherein the constraint clauses represented by the constraint nodes in the second node set are no longer the root cause of the unsolvable conjunctive normal form represented by the third variable constraint graph.
[0029] In other words, by adding connection variable nodes to the constraint nodes in the second node set, these constraint nodes no longer become UNSAT cores. That is, these constraint nodes are no longer the root cause of the unsolvable conjunctive normal form represented by the third variable constraint graph. This makes the number of constraint nodes in the third variable constraint graph that are the root cause of the unsolvable conjunctive normal form similar to the number of constraint nodes in the first node set of the first variable constraint graph. This makes the difficulty of solving the third variable constraint graph similar to that of the first variable constraint graph, thus ensuring the validity of the augmented data.
[0030] In this scheme, by adding connected variable nodes to the smaller UNSAT cores in the second variable constraint graph, these UNSAT cores can be effectively eliminated, thereby reducing the dominance of the newly added UNSAT cores on the difficulty of solving the problem, making the difficulty of solving the augmented data as close as possible to the original data.
[0031] In one possible implementation, the above-mentioned transformation operation includes one or more of the following operations: adjusting the positions of multiple second constraint nodes, adjusting the positions of variable nodes connected to multiple second constraint nodes, and adjusting the properties of variable nodes connected to multiple second constraint nodes.
[0032] A second aspect of the present application provides a data augmentation device, comprising:
[0033] an acquisition module, configured to acquire a first variable constraint graph of a conjunction normal form, wherein the conjunction normal form is obtained based on circuit design data, the first variable constraint graph including a plurality of variable nodes and a plurality of constraint nodes, the plurality of variable nodes being used to represent variable literals in the conjunction normal form, and the plurality of constraint nodes being used to represent constraint clauses in the conjunction normal form;
[0034] a processing module configured to split at least one first constraint node in a first variable constraint graph to obtain a plurality of variable constraint subgraphs, wherein each first constraint node is split into a plurality of constraint nodes, and the constraint nodes obtained after the splitting are located in different variable constraint subgraphs, at least one first constraint node does not belong to a first node set in the first variable constraint graph, the first node set includes a plurality of second constraint nodes, and the constraint clauses represented by the plurality of second constraint nodes are the root cause of the unsolvable conjunction normal form;
[0035] The processing module is further configured to perform a transformation operation on the plurality of second constraint nodes in the plurality of variable constraint subgraphs to obtain a plurality of transformed variable constraint subgraphs;
[0036] The processing module is also used to merge multiple transformed variable constraint subgraphs to obtain a second variable constraint graph, which is used to generate a new conjunction normal form, and the new conjunction normal form is used as a training sample for training the circuit verification model.
[0037] In a possible implementation, the processing module is further configured to:
[0038] Transform the second variable constraint graph into a conjunction normal form to obtain a new conjunction normal form;
[0039] The pre-trained model is fine-tuned according to the conjunction paradigm and the new conjunction paradigm to obtain a fine-tuned model, wherein the pre-trained model is a circuit verification model for processing the conjunction paradigm.
[0040] In one possible implementation, the fine-tuned model is used to perform one of the following tasks: logical equivalence verification or temporal equivalence verification.
[0041] In a possible implementation, the processing module is further configured to:
[0042] Grouping a plurality of variable nodes in the first variable constraint graph according to connection relationships between the plurality of variable nodes and the plurality of constraint nodes to obtain a group to which each of the plurality of variable nodes belongs, wherein in the first variable constraint graph, the connection relationship between the variable node and the constraint node is used to indicate that a variable literal represented by the variable node is located in a constraint clause represented by the constraint node;
[0043] According to the group to which each variable node belongs, it is determined that the constraint nodes connected with the variable nodes of different groups belong to at least one first constraint node.
[0044] In a possible implementation, the processing module is further configured to:
[0045] constructing a variable index graph according to a connection relationship between a plurality of variable nodes and a plurality of constraint nodes, wherein the variable index graph only includes a plurality of variable nodes, and the plurality of variable nodes have a connection relationship, and the connection relationship between any two variable nodes among the plurality of variable nodes is used to indicate that the two variable nodes are connected to the same constraint node in the first variable constraint graph;
[0046] The plurality of variable nodes are grouped according to the connection density between the plurality of variable nodes in the variable index graph, wherein the connection density between the variable nodes in the same group is greater than the connection density between the variable nodes in different groups.
[0047] In a possible implementation, the processing module is further configured to:
[0048] determining the number of variable nodes connected to each of the plurality of constraint nodes;
[0049] At least one first constraint node is determined according to the number of variable nodes connected to each constraint node.
[0050] In a possible implementation, the processing module is further configured to:
[0051] Predicting, by a prediction model, constraint nodes belonging to the same source node in a plurality of transformed variable constraint subgraphs, wherein the prediction model is trained based on the plurality of variable constraint subgraphs, and a plurality of constraint nodes in the plurality of variable constraint subgraphs obtained by splitting the same first constraint node are the same source nodes;
[0052] The constraint nodes belonging to the same source nodes in the multiple transformed variable constraint subgraphs are merged to obtain a second variable constraint graph.
[0053] In a possible implementation, the processing module is further configured to:
[0054] determining a second node set in the second variable constraint graph, wherein the constraint clauses represented by the constraint nodes included in the second node set are the root cause of the unsolvable conjunctive normal form represented by the second variable constraint graph, and the number of the constraint nodes in the second node set is less than a preset threshold;
[0055] In the second variable constraint graph, the variable nodes connected to the constraint nodes in the second node set are added to obtain a third variable constraint graph, wherein the constraint clauses represented by the constraint nodes in the second node set are no longer the root cause of the unsolvable conjunction normal form represented by the third variable constraint graph.
[0056] In one possible implementation, the above-mentioned transformation operation includes one or more of the following operations: adjusting the positions of multiple second constraint nodes, adjusting the positions of variable nodes connected to multiple second constraint nodes, and adjusting the properties of variable nodes connected to multiple second constraint nodes.
[0057] A third aspect of the present application provides a data augmentation device, which may include a processor coupled to a memory, wherein the memory stores program instructions. When the processor executes the program instructions stored in the memory, the method of the first aspect or any implementation of the first aspect is implemented. For details of the steps in each possible implementation of the first aspect performed by the processor, please refer to the first aspect and will not be repeated here.
[0058] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method of any implementation of the first aspect.
[0059] In an eighth aspect, the present application provides a circuit system, which includes a processing circuit, and the processing circuit is configured to execute a method of any implementation manner of the above-mentioned first aspect.
[0060] The fifth aspect of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method of any implementation manner of the first aspect.
[0061] In a sixth aspect of the present application, a chip system is provided, which includes a processor for supporting a server or a threshold value acquisition device to implement the functions involved in any implementation of the first aspect, for example, sending or processing the data and / or information involved in the above method. In one possible design, the chip system also includes a memory for storing program instructions and data necessary for the server or communication device. The chip system can be composed of a chip or can include a chip and other discrete devices.
[0062] The beneficial effects of the second to sixth aspects mentioned above can be referred to the introduction of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] FIG1 is a schematic diagram of a LEC process according to an embodiment of the present application;
[0064] FIG2 is a schematic diagram of a process for accelerating equivalence verification provided by an embodiment of the present application;
[0065] FIG3 is a schematic diagram showing a comparison between original data and randomly generated data in the related art;
[0066] FIG4 is a flow chart of a data augmentation method provided in an embodiment of the present application;
[0067] FIG5 is a schematic diagram of converting a conjunction normal form into a variable constraint diagram provided by an embodiment of the present application;
[0068] FIG6 is a schematic diagram of splitting a constraint node in a variable constraint graph provided by an embodiment of the present application;
[0069] FIG7 is a schematic diagram of performing a transformation operation on a node in a variable constraint subgraph according to an embodiment of the present application;
[0070] FIG8 is a schematic diagram of merging transformed variable constraint subgraphs provided in an embodiment of the present application;
[0071] FIG9 is a schematic diagram of a process of constructing a variable index graph based on a first variable constraint graph and grouping variable nodes according to an embodiment of the present application;
[0072] FIG10 is a schematic diagram of an UNSAT kernel in a second variable constraint graph provided in an embodiment of the present application;
[0073] FIG11 is a schematic diagram of a process for performing data augmentation and online fine-tuning on an AI verification platform according to an embodiment of the present application;
[0074] FIG12 is a schematic diagram of a process for generating augmented data according to an embodiment of the present application;
[0075] FIG13 is a schematic diagram showing a comparison of the structural fidelity of data generated by different methods provided in an embodiment of the present application;
[0076] FIG14 is a schematic diagram showing a comparison of the difficulty and fidelity of data generated by different methods provided in an embodiment of the present application;
[0077] FIG15 is a comparative diagram showing how different methods provided in the embodiments of the present application improve LEC verification efficiency;
[0078] FIG16 is a schematic structural diagram of a data augmentation device provided in an embodiment of the present application;
[0079] FIG17 is a schematic diagram of a structure of an execution device provided in an embodiment of the present application;
[0080] FIG18 is a schematic structural diagram of a chip provided in an embodiment of the present application;
[0081] FIG19 is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solutions and advantages of this application more clear, the embodiments of this application are described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only embodiments of a part of this application, rather than all embodiments. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0083] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the descriptions used in this way can be interchangeable where appropriate so that the embodiments can be implemented in a sequence other than that illustrated or described in this application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or that are inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The named or numbered process steps can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. In actual application, there may be other division methods. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. Moreover, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this application.
[0084] To facilitate understanding, some technical terms involved in the embodiments of this application are first introduced below.
[0085] (1) Electronic Design Automation (EDA)
[0086] EDA is a general term for a range of industrial software that uses computer software to complete the design, simulation, and verification processes of large-scale integrated circuits. Modern EDA tools integrate a variety of technologies, including graphics, computational mathematics, topological logic, microelectronics, materials science, and artificial intelligence.
[0087] (2) Formal Verification
[0088] Formal verification is a verification method in integrated circuit design. The main idea is to verify whether the function of the circuit design is consistent with the expectation through rigorous mathematical proof. Depending on the technology, it can be divided into equivalence verification, formal model checking, and theorem proving.
[0089] (3) Logic Equivalence Checking (LEC)
[0090] LEC compares the consistency of logical functions across different stages and levels of the circuit design process. Compared to exhaustive simulation, equivalence verification is more efficient and can typically verify the logical equivalence of millions of gates across integrated circuits in a matter of hours.
[0091] (4) Boolean Satisfactory Problem (SAT)
[0092] SAT, also known as the propositional satisfiability problem, is the problem of determining whether there exists an interpretation that satisfies a given Boolean formula. In short, SAT asks whether the variables in a given Boolean formula can be consistently replaced with true or false such that the Boolean formula evaluates to true.
[0093] (5) Conjunctive Normal Form (CNF)
[0094] Conjunctive normal form is a standard form of expression for propositional formulas and the standard input form for SAT solvers. Specifically, any propositional formula can be transformed into the form (A1∨A2)∧(A3∨A4), first disjunction and then conjunction, which is the conjunctive normal form. In conjunctive normal form, A1, A2, A3, and A4 are called variable literals, and (A1∨A2) and (A3∨A4) are called constraint clauses. When a constraint clause contains certain variable literals, the variable literals are said to appear in the constraint clause. For example, the variable literals A1 and A2 appear in the constraint clause (A1∨A2).
[0095] (6)Disjunction
[0096] Disjunction is one of the most commonly used logical connectives, meaning "or" and typically represented by the symbol "V." Disjunction is a binary logical operator in logic and mathematics. Its operation is: if one of its two variables is true, the result is true; if both variables are false, the result is false. Disjunction is widely used in many fields, including data mining and databases.
[0097] (7) Conjunction
[0098] Conjunction is one of the five basic propositional connectives, represented by the symbol "∧". The symbol "∧" is pronounced as "and" and is an abstraction of the connective "and" in natural language.
[0099] Specifically, let p and q represent arbitrary propositions. The formula p∧q represents the conjunction of p and q, called a conjunction, pronounced "p and q." Here, p∧q is an abstraction of the compound proposition "p and q" and is also the propositional form of the compound proposition "p and q." The truth of p∧q is determined by the truth of p and q. When both p and q are true, p∧q is true; when either p or q is false, or both are false, p∧q is false.
[0100] (8)UNSAT core
[0101] In an unsolvable Boolean satisfiability problem (i.e., UNSAT), the constraint clauses that directly lead to the unsolvability of the Boolean satisfiability problem are called the UNSAT kernel. Generally speaking, the UNSAT kernel is not unique, but is usually a subset of the original constraints. The number of constraint clauses contained in the UNSAT kernel is called the UNSAT size.
[0102] (9) Data Augmentation
[0103] Data augmentation involves leveraging existing data to create reasonable variants. In machine learning, sufficient training samples are crucial for model training. Data augmentation not only enriches training samples but also mitigates model overfitting, further expands the search space, and helps the model optimize towards a global optimal solution.
[0104] (10) Fine-tune
[0105] Fine-tuning involves combining new data with a trained network model and parameters to further optimize it, making it more suitable for the task at hand at a lower training cost. In the AI field, "pre-training + network fine-tuning" is a commonly used transfer learning framework.
[0106] (11) Neural Network
[0107] A neural network can be composed of neural units. A neural unit can refer to an operation unit that takes xs (i.e., input data) and intercept 1 as input. The output of the operation unit can be:
[0108] Where s = 1, 2, ... n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal of the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
[0109] (12) Deep Neural Networks
[0110] Deep Neural Network (DNN), also known as multi-layer neural network, can be understood as a neural network with many hidden layers. There is no special metric for "many" here. According to the position of different layers of DNN, the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neural unit in the i-th layer must be connected to any neural unit in the i+1-th layer. Although DNN looks complicated, the work of each layer is actually not complicated. Simply put, it is the following linear relationship expression: in, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer is just an input vector After such a simple operation, the output vector Since there are many DNN layers, the coefficient W and the offset vector The definition of these parameters in DNN is as follows: Take the coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neural unit in the second layer to the 2nd neural unit in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscript corresponds to the output of the third layer index 2 and the input of the second layer index 4. In summary, the coefficients from the kth neural unit in the L-1th layer to the jth neural unit in the Lth layer are defined as It's important to note that the input layer has no W parameter. In deep neural networks, more hidden layers allow the network to better capture complex real-world situations. Theoretically, a predictive model with more parameters is more complex and has greater "capacity," meaning it can handle more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrix for all layers of a trained deep neural network (a weight matrix formed by the vectors W of many layers).
[0111] (13) Convolutional Neural Networks
[0112] A convolutional neural network is a deep neural network with a convolutional architecture. It consists of a feature extractor consisting of a convolutional layer and a subsampling layer. The feature extractor can be thought of as a filter, and the convolution process can be thought of as convolving a trainable filter with an input image or feature map.
[0113] A convolutional layer is a layer of neurons in a convolutional neural network that performs convolution on the input signal. Within a convolutional layer, a neuron can only connect to a subset of neurons in adjacent layers. A convolutional layer typically contains several feature planes, each composed of a rectangular arrangement of neurons. Neurons within the same feature plane share weights, known as convolution kernels. These weights can be understood as position-independent extraction of image information. The underlying principle is that the statistical information from one part of the image is the same as from other parts. This means that image information learned in one part can also be applied to other parts. Therefore, the same learning can be used to obtain image information at all locations in the image. Multiple convolution kernels can be used within the same convolutional layer to extract different image information. Generally speaking, the greater the number of convolution kernels, the richer the image information captured by the convolution operation.
[0114] Convolution kernels can be initialized as matrices of random size, and during the training process of the convolutional neural network, the convolution kernels can be learned to obtain reasonable weights. In addition, the direct benefit of shared weights is that they reduce the number of connections between the layers of the convolutional neural network, while also reducing the risk of overfitting.
[0115] (14) Graph Convolution Networks (GCN)
[0116] Graph Convolutional Neural Networks generalize convolution operations from traditional data (images or grids) to graph data. The key is to learn a function f that aggregates its own features X i and the neighbor's characteristic X j To generate the representation of node vi, where j∈N(vi ).
[0117] In recent years, with the advancement of ultra-large-scale integrated circuit (VLSI) technology and the reduction of process nodes, all aspects of chip development have become increasingly challenging and complex. As we all know, chip design is a complex process encompassing multiple steps, including early functional design, logic synthesis, simulation, later physical synthesis, layout, and routing. EDA tools are a general term for a range of computer-aided software used in the chip design process. Throughout the chip design process, chip verification tools are among the most frequently used tools to ensure that chip functionality meets expectations. Research shows that the time and resource allocation to the verification phase of each chip generation has increased significantly compared to the previous generation, and the growth rate of verification work far exceeds that of other development stages, posing a more severe challenge for chip verification teams. How to achieve efficient and accurate verification in a shorter timeframe and with fewer resource constraints has become a key challenge that current verification EDA tools must address. Furthermore, chip-related work requires extensive domain knowledge and presents high technical barriers. Abstracting and simplifying domain-specific problems to create easily understandable models is also a key to promoting the development of EDA technology.
[0118] As AI-related technologies have achieved good results in many fields such as computer vision and natural language processing, the EDA field has also gradually begun to use AI-driven methods to solve problems in this scenario (such as design space exploration, early yield congestion prediction, formal verification, etc.) to further accelerate the chip design process and shorten the chip's time to market.
[0119] Taking the LEC that runs through the entire design process during the chip verification process as an example, the function of LEC is as its name suggests, and what needs to be completed is to verify whether two circuits are logically equivalent. Specifically, please refer to Figure 1, which is a flow chart of a LEC provided in an embodiment of the present application. As shown in Figure 1, there is a standard circuit and a circuit to be verified. First, it is determined whether all verification points in the standard circuit and the circuit to be verified have completed verification. If all verification points have completed verification, the program exits successfully; if there are verification points in the standard circuit and the circuit to be verified that have not completed verification, a point to be verified is matched from the standard circuit and the circuit to be verified, and the logic cone corresponding to the point to be verified is found, and an exclusive or (XOR) connection is performed. The circuit constructed in this way is called a splicing circuit, that is, a Miter circuit. Then, the Miter circuit is input into the equivalence verification program, and according to the solution result, it is selected to execute verification of the next equivalence point or fault repair.
[0120] Currently, there are multiple methods for equivalence verification, with mainstream approaches including theorem proving, simulation, and SAT. Thanks to the development of efficient SAT solvers, SAT-based LEC has become a mainstream approach. Furthermore, AI-driven SAT-based LEC tools are also becoming a mainstream development trend.
[0121] Compared to other scenarios, industrial LEC is one of the modules in the EDA process that best matches AI, mainly due to the following factors. 1. High frequency and time consumption: In real industrial scenarios, even for medium-sized circuits, the number of verification points that need to be compared is at least 100,000, and the solution of a single Miter circuit is relatively time-consuming. As long as the solution time is slightly improved, there will be objective benefits overall. 2. Topological similarity: The logic cones of adjacent comparison points often overlap, and the constructed Miter circuit topology has a certain degree of similarity, which facilitates feature extraction by the AI model. 3. No impact on correctness: The essence of LEC equivalence proof is a full-space traversal. The completeness of its solution is a basic attribute of LEC. AI only needs to be beneficial to narrowing the solution space to a certain extent.
[0122] The following will take the application of AI technology to SAT solution in LEC as an example to introduce in detail the process of applying AI models to chip verification.
[0123] Specifically, SAT is the first non-deterministic polynomial (NP) problem to be proven to be of polynomial complexity. It has wide applications in computer software design, circuit design, cryptography and other fields. Its standard expression is the conjunction normal form, which is the conjunction of several different disjuncts.
[0124] Solving SAT involves determining whether a reasonable set of assignments can be found that makes the conjunctive normal form true. If such a set of assignments exists, the problem is called SAT. If no such set of assignments can be found after traversing the entire space, the problem is called UNSAT. The key to using SAT to verify LEC equivalence lies in the fact that the logical relationships of the circuit can be converted into conjunctive normal form in polynomial time. This is then solved by calling a SAT solver, and the circuits are then judged based on the returned results to determine whether they are equivalent. Equivalence corresponds to UNSAT, while inequivalence corresponds to SAT.
[0125] Taking the LEC scenario as an example, LEC contains a large number of UNSAT problems. Solving UNSAT problems requires traversing the entire space, which is a difficult problem in SAT. Although modern mainstream SAT solvers all adopt a "conflict clause-based" solution process and utilize efficient conflict management mechanisms to reduce invalid searches, their solution efficiency for industrial-level SAT problems still faces challenges. How to use various feature engineering methods to better match the solver's parameter settings and solution strategy to the problem to be solved is crucial to the solution search efficiency and is currently a key breakthrough point in accelerating LEC based on SAT solvers.
[0126] For example, please refer to Figure 2, which is a schematic diagram of a process flow for accelerating equivalence verification provided by an embodiment of the present application. Figure 2 shows the core process of the LEC algorithm based on the SAT solver in the existing LEC tool to accelerate equivalence verification:
[0127] In step A, first, match the points to be verified from the standard circuit and the circuit to be verified, find the corresponding logic cones respectively, and perform XOR connection to construct the Miter circuit.
[0128] Step B: Encode the Miter circuit and convert the Miter circuit into conjunctive normal form.
[0129] Step C: Extract features from the conjunction normal form for solving the problem (including solving resource limits, solving strategy selection, solver hyperparameter configuration, etc.). Depending on the feature extraction method, there are two approaches: rule-based circuit feature extraction (Rule-Based Identification) and AI-based model-based problem prediction (AI-Based Identification).
[0130] Among them, rule-based circuit feature extraction refers to the use of static learning methods to derive the strong correlation of local signals from the topological relationship of the circuit, convert the strongly correlated signal relationship into constraints, and add them to the solution process, thereby narrowing the solution space and accelerating the solution; using statistical information such as the properties of the circuit and the size of the conjunction paradigm to manually select the optimal solver.
[0131] Predicting the nature of a problem using an AI model means that during the SAT solving process, the optimal search strategies for SAT and UNSAT problems differ. To fully leverage the solver's performance, using an AI model to predict the nature of the problem before using the solver to solve the task, and configuring a solving strategy based on the predicted results, can also accelerate the solution process.
[0132] Step D: Complete the solution task based on the configured solver and return the calculation results.
[0133] Step E: perform the next calculation to be verified until all the points to be verified are calculated.
[0134] In the process shown in Figure 2, the AI model-based problem prediction suffers from low accuracy. Specifically, the current optimal SAT problem prediction model suffers from a significant decline in performance when applied to circuit data, with accuracy dropping from over 90% to around 60%.
[0135] To improve the prediction accuracy of AI models, related technologies have proposed enriching the original training data through data augmentation, making the learning space of the AI model smoother and thus improving the performance of the model. Specifically, based on the different current data augmentation technologies, they can be roughly divided into the following two categories:
[0136] 1) Random generation: limit the number of variables and constraints, and randomly generate the connection between variable literals and constraint clauses through a probability model;
[0137] 2) Image perspective: Extract the coefficient relationship of the conjunction normal form, that is, express it as a 0 / 1 coefficient matrix. Treat the coefficient matrix as pixels in the image. After generating the corresponding image through image generation technology, the generated image is converted into the form of the conjunction normal form.
[0138] While relevant technologies have enriched the original training data to a certain extent, existing data augmentation methods fail to simultaneously consider the structure and difficulty of the SAT problem, resulting in significantly different data from the original data. From an AI perspective, the original data and the data generated by data augmentation methods are not identically distributed. Consequently, using data with significantly different distributions as the same training set to train a model not only fails to improve the model's generalization, but can actually degrade the model's original performance.
[0139] For example, please refer to Figure 3, which shows a schematic diagram comparing original data and randomly generated data in related art. As shown in Figure 3, the original data is the coefficient matrix of industrial LEC data converted into conjunctive normal form, while the randomly generated data is the result of random generation. Obviously, due to the presence of fixed functional modules in LEC circuits, even if the circuit is modeled in conjunctive normal form, the relationship between the coefficients can still reflect different degrees of clustering to a certain extent. However, the randomly generated data shown in Figure 3 is too uniform, resulting in a significant difference in data distribution between the original and randomly generated data.
[0140] In general, the AI models currently used in circuit verification usually require a large amount of training data in advance to perform model training. If the circuit data used to train the model is not rich enough, the performance of the final trained model is often poor.
[0141] In view of this, an embodiment of the present application provides a data augmentation method. For the conjunctive normal form as the model input data, the constraint nodes in the variable constraint graph of the conjunctive normal form are split, and during the splitting process, the constraint nodes that cause the conjunctive normal form to have no solution are kept unsplit. In the subgraphs obtained after the splitting, the constraint nodes that cause the conjunctive normal form to have no solution are transformed, and the transformed subgraphs are merged to obtain a new conjunctive normal form. Through this split-transform-merge operation, it is possible to ensure that the difficulty of solving the generated augmented data is close to that of the original data while changing the original data, thereby achieving augmentation of the model training data and improving the performance of the model finally trained.
[0142] Specifically, the data augmentation method provided in the embodiment of the present application is applied to perform data augmentation on the conjunction normal form to generate augmented data that is close to the original conjunction normal form data in structure and solution difficulty, thereby enriching the training data set of the model and improving the performance of the model finally trained.
[0143] Since the conjunction normal form is the standard expression of SAT, and SAT has a wide range of applications in the field of circuit design (such as chip circuit design), the data augmentation method provided in the embodiments of the present application can be applied to fields such as circuit design, computer software design, model design, or cryptography to enrich the training data sets of AI models in the above fields.
[0144] For example, please refer to Figure 4, which is a flowchart of a data augmentation method provided in an embodiment of the present application. As shown in Figure 4, the data augmentation method includes the following steps 401-404.
[0145] Step 401, obtain a first variable constraint graph of a conjunction normal form, where the conjunction normal form is obtained based on circuit design data. The first variable constraint graph includes multiple variable nodes and multiple constraint nodes, where the multiple variable nodes are used to represent variable literals in the conjunction normal form, and the multiple constraint nodes are used to represent constraint clauses in the conjunction normal form.
[0146] In this embodiment, the conjunctive normal form is a standard expression form for propositional formulas and is also the standard input form for SAT solutions. Specifically, the conjunctive normal form in this embodiment can be derived based on circuit design data, and can be used to represent the SAT in the following circuit design fields. Alternatively, it can also represent the SAT in any of the following fields: computer software design, model design, or cryptography. This embodiment does not specifically limit the fields to which the conjunctive normal form applies.
[0147] Conjunctive normal form usually consists of variable literals and constraint clauses. Variable literals are contained in constraint clauses, and the relationship between variable literals in the same constraint clause is "or" (denoted by the symbol "V"), while the relationship between different constraint clauses is "and" (denoted by the symbol "∧").
[0148] For example, in the conjunctive normal form (A1∨A2)∧(A3∨A4)∧(A2∨A3∨A5), A1, A2, A3, A4, and A5 are variable literals, and (A1∨A2), (A3∨A4), and (A2∨A3∨A5) are constraint clauses.
[0149] Specifically, circuit design data is typically composed of various circuits and switches, and the circuits and switches have corresponding relationships. For example, when using the conjunction normal form to represent circuit design data, the relationship between switches is represented by the conjunction "∧" when multiple switches are connected in series. This means that the circuit can only be energized if all the switches in the series are 1. The relationship between circuits is represented by the disjunction "V" when multiple circuits are connected in parallel. This means that as long as one of the parallel circuits is energized, the parallel circuit can be energized.
[0150] Since the relationship between variable literals and constraint clauses in the conjunction normal form is fixed, the conjunction normal form can be converted into a variable constraint graph (Literal-Clause-Graph, LCG), that is, the conjunction normal form can be represented in the form of a graph.
[0151] In this embodiment, the first variable constraint graph is obtained by transforming the conjunctive normal form. The first variable constraint graph includes multiple variable nodes and multiple constraint nodes. The multiple variable nodes correspond one-to-one to the multiple variable literals in the conjunctive normal form, and the multiple constraint nodes correspond one-to-one to the multiple constraint clauses in the conjunctive normal form. That is, the variable literals in the conjunctive normal form can be represented by variable nodes in the first variable constraint graph, and the constraint clauses in the conjunctive normal form can be represented by constraint nodes in the first variable constraint graph.
[0152] Furthermore, variable nodes and constraint nodes in the first variable constraint graph are connected by edges. In the first variable constraint graph, the connection between a variable node and a constraint node indicates that the variable literal represented by the variable node is within the constraint clause represented by the constraint node. In other words, for any variable node in the first variable constraint graph, if the variable literal represented by the variable node is within a constraint clause, an edge connects the variable node to the constraint node corresponding to the constraint clause.
[0153] For example, please refer to Figure 5, which is a schematic diagram of a conjunctive normal form provided in an embodiment of the present application converted into a variable constraint graph. As shown in Figure 5, after the conjunctive normal form (A1∨A2)∧(A3∨A4)∧(A2∨A3∨A5) is converted into a variable constraint graph, the variable constraint graph obtained by conversion includes variable node A1, variable node A2, variable node A3, variable node A4, variable node A5, and constraint node 1, constraint node 2 and constraint node 3. Among them, constraint node 1 is connected to variable node A1 and variable node A2, representing that variable literal A1 and variable literal A2 are located in constraint clause 1; constraint node 2 is connected to variable node A3 and variable node A4, representing that variable literal A3 and variable literal A4 are located in constraint clause 2; constraint node 3 is connected to variable node A2, variable node A4 and variable node A5, representing that variable literal A2, variable literal A4 and variable literal A5 are located in constraint clause 3.
[0154] Step 402: split at least one first constraint node in the first variable constraint graph to obtain multiple variable constraint subgraphs, wherein each first constraint node is split into multiple constraint nodes, and the constraint nodes obtained after the split are located in different variable constraint subgraphs, at least one first constraint node does not belong to the first node set in the variable constraint graph, and the first node set includes multiple second constraint nodes, and the constraint clauses represented by the multiple second constraint nodes are the root cause of the unsolvable nature of the conjunction normal form.
[0155] In this embodiment, at least one first constraint node that needs to be split in the first variable constraint graph can be determined, and then each first constraint node can be split, so that each first constraint node is split into multiple constraint nodes (for example, into two constraint nodes). The number of constraint nodes into which a first constraint node is split is not specifically limited, and can be, for example, two or three. For ease of description, the following description is based on the splitting of a first constraint node into two constraint nodes.
[0156] Since each first constraint node is connected to a variable node in the first variable constraint graph, after splitting a first constraint node into multiple constraint nodes, the connection relationship between the multiple constraint nodes and the variable nodes can be determined based on the connection relationship between the first constraint node and the variable nodes. For example, when splitting a first constraint node into two constraint nodes, assuming that the first constraint node is connected to multiple variable nodes, one of the constraint nodes can be connected to some of the multiple variable nodes, and the other constraint node can be connected to another part of the multiple variable nodes.
[0157] In general, after a first constraint node is split into multiple constraint nodes, the number of edges connecting the multiple constraint nodes is the same as the number of edges connecting the first constraint node.
[0158] Furthermore, the constraint nodes obtained after the splitting are located in different variable constraint subgraphs, i.e., different variable constraint subgraphs include different constraint nodes obtained after the splitting. For example, when two first constraint nodes in a first variable constraint graph are split, and each first constraint node is split into two constraint nodes, four constraint nodes can be obtained by splitting, and these four constraint nodes are distributed in different variable constraint subgraphs, i.e., by performing node splitting on the first variable constraint subgraph, four variable constraint subgraphs can be obtained.
[0159] Furthermore, at least one split first constraint node in the first variable constraint graph does not belong to the first node set in the first variable constraint graph, i.e., the first constraint node is selected from constraint nodes outside the first node set in the first variable constraint graph. The first node set includes multiple second constraint nodes, and the constraint clauses represented by the multiple second constraint nodes are the root cause of the unsolvable conjunctive normal form.
[0160] In other words, the conjunctive normal form above is essentially a representation of an UNSAT problem. The root cause of the unsolvable UNSAT problem lies in the constraint clauses represented by the multiple second constraint nodes. In other words, the constraint clauses represented by these multiple second constraint nodes constitute the UNSAT core. It is precisely the existence of these constraint clauses that directly leads to the unsolvable UNSAT problem represented by the conjunctive normal form.
[0161] In this embodiment, the multiple second constraint nodes in the first node set are not split in order to keep the UNSAT core unchanged, that is, to ensure that in the multiple variable constraint subgraphs obtained by splitting, the conjunctive normal form is still unsolvable due to the multiple second constraint nodes, thereby ensuring to the greatest extent that the difficulty of solving the transformed conjunctive normal form is close to that of the original conjunctive normal form.
[0162] For example, please refer to Figure 6, which is a schematic diagram of splitting the constraint nodes in the variable constraint graph provided by an embodiment of the present application. As shown in Figure 6, in the variable constraint graph, constraint node 1 is connected to variable node A1 and variable node A2; constraint node 2 is connected to variable node A3 and variable node A4; constraint node 3 is connected to variable node A2, variable node A4 and variable node A5. After splitting constraint node 3 in the variable constraint graph, two new constraint nodes can be obtained, namely constraint node 3.1 and constraint node 3.2. Among them, constraint node 3.1 and constraint node 1 are in variable constraint subgraph 1, and constraint node 1 is connected to variable node A1 and variable node A2, and constraint node 3.1 is connected to variable node A2. Constraint node 3.2 and constraint node 2 are in variable constraint subgraph 2, and constraint node 2 is connected to variable node A3 and variable node A4, and constraint node 3.2 is connected to variable node A3 and variable node A5.
[0163] Step 403: Perform a transformation operation on the plurality of second constraint nodes in the plurality of variable constraint subgraphs to obtain a plurality of transformed variable constraint subgraphs.
[0164] In this embodiment, the transformation operation may specifically refer to performing a position and attribute transformation on a node. Specifically, the transformation operation performed on the plurality of second constraint nodes may include one or more of the following operations: adjusting the positions of the plurality of second constraint nodes, adjusting the positions of variable nodes connected to the plurality of second constraint nodes, and adjusting the attributes of the variable nodes connected to the plurality of second constraint nodes.
[0165] It is understandable that, for multiple second constraint nodes, the variable nodes connected to each second constraint node are fixed, that is, the position of each second constraint node is fixed. By changing the position between any two second constraint nodes, it is equivalent to swapping the face-changing nodes connected to these two second constraint nodes. Therefore, adjusting the positions of multiple second constraint nodes can specifically be adjusting the variable nodes connected to the multiple second constraint nodes. Similarly, adjusting the positions of the variable nodes connected to the multiple second constraint nodes is equivalent to adjusting the constraint nodes connected to these variable nodes.
[0166] Furthermore, since variable nodes represent variable literals, if the variable literals have positive and negative values, the variable nodes will also have corresponding positive and negative attributes. Therefore, in this embodiment, the attributes of the variable nodes connected to the multiple second constraint nodes can also be adjusted, for example, adjusting a variable node representing a variable literal with a positive value to a variable literal with a negative value, or adjusting a variable node representing a variable literal with a negative value to a variable literal with a positive value.
[0167] It should be noted that performing a transformation operation on multiple second constraint nodes in multiple variable constraint subgraphs may be performing a transformation operation on some of the multiple second constraint nodes, or performing a transformation operation on all of the multiple second constraint nodes. This embodiment does not make any specific limitations on this.
[0168] Exemplarily, please refer to Figure 7, which is a schematic diagram of a transformation operation performed on a node in a variable constraint subgraph provided by an embodiment of the present application. As shown in Figure 7, the variable constraint subgraph before performing the transformation operation includes variable nodes A1-A5 and variable node -A2, as well as constraint nodes 1-3 (wherein constraint nodes 1-3 can be, for example, the second constraint nodes mentioned above). Among them, the conjunction normal form represented by the variable constraint subgraph before transformation is: (A1∨A2)∧(A3∨A4)∧(-A2∨A3∨A5); then, in the variable constraint subgraph before transformation, constraint node 1 is connected to variable node A1 and variable node A2, constraint node 2 is connected to variable node A3 and variable node A4, and constraint node 3 is connected to variable node A3, variable node A5 and variable node -A2. During the transformation operation, the positions of variable node A1 and variable node A4 are swapped, the attributes of variable node A2 and variable node -A2 are swapped, and the positions of constraint node 1 and constraint node 3 are swapped, thereby realizing the transformation operation on the variable constraint subgraph.
[0169] Thus, in the variable constraint subgraph before the transformation, constraint node 3 connects to variable nodes A1 and -A2, constraint node 2 connects to variable nodes A3 and A4, and constraint node 1 connects to variable nodes A3, A5, and A2. The conjunctive normal form represented by the transformed variable constraint subgraph is: (A2 ∨ A3 ∨ A5) ∧ (A3 ∨ A4) ∧ (A1 ∨ -A2).
[0170] In this embodiment, the reason the CNF is unsolvable is actually due to conflicts between the multiple constraint clauses represented by the multiple second constraint nodes (i.e., conflicts between the multiple second constraint nodes), resulting in the CNF being unsolvable. Therefore, while ensuring that the multiple second constraint nodes are not split, performing the transformation operation on the multiple second constraint nodes is equivalent to performing the transformation operation within the UNSAT core and does not change the root cause of the CNF being unsolvable. In other words, the constraint node obtained after performing the transformation operation on the second constraint node is still the root cause of the CNF being unsolvable.
[0171] Step 404 , merging the multiple transformed variable constraint subgraphs to obtain a second variable constraint graph, wherein the second variable constraint graph is used to generate a new conjunction normal form, and the new conjunction normal form is used as a training sample for training a circuit verification model.
[0172] Since in step 402, multiple variable constraint subgraphs are obtained by splitting the constraint nodes, in order to restore the structure size of the variable constraint graph before and after augmentation to be as similar as possible, in this embodiment, the constraint nodes in different transformed variable constraint subgraphs can be merged to achieve the merging of multiple transformed variable constraint subgraphs.
[0173] For example, assuming that the two transformed variable constraint subgraphs are variable constraint subgraph 1 and variable constraint subgraph 2, the constraint node 1 in the variable constraint subgraph 1 and the constraint node 2 in the variable constraint subgraph 2 can be merged to obtain a new constraint node; wherein the new constraint node is connected to the variable node originally connected to the constraint node 1 and the variable node originally connected to the constraint node 2.
[0174] Exemplarily, please refer to Figure 8, which is a schematic diagram of merging the transformed variable constraint subgraphs provided in an embodiment of the present application. As shown in Figure 8, Figure 8 includes a transformed variable constraint subgraph 1 and a transformed variable constraint subgraph 2. In the transformed variable constraint subgraph 1, constraint node 1 is connected to variable node A1 and variable node A2, constraint node 2 is connected to variable node A3 and variable node A4, and constraint node 3.1 is connected to variable node A3 and variable node A5. In the transformed variable constraint subgraph 2, constraint node 3.2 is connected to variable node A4 and variable node A8, and constraint node 4 is connected to variable node A6 and variable node A7.
[0175] Then, during the variable constraint subgraph merging process, constraint node 3.1 in the transformed variable constraint subgraph 1 is merged with constraint node 3.2 in the transformed variable constraint subgraph 2, resulting in a new constraint node 3. Constraint node 3 connects to both the variable nodes connected to the original constraint node 3.1 and the variable nodes connected to constraint node 3.2. That is, constraint node 3 connects to variable nodes A3, A5, A4, and A8. Furthermore, the connections between constraint nodes 1, 2, and 4 and the variable nodes remain unchanged.
[0176] In this embodiment, after merging multiple transformed variable constraint subgraphs, a second variable constraint graph can be obtained, wherein the second variable constraint graph can be converted into a new conjunction normal form, thereby achieving the augmentation of conjunction normal form data, enriching the training data set using conjunction normal form as training data, and thereby improving the performance of the trained model.
[0177] In general, for the conjunctive normal form (CNF) used as the model input data, the constraint nodes in the variable constraint graph of the CNF are split. During the splitting process, the constraint nodes that cause the CNF to have no solution are retained. Transformations are then performed on the constraint nodes that cause the CNF to have no solution in the resulting subgraphs. The transformed subgraphs are then merged to obtain a new CNF. This split-transform-merge operation ensures that the generated augmented data is similar in difficulty to the original data while changing the original data, thus augmenting the model training data and improving the performance of the final trained model.
[0178] In addition, since this embodiment splits the other constraint nodes in the variable constraint graph while keeping the UNSAT core unchanged, and then performs the transformation operation inside the UNSAT core, it can retain the rigorous logical structure of the problem solution as much as possible, while giving sufficient changes to the UNSAT core of the original problem, which plays a good role in enriching the original data.
[0179] Optionally, in some actual application scenarios, when applying AI models to process conjunctions, the conjunctions obtained in the actual scenario are often processed based on pre-trained models. However, due to the diversity of conjunctions that need to be processed in actual scenarios, it is easy for the conjunctions to be processed in the actual scenario to have a different distribution from the training set data used to train the model (i.e., the inference data and the training data have different distributions), resulting in poor performance of the model in processing conjunctions.
[0180] Based on this, in some embodiments, after obtaining the second variable constraint graph, the second variable constraint graph can be transformed into a conjunctive normal form to obtain a new conjunctive normal form. Then, the pre-trained model is fine-tuned according to the original conjunctive normal form (i.e., the conjunctive normal form described in step 401) and the new conjunctive normal form to obtain a fine-tuned model, where the pre-trained model is a circuit verification model for processing the conjunctive normal form.
[0181] Simply put, before using a pre-trained model to process the conjunction normal form, data augmentation can be performed on the conjunction normal form to be processed based on the data augmentation method provided in this embodiment, and the pre-trained model can be fine-tuned based on the original data and the augmented data, and then the corresponding conjunction normal form can be processed based on the fine-tuned model.
[0182] In this embodiment, based on the pre-trained model, data augmentation is performed on the conjunction paradigm to be processed, and the pre-trained model is fine-tuned online based on the original data and the augmented data. This can enable the model to quickly adjust the processing strategy when facing different data, and provide feature engineering that is more compatible with the current data to be processed, thereby effectively improving the performance of the model.
[0183] Optionally, the fine-tuned model is used to perform one of the following tasks: logical equivalence verification or timing equivalence verification. In general, the fine-tuned model, as an AI model (i.e., a circuit verification model), is used to process the conjunction paradigm to perform tasks in the circuit design domain.
[0184] The above describes the execution process of the data augmentation method provided in this embodiment. The following describes in detail various implementation methods for splitting the variable constraint graph in the above step 402.
[0185] Implementation method 1 is to group the variable nodes in the variable constraint graph, and determine the constraint nodes that need to be split based on the groups to which the variable nodes connected to the constraint nodes belong.
[0186] Exemplarily, in the process of grouping variable nodes in a variable constraint graph, multiple variable nodes in a first variable constraint graph can be grouped according to the connection relationship between multiple variable nodes and multiple constraint nodes to obtain the group to which each variable node in the multiple variable nodes belongs.
[0187] Then, based on the group to which each variable node belongs, it is determined that the constraint nodes connected to variable nodes from different groups belong to at least one first constraint node. In other words, if a constraint node is connected to variable nodes corresponding to multiple groups, then the constraint node can be determined to belong to the constraint node to be split (i.e., the at least one first constraint node mentioned above).
[0188] Optionally, in the process of grouping the multiple variable nodes in the first variable constraint graph according to the connection relationship between the multiple variable nodes and the multiple constraint nodes, a variable index graph (VIG) can be first constructed according to the connection relationship between the multiple variable nodes and the multiple constraint nodes. The variable index graph only includes the multiple variable nodes in the first variable constraint graph, and the multiple variable nodes have a connection relationship. The connection relationship between any two variable nodes in the multiple variable nodes is used to indicate that the two variable nodes are connected to the same constraint node in the first variable constraint graph. In other words, the variable index graph and the first variable constraint graph have the same multiple variable nodes; and for any two variable nodes in the variable index graph, if the two variable nodes are connected to the same variable node in the first variable constraint graph, the two variable nodes are connected.
[0189] Secondly, multiple variable nodes are grouped according to the connection density between multiple variable nodes in the variable index graph, wherein the connection density between variable nodes in the same group is greater than the connection density between variable nodes in different groups.
[0190] Exemplarily, please refer to Figure 9, which is a schematic diagram of a process of constructing a variable index graph based on a first variable constraint graph and grouping variable nodes provided by an embodiment of the present application. As shown in Figure 9, in the first variable constraint graph, constraint node 1 is connected to variable node A1, variable node A2 and variable node A3, constraint node 2 is connected to variable node A4, variable node A5, variable node A6 and variable node A7, and constraint node 3 is connected to variable node A3, variable node A5 and variable node A8. Based on the principle of connecting edges between two variable nodes connecting the same constraint node, a variable index graph is constructed by the first variable constraint graph. In the variable index graph, variable node A1, variable node A2 and variable node A3 are interconnected, variable node A4, variable node A5, variable node A6 and variable node A7 are interconnected, and variable node A3, variable node A5 and variable node A8 are interconnected.
[0191] In addition, based on the degree of connection between each variable node in the variable index graph, variable node A1, variable node A2 and variable node A3 can be divided into group 1, and variable node A4, variable node A5, variable node A6, variable node A7 and variable node A8 can be divided into group 2.
[0192] Specifically, in a variable index graph, variable nodes may have community properties. This means that the connections between some variable nodes are particularly tight, while the connections between these variable nodes and other variable nodes are relatively loose, resulting in the variable nodes being distributed and connected in communities. In this case, by grouping the variable nodes based on the tightness of their connections in the variable index graph, closely connected variable nodes can be grouped together, while the connections between variable nodes in different groups are relatively loose.
[0193] Taking the above-mentioned conjunction normal form as an example of the conjunction normal form corresponding to circuit data, the circuit data itself will have community attributes. Therefore, based on the community attributes of the circuit data itself, the variable nodes in the variable constraint graph are divided into communities (i.e., grouped), which can well match the characteristics of the circuit data. As a result, when the constraint nodes to be split are subsequently selected, the variable nodes within the same community can be avoided from being divided into different variable constraint subgraphs. Specifically, since a circuit usually contains multiple sub-functional modules, after the circuit data is modeled as a variable constraint graph corresponding to the conjunction normal form, the connection relationship between the variable nodes will show the following phenomenon: the internal connections of the variable nodes belonging to the same sub-functional block are relatively tight, while the connections between the variable nodes belonging to different sub-functional blocks are relatively sparse. That is, the variable nodes will present a community structure, the connections between the variable nodes within the same community are relatively tight, and the connections between the variable nodes between different communities are relatively sparse.
[0194] In this scheme, by learning the composition rules of the original data corresponding to the conjunction normal form (such as the community attributes existing in circuit data) and performing the grouping of variable nodes according to the corresponding composition rules, it is beneficial to subsequently split the constraint nodes according to the grouping of variable nodes, ensuring that the new data generated after the splitting and merging process is structurally close to the original data, and ensuring that the new data and the original data have the same data distribution, thereby effectively improving the performance of the final trained model.
[0195] It should be noted that, since the above scheme splits the constraint nodes connected to variable nodes of different groups, after the constraint nodes are split to obtain multiple new constraint nodes, each new constraint node can be connected to the variable nodes of the same group, thereby ensuring that the variable nodes of the same group in the split variable constraint subgraph can still be connected to the same constraint node.
[0196] For example, assume that constraint node 1 in the first variable constraint graph connects variable nodes A1-A6, where variable nodes A1-A3 belong to group 1 and variable nodes A4-A6 belong to group 2. After splitting constraint node 1 into constraint node 1.1 and constraint node 1.2, constraint node 1.1 can be connected to variable nodes A1-A3, and constraint node 1.2 can be connected to variable nodes A4-A6.
[0197] The second implementation method is to determine the constraint nodes to be split based on the number of variable nodes connected to the constraint nodes in the variable constraint graph.
[0198] Exemplarily, after obtaining the first variable constraint graph of the conjunction normal form, the number of variable nodes connected to each constraint node in the multiple constraint nodes of the first variable constraint graph is determined; then, at least one first constraint node is determined based on the number of variable nodes connected to each constraint node.
[0199] For example, multiple constraint nodes are sorted in descending order based on the number of variable nodes they connect to, with constraint nodes with more variable nodes being ranked higher, and constraint nodes with fewer variable nodes being ranked lower. Then, a preset number of constraint nodes are selected, in descending order, as the first constraint nodes to be split. The preset number can be determined or adjusted based on actual scenarios, and this embodiment does not impose any specific limitations on this.
[0200] In this scheme, by selecting the constraint nodes to be split according to the number of variable nodes connected to the constraint nodes, the constraint nodes connected to more variable nodes can be selected as much as possible for splitting, so that the structures of the variable constraint subgraphs obtained by splitting are relatively similar. Ultimately, it is ensured that the variable constraint graph generated after the splitting and merging process is structurally close to the original variable constraint graph, ensuring that the original data and augmented data have the same distribution, thereby effectively improving the performance of the model obtained by subsequent training.
[0201] When determining the constraint nodes to be split based on implementation method 2, in the process of splitting these constraint nodes, half of the variable nodes on the original constraint node can be randomly connected to one of the new constraint nodes, and the other half of the variable nodes can be connected to another new constraint node, so that the two new constraint nodes obtained by splitting are respectively connected to half of the variable nodes connected to the original constraint node.
[0202] For example, suppose constraint node 1 in the first variable constraint graph connects variable nodes A1-A6. After splitting constraint node 1 into constraint node 1.1 and constraint node 1.2, constraint node 1.1 and constraint node 1.2 can each connect to three variable nodes. For example, constraint node 1.1 connects variable nodes A1, A3, and A6, while constraint node 1.2 connects variable nodes A2, A4, and A5.
[0203] It should be noted that the above describes two implementation methods for selecting the constraint nodes to be split. In actual application, you can choose one of the implementation methods to select the constraint nodes to be split and perform the splitting, or you can choose both implementation methods to determine the constraint nodes to be split.
[0204] That is, in the actual process of splitting the constraint nodes, the constraint nodes to be split may include the constraint nodes determined by the first implementation and the constraint nodes determined by the second implementation.
[0205] Optionally, after splitting the variable constraint graph based on the above implementation method, in the process of merging the variable constraint subgraphs, the prediction model can be used to predict the constraint nodes that need to be merged in the variable constraint subgraphs, and then the variable constraint subgraphs can be merged by merging the predicted constraint nodes.
[0206] Exemplarily, in the above-mentioned step 404, multiple transformed variable constraint subgraphs are merged, which may specifically include the following steps: first, the constraint nodes belonging to the same source nodes in the multiple transformed variable constraint subgraphs are predicted by a prediction model, wherein the prediction model is obtained based on training of multiple variable constraint subgraphs, and the multiple constraint nodes obtained by splitting the same first constraint node in the multiple variable constraint subgraphs belong to the same source nodes; then, the constraint nodes belonging to the same source nodes in the multiple transformed variable constraint subgraphs are merged to obtain a second variable constraint graph.
[0207] In simple terms, after the first variable constraint graph is split into multiple variable constraint subgraphs, since the multiple constraint nodes obtained by splitting a constraint node in the first variable constraint graph are distributed in different variable constraint subgraphs, there will be a constraint node belonging to the same source node in each of the different multiple variable constraint subgraphs. By using multiple variable constraint subgraphs as training data for the prediction model, the prediction model can learn which constraint nodes in the multiple variable constraint subgraphs are obtained by splitting the same constraint node (that is, learn which constraint nodes belong to the same source node). In this way, after the prediction model is trained, the prediction model can be used to predict the constraint nodes belonging to the same source nodes in the transformed multiple variable constraint subgraphs, and then merge these constraints belonging to the same source nodes to achieve the merging of the transformed multiple variable constraint subgraphs.
[0208] In this scheme, by adopting the prediction model to learn the splitting rules of the variable constraint subgraph, and then merging the transformed variable constraint subgraphs based on the prediction model, the transformed variable constraint subgraphs can be merged by referring to the original splitting rules of the variable constraint subgraph, so as to ensure that the structure of the second variable constraint graph obtained after the merger is as close as possible to the original first variable constraint graph, thereby ensuring the validity of the augmented data.
[0209] It is understandable that in steps 401-404 above, since the second variable constraint graph is obtained by performing a split-transform-merge operation on the first variable constraint graph, the process of performing the above operations may introduce other factors that cause the conjunctive normal form corresponding to the second variable constraint graph to be unsolvable. In other words, the number of UNSAT cores corresponding to the second variable constraint graph may differ from the number of UNSAT cores corresponding to the first variable constraint graph, thereby making the difficulty of solving the second variable constraint graph different from that of solving the first variable constraint graph. In other words, in addition to the UNSAT cores defined before splitting, the second variable constraint graph may also add some other UASTA cores, that is, the presence of some other constraint nodes is also the root cause of the problem being unsolvable.
[0210] Therefore, in order to reduce the degree of dominance of the newly added UNSAT core on the difficulty of solving the problem, so that the difficulty of solving the augmented data can be as close as possible to the original data, this embodiment can be to add slack variables to the smaller UNSAT cores in the second variable constraint graph, so that these UNSAT cores no longer become the root cause of the problem's unsolvability.
[0211] For example, after obtaining the second variable constraint graph in step 404, a second node set in the second variable constraint graph can be determined, wherein the constraint clauses represented by the constraint nodes included in the second node set are the root cause of the unsolvable conjunctive normal form represented by the second variable constraint graph, and the number of constraint nodes in the second node set is less than a preset threshold. The preset threshold can be determined based on actual conditions, for example, the preset threshold can be set to be the same as the number of constraint nodes in the first node set determined in step 402.
[0212] Then, in the second variable constraint graph, the variable nodes connected to the constraint nodes in the second node set are added to obtain a third variable constraint graph. In the third variable constraint graph, the constraint clauses represented by the constraint nodes in the second node set are no longer the root cause of the unsolvable conjunction normal form represented by the third variable constraint graph.
[0213] In other words, by adding connection variable nodes to the constraint nodes in the second node set, these constraint nodes no longer become UNSAT cores. That is, these constraint nodes are no longer the root cause of the unsolvable conjunctive normal form represented by the third variable constraint graph. This makes the number of constraint nodes in the third variable constraint graph that are the root cause of the unsolvable conjunctive normal form similar to the number of constraint nodes in the first node set of the first variable constraint graph. This makes the difficulty of solving the third variable constraint graph similar to that of the first variable constraint graph, thus ensuring the validity of the augmented data.
[0214] For example, please refer to Figure 10, which is a schematic diagram of an UNSAT core in a second variable constraint graph provided in an embodiment of the present application. As shown in Figure 10, in the second variable constraint graph, constraint nodes A1-A6 constitute UNSAT core 1, and constraint nodes A1-A6 correspond to the first node set in the first variable constraint graph, that is, UNSAT core 1 is the same size as the UNSAT core in the first variable constraint graph. However, a plurality of smaller UNSAT cores are newly added to the second variable constraint graph, namely, UNSAT core 2 consisting of constraint node A1, constraint node A2, constraint node A7 and constraint node A8, UNSAT core 3 consisting of constraint node A3, constraint node A4, constraint node A9 and constraint node A10, and UNSAT core 4 consisting of constraint node A5, constraint node A6 and constraint node A11. This part of the UNSAT core is eliminated by adding variable nodes connected to the constraint nodes (e.g., constraint node 7-constraint node 11) in these newly added UNSAT cores.
[0215] In this scheme, by adding connected variable nodes to the smaller UNSAT cores in the second variable constraint graph, these UNSAT cores can be effectively eliminated, thereby reducing the dominance of the newly added UNSAT cores on the difficulty of solving the problem, making the difficulty of solving the augmented data as close as possible to the original data.
[0216] To facilitate understanding, the data augmentation method provided in this embodiment and the process of obtaining augmented data using the data augmentation method will be described in detail below with reference to specific examples.
[0217] Please refer to Figure 11, which is a schematic diagram of a process for performing data augmentation and online fine-tuning on an AI verification platform, provided in an embodiment of the present application. In Figure 11, taking the LEC scenario in accelerated chip design as an example, the process for performing data augmentation and online fine-tuning on the AI verification platform includes the following steps S1-S5 (the specific step names are not shown in the figure).
[0218] Step S1: input the circuit to be verified and the standard circuit, match the points to be verified, and construct the Miter circuit.
[0219] Step S2: Convert the Miter circuit into a conjunction normal form and input it into the data augmentation model. The data augmentation model generates and outputs augmented data, wherein the augmented data output by the data augmentation model is also in conjunction normal form.
[0220] In step S3, the generated augmented data and the original Miter circuit's converted conjunctive normal form are mixed and fed into the pre-trained model, thereby fine-tuning the pre-trained model and obtaining a fine-tuned model. The pre-trained model is an offline trained solver hyperparameter optimization model used to find the optimal solver parameter combination for a given Miter circuit.
[0221] In step S4, the Miter circuit constructed based on the same circuit to be verified is input into the fine-tuned model to provide a hyperparameter combination that better matches the circuit.
[0222] In step S5, the hyperparameter combination provided by the fine-tuned model is used to configure a solver, and the solver is used to solve the circuit to be verified.
[0223] The specific process of generating augmented data in step S2 is described in detail below with reference to the accompanying drawings.
[0224] Please refer to Figure 12, which is a schematic diagram of a process for generating augmented data according to an embodiment of the present application. As shown in Figure 12, the process for generating augmented data includes the following steps 1201-1207.
[0225] Step 1201: Convert the conjunction normal form into a variable constraint graph.
[0226] For the conjunction normal form input into the data augmentation model, the data augmentation model first converts the conjunction normal form into a variable constraint graph.
[0227] Step 1202 : Add community attributes to variable nodes in the variable constraint graph, and add UNSAT kernel attributes to constraint nodes in the variable constraint graph.
[0228] Specifically, in this embodiment, a community attribute can be added to a variable node in a variable constraint graph by adding a supernode to the variable constraint graph. Each supernode represents a community, and supernodes are only connected to variable nodes, indicating whether the variable nodes belong to the same community. Each variable node can only be connected to one supernode, meaning that each variable node can only be assigned to one community (i.e., one group).
[0229] The specific basis for the division of communities is to construct a variable index graph based on the variable constraint graph or the conjunction normal form. The variable index graph only contains one type of node: variable nodes. If any two variable nodes are connected to the same constraint node in the variable constraint graph, then these two variable nodes are connected in the variable index graph. In other words, in the variable index graph, two variable nodes with corresponding variable literals appearing in the same constraint clause are connected.
[0230] Then, according to the tightness of the connection between the variable nodes in the variable index graph, the variable nodes can be grouped, that is, the variable nodes can be divided into independent communities that are "tight inside and loose outside", that is, the connection between the variable nodes belonging to the same community is relatively tight, while the connection between the variable nodes belonging to different communities is relatively loose.
[0231] In addition, the way to add UNSAT core attributes to the constraint nodes in the variable constraint graph can be to calculate the constraint clauses in the conjunctive normal form that cause the conjunctive normal form to have no solution, and add UNSAT core attributes to the constraint nodes corresponding to these constraint clauses.
[0232] Step 1203 : split the variable constraint graph based on the community attributes of the variable nodes to obtain multiple variable constraint subgraphs.
[0233] In this step, there are two ways to split the variable constraint graph, namely, inter-community splitting (ie, the above-mentioned implementation method 1) and intra-community splitting (ie, the above-mentioned implementation method 2).
[0234] 1. Split between communities
[0235] For any constraint node in the variable constraint graph, if the variable nodes connected to the constraint node belong to different communities, the constraint node needs to be split, that is, the constraint node is divided into two, and some variable nodes are removed from the original constraint node and connected to the new constraint node. Among them, the variable nodes connected to the new constraint node can be some randomly selected variable nodes, or variable nodes that belong to different communities from the retained variable nodes. After splitting these constraint nodes, the corresponding variable constraint subgraph can be obtained. Then, the constraint node pairs after splitting (that is, the constraint node pairs obtained by splitting the same constraint node) and the variable constraint subgraph obtained after splitting are stored as training set 1.
[0236] 2. Split within the community
[0237] Once the specified number of inter-community splits has been completed, or if no variable nodes from different communities are connected to the same constraint node in the variable constraint subgraph, the intra-community split process begins. This intra-community split primarily splits constraint nodes connected to variable nodes from the same community. Furthermore, this stage targets constraint nodes with a high number of variable nodes connected, and the split principle is a 50-50 split, randomly connecting half of the variable nodes to the new constraint nodes obtained after the split.
[0238] Finally, the split constraint node pairs (i.e., constraint node pairs split from the same constraint node) and the variable constraint subgraphs obtained after the split are stored as training set 2.
[0239] It should be noted that, in the process of splitting the constraint nodes in the variable constraint graph, the splitting operation is not performed on the constraint nodes with the UNSAT core attribute added, that is, the constraint nodes with the UNSAT core attribute added remain unchanged.
[0240] Step 1204 : Perform transformation operations on the constraint nodes with UNSAT kernel attributes added in the multiple variable constraint subgraphs.
[0241] The transformation operations performed on the constraint node with the UNSAT core attribute added thereto may specifically include: adjusting the position of the constraint node, adjusting the position of the variable node connected to the constraint node, and adjusting the attributes of the variable node connected to the constraint node.
[0242] Step 1205: Merge the multiple transformed variable constraint subgraphs.
[0243] Before merging the transformed multiple variable constraint subgraphs, prediction model 1 and prediction model 2 may be trained based on training set 1 and training set 2 obtained in step 1203, respectively. Prediction model 1 and prediction model 2 may be, for example, graph convolutional neural networks (GCNs), and prediction model 1 and prediction model 2 are used to predict which nodes in the variable constraint subgraph are homologous nodes (i.e., split from the same constraint node).
[0244] The training set for prediction model 1 is the aforementioned training set 1, which takes two or more variable constraint subgraphs as input, and labels the constraint nodes derived from splitting the same constraint node in the variable constraint subgraph. After training, prediction model 1 can determine whether a given constraint node pair in the variable constraint subgraph is a homologous node between communities, effectively predicting pairs of constraint nodes in the variable constraint subgraph that are homologous nodes.
[0245] Prediction Model 2 is trained on the same training set as above. Specifically, its input consists of two or more variable constraint subgraphs, with labels representing constraint nodes derived from the same constraint node within the variable constraint subgraph. After training, Prediction Model 2 can determine whether a given constraint node pair within a variable constraint subgraph is a homologous node within a community. This means it can predict constraint node pairs within the variable constraint subgraph that are homologous nodes.
[0246] Specifically, merging the transformed multiple variable constraint subgraphs includes intra-community merging and inter-community merging.
[0247] During the intra-community merging process, the transformed variable constraint subgraphs are fed into the trained prediction model 2, and the constraint node pairs with the highest predicted probabilities are merged. This process is repeated until a specified number of rounds are reached or the average degree of the constraint nodes (where the average degree represents the average number of variable nodes connected to the constraint node) reaches a given threshold of 1. The intra-community connectivity is then generated.
[0248] During the inter-community merging process, the variable constraint subgraph obtained after the intra-community merging process is fed into the trained prediction model 1, merging the constraint node pairs with the highest predicted probability. This process is repeated multiple times until a specified number of rounds is reached or the average degree of the constraint nodes reaches a given threshold 2, at which point the inter-community connectivity is generated.
[0249] Step 1206: Add slack variables to the merged variable constraint graph to obtain a new variable constraint graph.
[0250] In this step, the UNSAT core in the merged variable constraint graph is first calculated. Then, for the UNSAT cores whose number of constraint nodes is less than the specified threshold, connected variable nodes are added to the constraint nodes in these UNSAT cores (i.e., slack variables are added) so that these constraint nodes no longer constitute the UNSAT core, thereby reducing the number of UNSAT cores and obtaining a new variable constraint graph.
[0251] Step 1207 : Convert the new variable constraint graph into a conjunction normal form to obtain augmented data.
[0252] The above describes the process of performing data augmentation and online fine-tuning on the AI verification platform in this embodiment. To illustrate the beneficial effects of the present invention, the following mainly measures it from three perspectives.
[0253] The first is the structural fidelity dimension of augmented data. This embodiment conducted experiments on domain public circuits, SAT competition data, and real industrial data, and compared multiple graph indicators of the original data and generated data, including the degree of aggregation and distribution of variable nodes and constraint nodes. Please refer to Figure 13, which is a schematic diagram of the comparison of the structural fidelity dimension of the generated data provided by different methods in the embodiment of this application. As shown in Figure 13, the data augmentation method proposed in this embodiment is in the box. It can be found that the data generated by the present invention is more consistent with the real data in terms of multiple graph indicators.
[0254] Secondly, considering the guaranteed difficulty of generated data, we input data generated by different methods into the same solver and compared their solution times. The results are shown in Figure 14. In Figure 14, the boxed portion represents the data generated using this embodiment. As shown in Figure 14, the data augmentation method provided by this embodiment can generate augmented data that is closer in difficulty to the original problem, while the data generated by other augmentation methods deviates significantly from the difficulty level.
[0255] Furthermore, to verify the beneficial effects of the entire process, the solving results of directly using the offline-trained solver parameter recommendation model and integrating different augmentation methods for online fine-tuning are compared, as shown in Figure 15. As shown in Figure 15, the data augmentation method provided in this embodiment is more effective in accelerating the solution and has better robustness. Compared with the original solver, the data augmentation method provided in this embodiment can achieve efficiency improvements of 22% and 15%, respectively. While other data augmentation methods only slightly improve the MP1 dataset, all LEC datasets deteriorate.
[0256] The above describes in detail the method provided by the embodiment of the present application. Next, the device provided by the embodiment of the present application for executing the above method will be introduced.
[0257] Please refer to Figure 16, which is a schematic diagram of the structure of a data augmentation device provided in an embodiment of the present application. As shown in Figure 16, the data augmentation device includes:
[0258] An acquisition module 1601 is configured to acquire a first variable constraint graph of a conjunction normal form, the first variable constraint graph including a plurality of variable nodes and a plurality of constraint nodes, the plurality of variable nodes being used to represent variable literals in the conjunction normal form, and the plurality of constraint nodes being used to represent constraint clauses in the conjunction normal form;
[0259] Processing module 1602 is configured to split at least one first constraint node in the first variable constraint graph to obtain multiple variable constraint subgraphs, wherein each first constraint node is split into multiple constraint nodes, and the resulting constraint nodes are located in different variable constraint subgraphs, at least one first constraint node does not belong to the first node set in the first variable constraint graph, the first node set includes multiple second constraint nodes, and the constraint clauses represented by the multiple second constraint nodes are the root cause of the unsolvable conjunction normal form;
[0260] The processing module 1602 is further configured to perform a transformation operation on the plurality of second constraint nodes in the plurality of variable constraint subgraphs to obtain a plurality of transformed variable constraint subgraphs;
[0261] The processing module 1602 is further configured to merge the multiple transformed variable constraint subgraphs to obtain a second variable constraint graph, and the second variable constraint graph is used to generate a new conjunctive normal form.
[0262] In a possible implementation, the processing module 1602 is further configured to:
[0263] Transform the second variable constraint graph into a conjunction normal form to obtain a new conjunction normal form;
[0264] The pre-trained model is fine-tuned according to the conjunction paradigm and the new conjunction paradigm to obtain a fine-tuned model, wherein the pre-trained model is used to process the conjunction paradigm.
[0265] In one possible implementation, the fine-tuned model is used to perform one of the following tasks: logical equivalence verification, temporal equivalence verification, or model checking.
[0266] In a possible implementation, the processing module 1602 is further configured to:
[0267] Grouping a plurality of variable nodes in the first variable constraint graph according to connection relationships between the plurality of variable nodes and the plurality of constraint nodes to obtain a group to which each of the plurality of variable nodes belongs, wherein in the first variable constraint graph, the connection relationship between the variable node and the constraint node is used to indicate that a variable literal represented by the variable node is located in a constraint clause represented by the constraint node;
[0268] According to the group to which each variable node belongs, it is determined that the constraint nodes connected with the variable nodes of different groups belong to at least one first constraint node.
[0269] In a possible implementation, the processing module 1602 is further configured to:
[0270] constructing a variable index graph according to a connection relationship between a plurality of variable nodes and a plurality of constraint nodes, wherein the variable index graph only includes a plurality of variable nodes, and the plurality of variable nodes have a connection relationship, and the connection relationship between any two variable nodes among the plurality of variable nodes is used to indicate that the two variable nodes are connected to the same constraint node in the first variable constraint graph;
[0271] The plurality of variable nodes are grouped according to the connection density between the plurality of variable nodes in the variable index graph, wherein the connection density between the variable nodes in the same group is greater than the connection density between the variable nodes in different groups.
[0272] In a possible implementation, the processing module 1602 is further configured to:
[0273] determining the number of variable nodes connected to each of the plurality of constraint nodes;
[0274] At least one first constraint node is determined according to the number of variable nodes connected to each constraint node.
[0275] In a possible implementation, the processing module 1602 is further configured to:
[0276] Predicting, by a prediction model, constraint nodes belonging to the same source node in a plurality of transformed variable constraint subgraphs, wherein the prediction model is trained based on the plurality of variable constraint subgraphs, and a plurality of constraint nodes in the plurality of variable constraint subgraphs obtained by splitting the same first constraint node are the same source nodes;
[0277] The constraint nodes belonging to the same source nodes in the multiple transformed variable constraint subgraphs are merged to obtain a second variable constraint graph.
[0278] In a possible implementation, the processing module 1602 is further configured to:
[0279] determining a second node set in the second variable constraint graph, wherein the constraint clauses represented by the constraint nodes included in the second node set are the root cause of the unsolvable conjunctive normal form represented by the second variable constraint graph, and the number of the constraint nodes in the second node set is less than a preset threshold;
[0280] In the second variable constraint graph, the variable nodes connected to the constraint nodes in the second node set are added to obtain a third variable constraint graph, wherein the constraint clauses represented by the constraint nodes in the second node set are no longer the root cause of the unsolvable conjunction normal form represented by the third variable constraint graph.
[0281] In one possible implementation, the above-mentioned transformation operation includes one or more of the following operations: adjusting the positions of multiple second constraint nodes, adjusting the positions of variable nodes connected to multiple second constraint nodes, and adjusting the properties of variable nodes connected to multiple second constraint nodes.
[0282] In one possible implementation, the above-mentioned conjunction normal form is used to represent Boolean satisfiability problems in any of the following fields: circuit design, computer software design, model design, or cryptography.
[0283] Please refer to Figure 17, which is a structural diagram of an execution device provided in an embodiment of the present application. The execution device 1700 can be specifically manifested as a mobile phone, a tablet, a laptop computer, a smart wearable device, a server, etc., which is not limited here. Specifically, the execution device 1700 includes: a receiver 1701, a transmitter 1702, a processor 1703 and a memory 1704 (wherein the number of processors 1703 in the execution device 1700 can be one or more, and Figure 17 takes one processor as an example), wherein the processor 1703 may include an application processor 17031 and a communication processor 17032. In some embodiments of the present application, the receiver 1701, the transmitter 1702, the processor 1703 and the memory 1704 may be connected via a bus or other means.
[0284] Memory 1704 may include read-only memory and random access memory, and provides instructions and data to processor 1703. A portion of memory 1704 may also include non-volatile random access memory (NVRAM). Memory 1704 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.
[0285] Processor 1703 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.
[0286] The method disclosed in the above embodiment of the present application can be applied to the processor 1703, or implemented by the processor 1703. The processor 1703 can be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 1703 or instructions in the form of software. The above-mentioned processor 1703 can be a general-purpose processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0287] The processor 1703 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1704, and the processor 1703 reads the information in the memory 1704 and completes the steps of the above method in combination with its hardware.
[0288] Receiver 1701 can be used to receive input digital or character information and generate signal input related to executing device-related settings and function control. Transmitter 1702 can be used to output digital or character information through the first interface. Transmitter 1702 can also be used to send instructions to the disk pack through the first interface to modify data in the disk pack. Transmitter 1702 can also include a display device such as a display screen.
[0289] The electronic device provided in the embodiment of the present application may specifically be a chip, and the chip includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit, etc. The processing unit may execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the method for determining the model structure described in the above embodiment, or so that the chip in the training device executes the method for determining the model structure described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0290] Specifically, see Figure 18 , which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be represented as a neural network processor NPU 1800. NPU 1800 is mounted on the host CPU (host CPU) as a coprocessor and is assigned tasks by the host CPU. The core of the NPU is arithmetic circuit 1803, which is controlled by controller 1804 to extract matrix data from memory and perform multiplication operations.
[0291] In some implementations, the arithmetic circuit 1803 includes multiple processing units (PEs). In some implementations, the arithmetic circuit 1803 is a two-dimensional systolic array. The arithmetic circuit 1803 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1803 is a general-purpose matrix processor.
[0292] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 1802 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 1801 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 1808.
[0293] Unified memory 1806 is used to store input and output data. Weight data is directly transferred to weight memory 1802 through the Direct Memory Access Controller (DMAC) 1805. Input data is also transferred to unified memory 1806 through the DMAC.
[0294] BIU stands for Bus Interface Unit 1810 , which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1809 .
[0295] The bus interface unit 1810 (BIU) is used for the instruction fetch memory 1809 to obtain instructions from the external memory, and is also used for the storage unit access controller 1805 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0296] DMAC is mainly used to move input data in the external memory DDR to the unified memory 1806 or to move weight data to the weight memory 1802 or to move input data to the input memory 1801.
[0297] The vector calculation unit 1807 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit 1803, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.
[0298] In some implementations, the vector calculation unit 1807 can store the processed output vector in the unified memory 1806. For example, the vector calculation unit 1807 can apply a linear function or a nonlinear function to the output of the operation circuit 1803, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values to generate an activation value. In some implementations, the vector calculation unit 1807 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1803, for example, for use in subsequent layers in a neural network.
[0299] An instruction fetch buffer 1809 connected to the controller 1804 is used to store instructions used by the controller 1804;
[0300] Unified memory 1806, input memory 1801, weight memory 1802, and instruction fetch memory 1809 are all on-chip memories. External memories are private to the NPU hardware architecture.
[0301] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.
[0302] Please refer to Figure 19, which is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present application. The present application also provides a computer-readable storage medium. In some embodiments, the method disclosed in Figure 4 above can be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or products.
[0303] 19 schematically illustrates a conceptual partial view of an example computer-readable storage medium including a computer program for executing a computer process on a computing device, arranged in accordance with at least some embodiments presented herein.
[0304] In one embodiment, computer readable storage medium 1900 is provided using signal bearing medium 1901. Signal bearing medium 1901 may include one or more program instructions 1902 that, when executed by one or more processors, may provide the functionality or portions of the functionality described above with respect to FIG.
[0305] In some examples, the signal bearing medium 1901 may include a computer readable medium 1903 such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a ROM or RAM, and the like.
[0306] In some embodiments, the signal-bearing medium 1901 may include a computer-recordable medium 1904, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, or the like. In some embodiments, the signal-bearing medium 1901 may include a communication medium 1905, such as, but not limited to, a digital and / or analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communication link, a wireless communication link, or the like). Thus, for example, the signal-bearing medium 1901 may be communicated via a wireless form of the communication medium 1905 (e.g., a wireless communication medium conforming to the IEEE 802.11 standard or other transmission protocol).
[0307] The one or more program instructions 1902 may be, for example, computer-executable instructions or logic-implemented instructions. In some examples, the computing device may be configured to provide various operations, functions, or actions in response to the program instructions 1902 communicated to the computing device via one or more of computer-readable media 1903, computer-recordable media 1904, and / or communication media 1905.
[0308] It should also be noted that the device embodiments described above are merely illustrative, in which the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0309] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods of each embodiment of the present application.
[0310] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0311] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website, computer, training device or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center that includes one or more available media integrations. Available media can be magnetic media, (such as floppy disks, hard disks, tapes), optical media (such as DVDs), or semiconductor media (such as solid-state drives (SSDs)).
Claims
1. A data augmentation method, It is characterized in that include: Obtaining a first variable constraint graph of a conjunction normal form, wherein the conjunction normal form is obtained based on circuit design data, the first variable constraint graph comprising a plurality of variable nodes and a plurality of constraint nodes, the plurality of variable nodes being used to represent variable literals in the conjunction normal form, and the plurality of constraint nodes being used to represent constraint clauses in the conjunction normal form; Splitting at least one first constraint node in the first variable constraint graph to obtain a plurality of variable constraint subgraphs, wherein each first constraint node is split into a plurality of constraint nodes, and the constraint nodes obtained after the splitting are located in different variable constraint subgraphs, the at least one first constraint node does not belong to a first node set in the first variable constraint graph, the first node set includes a plurality of second constraint nodes, and the constraint clauses represented by the plurality of second constraint nodes are the root cause of the unsolvable nature of the conjunctive normal form; Performing a transformation operation on the plurality of second constraint nodes in the plurality of variable constraint subgraphs to obtain a plurality of transformed variable constraint subgraphs; The multiple transformed variable constraint subgraphs are merged to obtain a second variable constraint graph, which is used to generate a new conjunctive normal form, and the new conjunctive normal form is used as a training sample for training a circuit verification model.
2. The method according to claim 1, It is characterized in that The method further comprises: Transform the second variable constraint graph into a conjunctive normal form to obtain a new conjunctive normal form; The pre-trained model is fine-tuned according to the conjunction paradigm and the new conjunction paradigm to obtain a fine-tuned model, wherein the pre-trained model is a circuit verification model for processing the conjunction paradigm.
3. The method according to claim 2, It is characterized in that The fine-tuned model is used to perform one of the following tasks: logical equivalence verification or timing equivalence verification.
4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: The plurality of variable nodes in the first variable constraint graph are grouped according to the connection relationship between the plurality of variable nodes and the plurality of constraint nodes to obtain the group to which each of the plurality of variable nodes belongs, wherein in the first variable constraint graph, the connection relationship between the variable node and the constraint node is used to indicate that the variable literal represented by the variable node is located in the constraint clause represented by the constraint node; According to the group to which each variable node belongs, it is determined that the constraint nodes connected with the variable nodes of different groups belong to the at least one first constraint node.
5. The method according to claim 4, It is characterized in that The grouping of the plurality of variable nodes in the first variable constraint graph according to the connection relationship between the plurality of variable nodes and the plurality of constraint nodes comprises: Constructing a variable index graph according to the connection relationship between the plurality of variable nodes and the plurality of constraint nodes, wherein the variable index graph only includes the plurality of variable nodes, and the plurality of variable nodes have a connection relationship, and the connection relationship between any two variable nodes among the plurality of variable nodes is used to indicate that the two variable nodes are connected to the same constraint node in the first variable constraint graph; The plurality of variable nodes are grouped according to the connection density between the plurality of variable nodes in the variable index graph, wherein the connection density between the variable nodes in the same group is greater than the connection density between the variable nodes in different groups.
6. The method according to any one of claims 1 to 5, It is characterized in that The method further comprises: determining the number of variable nodes connected to each of the plurality of constraint nodes; The at least one first constraint node is determined according to the number of variable nodes connected to each constraint node.
7. The method according to any one of claims 1 to 6, It is characterized in that The merging of the plurality of transformed variable constraint subgraphs comprises: The constraint nodes belonging to the homologous nodes in the plurality of transformed variable constraint subgraphs are predicted by a prediction model, wherein the prediction model are obtained through training based on the plurality of variable constraint subgraphs, wherein the plurality of constraint nodes obtained by splitting the same first constraint node in the plurality of variable constraint subgraphs are homologous nodes; The constraint nodes belonging to the same source nodes in the multiple transformed variable constraint subgraphs are merged to obtain the second variable constraint graph.
8. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: Determine a second node set in a second variable constraint graph, wherein the constraint clauses represented by the constraint nodes included in the second node set are the root cause of the unsolvable conjunctive normal form represented by the second variable constraint graph, and the number of the constraint nodes in the second node set is less than a preset threshold; In the second variable constraint graph, the variable nodes connected to the constraint nodes in the second node set are added to obtain a third variable constraint graph, wherein the constraint clauses represented by the constraint nodes in the second node set are no longer the root cause of the unsolvable conjunction normal form represented by the third variable constraint graph.
9. The method according to any one of claims 1 to 8, It is characterized in that The transformation operation includes one or more of the following operations: The positions of the plurality of second constraint nodes are adjusted, the positions of the variable nodes connected to the plurality of second constraint nodes are adjusted, and the properties of the variable nodes connected to the plurality of second constraint nodes are adjusted.
10. A data augmentation device, It is characterized in that include: an acquisition module, configured to acquire a first variable constraint graph of a conjunction normal form, wherein the conjunction normal form is obtained based on circuit design data, wherein the first variable constraint graph includes a plurality of variable nodes and a plurality of constraint nodes, wherein the plurality of variable nodes are used to represent variable literals in the conjunction normal form, and the plurality of constraint nodes are used to represent constraint clauses in the conjunction normal form; A processing module, configured to split at least one first constraint node in the first variable constraint graph to obtain a plurality of variable constraint subgraphs, wherein each first constraint node is split into a plurality of constraint nodes, and the constraint nodes obtained after the splitting are located in different variable constraint subgraphs, the at least one first constraint node does not belong to a first node set in the first variable constraint graph, the first node set includes a plurality of second constraint nodes, and the constraint clauses represented by the plurality of second constraint nodes are the root cause of the unsolvable nature of the conjunctive normal form; The processing module is further used to perform a transformation operation on the plurality of second constraint nodes in the plurality of variable constraint subgraphs to obtain a plurality of transformed variable constraint subgraphs; The processing module is also used to merge the multiple transformed variable constraint subgraphs to obtain a second variable constraint graph, and the second variable constraint graph is used to generate a new conjunctive normal form, and the new conjunctive normal form is used as a training sample for training a circuit verification model.
11. The device according to claim 10, It is characterized in that The processing module is further used for: Transform the second variable constraint graph into a conjunctive normal form to obtain a new conjunctive normal form; The pre-trained model is fine-tuned according to the conjunction paradigm and the new conjunction paradigm to obtain a fine-tuned model, wherein the pre-trained model is a circuit verification model for processing the conjunction paradigm.
12. The device according to claim 11, It is characterized in that The fine-tuned model is used to perform one of the following tasks: logical equivalence verification or timing equivalence verification.
13. The device according to any one of claims 10 to 12, It is characterized in that The processing module is further used for: The plurality of variable nodes in the first variable constraint graph are grouped according to the connection relationship between the plurality of variable nodes and the plurality of constraint nodes to obtain the group to which each of the plurality of variable nodes belongs, wherein in the first variable constraint graph, the connection relationship between the variable node and the constraint node is used to indicate that the variable literal represented by the variable node is located in the constraint clause represented by the constraint node; According to the group to which each variable node belongs, it is determined that the constraint nodes connected with the variable nodes of different groups belong to the at least one first constraint node.
14. The device according to claim 13, It is characterized in that The processing module is further used for: Constructing a variable index graph according to the connection relationship between the plurality of variable nodes and the plurality of constraint nodes, wherein the variable index graph only includes the plurality of variable nodes, and the plurality of variable nodes have a connection relationship, and the connection relationship between any two variable nodes among the plurality of variable nodes is used to indicate that the two variable nodes are connected to the same constraint node in the first variable constraint graph; The plurality of variable nodes are grouped according to the connection density between the plurality of variable nodes in the variable index graph, wherein the connection density between the variable nodes in the same group is greater than the connection density between the variable nodes in different groups.
15. The device according to any one of claims 10 to 14, It is characterized in that The processing module is further used for: determining the number of variable nodes connected to each of the plurality of constraint nodes; The at least one first constraint node is determined according to the number of variable nodes connected to each constraint node.
16. The device according to any one of claims 10 to 15, It is characterized in that The processing module is further used for: Predicting the constraint nodes belonging to the same source nodes in the multiple transformed variable constraint subgraphs by using a prediction model, wherein the prediction model is obtained by training based on the multiple variable constraint subgraphs, and the multiple constraint nodes in the multiple variable constraint subgraphs obtained by splitting the same first constraint node belong to the same source nodes; The constraint nodes belonging to the same source nodes in the multiple transformed variable constraint subgraphs are merged to obtain the second variable constraint graph.
17. The device according to any one of claims 10 to 16, It is characterized in that The processing module is further used for: Determine a second node set in a second variable constraint graph, wherein the constraint clauses represented by the constraint nodes included in the second node set are the root cause of the unsolvable conjunctive normal form represented by the second variable constraint graph, and the number of the constraint nodes in the second node set is less than a preset threshold; In the second variable constraint graph, the variable nodes connected to the constraint nodes in the second node set are added to obtain a third variable constraint graph, wherein the constraint clauses represented by the constraint nodes in the second node set are no longer the root cause of the unsolvable conjunction normal form represented by the third variable constraint graph.
18. The device according to any one of claims 10 to 17, It is characterized in that The transformation operation includes one or more of the following operations: The positions of the plurality of second constraint nodes are adjusted, the positions of the variable nodes connected to the plurality of second constraint nodes are adjusted, and the properties of the variable nodes connected to the plurality of second constraint nodes are adjusted.
19. A data augmentation device, It is characterized in that The device comprises a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the device executes the method according to any one of claims 1 to 9.
20. A computer storage medium, It is characterized in that The computer storage medium stores instructions, which, when executed by a computer, cause the computer to implement the method of any one of claims 1 to 9.
21. A computer program product, It is characterized in that The computer program product stores instructions, which, when executed by a computer, cause the computer to implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Propositional logic-based specification decomposition method
CN108446267A
Constraint-based system fault injecting method
CN108733528A
Boolean satisfiability problem solution searching method and device, electronic equipment and medium
CN115391379A
Data augmentation method and related device
CN116483633A
Incremental routing for circuit designs using a SAT router
US10445456B1
Cited By
Method and sampling system for sampling training data for training a graph neural network for electronic design automation
WO2026135670A1
