Predicting dairy profitability using deep learning models

Authors: Vahid Naghashi

Date: 2025-01-01

Status: Published


In precision livestock management, effective decision-making around animal replacement depends on ac-
curately estimating the lifetime profitability of each animal. In dairy farming, milk production is influenced
by various factors including milk quality, health conditions, genetics, and herd management practices, all of which may be affected by broader operational and market dynamics. This thesis formulates the estimation of milk production income as a multivariate time series forecasting problem, where future profitability, typically measured during later lactation periods (e.g. lactation 2 or 3) is predicted using data collected during early lactation period(s) (e.g., lactation 1). The available data includes a range of temporally ordered dairy-related features collected over several months after the cow’s birth. This spatio-temporal dataset can be treated as a multivariate time series, where each variable (or channel) represents a distinct dairy factor evolving over time. Addressing this forecasting task requires models that can simultaneously capture temporal dependencies and inter-feature (cross-channel) correlations.
This thesis investigates deep learning architectures for time series forecasting, with a specific emphasis
on their application to dairy income prediction. After reviewing and exploring major existing approaches,
including autoregressive models, recurrent neural networks (RNNs), linear models, and Transformer-based models, we introduce several novel architectures tailored to multivariate forecasting. First, we propose an LSTM-derived architecture enhanced with an attention layer to model sequential and contextual patterns in the context of dairy prediction. Second, we introduce two Transformer-based models: one focusing on multi-scale temporal and cross-channel modeling, with another emphasizing cross-channel interactions and integrating them with captured temporal patterns. Finally, we present a recurrent model that applies GRUs bidirectionally along the channel dimension to capture complex inter-feature dependencies, particularly in dairy forecasting scenarios.
All proposed models are extensively evaluated on both publicly available benchmark datasets and real-
world dairy farm data. Results underscore that our methods consistently outperform or remain competitive with current state-of-the-art models in terms of forecasting accuracy and computational efficiency.
Beyond methodological contributions, this work supports improved resource allocation and decision-making in the dairy industry, providing a data-driven foundation for more accurate profitability forecasting and cost-effective herd management.