This preprint tests whether readily available species traits can predict trophic links in freshwater fish food webs. The primary trait of interest is body size, which is widely viewed as a principal determinant of trophic interactions in freshwater systems. The author evaluates whether trait-based models trained on existing networks can predict links in networks they have not seen, using an out‑of‑sample approach.
The analysis used 37 freshwater fish food webs. Four predictive models were evaluated under a leave-one-study-out cross-validation (LOSO-CV) framework: each held-out network was predicted using only species traits and no observed interactions from that network. Trait sources included locally measured body mass (per-network measurements) and global trait compilations from FishBase (species-level data such as maximum body size and depth-stratum categories). The study also tested a habitat overlap score derived from FishBase depth-stratum categories and compared machine-learning approaches including a random forest and a graph attention network. Results are reported using ROC-AUC metrics.
Models that used locally measured body mass ratios between predator and prey achieved the highest accuracy for predicting fish-associated trophic links, with a reported median ROC-AUC of 0.973 across held-out networks. This indicates strong discriminatory performance when locally measured body mass data are available and used to compute predator–prey size ratios.
Models that relied on FishBase-derived traits also recovered fish-associated links with good performance (reported ROC-AUC 0.887 in the source). On the same set of networks, a comparative number reported was 0.912. However, when prediction was assessed across entire networks (including non-fish taxa and links among them), overall performance fell substantially, with a whole-network ROC-AUC of 0.607. The reduction in whole-network performance is attributed to FishBase’s incomplete coverage of non-fish taxa, leaving many non-fish node pairs without trait descriptors and limiting prediction accuracy for those interactions.
A habitat overlap score constructed from FishBase depth-stratum categories did not add predictive signal beyond the other trait predictors in this study. In the comparison of machine-learning methods, a graph attention network did not outperform a random forest model; the random forest remained competitive with or superior to the graph attention network in the reported tests. The source does not report further algorithmic hyperparameters or training details beyond these comparative outcomes.
Predictive performance depended on the relationship between the held-out system and the training corpus. For held-out networks that fall within the trait and geographic range represented in the training data, fish-associated trophic links were recovered from globally available traits alone. However, for three out‑of‑region networks evaluated, prediction performance dropped to near or below chance levels. The source emphasizes that reliable cross-region transfer will require a larger and more geographically varied collection of fish food webs in the training set.
Implications:
Limitations reported in the source:
Data and code: the author provided a public repository link for the project (reported in the source). The source also indicates supplementary material and data/code links, but detailed contents and code execution instructions are not reproduced here and should be consulted from the repository.
Within the geographic and taxonomic range represented in the training data, fish-associated trophic links can be effectively predicted from readily available traits: locally measured body mass ratios yielded the best performance, and FishBase traits performed nearly as well for fish-associated links. However, whole-network inference is limited by incomplete trait coverage for non-fish taxa, and cross-region transfer of models failed for three out-of-region networks in this study. The author concludes that expanding the geographic and taxonomic breadth of food web training data is needed to improve cross-region predictive performance. The manuscript is a preprint and further validation through peer review is pending.