The pursuit of high-quality sand casting products remains a central challenge in the foundry industry. Complex sand casting products, such as steering axles, slewing frames, and axle housings used in engineering machinery, are particularly prone to a variety of defects including cold shuts, porosity, sand inclusions, and shrinkage cavities. These defects compromise the structural integrity and performance of the final components, leading to significant economic losses and potential safety risks. While process parameters from stages like sand mixing, molding, melting, and pouring are known to exert a major influence on quality outcomes, the three-dimensional (3D) geometry of the casting itself is a critical, yet often underexploited, factor. The intricate shapes of complex sand casting products directly affect heat transfer, solidification patterns, and stress distribution, thereby influencing the likelihood and location of defect formation. However, the non-structured nature of 3D CAD models presents a significant barrier to quantitative analysis. Traditional data-driven quality prediction approaches in sand casting frequently overlook this geometric information due to the inherent difficulty in characterizing complex 3D morphology, creating a gap in our understanding of how specific geometric features correlate with defect formation.
This work addresses this gap by developing a comprehensive, data-driven framework for predicting defects in complex sand casting products. We argue that a holistic prediction model must integrate both structured process data and unstructured 3D geometric data. The core challenges involve the effective quantitative representation of complex 3D shapes and the subsequent fusion of these geometric features with traditional process parameters to build a robust predictive model. To this end, our research focuses on three principal contributions: the systematic collection of multi-source heterogeneous data encompassing both process parameters and product 3D structures; the development of a novel deep learning-based method for extracting compact, informative features from the complex 3D geometry of sand casting products; and the construction of an integrated prediction model that leverages these heterogeneous data sources to accurately forecast the quality of sand casting products.

The geometry of sand casting products, as shown, is inherently complex, with features like thin walls, thick sections, internal cavities, and curved surfaces that challenge conventional analysis. The inability to quantify these features has historically prevented a data-centric exploration of the relationship between product shape and quality. Recent advancements in 3D shape analysis and deep learning offer new pathways. Techniques such as 3D shape descriptors, view-based convolutional neural networks (CNNs), and volumetric learning have shown promise in other domains for capturing geometric essence. Inspired by these approaches, particularly the power of autoencoders for unsupervised feature learning from complex data, we propose a tailored solution for the foundry context. Our goal is to move beyond a purely process-parameter-based view and establish a methodology where the digital twin of the sand casting product—its 3D model—becomes a central, quantifiable input for intelligent quality prediction.
1. Data Acquisition and Analysis for Sand Casting Products
The foundation of any data-driven model is high-quality, relevant data. For predicting the quality of sand casting products, data must be captured from two fundamentally different yet interconnected domains: the manufacturing process and the product design itself.
1.1 Process Parameter Acquisition and Per-Piece Traceability
The sand casting process involves a sequence of interconnected steps, each contributing variably to the final quality of sand casting products. Our data acquisition strategy focuses on key stages identified as highly influential:
- Sand Preparation & Molding: Parameters such as sand moisture, compactability, permeability, and green strength are measured batch-wise, as the consistency of the molding sand is crucial for avoiding defects like sand erosion and inclusions in the final sand casting products.
- Melting & Alloy Treatment: This is a critical stage. Chemical composition (e.g., C, Si, Mn, S, P content), melting temperature, and spheroidization treatment parameters (e.g., magnesium residual, inoculant type and amount) are recorded. Establishing per-piece traceability here is essential. We implement a data linkage system using key identifiers like casting ID, heat number, and pour time. By joining records from the MES (Manufacturing Execution System) modules for core setting, spectroscopy, and treatment, we can uniquely associate the exact molten metal properties with each individual sand casting product.
- Pouring: Real-time sensors log pouring temperature and pouring time for each ladle, providing immediate thermal history data linked to the batch of sand casting products being produced.
This structured process data is inherently tabular. A subset of the critical parameters collected for building our prediction model is summarized in Table 1.
| Process Stage | Parameter Name | Unit | Description |
|---|---|---|---|
| Sand Molding | Moisture Content | % | Water content in molding sand. |
| Compactability | % | Ability of sand to be compacted. | |
| Green Strength | kPa | Tensile strength of uncured sand. | |
| Melting & Treatment | Carbon Equivalent (CE) | % | Calculated value (C + Si/4 + P/2) influencing fluidity and shrinkage. |
| Pouring Temperature | °C | Temperature of metal at the point of pour. | |
| Magnesium Residual | % | Residual Mg after spheroidization for ductile iron sand casting products. | |
| Inoculant Amount | kg | Weight of inoculant added per ton. | |
| Post-Casting | Defect Label | Category | Final quality inspection result (e.g., Cold Shut, Porosity, Sound). |
1.2 3D Geometric Data of Sand Casting Products
Alongside process data, the 3D CAD model of each sand casting product is collected. This represents the unstructured data source. The geometry defines the casting’s volume, surface area, section thickness variations, and the presence of features like ribs, bosses, and holes—all of which govern solidification dynamics. To make this data computationally manageable for deep learning, the 3D models are first converted into a volumetric (voxel) representation. Each model is placed within a normalized bounding cube and discretized into a 3D grid (e.g., 64x64x64 voxels). A voxel is assigned a value of 1 if it lies inside the solid geometry of the sand casting product and 0 otherwise. This binary voxel grid, $V \in \{0,1\}^{d \times h \times w}$, serves as the raw input for our 3D feature extraction network, where $d, h, w$ represent depth, height, and width dimensions.
2. 3D Feature Extraction for Complex Sand Casting Products
The primary innovation of this work lies in the quantitative characterization of the complex 3D geometry of sand casting products. We frame this as an unsupervised feature learning problem, where the goal is to discover a low-dimensional latent representation $h$ that encapsulates the essential geometric shape of a sand casting product from its high-dimensional voxel grid $V$.
2.1 Theoretical Foundation: The Autoencoder
An Autoencoder (AE) is a neural network designed to learn an efficient encoding of input data. It consists of two main parts: an encoder $f_\phi$ that maps the input to a latent code, and a decoder $g_\theta$ that reconstructs the input from this code. The network is trained to minimize the reconstruction loss between the original input $V$ and its reconstruction $\hat{V}$.
$$ \text{Encoder: } h = f_\phi(V) $$
$$ \text{Decoder: } \hat{V} = g_\theta(h) $$
$$ \text{Loss: } \mathcal{L}_{rec}(V, \hat{V}) = || V – \hat{V} ||^2 $$
Once trained, the latent vector $h$ serves as a compact feature descriptor. Unlike linear methods like PCA, the non-linear transformations in a deep AE can capture complex, non-manifold relationships present in the 3D shapes of sand casting products, making it superior for this task.
2.2 3D Deep Convolutional Autoencoder (3D-DCAE) Architecture
Standard AEs with fully connected layers are inefficient and ineffective for volumetric data due to the immense number of parameters. We propose a 3D Deep Convolutional Autoencoder (3D-DCAE), which leverages 3D convolutional and pooling operations. The encoder uses 3D convolutional layers with kernels that scan the volumetric space, followed by 3D max-pooling layers to downsample the spatial dimensions while progressively extracting higher-level features. The decoder uses 3D transposed convolutional layers (sometimes called deconvolutions) to upsample the latent representation back to the original voxel grid size. The bottleneck layer between the encoder and decoder outputs the latent feature vector $h$ for each sand casting product.
The model is trained on a large set of voxelized sand casting product models with the objective of minimizing the binary cross-entropy reconstruction loss. The high-fidelity of the reconstruction is direct evidence of the richness of the information captured in $h$. The structure can be formalized as a series of transformations. Let a 3D convolutional operation be denoted by $Conv3D(k, s)$, where $k$ is kernel size and $s$ is stride. Pooling is denoted by $MaxPool3D(p)$. The encoder process for an input $V$ can be summarized as:
$$ h_1 = \text{ReLU}(Conv3D(5,2)(V)) $$
$$ h_2 = MaxPool3D(2)(h_1) $$
$$ h_3 = \text{ReLU}(Conv3D(3,1)(h_2)) $$
$$ … $$
$$ h = f_\phi(V) = \text{Flatten}(h_n) $$
The decoder $g_\theta$ performs the symmetric inverse operations.
2.3 Model Performance and Comparative Analysis
Our 3D-DCAE was trained on a dataset comprising hundreds of voxelized models of complex sand casting products like steering axles and slewing frames. The model achieved an average voxel-wise reconstruction accuracy exceeding 99.7%, indicating an excellent capture of geometric details, from overall form to fine features like holes and thin ribs.
To validate the superiority of our 3D approach, we compared it against a 2D-DCAE baseline, a common method in literature where the 3D volume is treated as a stack of 2D slices along one axis. The 2D-DCAE processes the data with 2D convolutions, effectively ignoring the spatial coherence along the third dimension. The training convergence and final reconstruction fidelity were significantly lower for the 2D model, as shown in Table 2. This confirms that explicitly modeling 3D spatial relationships is crucial for accurately characterizing sand casting products.
| Model | Architecture Focus | Final Training Loss | Reconstruction Accuracy | Key Advantage for Sand Casting Products |
|---|---|---|---|---|
| 3D-DCAE (Ours) | Volumetric 3D Convolutions | 0.008 | 99.76% | Preserves full 3D spatial context and correlations, essential for complex solid geometry. |
| 2D-DCAE (Baseline) | Stacked 2D Convolutions | 0.042 | ~97.1% | Treats depth as independent channels, loses inter-slice geometric relationships. |
3. Building the Integrated Defect Prediction Model
With the two data streams prepared—the structured process parameter vector $P$ and the extracted 3D geometric feature vector $h$—we now construct the final quality prediction model. The task is a multi-class classification problem where the input is the heterogeneous data pair $(P, h)$ and the output is the predicted defect class (e.g., cold shut, porosity, shrinkage, sound) for the sand casting product.
3.1 Data Preprocessing and Fusion
Prior to modeling, both data streams are preprocessed. Numerical process parameters $P$ are normalized to a [0,1] range to ensure equal weighting during training and accelerate convergence:
$$ P_{norm}^{(i)} = \frac{P^{(i)} – \min(P^{(i)})}{\max(P^{(i)}) – \min(P^{(i)})} $$
The defect labels are encoded using one-hot encoding. The core step is data fusion: the normalized process parameter vector $P_{norm}$ and the 3D geometric latent vector $h$ are concatenated to form a unified feature vector $X$ that represents the complete state of a specific sand casting product instance.
$$ X = \text{Concat}(P_{norm}, h) $$
This combined vector $X$ serves as the input to the prediction network.
3.2 Network Architecture: A Feature-Refined and Cost-Sensitive CNN (FR-CS-CNN)
We design a hybrid neural network tailored for this fused data. While $X$ is a 1D vector, initial layers apply 1D convolutional operations to detect local patterns and interactions among the fused features. The architecture consists of:
- Input Layer: Takes the fused feature vector $X$.
- 1D Convolutional & Pooling Blocks: Two blocks, each with a 1D convolutional layer (kernel size=3, ReLU activation) followed by a 1D max-pooling layer, refine the features and reduce dimensionality.
- Flatten Layer: Converts the output to a 1D vector.
- Fully Connected (Dense) Layers: A series of dense layers with dropout for regularization perform high-level reasoning.
- Output Layer: A softmax layer outputs the probability distribution over the defect classes.
To address the typical class imbalance in defect data (where ‘sound’ castings far outnumber specific defect types), we employ a Cost-Sensitive (CS) loss function. The standard categorical cross-entropy loss is modified by incorporating class weights $w_c$ inversely proportional to class frequencies:
$$ \mathcal{L}_{CS} = – \sum_{c=1}^{C} w_c \cdot y_c \log(\hat{y}_c) $$
where $y_c$ is the true label, $\hat{y}_c$ is the predicted probability for class $c$, and $C$ is the number of defect classes. This ensures the model pays more attention to the less frequent but critical defect classes during training.
3.3 Model Training and Performance Evaluation
The model was trained using the mini-batch gradient descent algorithm (Adam optimizer) with an initial learning rate of 0.01. The dataset was split into 80% for training and 20% for testing. Key training parameters are consolidated in Table 3.
| Parameter | Setting / Value |
|---|---|
| Training / Test Split | 80% / 20% |
| Batch Size | 64 |
| Initial Learning Rate | 0.01 |
| Number of Epochs | 80 |
| Optimization Algorithm | Adam (with mini-batch gradient descent) |
| Loss Function | Cost-Sensitive Categorical Cross-Entropy |
| Primary Metric | Classification Accuracy |
The performance of our proposed FR-CS-CNN model was compared against two classic benchmarks: a Multi-Layer Perceptron (MLP) with fully connected layers only, and a standard 1D CNN. The results, evaluated on the independent test set of sand casting products, clearly demonstrate the advantage of our integrated approach. The MLP, operating on the fused data but without convolutional feature refinement, achieved a test accuracy of 86.1%. The standard CNN improved this to 90.7%. Our FR-CS-CNN model, which combines the fused heterogeneous data input, convolutional feature refinement, and cost-sensitive learning, achieved the highest test accuracy of 93.7%. This represents a significant improvement in the ability to proactively identify defective sand casting products, validating the critical importance of incorporating 3D geometric data into the quality prediction paradigm.
4. Conclusion and Implications
This research presents a novel, holistic framework for predicting defects in complex sand casting products by leveraging multi-source heterogeneous data. We have demonstrated that the integration of traditional process parameters with quantitative 3D geometric features—extracted via a custom-built 3D Deep Convolutional Autoencoder—significantly enhances prediction accuracy. The 3D-DCAE successfully overcomes the historical challenge of characterizing the non-structured geometry of sand casting products, converting complex shapes into compact, information-rich feature vectors. The subsequent FR-CS-CNN prediction model effectively fuses these geometric insights with process data, providing a more complete digital representation of the manufacturing scenario for each sand casting product.
The implications of this work are substantial for the foundry industry. It moves quality control from a reactive, inspection-based practice toward a proactive, predictive capability. By analyzing the digital model of a new sand casting product design alongside planned process parameters, manufacturers can potentially forecast quality risks before any metal is poured. This enables preventative adjustments in process settings or even guided design modifications to improve manufacturability. The methodology underscores the transformative potential of Industry 4.0 technologies—specifically deep learning and digital twin integration—in advancing the precision, efficiency, and reliability of producing high-integrity sand casting products. Future work will focus on expanding the model’s interpretability to provide specific insights into which geometric features correlate with which defects, further closing the loop between product design and manufacturing quality.
