Zexin Wen, Rong Yang, Ruidong Chen, Yuxuan Chen, Yuyao Jiang, Qingyi Cao, Shuying Li, Haibo Yu, Wenjun Gui
Accurately predicting the acute toxicity of chemicals to Daphnia magna is critical for environmental risk assessment. Yet, current deep learning models often exhibit limited generalization and overconfidence when processing out-of-distribution molecules, risking dangerous false-negative errors due to scarce training data. To tackle this issue, the present study proposes GTFCN (Graph Transformer and Fully Connected Network), a ternary classification model within a two-branch architecture. One branch combines graph convolution with a masked Transformer to capture local atomic environments and higher-order interactions, while the other encodes ten global physicochemical descriptors through a fully connected network. The two representations are adaptively fused via a learnable gate, and a deep ensemble uncertainty framework is incorporated to quantify predictive uncertainty. Using a newly constructed dataset of 1,801 chemical compounds, GTFCN achieved 70.6% accuracy on a test set (181 compounds) and 71.4% accuracy on an external set (28 compounds). Crucially, the uncertainty framework effectively mitigated model overconfidence. With a threshold of H* = 0.633 selected exclusively on the validation set and subsequently fixed for target evaluation. On the external set, the low-uncertainty subset retained by this threshold comprised 19 compounds, of which 16 were correctly classified (84.2% accuracy). This research not only overcomes the "black-box" limitations of traditional QSAR models but also provides a practical tool for early-stage screening and prioritization of chemicals with potential acute toxicity to D. magna.