The hetero-GNN is fully differentiable and takes the features that define the UCNP heterostructure (i.e., layer radii and dopant concentrations) as explicit inputs. For optimization, the hetero-GNN acts as a surrogate model for kMC which is not only orders of magnitude faster, but also provides derivatives of a predicted label with respect to structural features (which are inaccessible with kMC), enabling the use of more powerful gradient-based optimizers to identify UCNP structures that minimize or maximize one or multiple properties.