Abstract:The food supply chain faces significant challenges such as information silos and data fragmentation during quality traceability and risk warning processes, leading to resource waste and decision-making biases. There is an urgent need to establish a multi-agent collaborative information ecosystem. Aiming to address the issues of data privacy and heterogeneity among multiple agents in the food supply chain, a cross-subject Federated collaborative optimization computing method was proposed based on Federated learning. This method integrated Federated learning algorithms with deep learning frameworks to achieve collaborative optimization across multiple stages of the supply chain. Considering the heterogeneous data characteristics at different stages, the horizontal federated learning models for the same-stage different-subjects and vertical Federated learning models for different-stage different-subjects were constructed. Based on the logistic regression algorithm, the model parameters were rapidly adjusted. Experimental results indicated that the Federated learning collaborative computing optimization algorithm shortened the iteration cycle by 18%, reduced the loss function by 23%, and improved the accuracy of cross-scale data by 7.2 percentage points. The optimized collaborative computing evaluation achieved an F1 score of 95.3%, providing technical support for precise demand forecasting, real-time risk warning, and multi-agent collaborative decision-making in the food supply chain.