acceptodds
Under review as a conference paper at ICLR 2027

CodePaint: Generating IC Layouts in a Learned Discrete Space

Abstract

Early design-technology co-optimization requires both rule-clean layout patterns that satisfy design rules and rule-targeted patterns with specified critical dimensions. Meeting these requirements is challenging because small geometric variations can violate design rules, while sampling from a pre-trained natural image distribution offers limited controllability. We present CodePaint, a framework for controllable IC layout generation in a learned discrete space. A vector-quantized vocabulary captures local layout features, and absorbing diffusion completes their spatial configurations through one-way token updates that preserve context and revealed tokens. For rule-targeted generation, we introduce TokenProbe, which selects tokens to retain during completion by probing encoder responses to geometric perturbations, without additional training. On ASAP7, CodePaint achieves 75.69% direct DRC compliance compared with 12.00% for PatternPaint, rising to 78.38% after cleanup. For rule-targeted generation, TokenProbe achieves a valid target realization rate of 22.5%,  50% higher than the fixed-block baseline. On a commercial 16 nm PDK, CodePaint adapted with only 20 target clips outperforms PatternPaint adapted with 100 clips. These results establish a strong pretrained layout prior for geometrically faithful generation, local control, and sample-efficient PDK adaptation.

Primary area:
generative models
Keywords:
DRC, VQ-VAE, D3PM, conditional generation, discrete diffusion, layout inpainting, benchmark, VLSI, Layout Pattern Generation

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_6ydiOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

CodePaint combines a layout-trained VQ-VAE with absorbing discrete diffusion for IC layout completion. TokenProbe enables geometric conditioning by retaining tokens selected through encoder sensitivity to spacing perturbations. The paper also investigates few-shot adaptation to a commercial PDK.

Critical strengths

The work addresses a practically relevant problem and reports a substantial improvement in direct DRC compliance, from 12.00% for PatternPaint to 75.69%. Calibre-based verification and the commercial-PDK evaluation provide meaningful evidence of practical utility.

Critical weaknesses
  • The methodological novelty is moderate. The representation and diffusion components are established techniques. The contribution therefore rests primarily on their application to layout generation and on the effectiveness of TokenProbe.

  • TokenProbe’s selection criterion needs stronger validation. Encoder sensitivity to a geometric perturbation does not establish that retaining the selected tokens is sufficient or necessary to preserve that geometry. It may also constrain unrelated features. A direct geometric-retention baseline would help establish the benefit of operating through token sensitivity.

  • The control evaluation does not fully establish precise, site-specific preservation. Metrics are computed after target-template cleanup, and successful realization need not occur at the original site. Furthermore, unchanged per-rule violation counts do not guarantee the absence of newly introduced violations.

  • The ablations contain confounding factors. The appendix describes different noise schedules and loss formulations across transition variants, while the cross-PDK comparison uses different adaptation procedures. These settings limit attribution of the improvements to the proposed mechanisms.

Questions for authors
  • Can the authors clarify the implemented transition schedules and provide appropriately controlled comparisons?
  • How does TokenProbe perform at the original target site before cleanup, compared with directly retaining the target geometry?
3 comments

Thank you for recognizing the practical relevance of the problem and the substantial improvement in direct DRC compliance, and for noting that the Calibre-based verification and commercial-PDK evaluation provide meaningful evidence of practical utility. We greatly appreciate your constructive comments. Below, we provide our detailed responses to each point.

W1: Methodological novelty

We acknowledge that vector quantization and absorbing-state diffusion are established concepts. Our contribution lies in how we adapt and integrate them for layout generation, guided by the properties that layouts require.

First, the representation is not a generic image tokenizer. Prior diffusion-based layout generation works in a continuous latent space pretrained on natural images, and its decoder adds edge noise that only template cleanup can remove. CodePaint learns its vocabulary directly from layouts. Each code is a learned prototype of a local layout feature, so every decoded token is geometry observed in real designs.

Second, our use of absorbing diffusion is also not a generic transfer of D3PM. We select the absorbing kernel for two properties (Sec. 3.2, Fig. 2b). Its corruption removes information and never substitutes one layout code for another. Its completion is monotonic and never revisits a revealed token. Both properties matter for layouts. A single pixel-scale defect can invalidate an otherwise clean layout. With the tokenizer fixed, the kernel alone moves the direct DRC-clean rate from 15.08% (uniform) to 45.62% (codebook-similarity) to 75.69% (absorbing). It also reduces boundary speckle from 5,121 to 206 pixels (Table 1, Fig. 2c).

Third, prior controllable layout generators steer only coarse attributes, such as pattern category or a text description of the rule (Sec. 2.2). To our knowledge, CodePaint is the first to control a requested critical dimension numerically, and TokenProbe is the mechanism that makes it possible. It retains the tokens whose encoder features respond to a perturbation of the target dimension. It needs no labels, no retraining, and no rule-specific code.

Together, these choices address a specific gap in prior layout generation: continuous latent diffusion yields noisy geometry and offers no handle on a requested dimension. CodePaint raises direct DRC compliance from 12.00% to 75.69%, realizes a requested dimension within a designated region, and adapts the same prior to a commercial PDK from 20 clips without retraining.

W4 and Q1: Confounds in the ablations

We thank the reviewer for identifying the noise-schedule confound in the original comparison. We conducted additional experiments to assess whether the absorbing model’s advantage depends on its cosine-squared schedule. The original settings and new results are summarized below. Direct DRC pass rates are measured before geometric cleanup.

ExperimentTransition kernelNoise scheduleSchedule parametersDirect DRC pass rateAfter template-based cleanup
OriginalUniformConstantβt=0.5\beta_t = 0.515.08%48.00%
OriginalCodebook-similarityConstantβt=0.5\beta_t = 0.545.62%72.92%
OriginalAbsorbingCosine-squareds=0.008s = 0.008, βmax⁡=0.999\beta_{\max} = 0.99975.69%78.38%
NewAbsorbingConstantβt=0.5\beta_t = 0.572.00%73.77%

The codebook-similarity variant did not converge under the tested cosine-squared configuration. We therefore only trained the absorbing model with the constant schedule used by both alternative kernels. Under this shared schedule, absorbing diffusion achieves a 72.00% direct DRC pass rate, only 3.69 percentage points below its original result, and substantially above the uniform and codebook-similarity variants.

These results show that absorbing diffusion maintains strong performance under the constant schedule and that its observed advantage cannot be explained solely by the original noise-schedule difference.

W2 W3 and Q2: Site preservation before and after cleanup

We thank the reviewer for raising these points. That a successful realization need not occur at the original site is a deliberate choice rooted in the requirement of our task. Rule-targeted generation needs layouts that contain a requested spacing (e.g., 18 nm tip-to-side) for DTCO rule probing. A pattern serves this purpose wherever the spacing occurs, so the property to preserve is the spacing itself, not its absolute position in the clip. Problem 2 (Sec. 2.4) defines target consistency this way, and Kept follows it.

Before and after cleanup. To separate token retention from cleanup, we report Kept and Kept + clean before and after cleanup for every Table 2 variant.

MethodKept, before cleanup (%)Kept + clean, before cleanup (%)Kept, after cleanup (%)Kept + clean, after cleanup (%)
Unconditional17.81.410.03.7
Random20.71.713.15.7
BoxKeep44.12.238.914.7
TokenProbe53.04.055.222.5

The advantage of TokenProbe is already present before any cleanup. TokenProbe keeps the target in 53.0% of draws, against 44.1% for BoxKeep and 17.8% unconditionally, and the ranking TokenProbe > BoxKeep > Random > Unconditional holds in all four columns. Raw rasters contain isolated noise pixels that the deck flags as violations, so Kept + clean is low for every method before cleanup and rises after it. Token retention therefore realizes the dimension, and cleanup mainly supplies legality.

New violations. Our check already works at the level of individual violations, not counts. A draw is clean only if every Calibre violation it contains also appears in the reference, with the same rule at the same location. Any newly introduced violation fails the draw. The wording "no rule has more violations" in Appendix D.3 understates this, and we will clarify it in the revised PDF.

Dear Reviewer 6ydi,

Thank you again for your thoughtful feedback and careful consideration of our work. As the discussion period draws to a close, we would appreciate knowing whether our responses have sufficiently addressed your concerns. For convenience, we summarize our main responses below:

For W1 (Methodological novelty & task alignment): We clarified that our contribution goes beyond adapting existing components: (1) our layout-learned VQ vocabulary and monotonic absorbing kernel eliminate substitution defects and reduce boundary speckle by 25× (driving direct DRC compliance from 15.08% to 75.69%), and (2) TokenProbe introduces the first training-free, label-free mechanism to steer continuous critical dimensions numerically in discrete layout generation.

For W4 / Q1 (Noise-schedule confounds): We conducted controlled experiments training the absorbing diffusion model under the exact same constant noise schedule (βt=0.5\beta_t = 0.5) used by all alternative kernels. Absorbing diffusion maintains a high direct DRC pass rate (72.00%), confirming its advantage is robust and independent of schedule differences.

For W2, W3 / Q2 (Site preservation & new violations): We provided detailed before-and-after cleanup metrics demonstrating that TokenProbe's target realization advantage over direct geometric retention (BoxKeep) already holds prior to post-processing (53.0%53.0\% vs. 44.1%44.1\%), and clarified that our DRC evaluation strictly inspects individual violations rather than net counts to rule out any newly introduced errors.

We would greatly appreciate any further comments or questions. Thank you again for your time and positive recognition of our substantial DRC compliance gains and industry-aligned practical utility!

Reviewer_QCJUOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes CodePaint, an IC layout generation framework combining a learned VQ tokenizer with absorbing diffusion for conditional layout completion. TokenProbe selects geometry-sensitive tokens to retain during generation, enabling dimensional control without additional training. Experiments evaluate DRC compliance, target-spacing realization, and few-shot adaptation to a commercial 16nm PDK.

Critical strengths
  1. IC layouts contain recurring geometric patterns and require precise boundaries, making the discrete formulation reasonable. The comparisons across corruption kernels and tokenizers in Table 1 provide useful empirical support for the main design choices.

  2. DRC compliance improves substantially over PatternPaint, both directly (75.69% versus 12.00%) and after identical cleanup (78.38% versus 42.62%). Evaluation uses Calibre after stitching outputs back into their GDSII context. The commercial-PDK results also suggest that the learned layout prior transfers effectively with limited target data.

Critical weaknesses

I am familiar with discrete diffusion but less familiar with the IC layout literature, so I may miss some domain-specific context. Nevertheless, I have several concerns regarding the methodology and evaluation:

  1. Eq. (7) measures continuous encoder-feature changes, whereas the method retains discrete token identities. The authors explain that pre-quantization features capture sensitivity even without token changes, which is plausible. However, it remains unclear whether these scores identify the tokens most useful for preserving the requested dimension after decoding. Random and BoxKeep provide useful comparisons, but do not directly address this issue. A comparison with selection based on discrete token-change frequency under the same perturbations and a nine-token budget would better justify the central selection rule.

  2. Appendix D.3 measures target realization after template cleanup, which can snap displaced boundaries back to the requested spacing. A matching pair elsewhere in the regenerated neighborhood also counts, even if it is not the original target site. Applying the same cleanup to all methods keeps the comparison useful, but the reported rate does not directly establish preservation at the designated site before correction. Reporting original-site target preservation before and after cleanup would help clarify the respective contributions of token retention and post-processing.

Questions for authors
  1. How does Eq. (7) compare with selection based on discrete token changes under identical perturbations and retention budgets?

  2. Could the authors report target preservation at the original site, both before and after template cleanup?

3 comments

Thank you for recognizing that the discrete formulation suits the recurring patterns and precise boundaries of IC layouts, and for noting the substantial DRC improvement under Calibre verification and the effective transfer to a commercial PDK. We greatly appreciate your constructive comments. Below, we provide our detailed responses to each point.

W1 and Q1: Continuous scores versus discrete token changes

The continuous encoder feature contains more information than discrete token changes. A code flips only when a perturbation moves a token's feature across a codebook boundary, so the flip is determined by the feature displacement that Eq. 7 measures, and Eq. 7 also records how far the feature moved. Measuring the same response by discrete token-change frequency should therefore yield similar but slightly lower performance. Below we implement the comparison you propose. FlipKeep applies the same six perturbations as Eq. 7 (±1, ±2, ±3 nm), counts how many change each token's VQ code, and keeps the top 9 under the same token budget (ties go to the token nearest the site). We use the full Table 2 protocol. Kept is measured on the decoded raster, so it directly tests whether the retained tokens preserve the dimension after decoding.

SelectionTokensKept, before cleanup (%)Kept + clean, before cleanup (%)Kept, after cleanup (%)Kept + clean, after cleanup (%)
BoxKeep944.12.238.914.7
FlipKeep (discrete code change)950.83.853.222.0
TokenProbe (Eq. 7)953.04.055.222.5

As expected, FlipKeep yields similar but slightly lower performance. TokenProbe is higher in every column (22.5% vs. 22.0% Kept + clean after cleanup), and both exceed BoxKeep by 7–8 points. The discrete measure thus confirms that the encoder response identifies the tokens that preserve the dimension after decoding, and Eq. 7 reads that response at finer resolution. We will add the FlipKeep baseline to Table 2 in the revised PDF.

W2 and Q2: Site preservation before and after cleanup

We thank the reviewer for pointing out this distinction. Counting a matching pair anywhere in the regenerated neighborhood is a deliberate choice closely tied to our task. Rule-targeted generation needs layouts that contain a requested spacing (e.g., 18 nm tip-to-side) for DTCO rule probing. A pattern serves this purpose wherever the spacing occurs, so the property to preserve is the spacing itself, not its absolute position in the clip. Problem 2 (Sec. 2.4) defines target consistency this way, and Kept follows it. To separate token retention from cleanup, we now report Kept and Kept + clean before and after cleanup for every Table 2 variant.

MethodKept, before cleanup (%)Kept + clean, before cleanup (%)Kept, after cleanup (%)Kept + clean, after cleanup (%)
Unconditional17.81.410.03.7
Random20.71.713.15.7
BoxKeep44.12.238.914.7
TokenProbe53.04.055.222.5

The advantage of TokenProbe is already present before any cleanup. TokenProbe keeps the target in 53.0% of draws, against 44.1% for BoxKeep and 17.8% unconditionally, and the ranking TokenProbe > BoxKeep > Random > Unconditional holds in all four columns. Raw rasters contain isolated noise pixels that the deck flags as violations, so Kept + clean is low for every method before cleanup and rises after it. Token retention therefore realizes the dimension, and cleanup mainly supplies legality. We will add this table as Appendix D.5 and summarize it in Sec. 4.3 in the revised PDF.

We thank the reviewer again and hope these results help resolve your concerns and potentially support a higher rating.

The additional empirical results seem reasonable, and the explanation of the target consistency criterion has resolved my concern. I maintain my original positive assessment.

Thanks for your response. We are glad that the additional ablation and the further explaination of the target consistency criterion has resolved all your concerns. Thank you again for your valuable time and overall positive assessment of our work.

Reviewer_a6WHOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper presented CodePaint, which is a codebook-based framework for controllable IC layout generation in a learned discrete space. The authors demonstrated that vector quantization provides an effective representation for chip layouts, therefore supporting higher direct DRC compliance. Furthermore, the authors proposed TokenProbe, which is a token-retention strategy for rule-targeted generation to improve valid target realization.

Critical strengths
  1. The technical novelty of this paper good - introduced two both CodePaint as a framework and especially TokenProbe, which is the distinctive component in comparison to prior literature.
  2. The proposed method demonstrated good performance in few-shot commercial PDK adaptation against PatternPaint.
Critical weaknesses
  1. Although this paper demonstrated some strong results in commercial PDK adaptation, only PatternPaint is considered in Table 3 as the comparison. More baselines would be helpful to present a more complete table.
  2. For the experiments dataset, it seems like the generalization across circuit designs could still remain limited. With the 1,000 M1 layout mentioned in the experimental design, Appendix B mentioned that they are from a single AES encryption design.
  3. There is limited qualitative evidence in the main paper. For a diffusion based paper, there are not much visual figure throughout the whole paper, and some of them can only be seen in Appendix.
Questions for authors
  1. Could you include more commercial adaptation experiments?
  2. Could you demonstrate generalization abilities?
6 comments

Thank you for your positive feedback on our novelty and few-shot PDK adaptation, and for your constructive comments. Below, we provide our detailed responses to each point.

W1 and Q1: More baselines for commercial-PDK adaptation

PatternPaint is the only prior generator that applies to this setting. Solver-based methods (DeePattern, DiffPattern, ChatPattern) generate only topology and rely on a rule-constrained solver for dimensions. As noted in Sec. 2, translating an industrial deck with discrete widths and width-dependent spacing into solver constraints does not scale, so these methods cannot adapt to the commercial PDK. For a more complete Table 3, we add the two other D3PM kernels from Table 1 (uniform and codebook-similarity), adapted with the same tokenizer, recipe, and evaluation as CodePaint. We will add them to Table 3 in the revised PDF.

MethodClipsDirect (%)+Denoise (%)H1H_1
PatternPaint201.695.313.218
D3PM (uniform)2017.5418.692.916
D3PM (codebook-sim.)2019.9222.153.212
CodePaint (ours)2027.5429.313.597
PatternPaint502.316.623.229
D3PM (uniform)5025.0026.463.603
D3PM (codebook-sim.)5026.9229.543.566
CodePaint (ours)5035.6935.853.848
PatternPaint1004.6910.383.671
D3PM (uniform)10032.2334.383.951
D3PM (codebook-sim.)10037.7738.924.005
CodePaint (ours)10040.6241.084.012

CodePaint achieves the best clean rate and diversity at every budget. Even the weakest discrete kernel far exceeds PatternPaint (17.54% vs. 1.69% direct at 20 clips), so the layout-learned tokenizer drives most of the transfer, and the absorbing kernel adds to it. With only 20 clips, it already exceeds both kernels adapted with 50 clips in direct clean rate (27.54% vs. 26.92% and 25.00%). This ranking (uniform < codebook-similarity < absorbing) matches Table 1, where the same three kernels are trained directly on ASAP7 (15.08% < 45.62% < 75.69% direct). It is aligned with our insight that the absorbing kernel is the better choice for layout generation, both when training on a PDK and when adapting to a new one. We would be happy to include any additional baselines the reviewer would find informative.

W2 and Q2: Generalization across designs

We thank the reviewer for suggesting evaluation beyond a single AES design. To directly assess cross-design generalization, we evaluate the same AES-trained CodePaint model on three unseen circuit designs—Ibex, JPEG, and ETHMAC—without any retraining or fine-tuning on these designs.

We construct the three datasets from OpenROAD designs using the same dataset-construction pipeline as in the original experiments. For each design, we perform inference on 100 validation tiles with 13 masks per tile and one sample per layout–mask pair, yielding 1,300 completions per design and 3,900 completions in total.

Unseen designDirect DRC pass rateAfter template-based cleanup
Ibex51.69% (672/1,300)58.62% (762/1,300)
JPEG63.31% (823/1,300)68.31% (888/1,300)
ETHMAC48.08% (625/1,300)59.38% (772/1,300)

The AES-trained model achieves direct DRC pass rates of 48.08%–63.31% on these unseen designs, with template-based cleanup further improving performance on every design. These results provide direct empirical evidence that CodePaint generalizes beyond its training design and can generate DRC-clean completions across different circuit designs without design-specific model adaptation.

W3: Qualitative evidence in the main paper

We thank the reviewer for suggesting stronger qualitative evidence in the main paper. We would like to clarify that the layout examples in Figs. 1 and 2 were obtained through actual model inference on purpose-designed layout inputs. We will clarify this provenance in the captions.

Given the nine-page main-text limit, we placed the more extensive qualitative comparisons in Appendix F (Figs. 6–8), covering DRC-annotated model comparisons, sampling diversity, and pixel artifacts. These generated outputs are shown before geometric cleanup.

We agree that presenting a compact comparison in the main paper would make the empirical results easier to assess. We have therefore prepared a figure combining a comparison across four models, enlarged views of pixel artifacts, and two distinct DRC-clean completions of the same input, and uploaded it to our anonymous repository as codepaint_qualitative.pdf. We will incorporate this figure into the revised main text while retaining the broader qualitative evaluation in the appendix.

We hope this added visual evidence addresses your concerns and supports a higher rating.

Dear Reviewer a6WH,

Thank you again for your thoughtful feedback and careful consideration of our work. As the discussion period draws to a close, we would appreciate knowing whether our responses have sufficiently addressed your concerns. For convenience, we summarize our main responses below:

For W1/Q1 (Commercial-PDK baselines): We evaluated additional discrete diffusion kernels (uniform and codebook-similarity) under the same commercial 16nm PDK adaptation protocol, demonstrating that CodePaint consistently achieves superior direct DRC compliance and diversity at every sample budget.

For W2/Q2 (Cross-design generalization): We evaluated the AES-trained CodePaint model directly on three unseen OpenROAD designs (Ibex, JPEG, and ETHMAC) without any retraining or fine-tuning, achieving strong direct DRC pass rates (48.08%–63.31%) that further improve after template cleanup.

For W3 (Qualitative evidence): We provided a comprehensive comparative qualitative figure on our anonymous repository showcasing model comparisons, pixel artifacts, and diverse DRC-clean completions.

We would greatly appreciate any further comments or questions. Thank you again for your time and positive recognition of our novelty and few-shot adaptation performance!

Thank you for providing additional baselines and the evaluation figure. May I ask you to update the PDF of the paper to reflect these new changes and results?

Comments on the paper

1 comment

We thank the reviewers for their careful reviews and constructive feedback. We have uploaded a revised PDF. The main text now uses the tenth page that the discussion period permits for the new figure and the new results. All changes are marked in red:

  1. More baselines for commercial-PDK adaptation (a6WH). Table 3 adds the uniform and codebook-similarity D3PM kernels, adapted with the same tokenizer, recipe, and evaluation as CodePaint (Sec. 4.4).
  2. Cross-design generalization (a6WH). The last row of Table 1 evaluates the AES-trained model on three unseen designs (Ibex, JPEG, ETHMAC) without retraining (Sec. 4.2), with a per-design breakdown in Appendix F.
  3. Qualitative evidence in the main text (a6WH). The new Fig. 4 shows model comparisons, pixel artifacts, and diverse DRC-clean completions before cleanup.
  4. A discrete token-flip selection (FlipKeep) (QCJU). It is added to Table 2 as a baseline next to TokenProbe (Sec. 4.3, Appendix D.2).
  5. Before-cleanup results for rule-targeted generation (QCJU, 6ydi). Table 2 now reports Kept and Kept + clean before and after cleanup for every method (Sec. 4.3).
  6. Noise-schedule control (6ydi). Absorbing diffusion is retrained with the constant schedule used by the other kernels (Sec. 4.2, Appendix F).

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.