  Deep learning (DL) models have been widely used in materials property
prediction with great success, especially for properties with large datasets.
However, the out-of-distribution (OOD) performances of such models are
questionable, especially when the training set is not large enough. Here we
showed that using physical encoding rather than the widely used one-hot
encoding can significantly improve the OOD performance by increasing the
models' generalization performance, which is especially true for models trained
with small datasets. Our benchmark results of both composition- and
structure-based deep learning models over six datasets including formation
energy, band gap, refractive index, and elastic properties predictions
demonstrated the importance of physical encoding to OOD generalization for
models trained on small datasets.
