Next Article in Journal
Effects of Replacing Soybean Meal with Fermented Rapeseed Meal on Growth Performance, Meat Quality, Intestinal Morphology and Short-Chain Fatty Acid Production in Finishing Pigs
Previous Article in Journal
Effects of Water Avoidance Stress as a Psychological Stress Model and Coenzyme Q10 on Reproductive, Endocrine, and Ovarian Responses in Adult Female Rats
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Batch-Level Average Market Weight Estimation and Interpretability Analysis for Pigs with Regional K-Means Clustering and AMFormer

1
College of Mathematics and Informatics, South China Agricultural University, Guangzhou 510642, China
2
Wens Foodstuff Group Co., Ltd., Xinxing, Yunfu 527400, China
*
Author to whom correspondence should be addressed.
Animals 2026, 16(13), 2092; https://doi.org/10.3390/ani16132092
Submission received: 23 May 2026 / Revised: 29 June 2026 / Accepted: 30 June 2026 / Published: 6 July 2026
(This article belongs to the Section Pigs)

Simple Summary

Estimating pig market weight is important for production management and economic efficiency in modern pig farming. In this study, more than 35,000 batch-level production management records are used to estimate final average market weight. Based on practical farming characteristics, we combine regional clustering with a deep learning method for tabular data. The proposed method achieves an average error of about 2.6 kg and shows competitive performance compared with ten strong baseline models. In addition, features associated with market weight are also analyzed. These findings suggest that tabular production data may provide a feasible basis for batch-level non-invasive body weight estimation and contribute to more precise pig farming.

Abstract

In modern pig farming, batch-level weight estimation is important for optimizing feeding management and improving economic efficiency. Current vision-based weight estimation methods are often affected by acquisition conditions and mainly focus on individual pigs, making them less suitable for batch-level decision-making. To address this problem, this study focuses on concurrent estimation of batch-level final average market weight and explores the use of tabular production data for non-invasive body weight estimation in pig groups. Based on more than 35,000 production records from a modern pig farming enterprise, we propose RC-AMFormer. The method uses region-wise K-means clustering to characterize underlying farming heterogeneity, introduces cyclic month encoding and organizational hierarchy features, and adopts the arithmetic attention mechanism in AMFormer to model feature interactions. Among the ten comparison models, RC-AMFormer achieves an MAE of 2.64, an MSE of 11.77, and an R 2 of 0.67 on the test set. Compared with XGBoost, it reduces MSE and MAE by 4.03% and 1.43%, respectively. SHAP analysis identifies important features associated with market weight. These results suggest that tabular production data provide a feasible basis for batch-level non-invasive body weight estimation and may also support similar production scenarios.

1. Introduction

In modern intensive pig production, body weight is an important indicator of growth performance, health status, and production efficiency, and it provides an important basis for production management decisions [1]. Accurate body weight information is essential for feeding management, production scheduling, marketing planning, and sales decisions. Therefore, pig weight estimation has become a basic task in smart pig farming [2].
Traditional pig weight estimation methods mainly rely on manual weighing or body-size measurements [3]. However, these methods are time-consuming, labor-intensive, and inefficient and may also cause unnecessary stress to pigs [4]. In recent years, computer-vision-based non-invasive weight estimation methods, including those based on 2D images and 3D point clouds, have become an important direction in pig weight estimation [5,6,7]. Existing studies have achieved high estimation accuracy at the individual-pig level by extracting body-shape and body-size features, such as body length, body width, and contour area, as well as geometric features from point clouds [8,9,10].
Although vision-based weight estimation has improved the level of automation in pig weight measurement, its practical application still faces several limitations. On the one hand, the performance of these methods is often affected by the data acquisition environment, occlusion, lighting conditions, and device deployment [5]. On the other hand, most existing studies focus on individual pigs, while relatively little attention has been paid to weight estimation at the group or batch level. In practical production management, customer matching, production scheduling, and sales decisions are usually conducted at the batch level rather than for individual pigs [11]. Therefore, individual-level estimation results are often insufficient to fully support practical business needs.
For commercial pig production, market weight estimation is also directly related to carcass grade and sales revenue. According to the Chinese national standard Code of Practice for Quality Grading of Livestock and Poultry Meat (GB/T 40945-2021) [12], commercial pigs are graded and priced based on carcass weight. However, carcass weight cannot be directly measured before marketing. Since carcass weight has a stable relationship with live market weight [13,14], accurate estimation of batch-level market weight can help farming enterprises plan batch sorting and packaging, match products to target customers, and implement grade-based sales strategies [1,2].
With the development of large-scale and standardized pig production systems [15,16,17], modern pig farming enterprises have widely established relatively complete production management information systems. These systems have accumulated large amounts of structured production data related to pig farming [18,19], which have been used in scenarios such as hog price forecasting, production cycle management, and production optimization [11,20,21]. Production management data are derived from routine records in enterprise production systems and do not require additional hardware for data acquisition or direct measurement of pigs. Therefore, using such data for pig group weight estimation and batch-level market weight estimation provides a new research direction for non-invasive body weight estimation in pig groups. Compared with vision-based weight estimation methods, this approach does not require additional image acquisition devices or direct contact with animals and thus has lower data acquisition costs and potential for broader application.
Since production management data are usually stored in structured tabular form, estimating pig group weight based on such data can be naturally formulated as a tabular regression task. In existing weight estimation studies, gradient-boosted decision tree (GBDT) models, such as XGBoost [22], CatBoost [23], and LightGBM [24], are commonly used in the regression stage. Due to their strong performance and robustness, GBDT models have long dominated the field of tabular learning [25,26,27]. However, tree-based models still depend to some extent on the quality of input features, and their ability to model high-order feature interactions is relatively limited [28].
In recent years, following the success of deep learning in natural language processing [29] and computer vision [30], researchers have increasingly introduced deep learning into tabular data modeling. These methods have also been widely applied in key fields such as agriculture, finance, and healthcare [31,32,33,34,35]. Compared with traditional machine learning methods, deep tabular learning shows stronger representation ability in large-scale, high-cardinality, and transfer learning scenarios [26,36]. Among these methods, Transformer-based tabular models can effectively capture complex feature interactions through self-attention and have achieved competitive performance [26]. Representative models include AutoInt [37], SAINT [38], FT-Transformer [39], ExcelFormer [40], AMFormer [41], and MAYA [42]. These advances provide a new technical path for pig group weight estimation and batch-level market weight estimation based on tabular data.
However, most existing tabular learning methods are designed for general-purpose settings and usually treat samples as a homogeneous whole, which may overlook relevant prior information in practical scenarios. Even within a standardized production system, production performance may vary across farms because of variations in regional conditions, organizational management, seasonal climate, and other factors. Therefore, how to incorporate such prior knowledge into the model is an important issue for batch-level market weight estimation.
Based on this, we propose RC-AMFormer, a method for non-invasive concurrent estimation of batch-level final average market weight using tabular production data derived from enterprise production systems. The method adopts AMFormer [41] as the backbone for tabular feature modeling and uses K-means clustering [43] to capture underlying heterogeneity in large-scale standardized pig production. Cyclic encoding is further applied to time-related features to capture seasonal climate effects, and management-related hierarchical features are introduced to enhance the model representation. Experimental results on more than 35,000 real-world production records show that RC-AMFormer achieves better overall performance than 10 baselines, including XGBoost and AMFormer. Finally, SHAP analysis is conducted to identify important factors associated with market weight estimation and provide some interpretability for the model results.

2. Materials and Methods

2.1. Data

2.1.1. Batch Production Records of Pigs

The production records used in this study were collected from modern pig farms of Wens Foodstuff Group (hereinafter referred to as “Wens”), whose farming operations cover five major regions of China, namely East China, South China, Central China, North China, and Southwest. Wens adopts an enterprise–farmer model, under which the company provides piglets, feed, animal health services, technical support, and hog procurement, while farmers are responsible for daily feeding and management during the fattening stage. To ensure production quality, Wens has established a standardized management system and digitally manages the farming processes of participating farmers. Under this system, the production process of each batch of pigs raised by farmers is recorded throughout the fattening stage, resulting in structured production records. The current empirical study focuses on production batches of commercial pigs under a standardized fattening system.
The data contain 36,536 independent batch records. Each sample (i.e., each row) represents one production batch of pigs, and each feature (i.e., each column) records a production indicator. In total, the data include 13 features and 1 target variable, which can be grouped into four categories.
  • Organizational and regional indicators: The l2 unit, l3 company, l4 company, and l5 unit indicate the affiliation path of each farm within the enterprise’s multi-level management system. The Region feature describes the geographical location of the farm.
  • Initial batch conditions: Placement month, placement count, and placement weight. These indicators characterize the initial status of each batch.
  • Production process indicators: Feeding days, 2w mortality, 5w mortality, medication cost, and feed consumption. These indicators reflect pig status and cost input during the feeding process.
  • Marketing outcome indicator: market weight. This variable serves as the estimation target in this study.
The details of the data are shown in Table 1.

2.1.2. Production Phase and Data Collection

The data used in this study cover the production cycle from piglet placement to marketing at contract farms. Piglets are nursed at the company’s sow farms for 23–25 days, reaching a body weight of 6–7 kg, and are transferred to contract farms within 1–3 days after weaning. Upon arrival, they are assigned to pens, and information such as placement month and placement weight is recorded. During the subsequent fattening stage, relevant production management data continue to be recorded. Pigs are marketed when they reach the enterprise’s market standards.

2.1.3. Indicator Definitions and Data Sources

This section further explains the definitions and data sources of several key indicators.
  • Feed Consumption. In actual production, the enterprise delivers piglets and feed to contract farmers and records the placement count and cumulative feed supply for each production batch through the production management system. Feed is supplied on farms through automatic feeding lines. However, the feed consumption per pig used in this study is not individual or group-level feed intake monitoring data. Instead, it is a production indicator calculated by the company headquarters based on the cumulative feed supply recorded in the production database and the placement count, which is calculated as follows:
    Feed Consumption = Cumulative Feed Supply Placement Count
    where Cumulative Feed Supply represents the cumulative feed delivered to the batch over the entire feeding period, as recorded by the enterprise’s management system.
  • Feeding Days. This indicator denotes the cumulative number of days that pigs in a batch have been raised since piglet placement. It is used to characterize the growth stage and farming progress of the batch.
  • Organizational hierarchy feature. Wens has established a relatively complete multi-level organizational management structure. The organizational hierarchy features used in this study correspond to management companies or units at different granularities below the group headquarters. Specifically, this hierarchy is structured as follows, headquarters → business division (l2 unit) → regional company (l3 company) → production company (l4 company) → farm (l5 unit).
    As shown in Figure 1, under large-scale standardized pig production, each production batch can be traced through this hierarchy to obtain its complete management affiliation path. In addition, each batch is labeled with its geographical region, including South China, East China, North China, Central China, and Southwest. The Region feature mainly reflects the macro-geographical location of the batch and its possible climatic and environmental differences. It is not part of the enterprise’s internal organizational hierarchy.
Figure 1. Organizational management hierarchy.
Figure 1. Organizational management hierarchy.
Animals 16 02092 g001
These production records form batch-level pig production data. Among these indicators, feed consumption per pig is a key indicator of nutritional input and is closely associated with market weight [44]. Placement weight, feeding days, and mortality-related indicators further reflect pig growth status and management conditions from different perspectives. Figure 2a,b present the Pearson correlation coefficients of the cleaned numerical features and the distribution of market weight, respectively. As shown in Figure 2b, the target variable follows an approximately normal distribution, indicating that it is suitable for regression modeling.

2.1.4. Data Cleaning

We clean the raw pig production records through two stages, namely rule-based screening and statistical screening. The rule-based screening rules are summarized in Table 2. In this stage, relatively conservative thresholds are applied to remove clearly unreasonable values. This setting is used because some indicators are manually recorded by contract farmers, whose digital literacy may vary [45]. Therefore, this stage mainly aims to exclude obvious data entry errors in farmer-reported records and values that violate business logic.
For the samples that pass the rule-based screening but may still exhibit abnormal patterns in the data distribution, we further apply statistical methods for identification. Specifically, Isolation Forest [46], an unsupervised method that identifies anomalies through random partitioning, is used to detect anomalies not captured by explicit rules. The detected anomalies in numerical variables related to growth, cost, and mortality are then validated using the Z-score method, which measures the degree to which a value deviates from the mean and is calculated as follows:
Z = X μ σ
Samples with |Z| > 3 are classified as statistical outliers. To further reduce the false positive rate, a sample is classified as a statistical anomaly only if it is identified by both Isolation Forest and the Z-score method. Finally, we remove 690 samples identified by the rule-based criteria and 355 statistical anomalies from the data. The remaining 35,491 valid records are then used to construct a batch-level pig production dataset for subsequent modeling.

2.2. Problem Definition

This study aims to estimate the final average market weight of each batch based on production management records. We denote the batch production records as X = { x 1 , x 2 , , x n } , where n means the total number of samples, x i R k denotes the specific indicators of the i-th sample, and k = 13 denotes the number of original features. The target values are denoted as Y = { y 1 , y 2 , , y n } , where y i is the actual average market weight of sample x i . Based on the training data X and Y, a regression function f ( X ; Y ; θ ) with trainable parameters θ is learned to estimate market weight from input features. Given a new batch sample, the learned function outputs its estimated value.

2.3. Weight Estimation Model

In this section, we introduce RC-AMFormer, a method designed for batch-level average pig market weight estimation. In standardized pig farming, production batches may still exhibit latent heterogeneity and may also be affected by seasonal climate factors. The method builds upon AMFormer [41] by introducing regional clustering, row–column fusion embedding, and cyclic encoding. The overall framework is shown in Figure 3.

2.3.1. Regional Clustering Method

Under the large-scale enterprise–farmer model, pig farms are managed through a multi-level organizational structure. In our dataset, the management units exhibit a clear hierarchy, including the l2 unit, l3 company, l4 company, and l5 unit. Different organizational levels correspond to different granularities of management and execution and may therefore lead to different degrees of production variation.
As shown in Figure 4, the effect size analysis of hierarchical features indicates that the explanatory power of organizational hierarchy for market weight increases significantly as the management granularity becomes finer. Among all levels, the l5 unit, which is directly responsible for frontline production guidance, has the strongest explanatory power for market weight. This result suggests that market weight is closely related to fine-grained differences at the farm level, and farm-level conditions and farmers’ actual management practices may be important contributing factors.
At the same time, although production inputs and feeding processes are highly standardized in large-scale pig production, substantial intrinsic heterogeneity still commonly exists across samples due to differences in geographical environment, climatic conditions, management level, and execution at the farm level. If all data are modeled as following a homogeneous distribution, this important prior information may be overlooked. Based on this, we design a regional clustering method to characterize the fine-grained differences that remain within each region under the standardized production framework and to transform them into structured features that can be utilized by the model.
Common clustering methods include density-based clustering, partition-based clustering, hierarchical clustering, and deep clustering [47]. Considering that the features used for clustering in this study are all continuous numerical variables, and that the overall data distribution is relatively regular, with no significant outliers or obvious density imbalance, the partition-based K-means [43] is adopted for clustering analysis. As a classical unsupervised learning method, K-means uses Euclidean distance as the distance measure and offers high computational efficiency, stable results, and good interpretability.
Specifically, the dataset is stratified into five regions, namely South China, East China, North China, Central China, and Southwest. Candidate indicators are analyzed and screened based on whether they can reflect differences in the farming process while remaining interpretable. According to this principle, four numerical indicators are selected for clustering, namely feed consumption, 2w mortality, medication cost, and feeding days. These indicators mainly reflect four aspects, namely feed input, farm conditions and execution, health, and production cycle.
In addition, 2w mortality is used instead of 5w mortality to introduce early mortality information that is closer to the initial post-placement period into the clustering features. The first two weeks correspond to a stage in which management interventions, including piglet transfer, feed transition, and grouping management [48], are relatively intensive. Mortality and culling during this period may be more closely related to management quality. In comparison, the 5w mortality variable covers a longer observation window and may also include information related to later health status, disease occurrence, treatment intervention, and environmental changes [49].
After splitting the dataset, we perform clustering separately within each region using the training samples. Specifically, for the clustering features within each region, we first apply Z-score standardization to the training set to avoid bias caused by different feature scales. The standardized values are then grouped by the K-means. Candidate cluster numbers K { 2 , 3 , 4 } are examined to determine the value of K that maximizes the Silhouette Coefficient for each region. In a standardized production system, actual farming differences within a region are usually relatively limited and interpretable and can generally be summarized into two to four typical types. If five or more clusters are used, the model is more likely to overfit data noise. When K = 1 , heterogeneity in the farming process is completely ignored. Therefore, the value of K that maximizes the Silhouette Coefficient is selected independently to balance interpretability and model stability. Differences in the final number of clusters across regions also reflect different degrees of farming variation under the standardized production framework.
To verify the stability of the regional clustering results, we fix the optimal number of clusters for each region, repeat K-means 30 times with different random seeds, and evaluate the clustering consistency using the Adjusted Rand Index (ARI) [50]. As shown in Table 3, the mean ARI is above 0.90 in all regions. In addition, the relatively small standard deviations, ranging from 0.0038 to 0.0200, also indicate that the regional clustering results are reasonably stable.
After clustering, samples with similar values across the four indicators are assigned to the same cluster, thereby identifying several relatively homogeneous farming subgroups within each region. Subsequently, the region-specific clustering models fitted on the training set are used to assign cluster labels to the validation and test samples. Finally, each batch is assigned a joint region–cluster label, such as “South_China_0” or “East_China_2”. To intuitively show the regional clustering structure, we further apply PCA to the selected numerical features and visualize the two-dimensional distribution of all samples, as shown in Figure 5. The resulting joint discrete label is then used as an additional categorical feature and fed into the deep learning network together with the original categorical features.
Through unsupervised learning, we aim to identify groups with similar farming characteristics within each region and convert the region–cluster label into structured information that can be explicitly utilized by the model, thereby providing auxiliary features for the downstream network.

2.3.2. Cyclic Feature Encoding

Pig growth performance is affected by seasonal changes [51]. Although standardized management can reduce production variability to some extent, it cannot completely eliminate the effects of seasonal factors. Because climatic conditions, disease risk, and other factors often vary with the seasons, placement month exhibits a clear periodic pattern. Treating it as a numerical feature may lead the model to incorrectly regard December and January as the most distant months. If it is treated as a categorical feature, the ordinal relationship between months will be lost. Therefore, we use sine–cosine encoding to map placement month into a continuous cyclic representation. Specifically, this module uses trigonometric functions to project the month onto the unit circle, thereby preserving its periodic structure:
month sin = sin 2 π × month 12 , month cos = cos 2 π × month 12
The two encoded features, placement_month_sin and placement_month_cos, are then used as new numerical inputs to the network. This encoding method can effectively capture the relationships among different months while ensuring continuity between the end and the beginning of the year. In this way, it preserves the ordinal information of placement month while also representing its periodicity.

2.3.3. Row-Column Fusion Representation

In the input representation stage, we build on the row–column fusion design in [52] and introduce a dual-encoding representation to integrate row-wise and column-wise information. Specifically, the row encoder maps each scalar feature value to a d-dimensional vector. For the j-th feature value x i , j , its row embedding h i , j r R d is computed as:
h i , j r = ϕ j r ( x i , j ) = w j x i , j + b j
where w j R d and b j R d are the learnable weight and bias, respectively.
In the column encoding stage, to incorporate global distribution information of each feature column, we construct a column summary v ˜ j . This summary is then mapped to a column embedding h j c = ϕ c ( v ˜ j ) through a lightweight MLP. Finally, the row representation h i , j r and column representation h j c are fused to obtain the final embedding for the j-th feature in sample x i :
h i , j = h i , j r h j c
where ⊙ denotes element-wise multiplication. This fusion enables the final representation to capture both the sample-level value information and feature-level distribution information, which is then fed into the subsequent attention network.

2.3.4. Arithmetic Attention Backbone Network

Based on the above feature encoding, the numerical and categorical feature embeddings are concatenated along the sequence dimension to form a complete feature sequence for each sample. A learnable CLS embedding is then prepended to the sequence to aggregate global information for the final market weight estimation. The self-attention mechanism in the conventional Transformer architecture mainly models additive interactions among features. To better capture the complex non-linear relationships among indicators in pig production data, we adopt the arithmetic attention mechanism from AMFormer [41] as our backbone network. This mechanism employs parallel additive and multiplicative attention streams to explicitly model both types of arithmetic feature interactions, as shown in Figure 6.
The additive stream follows the classical attention mechanism [39] and computes feature correlations through scaled dot-product attention, thereby extracting additive interaction candidates. Let the input feature embedding matrix be X R N × d , where N denotes the number of features and d denotes the embedding dimension. Query, key, and value matrices are first generated as Q = X W Q , K = X W K , and V = X W V , where W Q , W K , W V R d × d are learnable parameters. The correlation matrix is then obtained by scaled dot-product attention:
A = Q K T d
To accommodate the sparse interaction patterns in tabular data, only the top-k most relevant features in each row of the attention scores are retained for normalized weighted aggregation, producing the additive interaction output O add R N × d . This mechanism reduces interference from irrelevant features. Next, the multiplicative stream applies a logarithmic transformation to the input feature embeddings:
X log = log ( ReLU ( X ) + 1 )
here, the constant term 1 avoids the undefined case of log ( 0 ) and allows non-negative production indicators with zero values to be naturally mapped to 0 in log space. Attention is then computed in the log space, and the product semantics are restored through the exponential operator, producing the multiplicative interaction candidate O mult . Through this chained log-attention-exp design, the multiplicative stream explicitly models multiplicative arithmetic interactions, such as placement count × feed consumption, and therefore complements the additive stream. In the fusion stage, the outputs of the two streams are concatenated along the feature dimension and fused by a down-sampling linear layer:
O = FC ( [ O add ; O mult ] ) R N × d
The fused output is then added to the original input through a residual connection and further processed by a feed-forward network (FFN). After multiple stacked layers, the output vector at the CLS embedding position, z cls , is taken, followed by layer normalization and ReLU activation. Finally, a fully connected regression head maps it to the estimated value y ^ .

2.4. Compared Models

To evaluate the effectiveness of the proposed method, we compare RC-AMFormer with 10 strong baselines commonly used for tabular data. These baselines include three tree-based models, namely XGBoost [22], CatBoost [23], and Random Forest [46], five attention-based tabular learning models, namely AutoInt [37], SAINT [38], FT-Transformer [39], ExcelFormer [40], and AMFormer [41], and two classical deep learning models, namely ResNet-like [39] and TabNet [53].
  • Tree-based models. XGBoost [22] is an optimized framework based on gradient-boosted decision trees and has strong regularization capability, which is widely used in pig weight estimation. CatBoost [23] is a gradient boosting model specifically designed for categorical features. By using ordered boosting, it alleviates gradient estimation bias and shows clear advantages on mixed-type tabular data. Random Forest [46] is an ensemble learning method that improves generalization ability and robustness by constructing multiple independent decision trees and averaging their predictions or taking a majority vote. It is also one of the most commonly used baseline models for tabular tasks.
  • Attention-based models. AutoInt [37] is one of the earliest models to apply self-attention to tabular data, and it captures high-order feature interactions through stacked self-attention layers. SAINT [38] is a tabular-specific architecture that improves learning performance through a hybrid attention mechanism and contrastive pretraining. FT-Transformer [39] adapts the standard Transformer to tabular data and captures high-order feature interactions through contextual embeddings, where its self-attention mainly reflects conventional additive interactions. ExcelFormer [40] introduces semi-permeable attention, interaction attenuation initialization, and tabular-specific data augmentation and can outperform GBDT without hyperparameter tuning. AMFormer [41] is a deep tabular model based on an improved Transformer architecture, whose core design lies in parallel additive and multiplicative attention mechanisms.
  • Classical deep learning models. ResNet-like [39] adopts a multilayer perceptron with residual connections, which can alleviate the vanishing gradient problem in deep networks. TabNet [53] employs a sequential attention mechanism and performs feature selection through learnable sparse feature masks. It emphasizes model interpretability and is commonly used in pig weight estimation tasks.

2.5. Training Settings

Following [54], we use a sample-wise random split with a fixed random seed to divide the dataset into training, validation, and test sets at a ratio of 64:16:20. Each sample corresponds to a single farming batch. Therefore, no batch appears in more than one subset. At the same time, different batches from the same management unit may be assigned to different subsets. All numerical features are standardized using the mean and standard deviation computed from the training set to ensure a consistent feature scale. All deep learning models are trained using the Adam optimizer, with early stopping based on the validation MSE and a patience of 25. We use the Optuna library [55] for hyperparameter tuning, with validation MSE as the objective metric. The final test performance of each model is evaluated using the hyperparameter configuration that achieves the lowest validation MSE.
For XGBoost, CatBoost, TabNet, AutoInt, and SAINT, we reuse the default settings and hyperparameter search spaces from the comparative experiments reported in [39]. For Random Forest, FT-Transformer, ExcelFormer, AMFormer, and our proposed RC-AMFormer, we refer to the default settings and value ranges in [39,40,41] and construct comparable hyperparameter search spaces to ensure that all models are compared under consistent conditions. All experiments are conducted on a Linux server equipped with an NVIDIA RTX 3080 GPU and CUDA 13.0.

3. Results and Discussion

3.1. Evaluation Metrics

For the weight estimation task, we use mean squared error (MSE), mean absolute error (MAE), and the coefficient of determination ( R 2 ) as evaluation metrics. The corresponding formulas are as follows:
MSE = 1 n i = 1 n ( y i y ^ i ) 2
MAE = 1 n i = 1 n | y i y ^ i |
R 2 = 1 i = 1 n ( y i y ^ i ) 2 i = 1 n ( y i y ¯ ) 2
where n is the number of samples in the dataset, y i is the true value, y ^ i is the predicted value, and y ¯ represents the mean of the true values.

3.2. Estimation Results

In the market weight estimation task, our proposed RC-AMFormer achieves the lowest numerical MSE and MAE among the 10 compared models. As shown in Table 4, its MSE, MAE, and R 2 reach 11.7667, 2.6353, and 0.6698, respectively. Compared with AMFormer, RC-AMFormer reduces MSE and MAE by 2.27% and 1.22%. These results suggest that the proposed method can provide modest improvements in pig market weight estimation.
The comparison across different models suggests that traditional GBDT models remain competitive in this tabular regression task. XGBoost and CatBoost achieve relatively low errors, which may be related to the ability of tree-based models to capture nonlinear relationships through hierarchical feature-value partitioning. Deep learning models such as TabNet and ResNet-like show performance comparable to some tree-based models. Among attention-based models, FT-Transformer and AMFormer achieve better results than several other neural baselines. This suggests that different attention structures may differ in their ability to model feature interactions in pig farming tabular data.
Unlike most studies that estimate body weight at the individual-pig level using images or point cloud data [56], this study focuses on batch-level market weight concurrent estimation. This setting cannot capture individual differences among pigs, but it can reflect the overall market weight level of a production batch. In addition, the results suggest that non-invasive pig group weight estimation based on routinely accumulated tabular data is feasible to some extent. This data-driven approach may also have potential for extension to other farming scenarios, such as sow body condition monitoring.

3.3. Ablation Study

To evaluate the effects of different components, we conduct an ablation study using AMFormer as the baseline, and the results are shown in Table 5. After introducing the regional clustering feature (RC) or cyclic month encoding (Cyclic), the model shows improved performance on the evaluation metrics. Cyclic only re-represents the month feature in a periodic form and introduces minimal additional model complexity, but it still brings certain performance gains. RC also achieves better results than the baseline, suggesting that the discrete structural information derived from region-wise clustering helps characterize latent differences among farming batches.
In contrast, using row-column fusion embedding (Fusion) alone does not bring consistent improvements. This may be because the arithmetic attention mechanism in the backbone already captures part of the feature interactions and relationships among columns [26,52], while Fusion further increases representation complexity. When RC and Cyclic are introduced together, the model shows improved performance over the baseline. After further adding Fusion, all three metrics improve slightly. This suggests that Fusion can provide a modest complementary benefit under the current setting when combined with RC and Cyclic.
We further conduct a clustering feature replacement experiment, in which 2w mortality in the original clustering features is replaced with 5w mortality, while all other experimental settings remain unchanged. As shown in Table 6, the model performs better across all evaluation metrics when two-week mortality is used as the clustering feature.
This result may be related to the different information reflected by the two mortality indicators. 2w mortality corresponds to the early stage after piglet placement, during which pigs face multiple risks, including weaning, transport, environmental change, feed transition, and regrouping [57,58]. At this stage, higher demands are placed on the quality of farm management, and the pigs are relatively more sensitive to them. Therefore, differences in management conditions are more likely to be directly reflected in short-window mortality. At the same time, early management quality affects not only short-term mortality outcomes but may also influence subsequent health status and growth potential [59], thereby affecting final market weight.
In contrast, 5w mortality covers a longer time window. Mortality observed during Weeks 3 to 5 after piglet placement may be affected not only by management practices but also by factors such as regional disease outbreaks and climate conditions. As a result, it may contain more fluctuations unrelated to management differences. By comparison, 2w mortality may retain information more directly related to management quality. In addition, under the current clustering feature combination, some information overlap may exist between 5w mortality and medication cost per pig, which may weaken its complementarity with the other three clustering features.
Overall, 2w mortality and 5w mortality reflect production information from different time windows [49], and their usefulness may vary with the task objective. Under the current task setting, 2w mortality appears to be more suitable as a clustering feature.

3.4. Statistical Evaluation of Performance Improvement

To assess the statistical reliability of the observed improvement, we repeat the experiments with 10 different training random seeds while keeping all other experimental settings unchanged.
Table 7 presents the results of the 10 individual runs, and Table 8 summarizes the average performance and statistical significance test results. As shown in Table 8, the average MSE values of AMFormer and RC-AMFormer are 12.0687 ± 0.0902 and 11.8134 ± 0.0867 , respectively. A two-sided paired t-test on the MSE results suggests that the improvement is statistically significant p = 1.06 × 10 6 < 0.01 . The two-sided Wilcoxon signed-rank test shows a consistent result p = 1.95 × 10 3 < 0.01 , providing some statistical support for the observed performance improvement.

3.5. Results with Region-Stratified Splitting

To further examine whether the main conclusions are sensitive to the data splitting strategy, we conducted a region-stratified split in addition to the original random split. Specifically, while keeping the same train/validation/test ratio, samples were randomly stratified by region so that the proportion of samples from each region remained approximately consistent across different subsets. This design helps reduce the potential influence of regional distribution imbalance on model evaluation.
As shown in Table 9, the overall performance trend under the region-stratified split is generally consistent with that under the original random split. Compared with the original random split, the overall regression performance under the stratified split is slightly lower. Nevertheless, RC-AMFormer still shows the best overall performance among the compared models, with an MSE of 12.2065, an MAE of 2.6624, and an R 2 of 0.6611. Since the test set retains a more balanced regional composition, this split may provide a complementary and relatively stricter evaluation perspective. These results suggest that the proposed method maintains a certain level of robustness under different data splitting strategies.

3.6. Impact of the Regional Clustering Feature on Tree-Based Models

Table 10 presents the results of introducing the regional clustering feature into tree-based models, which we denote as RC-XGBoost, RC-CatBoost, and RC-RF. The results show that the effect of the regional clustering feature is not fully consistent across different tree-based models. For RC-XGBoost, after introducing the clustering label, the test MSE decreases from 12.2608 to 12.0821. For RC-CatBoost, the MSE decreases from 12.4987 to 12.3457, corresponding to a relative reduction of approximately 1.22%. In addition, both models show improvements in MAE and R 2 .
In contrast, RC-RF does not obtain further improvement after the clustering label is introduced. This may be because Random Forest builds an ensemble through random feature selection and sample resampling across multiple decision trees, and its use of a newly added discrete feature differs from that of gradient-boosted tree models. When the structural information provided by the clustering label is limited or partially overlaps with existing features, its benefit may become unstable. Overall, the regional clustering feature is not consistently effective for all tree-based models. However, the performance improvements observed in XGBoost and CatBoost suggest that this feature can characterize regional structural differences in pig production data to some extent and provide useful complementary information for some tree-based models.

3.7. Interpretability Analysis

Based on the estimation results on the test set, we perform SHapley Additive exPlanations (SHAP) attribution analysis to identify the important features influencing market weight, with the tree-based model results used as a reference.
Figure 7a shows the feature importance distributions of AMFormer and XGBoost before and after introducing the regional clustering feature and the cyclic encoding of placement month. Figure 7b presents the SHAP distribution of AMFormer-Enhanced, showing how the values of numerical features are associated with the direction of the model output, while categorical features mainly reflect the relative contribution distributions of different categories.

3.7.1. Analysis of Growth, Health, and Seasonal Features

Across the four models, feed consumption consistently ranks first in the SHAP analysis, with importance clearly higher than that of the other features. This finding is consistent with the general understanding in animal nutrition that energy intake is closely associated with growth performance [44].
The importance of 5w mortality consistently ranks second, indicating that herd health in the early stage after placement has an important influence on final market weight. By contrast, 2w mortality shows lower importance, suggesting that mortality measured over different time windows affects the estimation results to different extents. More specifically, 2w mortality mainly reflects health risks during the initial adaptation stage after placement. In comparison, 5w mortality covers a longer growth observation window and more comprehensively characterizes early herd health status and growth stability and therefore shows higher importance in the model. In addition, some of the early risk information reflected by 2w mortality may already be captured by subsequent feed consumption and 5w mortality, which leads to a relatively lower independent contribution in the SHAP analysis.
Among the original features, placement month ranks behind only feed consumption and 5w mortality, indicating that seasonal factors such as temperature and disease pressure still have some influence on pig growth even under modern standardized farming.
After cyclic encoding is introduced, the month feature is represented by two continuous components, placement_month_sin and placement_month_cos. Since these two variables jointly form a two-dimensional representation of month on the unit circle, their contributions are coupled. In addition to calculating the individual SHAP values of the two components, we also calculate the vector magnitude of their SHAP values, namely SHAP sin 2 + SHAP cos 2 , to measure the overall contribution strength of monthly periodic information. In Figure 7a, this quantity is denoted as Cyclic_Month_Norm. The results show that the vector magnitude reaches 1.177 in XGBoost-Enhanced and 1.379 in AMFormer-Enhanced.
Compared with the original discrete month encoding, cyclic encoding maps the month feature from 12 independent categories into a two-dimensional continuous space. This allows the model to learn the continuity and periodic relationships among months, rather than relying on discrete month values. Such a representation helps capture smooth seasonal variation patterns and reduces dependence on the sample distribution of specific months.
As shown in Figure 8a,b, the sine and cosine components of month show a clear synergistic effect on the model output. Either component alone cannot fully characterize month information. Their effects are also unevenly distributed across different seasonal windows, indicating that suppressing or promoting effects are more concentrated in certain periods.

3.7.2. Analysis of Hierarchical and Regional Features

Since this study focuses on batch-level market weight concurrent estimation under large-scale standardized pig production, information about the management units to which farms belong should also be considered in addition to growth-related features. The effect-size analysis of hierarchical features in the previous clustering section shows that the explanatory power of hierarchy-related features for market weight generally increases as the management granularity becomes finer (Table 11). Compared with differences at the macro-regional level, more pronounced production differences exist across management units. This provides a basis for incorporating hierarchical information into the model.
Specifically, the η 2 value at the regional level is only 0.032, whereas it reaches 0.145 at the l5 unit level, approximately 4.5 times the effect size of region, as shown in Table 11. Among all adjacent levels, the largest increase in effect size is observed from l3 company to l4 company (+0.039), which is higher than the changes between other levels. This indicates that when the organizational hierarchy is refined from regional management to management units more directly involved in production organization and technical services, more differentiated information related to market weight can be obtained.
From the SHAP results (shown in Figure 7a), the specific rankings of hierarchical variables are not fully consistent across different models. However, l4 company and l5 unit generally maintain relatively high importance and rank only behind feed consumption and 5w mortality in most models. This suggests that fine-grained management units contain rich information about production differences. The importance of hierarchical variables does not show a strictly progressive pattern across levels, which may be related to model structure, feature combinations, and interactions among variables.
To further evaluate the contribution of different hierarchy-related features, we conduct an ablation study on organizational hierarchy features (Table 12). Overall, removing all hierarchy-related features leads to a clear decline in model performance. The MSE increases from 12.0401 to 13.4266, and both MAE and R 2 also deteriorate, indicating that hierarchical features make a notable contribution to estimation performance. The stepwise removal results further show that removing l5 unit and l4 company, which are closer to the production execution level, causes a relatively larger performance drop. By contrast, the additional impact of removing l3 company is relatively limited, whereas removing l2 unit still leads to a further decline.
This suggests that the information carried by l3 company may be partly covered by l4 company and l5 unit, whereas l2 unit may still provide additional higher-level contextual information. These results are generally consistent with the effect-size analysis and SHAP results, further supporting the effectiveness of fine-grained management information.
From a practical production perspective, higher-level units, namely l2 unit and l3 company, are mainly responsible for macro-level planning and resource allocation. By contrast, lower-level units, such as l4 company and l5 unit, are closer to the actual farming process and are more directly involved in production management, technical services, and farmer guidance. Meanwhile, management-related differences may be more evident at the l4 level, partly explaining its larger impact on model performance. In addition, contract farmers may differ in education level, production skills, and work motivation, which may affect the consistency of production execution [45].
In comparison, the region feature, which represents macro-regional information of farms, generally has lower SHAP values than the organizational hierarchy variables. This may be because the climatic and macro-environmental differences represented by region are further decomposed and absorbed by finer-grained management units. Therefore, although standardized pig production unifies production inputs and farming requirements, it does not fully represent the actual implementation process. Hierarchical variables can reflect differences in farming environment, management conditions, and farmer execution, which may further influence market weight through the pig growth process.

3.7.3. Contribution of Regional Clustering

As shown in Figure 7, the regional clustering feature ranks higher than some original features, capturing information that may not be available in individual variables.
XGBoost tends to be more sensitive to categorical features with clear group boundaries, such as Cluster Label. By contrast, AMFormer tends to capture complex interactions among some categorical variables through joint representation learning (Figure 8c). Although the two models use features in different ways, their results both suggest that regional clustering and cyclic information contribute to market weight estimation to some extent.

3.7.4. Insights into Batch-Level Non-Invasive Weight Estimation

The above analyses show that batch-level market weight estimation is affected not only by direct growth-related factors, such as feed input, herd health, and seasonal variation, but also by production-background factors, such as organizational hierarchy, regional environment, and farmer execution. Unlike studies that estimate pig body weight based on morphological information from images, videos, or 3D point clouds [5,6,7], this study uses production management data naturally accumulated during the farming process for weight estimation, which offers a new direction for batch-level non-invasive weight estimation.
Objective differences remain across farming regions and management units, even under a standardized production system. In this regard, regional clustering and cyclic encoding help the model characterize these underlying differences and their temporal patterns to some extent, improving its ability to capture batch-level heterogeneity in market weight.

3.8. Analysis of Regional Farming Patterns

To analyze the structural characteristics within different regions, we perform clustering separately within each region based on all samples and summarize the corresponding regional farming patterns.
Table 13 presents the number of batches in each regional cluster, showing clear differences in cluster size across regions. Figure 9 and Figure 10 present the feature differences among cluster centers across the five geographical regions from the perspectives of original feature values and standardized mean values, respectively, and Figure 11 presents the corresponding average market weight distributions. Based on these visualizations, the underlying structure of farming units in different regions was analyzed. Although some continuous transitions exist among regional clusters, the overall patterns can be summarized into three dominant farming modes, namely the long-cycle weight-gain mode, the stable and balanced mode, and the high-risk mode. The representative regional clusters corresponding to these modes are listed in Table 14.
Among the three modes, the long-cycle weight-gain mode is characterized by relatively high feed consumption and long feeding days and is usually associated with higher market weight. Under this mode, pigs generally exhibit a longer feeding cycle, greater feed input, and higher market weight. The stable and balanced mode is characterized by relatively low 2w mortality and medication cost, a relatively short feeding cycle, and an overall moderate level of market weight, reflecting a balance among low risk, short production cycle, and relatively stable output. By contrast, the high-risk mode is characterized by higher 2w mortality and overall lower feed consumption, with relatively low market weight.
It should be noted that the above three modes are primarily a general summary of the regional clustering results and are used to characterize the major structural features in the data rather than to provide a strictly discrete partition of all clusters. Some clusters still show a certain degree of transition or mixture in their feature combinations. For example, although East_China_3 has relatively low 2w mortality, it shows relatively high medication cost, whereas North_China_1 exhibits higher mortality, higher medication cost, and a longer feeding cycle at the same time, reflecting more complex farming characteristics. These characteristics are not completely discrete but instead show a certain degree of continuous variation across different dimensions.
From a production perspective, the three dominant farming modes differ clearly in input level, production risk, and production stability. The long-cycle weight-gain mode is associated with higher market weight but also with greater feed and time input. The stable and balanced mode exhibits better overall production stability. In contrast, the high-risk mode reveals weaknesses in early health management and still leaves room for further improvement. Regarding the cluster distribution (Table 13) representative clusters of the high-risk mode account for a relatively small proportion of samples overall, whereas the stable and balanced mode and some clusters of the long-cycle weight-gain mode cover more batches. This indicates that the high-risk mode is not dominant in actual production and that farming activities still mainly follow relatively stable patterns. However, although high-risk clusters account for only a limited proportion, they are usually associated with higher mortality and greater production fluctuation, and their potential negative impact on overall farming efficiency should not be overlooked.
Because the regional clustering in this study is mainly based on four process-related indicators, the above mode interpretation primarily reflects the major differences along these key production dimensions rather than a complete characterization of the entire farming process.

4. Conclusions

Based on more than 35,000 tabular production records, this study proposes RC-AMFormer for batch-level market weight estimation in large-scale pig production. Experimental results on the test set show that RC-AMFormer achieves an MAE, MSE, and R 2 of 2.64, 11.77, and 0.67, respectively, and shows overall better performance than the ten comparison models. This demonstrate the effectiveness of regional clustering features, cyclic month encoding, and the arithmetic attention structure for weight estimation.
Market weight is influenced not only by growth- and health-related factors but also by regional differences, organizational hierarchy, and seasonal variation. These findings suggest that objective heterogeneity remains across farming units even under a standardized production system.
Several limitations should be noted. The current model is mainly based on batch-level statistical indicators, which makes it difficult to capture individual growth differences. In terms of research scope, this study performs concurrent estimation based on tabular production data accumulated during the farming process, rather than prospective prediction. Therefore, for scenarios requiring prospective prediction several weeks in advance, the temporal availability of input variables should be further constrained. Future studies could further integrate individual-level information, environmental data, and stage-specific production indicators to improve model performance and generalization ability.
Overall, this study demonstrates the feasibility of using tabular data from production management systems for non-invasive body weight estimation. Beyond final average market weight estimation, the proposed data-driven method may be extended to weight estimation at intermediate growth stages. It may also provide a useful reference for large-scale livestock and poultry production with cross-regional and multi-level management structures, as well as for other agricultural production scenarios.

Author Contributions

Conceptualization, Y.C. and R.L.; methodology, Y.C. and R.L.; software, R.L.; validation, Y.L. and H.P.; formal analysis, Y.C. and G.H.; investigation, R.L.; resources, Y.C. and Y.L.; data curation, Y.L.; writing—original draft preparation, Y.C. and R.L.; writing—review and editing, Y.C., Y.L., H.P., and G.H.; visualization, R.L.; supervision, Y.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable, as this study analyzed existing production management records and did not involve live animal experiments or experimental interventions.

Informed Consent Statement

Not applicable.

Data Availability Statement

Restrictions apply to the availability of these data. Data were obtained from Wens Foodstuff Group Co., Ltd. and are available from the corresponding author with the permission of Wens Foodstuff Group Co., Ltd.

Acknowledgments

The authors would like to thank Wens Foodstuff Group Co., Ltd. for providing the production data used in this study.

Conflicts of Interest

Yan Chen is affiliated with South China Agricultural University and also holds a position at Wens Foodstuff Group Co., Ltd. Yanbin Liang is an employee of Wens Foodstuff Group Co., Ltd. The remaining authors declare no conflicts of interest.

References

  1. He, Y.; Tiezzi, F.; Howard, J.; Maltecca, C. Predicting body weight in growing pigs from feeding behavior data using machine learning algorithms. Comput. Electron. Agric. 2021, 184, 106085. [Google Scholar] [CrossRef] [Scilit]
  2. Jang, J.W.; Lee, J.H.; Nam, G.P.; Lee, S.H. System Design of Optimal Pig Shipment Schedule through Prediction Model. Agriculture 2023, 13, 1520. [Google Scholar] [CrossRef] [Scilit]
  3. Lee, J.; Jin, L.; Park, D.; Chung, Y. Automatic recognition of aggressive behavior in pigs using a kinect depth sensor. Sensors 2016, 16, 631. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  4. Wang, Z.; Shadpour, S.; Chan, E.; Rotondo, V.; Wood, K.M.; Tulpan, D. ASAS-NANP SYMPOSIUM: Applications of machine learning for livestock body weight prediction from digital images. J. Anim. Sci. 2021, 99, skab022. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  5. Wang, Z.; Li, Q.; Yu, Q.; Qian, W.; Gao, R.; Wang, R.; Wu, T.; Li, X. A review of visual estimation research on live pig weight. Sensors 2024, 24, 7093. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Chen, Y.; Li, Z.; Yin, L.; Kuang, Y. A Novel Approach of Pig Weight Estimation Using High-Precision Segmentation and 2D Image Feature Extraction. Animals 2025, 15, 2975. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  7. Kwon, K.; Mun, D. Iterative offset-based method for reconstructing a mesh model from the point cloud of a pig. Comput. Electron. Agric. 2022, 198, 106996. [Google Scholar] [CrossRef] [Scilit]
  8. Tu, G.J.; Jørgensen, E. Vision analysis and prediction for estimation of pig weight in slaughter pens. Expert Syst. Appl. 2023, 220, 119684. [Google Scholar] [CrossRef] [Scilit]
  9. Xie, C.; Cang, Y.; Lou, X.; Xiao, H.; Xu, X.; Li, X.; Zhou, W. A novel approach based on a modified mask R-CNN for the weight prediction of live pigs. Artif. Intell. Agric. 2024, 12, 19–28. [Google Scholar] [CrossRef] [Scilit]
  10. Wan, S.; Fang, H.; Wang, X. Monocular Visual Pig Weight Estimation Method Based on the EfficientVit-C Model. Agriculture 2024, 14, 1571. [Google Scholar] [CrossRef] [Scilit]
  11. Ma, Z.; Xiong, T.; Wu, L.; Xia, W. Combining Machine Learning and Econometric Forecasts for Hog Markets: A Decision Framework for Price Prediction and Production Planning. Agribusiness 2026. [Google Scholar] [CrossRef] [Scilit]
  12. GB/T 40945-2021; Code of Practice for Quality Grading of Livestock and Poultry Meat. China Standard Press: Beijing, China, 2021.
  13. Wu, F.; Vierck, K.R.; DeRouchey, J.M.; O’Quinn, T.G.; Tokach, M.D.; Goodband, R.D.; Dritz, S.S.; Woodworth, J.C. A review of heavy weight market pigs: Status of knowledge and future needs assessment. Transl. Anim. Sci. 2017, 1, 1–15. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  14. Kim, Y.S.; Kim, S.W.; Weaver, M.A.; Lee, C.Y. Increasing the pig market weight: World trends, expected consequences and practical considerations. Asian Australas. J. Anim. 2005, 18, 590–600. [Google Scholar] [CrossRef] [Scilit]
  15. Benjamin, M.; Yik, S. Precision livestock farming in swine welfare: A review for swine practitioners. Animals 2019, 9, 133. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  16. Hasan, M.K.; Mun, H.S.; Ampode, K.M.B.; Lagua, E.B.; Park, H.R.; Kim, Y.H.; Sharifuzzaman, M.; Yang, C.J. Transformation toward precision large-scale operations for sustainable farming: A review based on China’s pig industry. J. Adv. Vet. Anim. Res. 2024, 11, 1076–1092. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  17. Wang, L.; Li, D. Current status, challenges and prospects for pig production in Asia. Anim. Biosci. 2024, 37, 742–754. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  18. Losacco, C.; Pugliese, G.; Forte, L.; Tufarelli, V.; Maggiolino, A.; De Palo, P. Digital transition as a driver for sustainable tailor-made farm management: An up-to-date overview on precision livestock farming. Agriculture 2025, 15, 1383. [Google Scholar] [CrossRef] [Scilit]
  19. Karlsson, E.; Yngvesson, J.; Jeppsson, K.H.; Westin, R. Housing systems with automatic sorting for finishing pigs in large groups—A field study. Front. Anim. Sci. 2026, 7, 1773476. [Google Scholar] [CrossRef] [Scilit]
  20. Ulguim, R.R.; Pereira, M.A.; Tavares, J.; Linhares, D.C.L.; Mellagi, A.P.G.; Bortolozzo, F.P.; Tecchio, C.A.; Nagae, R.Y.; Cavazini, N.C.; de Lara, A.C.; et al. Application of unsupervised learning to cluster swine breeding herds based on key performance indicators in Southern Brazil. Transl. Anim. Sci. 2026, 10, txag036. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  21. Will, K.J.; Magalhaes, E.S.; Moura, C.A.; Trevisan, G.; Silva, G.S.; Mellagi, A.P.G.; Ulguim, R.R.; Bortolozzo, F.P.; Linhares, D.C. Risk factors associated with piglet pre-weaning mortality in a Midwestern U.S. swine production system from 2020 to 2022. Prev. Vet. Med. 2024, 232, 106316. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  22. Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar] [CrossRef] [Scilit]
  23. Prokhorenkova, L.; Gusev, G.; Vorobev, A.; Dorogush, A.V.; Gulin, A. CatBoost: Unbiased boosting with categorical features. In Proceedings of the Advances in Neural Information Processing Systems, Montreal, QC, Canada, 3–8 December 2018; pp. 6639–6649. [Google Scholar]
  24. Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.Y. Lightgbm: A highly efficient gradient boosting decision tree. In Proceedings of the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; pp. 3146–3154. [Google Scholar]
  25. Hollmann, N.; Müller, S.; Purucker, L.; Krishnakumar, A.; Körfer, M.; Hoo, S.B.; Schirrmeister, R.T.; Hutter, F. Accurate predictions on small data with a tabular foundation model. Nature 2025, 637, 319–326. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  26. Somvanshi, S.; Das, S.; Javed, S.; Antariksa, G.; Hossain, A. A Survey on Tabular Data: From Tree-based Methods to Tabular Deep Learning. ACM Comput. Surv. 2026. [Google Scholar] [CrossRef] [Scilit]
  27. Grinsztajn, L.; Oyallon, E.; Varoquaux, G. Why do tree-based models still outperform deep learning on typical tabular data? In Proceedings of the Advances in Neural Information Processing Systems, New Orleans, LA, USA, 28 November–9 December 2022; pp. 507–520. [Google Scholar]
  28. Micci-Barreca, D. A preprocessing scheme for high-cardinality categorical attributes in classification and prediction problems. SIGKDD Explor. Newsl. 2001, 3, 27–32. [Google Scholar] [CrossRef] [Scilit]
  29. Otter, D.W.; Medina, J.R.; Kalita, J.K. A survey of the usages of deep learning for natural language processing. IEEE Trans. Neural Netw. Learn. Syst. 2021, 32, 604–624. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  30. Voulodimos, A.; Doulamis, N.; Doulamis, A.; Protopapadakis, E. Deep learning for computer vision: A brief review. Comput. Intell. Neurosci. 2018, 2018, 7068349. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  31. Khaksar Ghalati, M.; Hao, Z.D.; Zhang, J.; Dong, H. Deep Transformers for Analyzing BOF Steelmaking Data. Metall. Mater. Trans. B 2025, 56, 4201–4217. [Google Scholar] [CrossRef] [Scilit]
  32. Borisov, V.; Leemann, T.; Seßler, K.; Haug, J.; Pawelczyk, M.; Kasneci, G. Deep neural networks and tabular data: A survey. IEEE Trans. Neural Netw. Learn. Syst. 2024, 35, 7499–7519. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  33. Sumon, M.S.I.; Islam, M.S.B.; Rahman, M.S.; Hossain, M.S.A.; Khandakar, A.; Hasan, A.; Murugappan, M.; Chowdhury, M.E.H. CardioTabNet: A novel hybrid transformer model for heart disease prediction using tabular medical data. Health Inf. Sci. Syst. 2025, 13, 44. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  34. Barkov, V.; Schmidinger, J.; Gebbers, R.; Atzmueller, M. Modern Neural Networks for Small Tabular Datasets: The New Default for Field-Scale Digital Soil Mapping? Eur. J. Soil Sci. 2026, 77, e70299. [Google Scholar] [CrossRef] [Scilit]
  35. Zhu, X.; Su, P.; Yu, J.; Pei, J.; Teng, Z.; Li, Y.; Liu, Y. A prediction model for hazard levels of shallow natural gas in tunnel based on K-means clustering and tabular prior-data fitted network. Results Eng. 2025, 27, 106873. [Google Scholar] [CrossRef] [Scilit]
  36. McElfresh, D.; Khandagale, S.; Valverde, J.; Prasad, V.C.; Ramakrishnan, G.; Goldblum, M.; White, C. When do neural nets outperform boosted trees on tabular data? In Proceedings of the 37th International Conference on Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023; pp. 76336–76369. [Google Scholar]
  37. Song, W.; Shi, C.; Xiao, Z.; Duan, Z.; Xu, Y.; Zhang, M.; Tang, J. AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networks. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, Beijing, China, 3–7 November 2019; pp. 1161–1170. [Google Scholar] [CrossRef] [Scilit]
  38. Somepalli, G.; Goldblum, M.; Schwarzschild, A.; Bruss, C.B.; Goldstein, T. Saint: Improved neural networks for tabular data via row attention and contrastive pre-training. arXiv 2021, arXiv:2106.01342. [Google Scholar]
  39. Gorishniy, Y.; Rubachev, I.; Khrulkov, V.; Babenko, A. Revisiting deep learning models for tabular data. In Proceedings of the 35th International Conference on Neural Information Processing Systems (NeurIPS 2021), Online, 6–14 December 2021; pp. 18932–18943. [Google Scholar]
  40. Chen, J.; Yan, J.; Chen, Q.; Chen, D.Z.; Wu, J.; Sun, J. Can a Deep Learning Model be a Sure Bet for Tabular Prediction? In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Barcelona, Spain, 25–29 August 2024; pp. 288–296. [Google Scholar] [CrossRef] [Scilit]
  41. Cheng, Y.; Hu, R.; Ying, H.; Shi, X.; Wu, J.; Lin, W. Arithmetic feature interaction is necessary for deep tabular learning. In Proceedings of the 38th AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 26–27 February 2024; pp. 11516–11524. [Google Scholar] [CrossRef] [Scilit]
  42. Li, X.; Li, Y.; Liu, J.; Jin, X.; Hu, X. Multi-branch of Attention Yields Accurate Results for Tabular Data. arXiv 2025, arXiv:2502.12507. [Google Scholar]
  43. Ahmed, M.; Seraj, R.; Islam, S.M.S. The K-Means Algorithm: A Comprehensive Survey and Performance Evaluation. Electronics 2020, 9, 1295. [Google Scholar] [CrossRef] [Scilit]
  44. Bruininx, E.M.A.M.; van der Peet-Schwering, C.M.C.; Schrama, J.W.; Vereijken, P.F.G.; Vesseur, P.C.; Everts, H.; den Hartog, L.A.; Beynen, A.C. Individually measured feed intake characteristics and growth performance of group-housed weanling pigs: Effects of sex, initial body weight, and body weight distribution within groups. J. Anim. Sci. 2001, 79, 301–308. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  45. Tang, A. Optimization of Interest Linkage Mechanism between Agricultural Leading Enterprises and Breeding Farmers: A Case Study of Wen’s Group. Rural Econ. Sci.-Technol. 2025, 36, 118–121. (In Chinese) [Google Scholar]
  46. Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
  47. Svirsky, J.; Lindenbaum, O. Interpretable deep clustering for tabular data. In Proceedings of the 41st International Conference on Machine Learning, Vienna, Austria, 21–27 July 2024; pp. 47314–47330. [Google Scholar]
  48. Feng, G.; Feng, Y.; Chang, H. Comprehensive Measures to Reduce Mortality of Weaned Piglets. Jilin Anim. Husb. Vet. Med. 2025, 46, 52–54. (In Chinese) [Google Scholar]
  49. Guan, C.; Ling, B.; Kong, Y.; Zhang, G. Dynamic Monitoring System of Different Dimensions for Nursery-Finishing Integrated Pig Herd Feeding and Its Guiding Significance for Production. Swine Prod. 2019, 81–84. (In Chinese) [Google Scholar] [CrossRef]
  50. Zhang, S.; Wong, H.S.; Shen, Y. Generalized adjusted rand indices for cluster ensembles. Pattern Recogn. 2012, 45, 2214–2226. [Google Scholar] [CrossRef] [Scilit]
  51. Renaudeau, D.; Gourdine, J.L.; St-Pierre, N.R. A meta-analysis of the effects of high ambient temperature on growth performance of growing-finishing pigs. J. Anim. Sci. 2011, 89, 2220–2230. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  52. Wu, T.; Cao, L.; Wang, S.; Wang, J.; Zhu, S.; Wu, Y.; Feng, Y. City-level foreign direct investment prediction with tabular learning on judicial data. In Proceedings of the 34th International Joint Conference on Artificial Intelligence, Montreal, QC, Canada, 29–31 August 2025; pp. 9936–9944. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  53. Arik, S.Ö.; Pfister, T. TabNet: Attentive interpretable tabular learning. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 2–9 February 2021; Volume 35, pp. 6679–6687. [Google Scholar] [CrossRef] [Scilit]
  54. Yan, J.; Zheng, B.; Xu, H.; Zhu, Y.; Chen, D.Z.; Sun, J.; Wu, J.; Chen, J. Making pre-trained language models great on tabular prediction. In Proceedings of the 12th International Conference on Learning Representations (ICLR 2024), Vienna, Austria, 7–11 May 2024. [Google Scholar]
  55. Akiba, T.; Sano, S.; Yanase, T.; Ohta, T.; Koyama, M. Optuna: A Next-generation Hyperparameter Optimization Framework. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 2623–2631. [Google Scholar] [CrossRef] [Scilit]
  56. Zhang, S.; Peng, J.; Huang, Q.; Li, Z.; Yin, L. Pig body weight prediction based on weight waveform graph. Comput. Electron. Agric. 2025, 236, 110412. [Google Scholar] [CrossRef] [Scilit]
  57. Qin, Y.; He, C.; Huang, T. Refined Feeding and Management Techniques for Early-Weaned Piglets in Large-Scale Pig Farms. Anim. Breed. Feed. 2026, 25, 71–74. (In Chinese) [Google Scholar] [CrossRef]
  58. Fu, Q.; Bai, B.; Zhou, S.; Zhao, Y.; Yang, Y.; Zhang, X.; Liu, X.; Wu, M.; Zhao, W.; Bao, J.; et al. A new therapy to alleviate the inflammatory injury of piglet intestine caused by short-distance transportation—Music. PLoS ONE 2025, 20, e0313354. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  59. Chang, J. Key technical points for feeding and management of weaned piglets. Swine Ind. Sci. 2026, 43, 106–107. (In Chinese) [Google Scholar]
Figure 2. Descriptive analysis of the data. (a) Pearson correlation coefficients of numerical features. (b) Distribution of average market weight.
Figure 2. Descriptive analysis of the data. (a) Pearson correlation coefficients of numerical features. (b) Distribution of average market weight.
Animals 16 02092 g002
Figure 3. The framework of RC-AMFormer. The method includes data cleaning, regional clustering, and feature engineering. This is followed by the row–column fusion architecture, the arithmetic attention network from the original AMFormer, and the regression output layer. The model takes 6 categorical features and 9 numerical features as input and outputs the estimated value.
Figure 3. The framework of RC-AMFormer. The method includes data cleaning, regional clustering, and feature engineering. This is followed by the row–column fusion architecture, the arithmetic attention network from the original AMFormer, and the regression output layer. The model takes 6 categorical features and 9 numerical features as input and outputs the estimated value.
Animals 16 02092 g003
Figure 4. Effect sizes of geographical and hierarchical features.
Figure 4. Effect sizes of geographical and hierarchical features.
Animals 16 02092 g004
Figure 5. PCA visualization of K-means clustering results. (a) Central China. (b) East China. (c) South China. (d) North China. (e) Southwest.
Figure 5. PCA visualization of K-means clustering results. (a) Central China. (b) East China. (c) South China. (d) North China. (e) Southwest.
Animals 16 02092 g005
Figure 6. Arithmetic attention mechanism.
Figure 6. Arithmetic attention mechanism.
Animals 16 02092 g006
Figure 7. SHAP-based feature importance analysis. (a) Feature importance heatmap of AMFormer and XGBoost. The numbers in the cells indicate the raw feature importance values, and darker colors indicate higher relative importance. (b) SHAP summary of AMFormer-Enhanced.
Figure 7. SHAP-based feature importance analysis. (a) Feature importance heatmap of AMFormer and XGBoost. The numbers in the cells indicate the raw feature importance values, and darker colors indicate higher relative importance. (b) SHAP summary of AMFormer-Enhanced.
Animals 16 02092 g007
Figure 8. SHAP dependence of selected features. (a,b) show the interactions between placement_month_sin and placement_month_cos. (c) shows the interaction between cluster label and feed consumption.
Figure 8. SHAP dependence of selected features. (a,b) show the interactions between placement_month_sin and placement_month_cos. (c) shows the interaction between cluster label and feed consumption.
Animals 16 02092 g008
Figure 9. Comparison of farming cluster centers based on four original features. (ad) show the farming clusters in different regions in terms of feed consumption, medication cost, 2w mortality rate, and feeding days, respectively.
Figure 9. Comparison of farming cluster centers based on four original features. (ad) show the farming clusters in different regions in terms of feed consumption, medication cost, 2w mortality rate, and feeding days, respectively.
Animals 16 02092 g009
Figure 10. Comparison of standardized cluster centers in the five geographical regions. (ae) show the results for Central China, East China, South China, North China, and Southwest, respectively.
Figure 10. Comparison of standardized cluster centers in the five geographical regions. (ae) show the results for Central China, East China, South China, North China, and Southwest, respectively.
Animals 16 02092 g010
Figure 11. Target average market weight distribution in region–cluster groups.
Figure 11. Target average market weight distribution in region–cluster groups.
Animals 16 02092 g011
Table 1. Indicator descriptions of the pig production data.
Table 1. Indicator descriptions of the pig production data.
FeatureTypeStatisticsDescription
RegionCategorical5 categoriesThe macro-geographical region to which the farm and pig batch belong, including South China, North China, East China, Central China, and Southwest.
L2 UnitCategorical6 categoriesA level-2 business management unit under the group headquarters, responsible for coordinating specialized production and operations across business sectors.
L3 CompanyCategorical19 categoriesA level-3 regional management company under the level-2 unit, responsible for overall operations in a specific region.
L4 CompanyCategorical96 categoriesA level-4 production management company under the level-3 company, directly connected with contract farms.
L5 UnitCategorical215 categoriesA level-5 grassroots management unit close to front-line farmers, responsible for production services, process tracking, and information recording for pig batches.
Placement MonthCategorical12 monthsThe month when piglets in a production batch are placed into the farm.
Placement CountNumerical1260.8 ± 766.4The initial number of piglets at placement.
Placement WeightNumerical6.74 ± 0.70 kgThe average initial body weight of piglets at placement.
2W MortalityNumerical0.73 ± 1.09%The proportion of pigs that die or are culled within two weeks after placement, calculated based on the initial placement count.
5W MortalityNumerical2.78 ± 2.64%The proportion of pigs that die or are culled within five weeks after placement, calculated based on the initial placement count.
Feeding DaysNumerical170.8 ± 6.9The cumulative number of days from piglet placement to marketing, used to characterize the growth stage and farming progress of the batch.
Medication CostNumerical38.83 ± 12.45 CNY/headThe medication cost per pig accumulated before marketing, calculated based on the initial placement count.
Feed ConsumptionNumerical289.31 ± 22.01 kg/headAn average feed input per pig, calculated from batch-level feed supply records and normalized by the initial placement count.
Market WeightTarget125.51 ± 5.91 kgThe average body weight of pigs in a production batch at marketing.
Table 2. Detailed cleaning rules.
Table 2. Detailed cleaning rules.
Rule CategorySpecific RulesRemoved Records
Basic validity constraintsFeeding Days < 0 or Placement Count < 00
Ratio constraints2W Mortality ∉ [0, 1] or 5W Mortality ∉ [0, 1]128
Business logic constraintsMarket Weight ≤ Placement Weight or 5W Mortality < 2W Mortality537
Extreme-value thresholds5W Mortality > 0.5, Feeding Days < 50 or >280, Feed Consumption < 75 or >500 kg/head, Placement Weight ∉ [3, 12.5] kg, Market Weight ∉ [50, 175] kg142
Some records violate multiple rules, so the category totals exceed the number of unique records removed.
Table 3. Regional clustering stability results.
Table 3. Regional clustering stability results.
RegionKMean ARISD
Central China30.97870.0133
East China30.98880.0069
South China30.99580.0038
North China40.97910.0112
Southwest30.96680.0200
Table 4. Performance comparison of different models for pig market weight estimation.
Table 4. Performance comparison of different models for pig market weight estimation.
ModelMSEMAE R 2
XGBoost12.26082.67360.6560
CatBoost12.49872.68940.6493
Random Forest12.87982.73990.6386
TabNet13.95022.83570.6086
ResNet-like12.46022.71390.6503
AutoInt12.86312.74780.6390
SAINT12.85952.74500.6392
FT-Transformer12.08462.66350.6609
ExcelFormer13.03032.75540.6344
AMFormer12.04012.66790.6622
Ours11.76672.63530.6698
Bold values indicate the best performance in each column.
Table 5. Ablation study results.
Table 5. Ablation study results.
BackboneRCCyclicFusionMSEMAE R 2
AMFormer---12.04012.66790.6622
--11.89632.64640.6662
--11.80512.64020.6688
--12.07112.65170.6613
-11.77852.63870.6695
11.76672.63530.6698
√ indicates that the corresponding setting is included, while “-” indicates that it is not included.
Table 6. Comparison of clustering features.
Table 6. Comparison of clustering features.
Clustering FeatureMSEMAE R 2
2w mortality11.89632.64640.6662
5w mortality12.06912.66240.6613
Table 7. Performance of AMFormer and RC-AMFormer over 10 random seeds.
Table 7. Performance of AMFormer and RC-AMFormer over 10 random seeds.
Seed 1AMFormerRC-AMFormer
MSEMAE R 2 MSE MAE R 2
3012.01002.65700.663011.73382.62700.6708
11112.20862.67480.657411.95112.64610.6647
25312.05422.66660.661811.83972.63790.6678
36712.06282.66850.661511.84822.63450.6676
51811.93202.65970.665211.65342.62920.6730
61312.13962.66730.659411.83922.63610.6678
67812.20272.67560.657611.79722.63140.6690
71411.99382.66240.663511.80212.63810.6689
80912.06592.67640.661511.91512.64560.6657
95512.01702.65770.662811.75472.62950.6702
1 The 10 random seeds are randomly sampled from the range 1 to 1000.
Table 8. Repeated-run results and significance tests.
Table 8. Repeated-run results and significance tests.
MetricAMFormerRC-AMFormert-Test (p)Wilcoxon (p)
MSE12.0687 ± 0.090211.8134 ± 0.0867 1.0628 × 10 6 1.9531 × 10 3
MAE2.6666 ± 0.00732.6355 ± 0.0066 1.6281 × 10 8 1.9531 × 10 3
R 2 0.6614 ± 0.00250.6685 ± 0.0024 1.0599 × 10 6 1.9531 × 10 3
Table 9. Performance comparison under the region-stratified split.
Table 9. Performance comparison under the region-stratified split.
ModelMSEMAE R 2
XGBoost12.40202.68360.6557
CatBoost12.58552.69820.6506
Random Forest12.89622.74410.6420
TabNet13.96742.85580.6122
ResNet-like12.59292.69890.6504
AutoInt13.11362.76290.6359
SAINT13.12392.76710.6357
FT-Transformer12.35752.67650.6569
ExcelFormer13.53602.78680.6242
AMFormer12.43802.69550.6547
Ours12.20652.66240.6611
Bold values indicate the best performance in each column.
Table 10. Performance of some tree-based models with cluster labels.
Table 10. Performance of some tree-based models with cluster labels.
ModelMSEMAE R 2
RC-XGBoost12.08212.65960.6610
RC-CatBoost12.34572.68410.6536
RC-RF12.93092.74430.6372
Table 11. Effect sizes of regional and organizational hierarchy features.
Table 11. Effect sizes of regional and organizational hierarchy features.
Feature η 2 Δ η 2 vs. PreviousRelative to Region
Region0.0321.00×
L2 Unit0.066+0.0342.06×
L3 Company0.095+0.0292.97×
L4 Company0.134+0.0394.19×
L5 Unit0.145+0.0114.53×
Table 12. Ablation study of organizational hierarchy features.
Table 12. Ablation study of organizational hierarchy features.
ModelMSEMAE R 2
AMFormer12.04012.66790.6622
w/o L512.40972.68070.6518
w/o L5, L413.10292.75790.6324
w/o L5, L4, L313.15612.75560.6309
w/o L5, L4, L3, L213.42662.79420.6233
AMFormer denotes the full model, and subsequent rows denote the progressive removal of hierarchy features from l5 unit down to l2 unit.
Table 13. Batch counts for clusters in each region.
Table 13. Batch counts for clusters in each region.
RegionClusterNumber of Batches (n, %)
Central ChinaCentral_China_11753 (4.9%)
Central_China_2608 (1.7%)
Central_China_34054 (11.4%)
East ChinaEast_China_12515 (7.1%)
East_China_2385 (1.1%)
East_China_31255 (3.5%)
East_China_41298 (3.7%)
South ChinaSouth_China_1793 (2.2%)
South_China_26227 (17.5%)
South_China_33848 (10.8%)
North ChinaNorth_China_12228 (6.3%)
North_China_23969 (11.2%)
SouthwestSouthwest_11902 (5.4%)
Southwest_23818 (10.8%)
Southwest_3837 (2.4%)
Table 14. Dominant farming modes and representative clusters.
Table 14. Dominant farming modes and representative clusters.
Farming ModeRepresentative Clusters
Long-cycle weight-gain typeCentral_China_1, East_China_4, South_China_3, Southwest_1
Robust and balanced typeCentral_China_3, East_China_1, South_China_2, North_China_2, Southwest_2
High-risk typeCentral_China_2, East_China_2, South_China_1, Southwest_3
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chen, Y.; Liu, R.; Liang, Y.; Peng, H.; Huang, G. Batch-Level Average Market Weight Estimation and Interpretability Analysis for Pigs with Regional K-Means Clustering and AMFormer. Animals 2026, 16, 2092. https://doi.org/10.3390/ani16132092

AMA Style

Chen Y, Liu R, Liang Y, Peng H, Huang G. Batch-Level Average Market Weight Estimation and Interpretability Analysis for Pigs with Regional K-Means Clustering and AMFormer. Animals. 2026; 16(13):2092. https://doi.org/10.3390/ani16132092

Chicago/Turabian Style

Chen, Yan, Ruiwen Liu, Yanbin Liang, Hongxing Peng, and Guangmin Huang. 2026. "Batch-Level Average Market Weight Estimation and Interpretability Analysis for Pigs with Regional K-Means Clustering and AMFormer" Animals 16, no. 13: 2092. https://doi.org/10.3390/ani16132092

APA Style

Chen, Y., Liu, R., Liang, Y., Peng, H., & Huang, G. (2026). Batch-Level Average Market Weight Estimation and Interpretability Analysis for Pigs with Regional K-Means Clustering and AMFormer. Animals, 16(13), 2092. https://doi.org/10.3390/ani16132092

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop