ReSPack: A Large-Scale Rectilinear Steiner Tree Packing Data Generator and Benchmark
Abstract
Combinatorial optimization (CO) has been studied as a useful tool for modeling industrial problems, but it still remains a challenge in complex domains because of the NP-hardness.
With recent advances in machine learning, the ﬁeld of CO is shifting to the study of neural combinatorial optimization using a large amount of data, showing promising results in some CO problems.
Rectilinear Steiner tree packing problem (RSTPP) is a well-known CO problem and is widely used in modeling wiring problem among components in a printed circuit board and an integrated circuit design.
Despite the importance of its application, the lack of available data has restricted to fully leverage machine learning approaches.
In this paper, we present ReSPack, a large-scale synthetic RSTPP data generator and a benchmark.
ReSPack includes a source code for generating RSTPP instances of various types with different sizes, test instances generated for the benchmark evaluation, and implementations of several baseline algorithms.
Introduction
Combinatorial optimization (CO) problems cover a wide range of tasks.
Many of such CO problems that are relevant in industry today are NP-hard, and hence there are no known efﬁcient algorithms that give solution within polynomial time.
Neural combinatorial optimization (NCO), which leverages the powerful expressiveness of deep neural networks, have shown promising results in some CO problems [51, 6].
The latest advancement has been made in traveling salesman problems [28, 37] and vehicle routing problems [26], where public benchmark datasets exist to encourage active research [45, 55].
Meanwhile, there has been a growing interest in another stream of a CO problem called rectilinear
Steiner tree packing problem (RSTPP), a generalized version of the minimum spanning tree problem where one is interested in disjointly spanning given distinct subsets of a full graph.
Wire routing problem is the representative industrial application of RSTPP.
The wire routing, connecting thousands of pins in a circuit while considering efﬁciency and various constraints, is known as the most timeconsuming work in a circuit design ﬂow.
There has been active studies of heuristic based automatic wire routing, but those are computationally expensive and suffer from non-optimality.
Recently
[Figure]
in both CO and machine learning communities, data-driven approaches have been perceived as promising candidates for the wire routing problem [33, 18].
In CO community, some public datasets are available for Steiner tree problems aiming VLSI design or telecommunication [25, 31], but there is no public dataset for Seinter tree packing problems.
In circuit design community, International Symposium on Physical Design (ISPD) provided wire routing benchmarks considering real-world design rules though annual contests: ISPD 2007, 2008, 2018, 2019.
However, these benchmark datasets have only few samples, so that it may not be suitable for
ML research where a lot of data is required.
The lack of public benchmark restricts an active research.
To accelerate research on these problems, we introduce a synthetic benchmark dataset for RSTPP, called ReSPack.
We provide a dataset generator, diversely scaled benchmark instances and feasible solutions.
Furthermore, we add challenging yet interesting constraints such as spacing between lines and no wiring area inspired by a real-world circuit routing.
Our benchmark dataset provides various scales of RSTPP instances, from academic research scale to industrial scale.
The dataset along with the generator and baselines are available on GitHub 3 .
In Figure 1, we visualize the
RSTPP problem obtained from a commercial printed circuit board (PCB) screenshot with an synthetic instance generated by ReSPack.
In summary, the main contributions of this paper are as follows: (i) We present ReSPack, an opensource RSTPP benchmark for wire routing, including the source code for generating a training datasets as well as diversely scaled benchmark instances for an evaluation, (ii) we add interesting constraints inspired by real-world routing, (iii) we give a set of baselines to start with for RSTPP.
Background and Problem Statement 2.1 Rectilinear Steiner tree packing problem (RSTPP)
Rectilinear Steiner tree problem (RSTP) [14].
We denote undirected graphs by G =
( V, E ) , where
V is the node set and E is the edge set.
We call rectangular h ⇥ b graph G a grid graph, if it can be embedded in the plane by h horizontal lines and b vertical lines such that all nodes v 2 V are represented by the intersections of the lines.
Given two different intersections, namely two neighbor nodes v i , v j , an edge is deﬁned by e ij = { v i , v j } 2 E .
For a given edge set S ✓ E , V ( S ) denotes all nodes that are incident to an edge in S .
We call a sequence of nodes and edges P =
( v 0 , e 01 , v 1 , ..., v l ) a path from v 0 to v l , where each edge e i  1 ,i is incident with the nodes v i  1 and v i for i = 1 , ..., l .
Given a subset of nodes T ✓ V , called a net or a terminal set, of a grid graph G , an edge set S is a rectilinear Steiner tree for T in G , if a subgraph ( V ( S ) , S ) contains a path from s to t for all pairs of nodes s, t 2 T , s 6 = t .
Rectilinear Steiner tree packing problem (RSTPP) .
RSTPP is a more generalized version of RSTP.
That is, given list of K nets T =
{ T 1 , T 2 , ..., T K } , RSTPP is to ﬁnd edge sets S 1 , ..., S K such that
S i is a Steiner tree in G for T i and
[Equation]
[Figure] [Figure]
2.2 An industrial example of RSTPP: Wire routing problem
Assuming that components are placed on a circuit board, routing problem can be formulated as
RSTPP [14] where a circuit board is a grid graph G with nonnegative edge costs C ( e ) , e 2 E and T is a set of electrically equivalent pins to be connected by a wire.
The goal of the wire routing problem is to minimize the total cost of all Steiner trees, i.e. , P Ki = P e 2 S i C ( e ) .
In our benchmark dataset, we simply deﬁne C ( e ) = 1 for all e 2 E , namely minimizing the overall wire length.
One of the main challenges in wire routing problem is derived from the hard constraints, e.g. no intersection is allowed between wires in different nets.
Figure 2 illustrates various solutions (possibly infeasible) for solving the same routing problem instance.
In Figure 2 (a), the connection of the blue and black nets block the path of the red net, which prevents the terminals from being connected.
Figure 2 (b) and (c) are illustrative examples of feasible routings, where the routings in (b) detour along relatively inefﬁcient path compared to that of (c), an optimal routing.
ReSPack: A Large-Scale Synthetic RSTPP Data Generator and Benchmark
ReSPack aims to provide problem instances and their feasible solutions for the large-scale RSTPP.
For that reason, the instance generation process is designed to guarantee existence of feasible solution and to cover real-world wire routing problems in terms of complexity and diversity.
In addition, we report benchmark results that compare existing wire-routing algorithms.
3.1 Constrained RSTPP
In order to make the problem more realistic, we assume multi-layer circuit routing where there is an additional vertical axis in a grid.
In addition, we add constraints found in real-world wire routing which are illustrated in Figure 3 i.e., no wiring area (NWA), line spacing (LS) and wire length (WL).
No wiring area (NWA) constraint.
A no wiring area set denoted as O ✓ V is a non-routable zones in a circuit, which may arise due to the placement of macro-cells, intellectual property (IP) blocks, etc.
Then, a Steiner tree S i in G for T i must also satisfy V ( S i ) \ O = ; for all i = 1 , ..., K .
Line spacing (LS) constraint.
A line spacing constraint speciﬁes the margin between the lines in distinct Steiner trees.
It is essential in circuit routing to provide enough spacing between the lines in order to prevent electromagnetic interference and/or line breaking in etching process [52].
Wire length (WL) constraint.
A wire length constraint restricts the path distance between any two terminals (or pins) within each Steiner tree.
This constraint is especially crucial in high frequency devices: as the signal propagates through a long wire, its amplitude gets attenuated and in turn the effect of noise gets ampliﬁed.
3.2 Instance generation process
As introduced earlier in this section, our goal is to generate a RSTPP instance with a feasible solution considering the constraints to avoid an instance that is impossible to route all terminals.
Once a problem is generated, ﬁnding a solution is an expensive task because of the discrete nature of combinatorial optimization.
Fortunately, however, acquiring both problem instances and feasible sub-optimal solutions can be made relatively easy through the access into generation process.
We provide an algorithm of which outputs are a problem and a feasible solution by building Steiner trees sequentially from given grid graph in Algorithm 1.
Algorithm 1: RSTPP instance generation
Data: Graph G , maximum number of nets N , a random sampler ⇠ , and a function
BuildSteinerTree ( G, k ) that outputs a Steiner tree s with terminals t in a graph G given number of terminals k in a net, and the candidate nodes C for terminals.
Result:
Nets of terminals N =
{ T 1 , · · · , T K } with feasible solutions S 1 , · · · , S K for K  N . {+1 initialize n 
+}
and i 1 ; 2 initialize C ; ; /* candidate nodes for terminals */ 3 while n
N do
[Equation] BuildSteinerTree C k ) ; if s is feasible then end
The key idea of the algorithm is to iteratively generate Steiner trees so that each Steiner tree S i are disjoint.
This process successfully terminates if all K Steiner trees are generated, or terminates with failure if for some i = 2 , · · · , K , the resulting tree S i violates any constraints.
The algorithm uses heuristics to generate an approximate Steiner tree S i .
(See appendix for details.)
The algorithm successfully terminates after all K iterations if the generated RSTPP solution is feasible, i.e. all the given constraints are satisﬁed, or terminates with failure otherwise.
To consider NWA and
LS constraints of a constrained RSTPP, LargestConnectedComponent returns candidate terminal nodes which are disjoint with nodes inhibited by NWA and LS nodes in the graph.
The WL constraint is applied to the feasible Steiner trees after each tree is built.
3.3 Benchmark dataset summary
ReSPack provides not only the instance generator but also the ﬁxed benchmark datasets to evaluate and compare algorithms for solving RSTPP in a wide range of conditions in terms of instance scale and constraints.
The benchmark is categorized into medium, large, and extra large datasets by the size of grid graphs.
The medium dataset consists of the commonly used size of instances in previous studies [33, 21, 18], and it is designed to obtain the optimal solutions in a reasonable time.
The large and extra-large datasets are intended to resemble wire routing problems for low-resolution and high-resolution printed circuit boards (PCB), respectively.
The large datasets can be solved by the heuristic method rather than by mathematical programming.
The extra large datasets are composed of challenging instances to handle with existing routing methods due to their instance size.
[Table]
Another axis of benchmark categorization is the constraints mentioned above.
The UC datasets are unconstrained RSTPP, the NWA datasets only have no wiring area contraints [Table] and the NWA+LS+WL datasets have line spacing and wire length constraints along with the exact same location of no-wiringarea as in NWA datasets.
Table 1 shows summary of benchmark datasets which are composed of eight grid sizes and three constraints, where each of the datasets contains one hundred instances.
We report few key statistics, including number of trees, number of terminals
[Table]
and the fraction of edges included in the solution (denoted as density), that well explains the characteristics of generated instances.
Experiments 4.1 Benchmarking baselines SCIP
RSTPP can be formulated as a mixed integer linear programming (MILP) problem [2] and can therefore be solved by using mathematical optimization solvers.
We formulate our RSTPP as the multi-commodity ﬂow-based formulation [2] and implement SCIP baseline using the non-commercial optimization solver SCIP [4].
Sequential.
Since RSTPP is composed of multiple RSTP (See Section 2.1), many studies have been attempted to exploit the routing heuristics to solve each RSTP in a pre-deﬁned orders.
However, such greedy approach does not necessarily guarantee a feasible solution and the resulting solution may violate congestion constraints.
The straightforward heuristic to help avoiding congestion is to randomly order nets and then route them one by one, excluding the regions routed previously.
Based on this heuristic, we provide Sequential-1 baseline upon RSTP router which incrementally constructs the tree starting from a single terminal node [49] and Sequential-2 baseline upon the router which computes minimum spanning tree (MST) on the complete graph of terminal nodes [27].
PathFinder.
Negotiated-congestion avoidance algorithm, PathFinder [39], induces a net router to avoid congested nodes by assigning the cost of nodes where congestion occurs.
It reroutes each net sequentially according to the updated node cost until there is no congestion.
We provide
PathFinder-1 , PathFinder-2 baselines based on PathFinder algorithm with corresponding RSTP routers mentioned above.
RankingCost.
RankingCost [21] combines an evolution strategy [47] with routing heuristics.
It learns two kinds of parameters, net ranking parameters and cost maps.
The net ordering is decided by net ranking parameters and then A* [17] router sequentially computes the path between each pair of terminals within current net, while the cost maps are injected into the A* heuristic to reﬂect overall routing cost.
As it is devised for 2-terminal circuits, we extend it to allow multiple terminals by decomposing multiple terminals into multiple 2-terminal pairs.
We provide RankingCost-MT baseline which is the extension of RankingCost for multiple terminals (MT).
In summary, we provide 6 baselines, SCIP, Sequential-1, Sequential-2, PathFinder-1, PathFinder-2,
RankingCost-MT, and detailed procedure of the baselines are described in Appendix.
4.2 Experimental setup
We evaluate baselines with three measures.
Success rate (SR) is a ratio of samples which succeed in ﬁnding feasible solutions.
Gap [26] is a ratio between the solution cost of the evaluated algorithm
[Table]
and the optimal solution cost.
Due to limited scalability of MILP, we replace optimal cost with the solution cost of ReSPack in our experiments:
Gap (%) =
[Table]
1) ⇥ 100 .
Time is an elapsed time per instance.
We report the mean over 5 runs except for SCIP of which random seed is ﬁxed by default.
We run all experiments on Intel(R)
Xeon(R)
Gold 6240 CPU.
We implemented SCIP by utilizing default ‘SCIP solver’ in google-or-tools [44] which is an open-source software package for combinatorial optimization problems.
All baselines have the same exit condition: maximum number of iterations as 200 and time limit as 3 hours.
On NWA+LS+WL , we slightly revised Sequentials and PathFinders by assigning the equivalent amount of cost to line spacing area and nodes in it.
SCIP is excluded from the baselines for NWA+LS+WL dataset, as drastic changes of MILP formulation is required.
4.3 Results
Table 2 demonstrates the evaluation results of baselines applied to ReSPack of medium size.
We add the results for large size in Appendix, and exclude the results for extra large size because we failed to ﬁnd a feasible solution for all baselines.
SCIP, being able to ﬁnd an optimal solution, shows the best Gap in the Table 2.
Sequentials show substantially worse performance since it does not consider congestion avoidance.
From this result, we conjecture that consideration of congestion avoidance highly affects the routing performance.
PathFinders show better SR than Sequentials by virtue of sophisticated congestion avoidance heuristic.
Lastly, RankingCost-MT shows better SR than the others, but takes longer than them except for SCIP since evolution strategy is computationally expensive.
Conclusion
In this paper, we present ReSPack, a synthetic RSTPP benchmark dataset which covers instances of diverse scales and constraints that captures the characteristics of real-world instances, along with an open-source generator and baseline solvers.
In our experiments, we compared several baselines on research to industrial problem size and point out that there is still a lot of room for improvement in terms of scalability, feasibility, and optimality, emphasizing the difﬁculty from constraints.
We believe that our benchmark and dataset can accelerate the further research in the ﬁeld of CO and wire routing.
One interesting future direction we are considering is reinforcement learning (RL).
Deep
RL has emerged as a promising way to build a scalable solution to tackle CO problems [6, 26], but application to Steiner tree (packing) problem has been limited.
ReSPack can provide a basic building blocks to build the RL environment, but we leave building the environment with complex design rules as a future work.