Source-linked AI summary

Risk-Aware Generative Inpainting for Optimized Design Editing of EV Battery Cooling Channels

Leekyo Jeong, Yoon Koo Lee, Namwoo Kang

arXiv:2609.08387v1cs.CE

TL;DR

Selecting where to edit a cooling-channel design is challenging because diffusion inpainting can produce different outcomes at the same location. The paper ranks candidate locations with a risk-conditioned distributional value model and finds that the policy outperforms random editing in most tested mask configurations, with an advantage also observed under independent CFD verification.

  • Problem

    Local generative edits can have substantially different outcomes at the same site, making location selection a decision under stochasticity rather than a comparison of expected improvement alone.

    Source: §1 · p. 2
  • Method

    A supervised, τ-conditioned distributional value model ranks candidate inpainting sites by outcome distribution, allowing inference-time risk preferences without retraining.

    Source: §1 · pp. 2–3
  • Results

    The policy improves over random editing in most of seven mask configurations, and its advantage holds under independent CFD verification of edited designs.

    Source: §1 · p. 3
  • Takeaways & Limitations

    One trained model can use its risk dial to trade mean improvement against seed-to-seed consistency when selecting edit locations.

    Source: §1 · pp. 2–3

    Surrogate decisions are supported only within the trained pressure-drop range, and the study covers a single fixed-heat-flux operating point.

    Source: §6.2 · p. 30

Abstract

from arXiv · show

Cooling-channel layouts for electric-vehicle battery packs must deliver temperature uniformity and low pressure drop while maintaining a single continuous channel. In late-stage design, local modification is a practical way to improve performance while retaining established global features. Diffusion-based inpainting supports such local edits, but its stochastic nature produces different outcomes even for the same region. This raises a fundamental question: how should edit locations be selected when each modification's outcome is stochastic? We propose a risk-aware generative editing framework that selects edit locations by accounting for this variability. Rather than scoring each candidate location by a single expected improvement, the method estimates a distribution of outcomes from offline edit results evaluated with a CFD-trained surrogate, and ranks locations by a chosen risk level. A single trained model therefore supports different editing preferences at inference time, emphasizing either higher expected improvement or greater consistency, without retraining. The policy is evaluated against random editing in a held-out paired study across seven mask configurations. It improves the cooling-channel objective over random editing in most configurations, and the advantage holds under independent CFD verification of the edited designs. Varying the risk level reveals a consistent trade-off between mean improvement and run-to-run consistency, while the learned distribution is useful for ranking locations but should not be read as a calibrated probability distribution. Together, these results show that stochastic generative editing can be converted from a source of variability into a controllable design decision through risk-aware location selection: effective editing depends not only on how a design is modified, but also on where and how much outcome variability is acceptable.

1. Introduction

Local generative editing makes the choice of edit location consequential because each site can produce multiple stochastic outcomes. The paper frames risk-aware location selection as a way to choose among those outcomes while retaining feasible cooling-channel designs.

Problem setting

  • Because the same inpainting mask can yield different completions, edit-site selection must account for the range of possible outcomes rather than a single expected value.Diffusion inpainting modifies a selected region while preserving the surrounding design; the generated completions can satisfy the single-stroke topology.Source: §1 · p. 2
  • Cooling-channel editing must preserve a manufacturable, single continuous channel while improving low and uniform temperatures and limiting pressure drop.The paper treats these constraints as defining the feasible design space, with the task focused on identifying promising edit locations within it.Source: §1 · p. 2

Proposed approach

  • A distributional value function scores candidate edit sites by their outcome distributions, and its inference-time τ query lets one trained network express different risk preferences.The approach retains IQN’s query interface but omits its usual reinforcement-learning training loop because temporal-difference training degraded the learned distribution for this task.Source: §1 · pp. 2–3

Contributions

  • A held-out paired evaluation compares the learned policy with random editing across seven mask configurations; it improves performance in most configurations, with an advantage that survives independent CFD verification.The study also examines rollout-seed dependence and reports that the learned distribution is useful for ranking locations but is not calibrated as a probability distribution.Source: §1 · p. 3
  • The contributions include a held-out evaluation against random editing, CFD verification of surrogate fidelity, and evidence that supervised IQN is useful for ranking sites but not calibrated as a probability distribution.The paper also reports that temporal-difference-trained IQN is worse-calibrated than the same architecture trained by supervised regression.Source: §1 · p. 3

2. Related Work

Related work spans parameterized cooling-channel optimization, generative design, and risk-sensitive value estimation. This paper distinguishes its approach by using an unconditional diffusion inpainting operator at agent-selected sites and a distributional value function to rank those sites by risk preference.

2.1. Cooling-channel and flow-field design optimization

  • Cooling-channel optimization includes fixed-template parametric methods, topology optimization, and surrogate-assisted search, but these approaches are less suited to free-form edits of discrete single-stroke channel skeletons.The paper also distinguishes its setting from the Kim & Han (2023) agent, which grows layouts with grid moves and scalar-value DQN, and is not quantitatively compared because its action space and training code are not directly transferable.Source: §2.1 · p. 4

2.2. Generative models for engineering design and diffusion inpainting

  • Diffusion inpainting, including RePaint (Lugmayr et al., 2022), generates diverse masked-region completions, while this approach repeatedly applies an unconditional generator at agent-selected sites and ranks the resulting stochasticity.Unlike reward-guided generator fine-tuning such as DDPO (Black et al., 2024) and DPOK (Fan et al., 2023), the generator is held fixed and the learned decision function selects where to apply it.Source: §2.2 · p. 5

2.3. Distributional reinforcement learning and risk-sensitive control

  • Distributional RL models the return distribution rather than only its expectation, enabling risk-sensitive decisions; IQN (Dabney et al., 2018a) supports querying a quantile fraction τ without a fixed set of fractions.The paper retains this query interface as a supervised-regression conditioning input at inference, rather than using temporal-difference learning, bootstrapped targets, or replay.Source: §2.3 · pp. 5–6

3. Proposed System

The system uses a three-stage pipeline to evaluate cooling-channel layouts, test iterative inpainting edits, and learn where to edit first when the editing budget is small. Its Stage 3 policy ranks candidate positions using offline edit outcomes and a selectable risk level.

3.1. Overview of the proposed system

  • The pipeline assigns Stage 1 to layout evaluation, Stage 2 to testing whether inpainting can improve a design, and Stage 3 to choosing where to edit first.Stages 1 and 2 establish the premises for the paper’s Stage 3 contribution.Source: §3.1 · pp. 6–7

3.3. Stage 1: surrogate evaluator

  • Stage 1 trains a surrogate on CFD-labelled layouts to score designs during the editing loop, reserving CFD for offline verification.The surrogate replaces CFD in the scoring loop, while CFD is used to generate training labels and verify final designs.Source: §3.1 · p. 7, §3.3 · p. 7

3.4. Stage 2: inpainting edit operator and best-of-N search

  • Stage 2 places masks randomly, generates and scores N=8 inpainting candidates per generation, and retains the best-so-far design without a learned position policy.The edit operator accepts only layouts that remain a single continuous stroke with valid inlet/outlet attachment; otherwise the layout is unchanged.Source: §3.1 · p. 7, §3.4 · pp. 7–8

3.2. Design problem and objective score

  • The design is a binary single-stroke channel skeleton, and its lower-is-better objective combines average temperature, temperature non-uniformity, pressure drop, and a weighted corner penalty.The skeleton is 41 × 33; routing is attached afterward to form the 48 × 35 domain that is scored.Source: §3.2 · p. 7

3.5. Stage 3: position-value model

  • Stage 3 ranks candidate edit positions with a frozen geometric-feature ridge term plus a τ-conditioned residual trained on empirical edit-outcome distributions.The five geometric features and corner weight condition the learned value; only the residual-network parameters are trained.Source: §3.5 · pp. 8–9

3.6. Training strategy: supervised regression versus sequential RL

  • The Stage 3 model keeps IQN’s τ-query interface but fits its learned components by supervised regression on fixed offline labels, without bootstrapped targets or environment interaction.The regression uses empirical outcomes from eight pre-generated candidate edits per position.Source: §3.5 · p. 9

3.7. Deployment policy

  • At deployment, the policy averages each position’s predicted value over a chosen risk band, then visits positions in that fixed priority order for 20 steps.Changing the risk band or corner weight produces a new priority list without retraining; visited positions are not revisited.Source: §3.7 · p. 10

4. Experimental Setup

The experiments use CFD-labelled cooling-channel layouts to train a surrogate and evaluate editing on a deliberately harder held-out population. The protocol compares the trained policy with random-position editing under fixed rollout and statistical rules.

4.1. Data generation (ground truth)

  • The training set contains 2,000 layouts accepted above a path-length threshold of 300, while the held-out set contains 100 layouts generated at the stricter threshold of 360.The held-out layouts have mean Tavg and ∆p roughly 2.8 standard deviations above the training mean, making this a deliberately harder sample rather than a random split.Source: §4.1 · p. 11

4.2. Surrogate model

  • An EfficientNetV2-S surrogate predicts Tmax, Tmin, Tavg, Tuni, and ∆p from layouts with inlet/outlet routing included.Both routing conventions are used for surrogate training, but Type B is fixed for editing and evaluation.Source: §4.2 · p. 11, §4.1 · p. 11

4.3. Training configuration

  • For each candidate edit position, eight completions are generated offline as outcomes for residual-network regression, and results use three training seeds.Per-mask effects are pooled by inverse-variance fixed-effect meta-analysis, then across seven mask configurations by random-effects meta-analysis.Source: §4.3 · p. 13

4.4. Evaluation protocol

  • The paired evaluation compares policy and random-position editing on the same 100 held-out images for 20 steps, scoring one new sample per step.Candidate positions are sorted and visited deterministically; edits that fail the single-stroke connectivity constraint leave the layout unchanged. Pre-registered comparisons use raw p-values, while post-hoc per-mask winners are not headline evidence.Source: §4.4 · pp. 13–14

5. Results

The results proceed through three stages: validating the surrogate, measuring unguided inpainting search, and evaluating the learned editing policy. The stages address distinct questions and are not pooled.

5. Results

  • Stage 1 tests whether the surrogate reproduces CFD, establishing the basis for using it as the objective in later stages.Source: §5 · p. 14
  • Stage 2 measures what iterative inpainting search can achieve without a learned policy, providing a baseline capability for Stage 3.Source: §5 · p. 14
  • Stage 3 evaluates the learned editing policy, and its results are kept separate from Stage 2 because the stages use different search budgets and procedures.Source: §5 · p. 14

5.1. Stage 1: labelled population and surrogate fidelity

The surrogate reproduces the composite CFD objective and individual responses on the labelled population. This fidelity supports its use in the optimization loops, while edited-design fidelity is assessed separately.

5.1. Stage 1: labelled population and surrogate fidelity

  • The labelled population spans about 0.6 K in Tavg, and the routing conventions shift Tavg and ∆p while leaving Tuni and corner count nearly unchanged.Type B is therefore held fixed for editing and evaluation rather than treated as a free variable.Source: §5.1 · p. 14
  • The surrogate reproduces the composite CFD objective with R2=0.994 and MAE 0.014 for both routing types.The reported correlation is r=0.997.Source: §5.1 · p. 14
  • Individual-response predictions reach R2=0.998 with MAE 0.0038 K for Tavg, R2=0.997 with MAE 0.0032 for Tuni, and R2=0.997 with MAE 0.51 Pa for ∆p.Source: §5.1 · p. 14
  • The surrogate’s Tavg error is roughly two orders of magnitude below the population spread, but fidelity on edited designs is tested separately.Source: §5.1 · p. 14

5.2. Stage 2: best-of-N optimization by inpainting, without a learned policy

Unguided best-of-N inpainting search substantially improves the surrogate score over 200 generations, but it uses a much larger edit budget than the learned policy. Independent CFD checks confirm improvement for the two larger masks, not the smallest.

5.2. Stage 2: best-of-N optimization by inpainting, without a learned policy

  • Stage 2 retains the best of eight randomly positioned candidate edits per generation for 200 generations, spending 1,600 diffusion calls on one design.Stage 3 instead uses 20 calls, an 80× smaller budget, and asks whether informed edit-location ranking beats random editing.Source: §5.2 · pp. 14, 19
  • The surrogate score falls from 1.417 to 0.131 over 200 generations at wcorner=0, with mask=32 physical responses also improving.Tavg changes from 337.998 to 337.656 K, Tuni from 0.9165 to 0.6566, ∆p from 334.01 to 288.96 Pa, and corner count from 49 to 35.Source: §5.2 · p. 19
  • Mask size affects convergence speed: mask=16 is consistently slowest across all four corner weights.Because best-of-N retains the best-so-far design, the curves are monotone and indicate convergence rate rather than improvement at every generation.Source: Figure 5 · p. 17, §5.2 · p. 19
  • Independent CFD checks confirm improvement for masks 24 and 32 (paired, N=30 designs per mask: m24 p=0.009, m32 p=0.012), but not for mask 16 (p=0.240).The mask-16 surrogate-predicted gains do not reach physical significance at this sample size.Source: §5.2 · p. 19

5.3. Stage 3: the learned editing policy

Stage 3 evaluates a learned edit-site policy against random editing and examines how risk choice, rollout variability, and surrogate validity shape its performance. The held-out advantage favors risk-seeking but trades off consistency; CFD checks support the ranking results, while the learned quantiles are not calibrated probabilities.

5.3.1. Held-out improvement across seven mask configurations

  • Six of seven mask configurations beat random editing; the pooled mask-averaged effect was ∆= + 0.0674 (95% CI [0.0402, 0.0946], z=4.86, p=1.2 × 10−6).Heterogeneity was substantial (I2=69.4%), and the seven configurations share the same 100 held-out designs.Source: §5.3.1 · p. 19, Table 3 · p. 20

5.3.2. Factor decomposition of the headline effect

  • Risk-seeking had a large, highly significant effect, whereas architecture identity had no significant main effect after controlling for mask and risk.A targeted three-seed matched comparison nevertheless put IQN ahead of FQF in five of seven mask configurations and tied in two.Source: §5.3.2 · pp. 20–21, Table 4 · p. 21

5.3.3. Risk vs. seed-to-seed consistency

  • Risk-seeking increased seed-to-seed variance in all seven masks, while larger masks raised both mean improvement and spread; corner weight was uncorrelated with spread.The reported spread ratios are upper estimates because the conditioning value differs from the scoring objective; random editing also includes variability from redrawn positions.Source: §5.3.3 · pp. 21–22, Table 5 · p. 21
  • Pair(24,32) was most consistent in 18/19 slices but won only 10/19; pair(16,24) won 13/19 while being weakest on consistency, and the axes were uncorrelated.Every configuration had both favourable and unfavourable slices; these single-image slices are descriptive, not significance tests.Source: §5.3.3 · pp. 22–23, Figure 7 · p. 22

5.3.4. CFD verification of the deployed policy

  • Across 240 CFD-verified designs, surrogate and CFD agreed on the sign of agent-versus-random improvement in 116/120 paired comparisons (96.7%).The comparisons reuse 30 held-out designs across four conditions, so the confidence interval assumes independence across conditions; both verification sets stayed within the pressure-drop training-scaler range, where extrapolation raises surrogate error 3.2–3.4×.Source: §5.3.4 · pp. 23, 25
  • On one eight-seed held-out design, CFD favoured the agent in all seeds (+0.70 vs. +0.20 for random), although identical action sequences produced distinct final layouts.The agent lowered mean temperature by 0.26 K and pressure drop by 9.6% in all eight seeds; this single design does not estimate population effects.Source: §5.3.4 · p. 25, Figure 9 · p. 26

5.3.5. Supervised regression versus TD training

  • Supervised regression and temporal-difference variants ranked candidate positions similarly, but quantile-crossing on a five-point τ grid fell from 9–32% under TD to 1.0% under supervised training.On a 100-point diagnostic grid, all three critics degraded to 41–48% crossing.Source: §5.3.5 · p. 26
  • The deployed quantile function was not calibrated: PIT tests rejected uniformity across all six significant conditions, and deployed τ windows retained 7–20% quantile-crossing.The authors use it for ranking and a mean-improvement/consistency dial, not as a calibrated probability object; the PIT test used the validation split with per-position outcome distributions.Source: §5.3.5 · p. 26

6. Discussion

The discussion distinguishes robust ranking decisions from calibrated absolute-value uses and interprets risk level and mask size as controls on the improvement–consistency trade-off. It limits surrogate trust to its trained pressure-drop range and identifies conditions and safeguards relevant to deployment.

6.1. Interpretation of the results

  • Ordering-based decisions remain robust across §5, whereas decisions requiring calibrated absolute values do not; sequential value-function training bought no ranking gain and cost calibration on this task.The paper cautions that rank agreement alone can miss calibration failures relevant to risk-sensitive deployment.Source: §6.1 · p. 27
  • Larger masks raise both mean improvement (ρ=+0.646) and seed spread (ρ=+0.833); the risk dial lowers the ratio in every configuration, with m32 below random parity at risk-seeking.Mask size sets a floor on achievable consistency, while risk level moves within it.Source: Figure 10 · p. 28, Figure 11 · p. 29
  • The realised-edit rate is not logged uniformly, so the discussion gives no single rate that could be paired consistently with the headline results.The single-stroke constraint still permits improvement: unguided best-of-8 search lowered the surrogate score from 1.417 to 0.131 over 200 generations.Source: §6.1 · p. 30

6.2. Limitations

  • The surrogate is supported as a decision proxy only within its trained pressure-drop range; outside that range, its error grows several-fold.Deployments producing out-of-range designs should re-verify against the ground-truth solver before trusting rankings.Source: §6.2 · p. 30, §6.3 · p. 30
  • Evidence is limited to one fixed-heat-flux operating point; DQN and ridge-only architecture comparisons each use a single training seed, and the baseline comparison is only against random editing.The headline effect size varies with rollout seed, and the pre-registered seed is the largest of the five measured.Source: §6.2 · p. 30

6.3. Implications for practice

  • Practitioners should use the learned distribution for ranking unless calibration is separately verified, and avoid calibrated-probability decisions such as adaptive stopping without solving calibration first.For offline pools of labelled outcomes with trajectory-independent step outcomes, the discussion argues that sequential training is a cost to justify rather than a default.Source: §6.3 · p. 30

7. Conclusion

The conclusion presents a deterministic, one-shot ranking policy for cooling-channel edits, trained by supervised regression on offline outcomes using a distributional value function. In held-out evaluation it beats random editing in most mask configurations, while exposing a trade-off between improvement and consistency.

7. Conclusion

  • The policy beats random editing in six of seven mask configurations, with a headline effect of +0.1389 (p=7.8 × 10−11) at the pre-registered protocol.The effect size falls to +0.094 when averaged over five rollout seeds.Source: §7 · p. 31
  • The system uses IQN’s τ-conditioned query interface without its usual reinforcement-learning loop, fitting a frozen linear term plus residual by supervised regression on offline edit outcomes.It deploys as a deterministic, one-shot ranking policy.Source: §7 · p. 31
  • A single inference-time risk dial moves the policy along a mean-improvement/consistency frontier, and the surrogate objective is CFD-verified as a decision proxy within its deployment range.The conclusion also reports that temporal-difference training hurts calibration relative to supervised regression, while the learned quantile function fails a calibration test regardless of training method.Source: §7 · p. 31
  • The authors conjecture that supervised value fitting and ranking-based use may extend to other topology-constrained design problems with cheap offline outcomes and trajectory-independent step outcomes.They also recommend verifying learned surrogates against physics before trusting policies trained on them.Source: §7 · p. 31

CRediT authorship contribution statement

The contribution statement assigns conceptualization, methodology, software, validation, analysis, investigation, data curation, writing, and visualization to Leekyo Jeong. Yoon Koo Lee is credited with investigation, validation, and review; Namwoo Kang with supervision, funding acquisition, and review.

CRediT authorship contribution statement

Loading 2609.08387v1…