A Model for the Prediction of Lifetime Profit Estimate of Dairy Cattle (Student Abstract)

Vahid Naghashi, Abdoulaye Baniré DialloAAAI 2022 · DOI

Abstract

Accurate prediction of a cow's lifetime profitability is essential for optimizing dairy farm management, particularly regarding culling decisions. This study proposes a multivariate time-series model utilizing a dual-layer Long Short-Term Memory (LSTM) network integrated with an attention mechanism. By analyzing production and health data from the first 46 months of a cow's life, the model predicts profitability for subsequent months with high precision. Experimental results on a dataset of over 290,000 Holstein cows demonstrate that the proposed model achieves a Root Mean Square Error (RMSE) of $2.36, a substantial improvement over baseline univariate and multivariate models.

Introduction

In the dairy industry, "culling"—the decision to replace an animal in the herd—is a critical economic choice. Farm efficiency depends on identifying cows whose long-term maintenance costs will be offset by milk production revenue. This prediction is challenging due to the complex interplay of genetics, environmental factors, and historical productivity. Traditional forecasting methods often fail to capture the temporal nuances of dairy cycles, such as the transitions between milking and "dry" periods (when a cow is not producing milk).

Methodology

The Proposed Model (PM) treats profit estimation as a multivariate time-series task. It employs a Dual-Layer LSTM to capture long-term temporal dependencies and an Attention Mechanism to weight specific time steps that are most indicative of future profit. A key innovation is the use of specialized learning units designed to handle the distinct patterns of "dry" versus "milking" cows. This allows the model to better navigate the sharp profit fluctuations associated with non-productive periods.

Experimental Setup

The model was evaluated using a substantial real-world dataset of 292,181 Holstein cows spanning 39 months. The input features included milk yield profit and 14 additional management and health factors. The training phase utilized data from ages 18 to 46 months ("early-profit") to predict "late-profit" for ages 47 to 56 months.

Results

The performance of the PM was compared against univariate (ARIMA, N-BEATS) and multivariate (ConvRNN, MuMu-RNN) baselines using Root Mean Square Error (RMSE) in dollars.

Table 1: RMSE results comparing the Proposed Model (PM) against univariate and multivariate baselines.

As shown in Table 1, the PM achieved an RMSE of **$2.36**, outperforming the next best model (N-BEATS at $7.36) by a significant margin. This level of precision—predicting monthly profit within a three-dollar margin—provides actionable data for dairy farmers to make informed culling decisions.

Discussion

The success of the attention mechanism suggests that certain periods in a cow's life, such as peak lactation or specific health events, are much stronger indicators of lifetime value than others. Furthermore, the model's ability to handle the "dry" state—where profit drops significantly due to maintenance costs without revenue—demonstrates its robustness in real-world agricultural scenarios.

Figure 1: Comparison of predicted profit versus true profit over time (months after birth).

As illustrated in Figure 1, the model closely tracks the true profit trends. While some spikes occur due to the model reacting to imputed values for dry periods, the overall trajectory remains highly accurate, capturing the complex transitions between milking cycles.

Conclusion

This research provides a powerful tool for dairy farm optimization. By integrating deep learning with domain-specific knowledge of cattle life cycles, the proposed model offers a reliable estimate of lifetime profitability, facilitating more efficient herd management and economic stability for dairy operations.

Summary updated

BibTeX
@inproceedings{naghashi2022model,
  author = {Vahid Naghashi and Abdoulaye Baniré Diallo},
  title = {{A Model for the Prediction of Lifetime Profit Estimate of Dairy Cattle (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i11.21647},
}
Figure