# A New Approach to Preform Design in Metal Forging Processes Based on the Convolution Neural Network
## 2 Preform Design Methodology
### Convolution Neural Network Model Structure  
The CNN model utilized in this paper is based on the U-shape architecture [24]. The model is composed of nine convolution blocks with two convolutional layers and eight pooling layers, as shown in Figure 2. For the application of 3D geometries, the convolution operation is conducted in 3D digital volume space (voxel array). The voxel array input to each layer is (\(h\cdot w\cdot d\cdot c\)). \(h\), \(w\), and \(d\) are the height, width and depth of the array, respectively, and \(c\) is the number of channels that signifies the information of the array. The convolution operation is conducted as the filters move in the \(h\), \(w\), and \(d\) directions of the input array. In this study, 128 voxels were considered for the \(h\), \(w\), and \(d\) values in the voxel array of the 3D forging and preform geometries through the conversion processes, summarized in Appendix A. For the filter array, six voxels for each of the three axes were considered. Those values are the trade-off for the training convergence and computational efficiency. The feature recognition process for the \(i\)-th convolution layer begins from the input data array \(n\times n\times n\times c_{i-1}\) (\(c_{i-1}\) is the number of the filters of the previous layers). To avoid  
Figure 1: Flowchart for the preform design methodology. Figure 2: CNN model overall structure. dimension loss during the convolution operation, zero values are padded to the outside of an input array, resulting in \((n+2)\times(n+2)\times(n+2)\times c_{i-1}\). After the convolution with \(c_{i}\) filter arrays of \(6\times 6\times 6\times c_{i-1}\), the output array is \(n\times n\times n\times c_{i}\) (feature maps). The procedure in the first convolution layer is illustrated in Figure 3 where \(n\) is 128, \(c_{i}\) is 32 and \(c_{i-1}\) is 1. The \(n\cdot n\cdot n\cdot c_{i}\) array is reduced in half the size of \(n/2\cdot n/2\cdot n/2\cdot c_{i}\) by the red arrows in Figure 2 which represent a max-pooling operation. After that, by doubling the number of filter arrays, the features recognized in the previous convolution block are \"zoomed in\". After the 4 th convolution block, the size of the considered image is increased to derive the preform shape in the original dimensional scale. In this upgoing sampling procedure following the green arrows, the feature maps are mapped to the considered preform design, starting from small features (convolution block 5) to large features (convolution block 9). By concatenating the number of features in the down-sampling and the up-sampling operation, any loss of information concerning the positions of the feature positions in both the forging and preform shapes is avoided. The general formulation of the convolution operation is defined in Equation (1). \(x\) is the inputted array, \(w\) is the filter array, and the bias \(b\) is added in computation. \(p\), \(q\), and \(r\) are the coordinates in the feature maps. The predicted value is calculated as the output of the activation function \(f\). The weights in filters (\(w\)) are determined to minimize the loss between the true value \(y\) of the given preform shapes and of the CNN model. Since the inputted data have binary values, a binary cross-entropy loss function \(E\), defined in Equation (2), is utilized. For the minimization process, an ADAM (Adaptive Moment Estimation) optimizer [25] as defined in Equation (3) is utilized assuring the robust and quick weight update process by a two-moment vector, \(\beta_{1}\) and \(\beta_{2}\). For the activation function, a ReLU (Rectified Linear Unit) function in Equation (4) is utilized for all the convolution layers except for the last one. Since the output of the ReLU function is \(x_{i}\) in the \(x_{i}>0\) domain, the \(dE/dw_{i}\) in Equation (3) cannot become zero. (If it becomes zero, the relevant weight is no longer updatable.)