Adaptation of Compositional Data Analysis in Deep Learning to Predict Pasture Biomass Proportions

Badri Narayanan, Mohamed Saadeldin, Paul Albert, Kevin McGuinness, Noel E. O'Connor, Brian Mac NameeAICS 2021

Introduction

In precision dairy farming, accurately determining the botanical composition of pastures—specifically the proportions of grass, clover, and weeds—is critical for optimizing feed quality and managing nitrogen fertilization. However, this task presents a unique statistical challenge: the data is compositional. Because the proportions must sum to 100%, the variables are inherently dependent, existing within a constrained "simplex space." Traditional statistical methods often employ Compositional Data Analysis (CoDa) to transform this data into Euclidean space. This research investigates whether such transformations benefit modern deep learning architectures or if standard neural network components are sufficient.

Experimental Methodology

The study utilized a Convolutional Neural Network (CNN) based on the VGG-16 architecture, comparing two distinct output strategies:

  1. Baseline (Softmax): A standard approach using a 4-neuron output layer with a softmax activation function. Softmax naturally constrains outputs to a simplex, matching the target data's properties.
  2. CoDa Adaptation (ILR): A model trained to predict Isometric Log Ratio (ILR) coefficients. This transformation maps the compositional data from the simplex to real Euclidean space ($\mathbb{R}$), theoretically aligning better with standard regression assumptions. The model used a 3-neuron linear output layer, with results back-transformed for evaluation.

Both models were trained using transfer learning and extensive data augmentation to mitigate the risks associated with a limited dataset.

Dataset Characteristics

The models were evaluated using the Grass Clover Image Dataset, which consists of 261 high-resolution "quadrat" images. Each image is labeled with precise dry biomass weights for grass, white clover, red clover, and weeds.

Sample images from the Grass Clover Image Dataset showing varying proportions of grass, clover, and weeds.

The dataset presents significant challenges, including "weak supervision" where specific sub-compositions were missing and required imputation. The small sample size (209 training, 52 validation images) necessitates robust regularization and augmentation strategies.

Comparative Performance Analysis

Contrary to theoretical expectations, the standard deep learning approach outperformed the CoDa-adapted model across all primary metrics.

Model Overall RMSE Overall MAE
Baseline (Softmax) 7.11 5.51
ILR Transformation 9.78 6.58

The baseline model was particularly effective at predicting white clover (7.44 RMSE vs. 12.64 for ILR) and red clover (7.33 RMSE vs. 11.98 for ILR). The ILR approach appeared to introduce unnecessary complexity that hindered the learning process.

Training and validation loss curves for the predictive model, highlighting the challenges of training on a small, complex dataset.

As shown in the loss curves, while training loss decreases consistently, the validation loss exhibits significant volatility. This instability underscores the difficulty of generalizing from a small dataset of complex botanical textures.

Discussion and Future Directions

The results suggest that deep neural networks possess an intrinsic ability to learn complex, constrained distributions without explicit statistical transformations. The softmax function effectively acts as a built-in projection onto the simplex, making it a natural fit for compositional targets.

Key limitations identified include:

  • Zero Values: The ILR transformation requires "multiplicative replacement" for components with zero mass, which can introduce bias.
  • Rare Species: Both models struggled with red clover and weeds, which often appear in low proportions and are visually similar to other species.

Future work will focus on specialized loss functions and architectures designed to better handle the "long tail" of rare species and improve the detection of visually similar botanical components.

Summary updated

BibTeX
@inproceedings{narayanan2021adaptation,
  author = {Badri Narayanan and Mohamed Saadeldin and Paul Albert and Kevin McGuinness and Noel E. O'Connor and Brian Mac Namee},
  title = {{Adaptation of Compositional Data Analysis in Deep Learning to Predict Pasture Biomass Proportions}},
  booktitle = {AICS},
  year = {2021},
  url = {https://openreview.net/forum?id=KawENRZLtd1},
}
Figure