C-ShipGen: A Conditional Guided Diffusion Model for Parametric Ship Hull Design

Ship design is a complex design process that may take a team of naval architects many years to complete. Improving the ship design process can lead to significant cost savings, while still delivering high-quality designs to customers. A new technology for ship hull design is diffusion models, a type of generative artificial intelligence. Prior work with diffusion models for ship hull design created high-quality ship hulls with reduced drag and larger displaced volumes. However, the work could not generate hulls that meet specific design constraints. This paper proposes a conditional diffusion model that generates hull designs given specific constraints, such as the desired principal dimensions of the hull. In addition, this diffusion model leverages the gradients from a total resistance regression model to create low-resistance designs. Five design test cases compared the diffusion model to a design optimization algorithm to create hull designs with low resistance. In all five test cases, the diffusion model was shown to create diverse designs with a total resistance less than the optimized hull, having resistance reductions over 25%. The diffusion model also generated these designs without retraining. This work can significantly reduce the design cycle time of ships by creating high-quality hulls that meet user requirements with a data-driven approach.


INTRODUCTION
Generative artificial intelligence has shown to be a promising tool for engineering design.By training models on engineering datasets, generative models have created designs with high performance.These tools are particularly useful in ship design, as the complexity of balancing competing trade-offs in a ship requires long design cycles for human design teams.A hull's shape affects several key aspects of a ship's performance, including buoyancy, upright stability, hydrodynamics, and general arrangements.A generative model specifically trained to generate ship hulls can improve this workflow by creating high-quality designs quickly and inexpensively.The availability of open-source datasets on ship hull designs enables the use of generative artificial intelligence for design.This work builds on prior work, a guided diffusion model called Ship-Gen (Bagazinski and Ahmed, 2023a).
Hull design was chosen as the application for this work as hulls have a direct impact on over 70% of the cost of a ship (Lin and Shaw, 2017) and they are the first step in the traditional workflow for ship design (Evans, 1959).Ship hulls can exist across many length scales, ranging from a few meters to over three hundred fifty meters in length.In addition, hulls can exhibit large ranges in relative dimensions such as the beam, draft, depth, and volume displacement.A well-designed generative model for hull design should consider the scale and diversity of ship hulls in its training.This would allow the generative model to create ship hulls based on a designer's needs.
This work proposes a model called C-ShipGen, which generates early-stage hull designs considering a designer's inputs: length, beam, draft, depth, volume displacement, and intended velocity.C-ShipGen is a conditional diffusion model that implements guidance algorithms to create ship hull designs with low resistance while constraining to a user's desired principal characteristics.Figure 1 shows an overview of C-ShipGen, highlighting how the model utilizes a combination of input conditioning and guidance algorithms during the design sampling process.The following sections detail prior research on generative artificial intelligence for engineering design and computational ship design; the methods for training and sampling hull designs with C-ShipGen; the evaluation of hulls generated by C-ShipGen; and a discussion on the work.C-ShipGen generates ship hulls with low resistance for future design analysis.These generated hulls do not necessarily resemble real-world ship hulls as many other factors influence the design of hulls in addition to total resistance.Through the development of C-ShipGen, the contributions of this paper are: 1.The use of a conditional diffusion model to generate diverse ship hulls within a 5% volume error tolerance given desired principal characteristics across the full spectrum of hull sizes and relative dimensions found in real-world hull designs.
2. The use of guidance in a conditional diffusion model to generate hulls with lower total resistance than optimized hulls, having resistance reductions greater than 25% while maintaining the displaced volume within 5% of a target.

PRIOR WORK
Computational ship design refers to the application of computer-based modeling, simulation, and optimization techniques in the design and analysis of marine vessels.This facilitates more efficient, innovative, and integrated design solutions.Historically, computational ship design can be divided into three categories: design representation, forward modeling which includes surrogate regression models, and inverse design or synthesis, which includes optimization methods.Recently, generative artificial intelligence methods have emerged as a powerful technique, which has been used to represent and synthesize ship hull designs.
In order to computationally design a product, a design representation is needed that allows a computer to manipulate the design.For ship design, the two most popular modes to represent the design of a ship hull are parameterized vectors (Brown and Salcedo, 2003; Feng et al., 2022; Read, 2009; Zhang et al., 2018; Chrismianto and Kim, 2014; Lu et al., 2016; Knight et al., 2014, 2015; Hodges et al., 2022; Bagazinski and Ahmed, 2023a) and free form deformation techniques (Wang et al., 2022; Ao et al., 2021, 2022; Peri et al., 2001; Demo et al., 2021; Abbas et al., 2023).With a design representation, a dataset of designs can can be created by calculating or simulating performance metrics for each design.With the dataset, datadriven models can be trained to make inferences on new designs.For ship design specifically, the works of Khan et al. (Khan et al., 2022b(Khan et al., ,a, 2023)), Shaeffer et al. (Shaeffer, 2023; Shaeffer et al., 2020), and Bagazinski et al. (Bagazinski and Ahmed, 2023a) have looked at various methods to create diverse design spaces and datasets for ship hull design.
With a dataset of designs and performance metrics of a hull as inputs, data-driven surrogate models, using methods such as neural networks, provide a computationally inexpensive way to predict performance.Significant research has been done on predicting the hydrodynamics of hulls with neural network-based surrogates due to the high cost of performing computational fluid dynamics simulations (Ao et al., 2021, 2022; Khan et al., 2022a,b; Peri et al., 2001; Read, 2009; Lu et al., 2016; Feng et al., 2022; Wang et al., 2022; Marlantes and Maki, 2021; Silva and Maki, 2023).
Generative artificial intelligence models are designed to create new content or data that resemble the input they were trained on.These models can produce a wide range of outputs, from text to images, and even complex design structures.In the context of ship design, datasets facilitate quick performance predictions and serve as a foundation for training generative artificial intelligence models to innovate in hull design.Prior work has explored various generative approaches, including variational autoencoders (Hodges et al., 2022), generative adversarial networks (Yonekura et al., 2023; Khan et al., 2023), and diffusion models (Bagazinski and Ahmed, 2023b), each contributing uniquely to the field.
Diffusion models, in particular, iteratively modify a noisy data vector over many specified steps.This transforms random data to mirror the statistics of training data (Ho et al., 2020).The development of diffusion models has shown that they can generate complex data and already have applications for engineering design.For example, diffusion models were shown to create higher quality images compared to generative adversarial networks (Ho et al., 2020).Subsequent advancements in diffusion models introduced guidance, where gradients from a classifier neural network guide image synthesis to match a specific image classification label (Dhariwal and Nichol, 2021).This evolution enabled text-to-image diffusion models that employ text-based guidance to craft custom, lifelike images (Ramesh et al., 2022; Rombach et al., 2022).Guided diffusion models have found applications in generating 3D shapes from image data (Liu et al., 2023).In addition, guided diffusion can be applied to engineering design generation.For example, guided diffusion has been used to create two-dimensional structures (Mazé andAhmed, 2023; Giannone et al., 2023b,a), room layouts (Ploennigs and Berger, 2023), thermometers (Yang et al., 2023), architected materials (Lew and Buehler, 2023), and vehicles (Arechiga et al., 2023).A notable advantage of diffusion models is their adaptability, allowing the incorporation of new design constraints or objectives without necessitating retraining the entire model.This attribute is particularly beneficial for iterative design processes, where continuous adjustments are essential for optimizing performance.
The work presented in this paper builds on the prior work in training diffusion models for hull design.A prior model called ShipGen can generate parametric ship hull designs that have 91.4% lower wave drag and 47.9x higher internal volume on average compared to the original training data (Bagazinski and Ahmed, 2023b).ShipGen implements seven different guidance models to create these designs.A major shortcoming of this model is that there is no control to generate desired principal characteristics in a hull design, such as length, beam, draft, depth, and displacement.All hull designs generated by Ship-Gen are purely influenced by the guidance models and not by a human designer.This makes ShipGen impractical for some real-world design applications, where designers may seek more freedom in imposing constraints.To address this gap, we propose a model that utilizes an additional feature called conditioning, where the diffusion model is given a hull design's principal characteristics during training.This way, the diffusion model will generate designs that satisfy the principal characteristics provided by a designer during sampling.The following subsections detail this improvement and showcase a few design applications with this diffusion model.

METHODS
This section outlines the methodology for developing C-ShipGen (Conditional ShipGen).The first subsection explores the training dataset of ship hulls, including formulae for geometric and performance measurements of the dataset hulls.The second subsection details the model training for the regression models used in this study.The third subsection details training and sampling with a conditional diffusion model.The fourth subsection details the methodology for analyzing designs generated with the diffusion model.

Dataset
To train the regression and generative models, a dataset of ship hulls and their respective performance metrics was created.
The training dataset consists of 82,168 parametric ship hull designs.These dataset hulls were derived from the following sources: • 30,000 hulls from the Ship-D dataset (Bagazinski and Ahmed, 2023a) • 41,752 hulls generated using ShipGen (Bagazinski and Ahmed, 2023b) • 10,416 hulls subset from the former ShipGen hulls with the addition of randomly parameterized bulbous bows and sterns These parametric hull designs are represented with a forty-five-parameter scheme that algebraically defines the hull's surface.The Ship-D hulls cover the full design space possible with the parametric design scheme.The Ship-D hulls do not represent realistic-looking or performing hullforms.The hullforms, however, provide a large diversity of feature combinations that encompass realistic hull designs for machine learning applications (Bagazinski and Ahmed, 2023a).A few examples of the Ship-D dataset hulls are shown in Figure 2. Using the initial 30,000 Ship-D hulls, a guided tabular diffusion model called ShipGen was trained to generate high-performing hull designs.The mean performance of the 41,752 ShipGen hulls and the mean performance of the 30,000 Ship-D hulls was calculated and non-dimensionalized.Comparatively, the generated ShipGen hull designs have a mean wave drag that is 91.4% lower and a mean internal volume that is 47.9x higher than the mean performances found among the Ship-D dataset hull designs (Bagazinski and Ahmed, 2023b).A selection of Ship-Gen hulls is shown in Figure 3.The ShipGen hulls are much more representative of realistic hull designs compared to the Ship-D hulls.Among the ShipGen hulls, it was observed that few were generated with bulbous bows and bulbous sterns, a feature that can reduce the drag on hulls when designed well.To increase the presence of bulbs in the training dataset, bulbs were added to 10,416 hulls by randomly sampling the design parameters for bulbs.These bulbs were not tuned for hydrodynamic performance.Only a smaller subset of the ShipGen hulls were selected for bulbs as these were the hull designs that allowed for the generation of feasible bulb designs.
The feasibility of hulls is calculated using a set of forty-nine algebraic constraints.These constraints ensure that a parametric hull surface is watertight and non-self-intersecting.These algebraic constraints are solved with the parameter values for a given hull design without generating the hull's surface, reducing the total computation time.Full documentation of the hull design parameters and constraints is provided at https://decode.mit.edu/projects/ShipGen/.

Measures of Hull Geometry
In addition to the parametric hull designs, the dataset includes geometric measures for each hull.The displaced volume, wetted surface area, and waterline length were calculated at 100 evenly spaced draft marks across the depth of each hull.To generate designs regardless of scale, these geometric measures are scaled using the first parameter in the hull representation: length overall, or LOA.The equations for the normalized volume, surface area, and waterline length are provided in Equations 1, 2, and 3. ) (1) In each equation, LOA scales the value based on its dimensionality: LOA n .The other terms, t * is ratio of draft, T , to depth, D. During model training, t * will be used as an additional embedding to hull shape to predict the geometric measures of a hull at a specific draft mark.

Calculation of Total Hull Resistance
In addition to the geometric measures of each hull, the total resistance of each hull is calculated for many speed and draft conditions.Total resistance, R T is estimated to be the sum of wave-making resistance, R w , and skin friction resistance, R f , as seen in Equation 4. Wave drag calculations were computed using Michell's integral.Michell's integral was chosen as the simulation for this study as it considers the full 3D geometry of a hull in the total resistance prediction while being computationally inexpensive to calculate.In practice, any fluid simulation would work for this study as the methodology of training generative models is the same.For this study, 2.6 million fluid simulations were performed using the Michell integral.The Michell integral balances the need for accurate simulation data with reduced computational cost of performing the simulation.For this study, thirty-two wave drag coefficients for each hull across four different drafts and eight velocity conditions.The four drafts are t * = 0.25, 0.33, 0.50, and 0.67.The eight velocity conditions are normalized using Froude scaling as seen in Equation 5, where g is gravitational acceleration, U is the ship's speed, and W L t * is the non-dimensional waterline length for a given draft.In the denominator, W L t * is multiplied by LOA to balance the dimensions of U and the denominator.
The eight ship speeds are scaled between F n = 0.10 and F n = 0.45 in increments of 0.05, corresponding to typical operating conditions of traditional displacement hulls (Zubaly, 1996; Newman, 2018).Given the 3D surface of a hull submerged to t * and a velocity, U , the wave-making resistance is calculated with Equation 6.
where ρ is the density of water, and A, I, and J are integrated terms relating to the surface normal across the hull and the direction of wave propagation.Further insight into these terms is in Michell's paper from 1898 (Michell, 1898).With these thirty-two wave drag measurements, a given hull's wave-making resistance for a given t * and F n is interpolated between these calculations.
Skin friction resistance is calculated using the ITTC-1957 formula in Equations 7 and 8.
The Reynolds number of the hull, Re, scales with forward velocity, U , and waterline length, W L t * .SA t * is the non-dimensionalized wetted surface area of the hull for a given draft.Together, R w and R f can be used to calculate the coefficient of total resistance, C T .To learn with the dataset, C T is scaled by LOA 2 as opposed to the more traditional use of wetted surface area.This was done so that a regression model can embed LOA and t * to predict C T without explicitly providing SA t * .Additionally, C T is on a logarithmic scale so that the distribution of C T is approximately Gaussian for model training.The calculation of C T is provided in Equation 9.
With this representation, C T will be predicted using the 45 design parameters, t * for a draft embedding, and F n for a speed embedding.The predicted coefficient of total resistance, ĈT , can then be scaled to a prediction of total resistance.RT with Equation 10.
The following subsection will detail training the regression models and the diffusion model with a dataset made from these equations.

Regression Modeling with Neural Networks
Using neural networks, four regression models were trained with the dataset: displaced volume, coefficient of total resistance, waterline length, and design feasibility.A trained neural network for regression provides two key benefits for computational design.The first benefit is a fast prediction of performance directly from design parameters.The second benefit is the ability to calculate the gradient of a performance metric with respect to the design parameters.This subsection will detail the process of training the regression models.
Following prior work, the forty-four (not including LOA), design parameters are quantile normalized and then scaled between -1 and 1 (Bagazinski and Ahmed, 2023b).Quantile normalization bins values of the design parameters so that the distributions of the design parameters are approximately Gaussian.This parameter scaling improves the diffusion model training.Scaling the parameters for the regression models allows them to work in conjunction with the diffusion model during sampling.This process, called guidance, will be described in the following subsection.
The process for training the coefficient of the total resistance regression model is described in Table 1.In the algorithm, the neural network is represented as P C T .The inputs to the regression model are a quantile normalized design vector, X i , a draft embedding, t * , a speed embedding, F n , and a length embedding, log(LOA).The loss function is the mean-squared error loss between the ground truth and the prediction of C T .The draft and speed embeddings are restricted to the limits of the range of draft and Froude numbers used in the dataset calculation of wave-making resistance.The length embedding is on a logarithmic scale for hulls with a length between 3 meters and 450 meters.This range of values allows the model to learn the relative influence of skin friction across velocity and length scales.Given the diversity of hull forms in the dataset and the range of length scales, this regression model is trained to predict the coefficient of total resistance on a large diversity of shapes, speeds, and sizes.This model was trained with a batch size of 1024 for 50,000 batches.The resistance prediction model predicts the total resistance coefficient across the full spectrum of the dataset hulls, draft ratios, and Froude numbers.This regression model predicts the total resistance coefficient derived from the simulation with an R 2 of 0.997.Results of the training accuracy relative to the simulation data are shown in Figure 6 and Figure 8.Take gradient descent step on: The training algorithm for the total resistance coefficient regression model.The algorithm randomly samples a Froude number and draft ratio for a hull in each batch so the model is trained on a full spectrum of speeds and drafts for the hulls in the dataset.
The training for the volume regression model, P V , and the waterline regression model, P W L , is similar.The volume regression model was trained to predict log(V t * ) given X i and t * .The model was trained to predict the logarithm of volume as this term has an approximate Gaussian distribution across the dataset.Similar to the C T regression model, the volume regression is trained to predict the displaced volume for any draft on a large diversity of hullforms.The waterline regression model predicts the waterline length of a given hull at a given draft.This model is used with the coefficient of total resistance regression model when W L t * is unknown.
The final regression model is a feasibility classifier, f ϕ .The feasibility classifier provides guidance gradients to influence the diffusion model to generate parametric designs that satisfy the forty-nine algebraic feasibility constraints (Bagazinski and Ahmed, 2023b).The only input to the feasibility classifier is a design vector, X i .To learn the distinction between feasible and infeasible designs, a set of 82,793 design vectors that violate at least one constraint was generated.The loss function in training was binary cross-entropy loss, which is better for classifier training than mean-squared-error loss.

Conditional Diffusion Model
A diffusion model is a generative artificial intelligence model that generates new instances of data by denoising random information over many steps.The generated sample will fall within the statistical distribution of the training dataset samples.Conditional diffusion models are similar to the standard diffusion model described by (Ho et al., 2020), however, their structure includes extra layers that embed information in the training and sampling process.This conditional diffusion model is a modified version of the ShipGen model, a tabular diffusion model for ship hull design (Bagazinski and Ahmed, 2023b).The conditioning for the model is the principal characteristics of the hull: draft, beam, depth, and displaced volume.The diffusion model and the conditioning use parameters that are scaled by the length overall, which is the first term in the forty-five parameter representation used to generate the hull designs.After sample generation, the parameter terms are re-scaled by LOA to measure the scaled design.By training with parameters scaled with respect to LOA, the model does not have to learn "length" in addition to the statistical relationships between the parameters to generate a hull design.This reduces the complexity of the learning task.The training algorithm for the conditional diffusion model is stated in Table 2 and illustrated with Figure 4.The diffusion model is conditioned with the draft, t * ; volume, V t * ; Beam, B, and depth, D of each hull.During training, the original design vector is partially noised to a timestep, t, and the conditional diffusion model predicts the noise of the sample at that timestep.Conditioning is applied to the diffusion model to influence the denoising process to satisfy input conditioning.To clarify in the algorithm, t is the timestep embedding of the denoising process, while t * is the draft embedding of the hull design in the conditioning vector.
After training, the diffusion model can be sampled to create design vectors that satisfy the input conditioning.While the diffusion model can generate hull designs that satisfy the input conditioning, the sampling process does not consider the total resistance of the hull.To generate hulls with reduced total resistance, the total resistance coefficient regression model is implemented in the sampling process as a guidance algorithm.Guidance leverages the gradients of the regression model 1: repeat 2: X 0 ∼ q(X 0 ) 3: t * ∼ U nif orm([0.01,1.0]) 4: interpolate V t * , B, and D from Dataset 5: C = [t * , log(V t * ), B, D] 6: t ∼ U nif orm({1, ..., T }) 7: ϵ ∼ N (0, I) 8: Take gradient descent step on: Table 2: This is the training algorithm for a conditional diffusion model.The diffusion model is represented by the function ϵ θ (X 0 , ϵ, t, C) in step 8.The conditioning for hull design is the draft,t * ; displaced volume, log(V t * ); beam, B; and depth, D, of the hull, X 0 at each timestep to influence the denoising process toward producing designs with reduced total resistance.In addition to resistance guidance, the feasibility classifier and the volume prediction regression models are also used as guidance.The feasibility classifier aims to improve the likelihood that a generated design vector leads to a feasible hull design.The volume guidance assists the diffusion model in generating a design that satisfies the input conditioning for displaced volume.This was implemented to prevent the resistance guidance from over-influencing the sampling process and producing hulls that do not satisfy the input conditioning.Each guidance algorithm is tuned with a hyperparameter: γ tunes the classifier guidance, while λ 0 and λ 1 tune the performance guidance.The sampling process is illustrated in Figure 1.The sampling algorithm is stated in Table 3.
2 8: end for 9: return X 0 In the sampling algorithm, γ is equal to 0.2, while λ 0 and λ 1 are equal to 0.3.The performance guidance hyperparameters are set equal so that no model overpowers the others.The λ values are set low so the guidance models do not overpower the denoising process from the diffusion model.One advantage to leveraging performance guidance is that the diffusion model does not need to be retrained to produce designs when considering different objectives.The guidance model can simply be replaced with a new one.Using an NVIDIA GeForce RTX 4090, 512 samples are generated in approximately 2.5 seconds.The feasibility check, total resistance calculation, and geometric measurements are computed on a single Intel Core i9-13900K core in approximately 2.5 seconds per sample.After sampling, the parallel CPU process across 32 cores for the 512 samples is less than 30 seconds.
Diffusion models rely on a degree of randomness in the denoising process.Sampling from the guided conditional model will not guarantee that every generated design will be high-quality.Therefore, studies on designs generated from the model evaluate the statistics from a set of generated designs.In addition, high-quality designs will be filtered from a set of generated designs to select potential candidates for further design evaluation.This is distinctly different from other data-driven design approaches, such as optimization, which provides some guarantee of design performance and constraint satisfac-tion among generated designs.Assuming that intended designs fall within the statistical distribution of the training dataset, conditional diffusion models can produce a large diversity of designs without needing to retrain the model, significantly decreasing the computational effort to create high-quality designs compared to optimization methods.

Evaluation of Diffusion Model for Low-Drag Design
A baseline comparison is needed to evaluate the ability of the guided conditional model to generate high-quality hull designs.Design optimization for drag reduction was selected as the baseline comparison.To conduct the study, five design test cases compare optimized hull forms to diffusion-generated hull forms.The purpose of this test is twofold: 1. Evaluate the diffusion model's ability to design low-resistance hulls while meeting specific dimensional properties.
2. Evaluate the accuracy of the total resistance regression model for a wide array of designs, scales, and relative speeds.
The five test cases were selected to create a unique set of dimensional requirements for both the design optimization and the diffusion model to satisfy.The designs of real-world ship classes inspired the dimensions of the five test cases.The design inspirations are a supercarrier1 , a kayak2 , a NeoPanamax container ship3 , a frigate4 , and a ROPAX ferry5 .These test cases encompass two military-style ships, two large ship designs, one small hull design, two small block coefficient designs, and one high beam-to-draft ratioed hull.The principal dimensions and design speed of the test cases are provided in Table 4.It is not expected for the diffusion model nor the optimization algorithm to produce designs that look like real-world ship designs with the same principal characteristics.Real-world hull designs satisfy many additional performance objectives in addition to total resistance; such as seakeeping, upright stability, cargo packing, general arrangements, etc.Since these hulls are generated only considering total resistance and principal dimensions, they are not expected to resemble real-world hull designs.For each design test case, 512 hull designs were generated with the full diffusion model, 512 were generated with the diffusion model and classifier guidance only, and 100 designs were generated using design optimization.In each test case, the diffusion-generated designs will be evaluated on drag, dimensional target satisfaction, and design diversity compared to optimized designs.
The optimization algorithm used for these studies is NSGA-II (Deb et al., 2002).NSGA-II is a state-of-the-art genetic algorithm for optimizing two or more objectives.Genetic algorithms are a set of optimization algorithms that act similarly to biological evolution to drive the optimization over several "generations".These tests were performed with a population of 100 samples for 200 generations.The initial population consisted of randomly selected designs from the dataset.For each test case, the optimization algorithm constrains the design parameters to be within 2% of the beam target, 1% of the depth target, and ≥ 99% of the volume target, while also constraining the design with the forty-nine feasibility constraints to maintain design feasibility.The target draft is held constant, so t * is scaled appropriately for each design at each generation during optimization.This provides a buffer for the optimization algorithm to find low-drag designs around the test case targets.In this study, the two objective functions were the total resistance of a hull and the total resistance coefficient of a hull, which were evaluated using the total resistance coefficient regression model, P C T at the test case's target speed.By leveraging the same regression model in both optimization and diffusion generation, we can directly compare the ability of each design method to produce low-drag designs.The optimization is expected to exploit the regression model, likely finding local minima and not a true minimum.This will be seen as a significant loss in accuracy when comparing predictions from the regression model to the original total resistance simulation.With the combined use of parallelized CPU computation (Intel Core i9-13900K) and GPU (NVIDIA GeForce RTX 4090), this optimization is performed in approximately 80 minutes per test case.

RESULTS
This section contains the results of the studies described in the Methods Section.The first subsection provides error measurements of diffusion-generated samples meeting the principal dimensions from the five test cases.The second subsection provides the results by generating low-resistance designs using the conditional diffusion model and the design optimization algorithm.

Targeted Design Sampling with Conditional Diffusion Model
For each design test case, 512 samples were generated with the full model, and 512 samples were generated with only feasibility guidance, ∇ Xt f ϕ (y|X t ).The feasibility rate and adherence to principal dimensions in each test case are provided in Table 5.The general trend among these test cases is that designs sampled with feasibility guidance only have higher feasibility rates and have tighter adherence to the test case's principal dimensions compared to hulls generated with the full model.This trend is seen in all five test cases.Generated hull designs within a 5% error tolerance will be selected for further design analysis.This tolerance is a reasonable margin for large ship hull designs.A ship's displacement can easily vary by this much through changes in cargo, fuel, water, etc. Sampling with only feasibility guidance yields, on average, 58.3% of hulls generated within a 5% volume error across the five test cases.Sampling with the full model gives 37.0% of total samples within a 5% volume error tolerance.This measure was calculated with Equation 11for each design test case.
In the equation, η E V t * is the percentage of samples within a 5% volume error tolerance.This metric relies on the feasibility rate, η f ease , and the Gaussian cumulative distribution between +5% and -5% error given the mean (µ E V t * ) and standard deviation(σ E V t * ) of volume error.

Drag Reduction with Guidance During Sampling
For each design test case, hull designs were optimized using NSGA-II to minimize the total resistance while satisfying the principal dimensions of the test case.After optimization, the total resistance of the 100 optimized hulls was calculated with the Michell Integral.The minimum total resistance calculated with the Michell Integral is listed in Table 6 for each test case.Similarly, the total resistance was calculated for the feasible hull designs among the 512 designs generated for each test case.The feasible hull designs were sorted into groups with volume errors less than 1%, 5%, and 10% relative to the target volume for each design test case.Then, the number of hulls with a total resistance less than the optimized minimum total resistance was collected.The number of these low resistance samples within each volume error tolerance is listed in Table 6.The final column in Table 6 lists the minimum total resistance among the diffusion-generated designs within a 5% volume error tolerance for each design test case.These results will be further analyzed in the Discussion Section.Table 6: This table lists the number of feasible, diffusion generated hull designs having a total resistance less than the minimum total resistance found through optimization.The number of hulls with low resistance increases as the volume error tolerance is increased.The final column lists the reduction in total resistance seen by a hull within a 5% volume error generated by C-ShipGen.
In general, as the volume error tolerance is loosened, more diffusion-sampled hull designs will have lower total resistance than the optimized hull design.This trend is seen in samples generated using the full model and among samples generated using only classifier guidance.Additionally, for four test cases, the full diffusion model produces low resistance designs within a 5% volume error tolerance at a rate of 1.5x to 25x more frequently than without using performance guidance.In addition, the full diffusion model generated hulls with at least 25% less total resistance than the NSGA-II generated hulls while still aligning to the principal dimensions of each design test case.For the ROPAX test case, the diffusion model with only classifier guidance created low-resistance designs with much higher success than the full diffusion model.Further analysis of the test cases can be found in the Discussion Section.
To illustrate the diversity of designs generated by the diffusion model, a two-dimensional principal component analysis (PCA) was performed with the design parameters from the training dataset, the diffusion-generated designs, and the NSGA-II sampled designs.The PCA was fitted with the training dataset.Figure 5 shows this PCA.The diffusion-generated samples maintain a high degree of diversity.This is expected as the diffusion model is trained to randomly generate designs that match the statistics of the training data.The optimized designs, however, are clustered around a single location on the PCA plot, suggesting these samples have low diversity.
After sampling, all feasible diffusion-generated designs and NSGA-II generated designs were simulated with the total resistance simulation.This was done to compare the regression model accuracy to the simulation data.Figure 6 shows the total resistance of each hull using both regression and simulation plotted against each other for the supercarrier design test case.The red dashed line shows perfect regression, meaning that the regression predicts the exact simulation.The generated samples show high accuracy with the regression, for a few outliers.This is expected as the diffusion-generated samples statistically resemble the training dataset.This dataset was used to train both the regression model and the diffusion model.Because diffusion-generated designs will statistically resemble the training data, they should have higher accuracy with the regression model.The hull designs created through optimization are significantly under-predicted compared to the total resistance calculated with the simulation.As mentioned in the methods section, this result was expected as the optimization algorithm exploited the regression model to find a minimum in the model that does exist in the simulation.This trend is seen across optimized hulls from the other four test cases, shown in Figure 8.
To further visualize the resistance across the diffusion-generated samples, a kernel density estimate (KDE) of the distribution of the simulated total resistance is shown in Figure 7. Also included in the plot is the minimum simulated total resistance among hulls sampled with NSGA-II.The KDE shows that approximately fifteen percent of diffusion-generated samples for this design test case will have lower total resistance than samples generated with NSGA-II using the same surrogate model for drag prediction.This relative trend also appears with the other four test cases shown in Figure 9.
The optimized designs from the ROPAX ferry design test case exhibit the worst regression-simulation similarity among the test cases.The regression prediction for the optimized ROPAX ferry was off by nearly a factor of 10 compared to its simulation-calculated resistance.Further analysis of the error in simulation prediction is in the Results Section.
To exhibit some of the diffusion-generated hull designs, Figure 10 showcases the station lines of hulls from each test case.
The Figure showcases the hull design sampled among the 512 with the minimum resistance within the 5% volume error tolerance for each design test case.The total resistance of these hulls is listed in Table 6.

DISCUSSION
This section provides a discussion of the results of the study.The first subsection analyzes the diffusion model's ability to satisfy the principal characteristics from the design test cases.The second subsection discusses the study on generating lowresistance designs.A third subsection discusses the ROPAX design case study compared to the other design test cases.The final subsection discusses the limitations of the C-ShipGen model in designing real-world hulls.

Targeted Sample Generation
The study's findings underscore the effectiveness of the conditional diffusion model in generating feasible designs that closely adhere to design requirements.The tolerance to the user-defined principal characteristics decreases when performance guidance is implemented with the model during sampling.Performance guidance reduces the diffusion model's ability to generate hulls within a 5% volume error tolerance by 36%.The next subsection will discuss how performance guidance produces low-resistance hull designs more frequently while maintaining the 5% volume error tolerance.
While not every individual design meets the entirety of the specifications provided by a user during sampling, the diffusion model proves to be a computationally inexpensive tool for producing samples closely aligned with intended principal di-  mensions.This characteristic makes it particularly advantageous for early-stage design processes, where loosely following requirements allows for design exploration.The diffusion model produces many diverse designs for further in-depth design analysis.With an efficient down-selection process, many useful hull designs are quickly identified within a user-desired tolerance with C-ShipGen.

Optimization versus Diffusion Models for Design Generation
Optimization represents a powerful approach to design exploration but has strong advantages and disadvantages.One key strength is the optimization's ability to generate samples within tighter tolerances to user-defined targets.Additionally, the optimization process excels at producing feasible designs with low resistance.On the other hand, design optimization for each test case can be slow and computationally expensive.For NSGA-II, increasing the population size increases the time complexity of the algorithm by O(N 2 ).Increasing the number of objectives increases its time complexity by O(N ) Deb et al. (2002).Optimization is limited by the diversity of samples and the computational complexity arising from increasing the number of samples.This inhibits design space exploration in early-stage design.Finally, as seen in the results, optimization exploits regression models, which leads to a loss in accuracy of the optimized design's prediction versus ground truth performance calculated with simulation.In this instance, the loss in accuracy of the total resistance regression surrogate model compared to the simulation leads to sub-optimal hull designs compared to those generated with the C-ShipGen model.
The diffusion model presents a contrasting set of advantages and challenges.The computation to generate designs is signif- This similarity between the training data and sampled designs is why C-ShipGen saw a significant improvement in total resistance among generated samples compared to NSGA-II using the same total resistance regression model.This trend was seen across the five design test cases in Figure 6 and Figure 8.This accuracy did not hold in optimization-generated designs.In addition, the diffusion model better leveraged the regression model in sampling.This is shown through the proportion of designs in each test case with lower total resistance than the samples generated with NSGA-II using the same regression model.Figure 7 and Figure 9 show that depending on the test case, roughly fifteen percent or more of the diffusion-generated samples will have a lower total resistance than samples generated using NSGA-II.However, the diffusion model has its own set of limitations.One major flaw is that the generated design needs to be sorted and filtered to identify low-resistance hull forms that meet the input conditioning within a desired tolerance.Additionally, while the diffusion model facilitates rapid design exploration, it does not provide a guarantee of finding an optimal solution, introducing an element of uncertainty into the design process.
Additionally, the diffusion model with performance guidance produces designs within a specified tolerance less frequently than the diffusion model without performance guidance, and even less frequently than optimization.Despite this compromise in tolerable design generation, these designs demonstrate a notable reduction in drag compared to their counterparts without performance guidance.Implementing performance guidance produces low resistance designs at a rate of 1.5x to 25x than the model without the implementation.The simultaneous benefits of lower drag and decreased feasibility highlight the nuanced impact of performance guidance on design outcomes.

Analysis on ROPAX Ferry Design
Despite the general success of the other design test cases, the ROPAX ferry design proved difficult for the diffusion model, the regression model, and the optimization algorithm.This design test case was inspired by a real-world ferry operating in the State of Massachusetts in the United States.This particular hull has a significantly higher length-to-draft ratio, beamto-draft ratio, and block coefficient compared to other design test cases.These comparisons are also true compared to hulls in the training data.As this design is different than most of the training data, the outcomes of the test case were expected to be poorer.This is particularly true with the total resistance prediction model.The regression model had completely inaccurate predictions of total resistance for the NSGA-II generated samples.The diffusion-generated designs also had poor regression accuracy as well.A third consideration with this particular design that is outside the project's scope is that the resistance simulation itself is also highly inaccurate for this design.Michell's integral relies on the assumption that the hull is a slender body (Michell, 1898).The ROPAX design is not necessarily slender compared to the other hulls.A new simulation method is needed to reasonably calculate the drag on a hull design like this one.

Limitations of Hull Design with C-ShipGen
When designing any product with generative artificial intelligence, understanding the model's limitations will avoid negative consequences on real products designed with the model.C-ShipGen has several limitations.The first limitation of this model is the training data.C-ShipGen and other diffusion models generate designs statistically similar to the training data.Since C-ShipGen was trained on hulls that are not necessarily representative of real-world hull designs, C-ShipGen generates hulls that are not necessarily representative of real-world designs.The second limitation of C-ShipGen is the simulation used to generate the total resistance training data.While the Michell integral is not the most accurate simulation for real-world hull design, it was chosen to balance accuracy and computational cost.Creating training data with higher fidelity and more accurate simulations will give these models data with a better representation of real-world hull designs in water.
In addition, leveraging more accurate simulations for creating training data will enhance claims of increased performance with generative design.The third limitation of C-ShipGen in its current implementation is that it only considers total resistance and volume displacement for design generation.Real ship hulls are designed considering other performance metrics such as seakeeping, stability, general arrangements, draft limitations, and countless other considerations for hull design.Therefore, hulls designed with C-ShipGen are not necessarily capable of performing safely in the real world without further analysis.These are some of the limitations of the current implementation of C-ShipGen to create hull designs with low total resistance.

CONCLUSION
This work generated ship hulls with low resistance using a conditional diffusion model that considers the desired principal dimensions of the hull during design generation.This diffusion model is trained on a large set of nearly 83,000 diverse hull designs that allow for a comprehensive design space exploration with the model.In addition, a regression model was trained to predict the total resistance of a hull with variable speed and draft.The gradients of this regression model allowed the diffusion model to generate designs with low resistance.This regression model was also used as a surrogate model to optimize hulls while constraining the designs to user-defined principal dimensions and design speeds.The optimization study was performed using NSGA-II.Five design test cases demonstrated the ability of C-ShipGen to generate hull designs across all scales of displacement hulls and many different dimensional properties found in different ship classes.Additionally, C-ShipGen was able to generate designs with greater diversity than NSGA-II, while creating designs with better predictive alignment between the regression model and the simulation used in the training data.A proportion of the diffusiongenerated designs in each test also had a total resistance less than the samples generated with NSGA-II.In all five test cases, C-ShipGen produced hull designs with at least 25% less total resistance than NSGA-II generated samples.An additional advantage of the diffusion model is that the diversity of these designs allows for efficient design space exploration in earlystage design.
Creating hull designs with reduced resistance will reduce the need to fuel ships, reducing the cost to operate the ship and reducing its emissions.Future work with generative artificial intelligence for ship design will continue to explore the systemslevel design of ships.Training models to explore the nuanced complexity of designing a ship system can yield better efficiencies and reduce costs for the marine industry.Through this work, the economic prospect of leveraging generative artificial intelligence to design ship hulls is demonstrated by C-ShipGen.

Figure 1 :
Figure 1: C-ShipGen is a guided conditional diffusion model that generates hull designs with low resistance while maintaining the principal dimensions provided by the user during sampling.The model leverages guidance gradients from pre-trained regression models to improve the performance of the hulls.

Figure 2 :
Figure 2: A selection of hulls from the Ship-D dataset, showing the variability possible with the hull parameterization.A random sampling from the dataset may lead to unrealistic hulls, containing combinations of features that do not resemble real-world ships and features that lead to poor performance.

Figure 3 :
Figure 3: A selection of hulls generated with multiobjective guided performance generation.Notice the relative slenderness of the hulls leading to drastically reduced drag coefficients relative to the Ship-D dataset hulls.

Figure 4 :
Figure 4: During training, the diffusion model predicts a denoising step, given a timestep embedding and a partially noised sample design vector.The model is informed by the input conditioning at each denoising step.

Figure 5 :
Figure 5: Two-dimensional principal component analysis of the hull parameterization shows the relative distribution between dataset hull designs, diffusion-generated hull designs, and optimized hull designs for the supercarrier test case.The optimized hulls have much less design diversity than the diffusion-generated designs.

Figure 6 :
Figure 6: Comparison of total resistance between simulation and regression for hull designs produced for the supercarrier design test case.The optimized designs have lower regression accuracy than the diffusion-generated designs.

Figure 7 :
Figure7: Kernel Density Estimate (KDE) of the distribution of the simulated total resistance across the diffusion-generated samples for the supercarrier test case.The distribution shows that some of the generated samples have a total resistance less than the minimum total resistance found using the total resistance prediction as a surrogate model with NSGA-II.

Figure 8 :
Figure 8: Comparison of total resistance between simulation and regression for hull designs produced for the other design test cases.The total resistance of optimized designs is less accurately predicted by the regression model than the diffusiongenerated designs.

Figure 9 :
Figure 9: KDE plots of the remaining four design test cases.The plots showcase the statistical distribution of total resistance among the diffusion-generated samples compared to the NSGA-II generated samples.Depending on the test case, 15% or more of the generated samples will have less total resistance than samples produced using NSGA-II with the same surrogate model for total resistance prediction.

Figure 10 :
Figure 10: The five hulls depicted are diffusion-generated hulls with the minimum total resistance within the 5% volume error tolerance for each design test case.The cross-section drawings showcase station lines for the bow on the right side and the stern on the left side.Also included is the LOA for each design.

Table 3 :
This is the sampling algorithm for a guided conditional diffusion model.The diffusion model is represented by the function ϵ θ (X t , t, C) in step 7.

Table 4 :
This table provides the dimensions of hull design test cases inspired by real-world ship designs.These test cases cover a diversity of principal characteristics, hull speeds, and length scales.

Table 5 :
This table provides the design feasibility rate and principal dimension errors relative to each test case for diffusion-generated samples using the full model and with feasibility guidance only.