Mechanism verification. For verifying the attribution results from the mechanism, we firstly found the "Ground Truth" mechanism fragments, which represent these specific molecular fragments directly affecting the properties. They can also be considered as structural alerts of many different properties. Our strategy is to search for related databases first. There is an online database called ToxAlerts [23\cite{bib36}], which extracts the structural alerts of some tasks, as one of the supporting data for the verification process. Another approach used to find the "Ground Truth" is by querying mechanisms reported in the literature and analyzing given important fragments. For example, Reddy et al. (2015) [24\cite{bib37}] mentioned that the mechanism of genotoxicity is the attack of electrophilic groups on DNA, so electron-rich structures in the compounds are considered as toxic structural groups. Combined with the contents of the database and mutual verification through the literature of drug toxicological mechanisms, we finally summarized most of the identified "Ground Truth" fragments for all the property tasks to be verified.
We randomly selected several high-confidence positive samples from six classic side-effect tasks, obtained the attribution results, and found that the attribution fragments with our fragment-based method highly overlap with the "Ground Truth" fragments given in the literature. As shown in Fig. 3C, the two molecules have the corresponding actual structural alert fragments [21, 22\cite{bib31,bib32}] (shown in the red highlights of the left column) on the Hepatobiliary side effect task. For the first molecule, the obtained attribution fragments with the top-0, top-1, top-2 confidence (shown in the three red highlights of the first row in the right column) perfectly cover the result in the literature [21\cite{bib31}]. Attribution fragments for the other molecule also match the "Ground Truth" fragment [22\cite{bib32}] with the top-0 and slightly low top-5 fragments. More mechanism verification results are shown in Figure S2-S21 (Supporting Information).
Molecular properties and their specific relevance due to the respective fragments. After obtaining the attribution fragments for each property task, the property relationships (Fig. 4A) were measured with the similarity of the fragment sequences between the task pairs. We verified this finding with the transfer learning [30\cite{bib25}] result, which was extended to all 42 property tasks. On the one hand, the relationship between tasks in the same dataset is closer than the property relationship between datasets (shown by the dividers in Fig. 4A); on the other hand, comparing the transferability results of 42 tasks with the fragment similarity results above, we use the cosine similarity to represent the relationship between the two results. The final similarity is 0.76, which means that it can be primarily believed that the relationship between the property tasks with attribution fragments is pretty effective. Based on the above task relationship measurement, the property relation map was constructed among 42 tasks (Fig. 4B). For example, the androgen receptor plays a crucial role in AR-dependent prostate cancer and other androgen-related diseases, potentially disrupting normal endocrine function and causing endocrine toxicity [31\cite{bib33}]. The above mechanism reveals that the "NR-AR" property task shows a pretty close relationship with the "Endocrine disorders" task, and the relationship was also shown in the proposed relation map (orange ball with number "3" and yellow ball with the number "27"). Therefore, the obtained attribution fragments can reveal the relationship of property tasks and assist in designing property tasks that lack adequate and diversified samples.