# Understanding Polymers Through Transfer Learning and Explainable AI
## 3 Results and Discussion
### Comparison of Both Approaches
For instance, a comparison of the predicted versus experimental results (presented in Figures S2 and S4) highlights significant differences between the direct model and the TL-based model. As shown, the relative error density in the TL-based model's plots is far more dispersed compared to the direct model. This wider spread indicates a higher degree of variability and suggests that the TL-based model struggles to generalize as effectively across different data points. In contrast, the direct model exhibits a more concentrated error distribution, implying less sensitivity to the selected hyperparameters. To better understand the underlying factors that influence these generalization behaviours, it is important to analyse the contributions of individual input features. We used Shapley value analysis to further test and validate our understanding of the models' inner workings. Figure 8 compares how specific chemical features are weighted by the direct and TL-based models when predicting Tg, with relative deviations shown above each sample. To understand the limitations of the TL-based model, we selected examples with the poorest performances (i.e., those with the largest deviations). As shown, all samples possess short side chains and mainly nonpolar groups. Notably, most of these examples feature a tert-butyl group that is heterogeneously weighted by the TL-based model, while it is weighted more homogeneously by the direct model, which, incidentally, performs better in these cases. A similar trend is observed across the rest of the structure, with the TL-based model displaying more heterogeneous behaviour compared to the direct model (for example, in the methacrylate or carbonyl groups). These results reinforce our hypothesis that models based on molecular glass formers tend to underestimate intra-chain effects while overestimating intermolecular forces, indicating that they do not generalize efficiently to polymer chains. Conversely, analysing examples where the TL-based model exhibits low deviations can also shed light on its strengths and limitations. In the example shown in Figure 9, both models slightly overestimate the Tg, predicting values of 317 K (direct) and 314 K (TL-based), compared to the actual value of 310 K. Analysing their Shapley contributions, we observe that in scenarios involving larger side chains (where the side chain structure significantly influences the polymer's Tg) the TL-based model shows improved performance. Specifically, the linear segment within the side chain (highlighted as A) decreases the predicted glass transition, as expected for a more mobile structure. On the other hand, the stiffer structure containing two phenyl groups (labelled as B) contributes to increasing the predicted Tg. Notably, this contribution to the Tg prediction is positive in both models, though it is twice as large in the direct model (53% of the total contributions, compared to 46% in the TL-based model). These results suggest that the TL-model may have a better \"understanding\" of the underlying physics when the side chain's effect is significant, and therefore the scenario is more similar to the molecular glass former case. Comparable observations can be made for other examples where the TL-based model performs well. Figure 10 illustrates the case of other relatively complex side chains where the TL-based model shows deviations of less than 2%. In the first example (labelled as 1), the phenyl group (A) and the carboxyl-containing segment (B) tend to increase the predicted value, likely due to their stiffness and their influence on dipolar forces among molecules, respectively. In both cases, the contribution is similar, accounting for about 25% of the prediction. In the second example, the linear chain (labelled A) does not significantly increase the predicted Tg, as expected for a relatively mobile linear chain. Most of the increase is attributed to the phenyl groups at the ends (labelled as B).