Trinity: One Differentiable Physics for Training, Refining and Scoring Generative Floorplanners

Shih-Ying Yeh, Tzu-Sian Wang, Xuehai Wang, Jia-Hua Lee, Daniel Z. Kaplan, Ming-Qi Xu, Wuqian Tang, Chun-Yao Wang, Shang-Hong Lai, Chun-Yi LeearXiv 2026

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.

Figure 1: The network beside each pipeline is the generator that training updates and sampling evaluates. Left: In prior diffusion placers the constraints are absent from training (dashed), differ in form between stages (̸=), and the layouts in between are not measured. Middle: Trinity carries one set of constraint and objective functions, its differentiable physics, through training, refinement, and scoring. Right: Soft cost against refinement budget, each curve starting at the raw sample with zero refinement steps. Faster: the step at which each prior generator under our refiner reaches the soft cost of its own full loop (triangle). Lower: the refined soft cost of the best prior pipeline against ours.
  1. 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.
  2. 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.
  3. 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.
Trinity (solid orange lines) achieves lower costs at much lower computational budgets than prior methods (triangles).

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

BibTeX
@misc{yeh2026trinity,
  author = {Shih-Ying Yeh and Tzu-Sian Wang and Xuehai Wang and Jia-Hua Lee and Daniel Z. Kaplan and Ming-Qi Xu and Wuqian Tang and Chun-Yao Wang and Shang-Hong Lai and Chun-Yi Lee},
  title = {{Trinity: One Differentiable Physics for Training, Refining and Scoring Generative Floorplanners}},
  year = {2026},
  eprint = {2610.04957},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.04957},
}
Figure