In the complex world of Electronic Design Automation (EDA), floorplanning is the high-stakes game of Tetris that determines a chip's performance. You have to pack hundreds of functional blocks onto a silicon die, minimizing wirelength and area while obeying a strict set of geometric rules.
A new paper from Kohaku Lab introduces Trinity, a generative floorplanner that moves away from the "black box" approach of recent AI models. Instead of just showing a model thousands of good layouts and hoping it learns the rules, Trinity integrates the "physics" of floorplanning—the constraints and objectives—directly into every stage of the machine learning pipeline.
TL;DR
Trinity is a flow-matching generative model that uses a unified set of differentiable physics functions for training, refining, and scoring chip floorplans. This approach allows the model to learn physical constraints during training, resulting in layouts that are 36% better than prior methods while being up to 660x faster to refine.
What Problem Does This Paper Address?
Recent "diffusion-based" floorplanners have a major blind spot: they are trained only to replicate reference layouts. They don't actually "know" the rules of floorplanning—like "don't overlap blocks" or "keep these specific blocks together."
To fix the inevitable mistakes these models make, researchers usually add "guidance" during sampling or messy post-processing loops. This makes it impossible to tell how much the AI generator is actually contributing versus the post-processing. Furthermore, these correction loops are often slow and hand-tuned. Trinity addresses this by making the constraints differentiable and visible to the model from day one.
Methods
The core of Trinity is a set of six differentiable functions that represent the "physics" of the problem: overlap, cluster adjacency, multi-instance block shapes, boundary constraints, wirelength, and outline area.
- Training: These functions are added to the training loss. The model doesn't just learn what a good layout looks like; it learns the gradients of the rules themselves.
- Refinement: After the model generates a "raw" sample, Trinity uses those same functions as an energy landscape. A closed-form refiner (using the Adam optimizer) quickly slides the blocks into better positions.
- Scoring: The authors introduced a "Soft Cost" metric based on these functions. This provides a continuous signal that ranks layouts even before they are "legalized" (made 100% overlap-free), allowing for much faster iteration.
The architecture uses a Diffusion Transformer (DiT) backbone enhanced with graph-based components to understand the "netlist"—the complex web of connections between blocks.
Datasets
- FloorSet-Lite: A massive dataset containing nearly 1 million synthetic floorplans with diverse constraints.
- FloorSet Val Set: The official 100-case validation set from the ICCAD 2026 CAD Contest.
- GSRC: A classic industry benchmark used to test the model's ability to generalize to designs it hasn't seen before.
Key Insights and Ideas
- Physics as a Prior: By putting physics in the training loss, the network essentially "pre-calculates" the guidance that prior models had to do slowly during sampling. This allows Trinity to sample layouts without any extra guidance steps.
- The Power of Refinement: The authors discovered that a shared, high-quality refiner can make even mediocre generators look good. This highlights why evaluating models stage-by-stage (raw vs. refined) is critical for true progress in the field.
- Area by Construction: Trinity uses a clever "log-aspect ratio" latent space. This ensures that every block generated always has the exact target area required, turning a hard constraint into a simple property of the coordinate system.
Key Results
Trinity sets a new bar for both speed and quality in generative floorplanning:
- Efficiency: Its refiner reaches the target cost of prior methods' loops 16x to 660x faster.
- Quality: Trinity’s refined layouts achieve a 36% lower soft cost than the best existing pipelines.
- Performance: On the FloorSet validation set, the full pipeline reaches a mean hard cost of 1.014 in just 1.63 seconds per case.
- Scaling: The researchers found that model depth is more important than width; a 12-layer model significantly outperforms a 4-layer model with the same number of parameters.
Limitations and Future Work
While Trinity is a leap forward, the authors note a few areas for growth:
- Scaling to Huge Designs: The current model is tested on designs with up to 120 blocks. Modern chips can have thousands of macros, which will require further architectural scaling.
- Learned Legalization: The final "legalizer" step is still a traditional, non-learned algorithm. The authors aim to eventually integrate wirelength optimization directly into a learned, differentiable legalization stage.
- Interactive Tools: Because the model is so fast, it opens the door for interactive design tools where an engineer could move one block and watch the AI instantly re-optimize the rest of the chip in real-time.
Summary updated