In this work, we develop a heterogeneous graph representation for nanomaterials with a variable number of spatial domains, each containing multiple components that can interact within the same domain and across interfaces. We demonstrate that physics-informed graph neural networks (GNNs) built atop such representations can accurately predict properties of nanostructures which are far more complex than any contained in the training dataset. As a model system, we center our investigation on lanthanide-doped upconverting nanoparticle (UCNP) heterostructures (Figure ), whose unique nonlinear optical properties have diverse applications in biological and super-resolution imaging, optogenetics, sensing, photonics, scintillators, secure labeling, 3D printing, and photovoltaics. These applications leverage the ability of UCNPs to absorb multiple near-infrared (NIR) photons and convert them into a single photon of higher frequency, e.g., in the visible and ultraviolet spectrum. Such nonlinear processes are the result of complex networks of energy transfer (ET) interactions between different lanthanide ions (e.g., Yb 3+ , Er 3+ , and Nd 3+ , as in Figure ). To promote advantageous ET interactions and inhibit those that quench emission, nearly all practical implementations of UCNPs use doped heterostructures in which a spherical core is surrounded by one to four concentric shells, with each domain having a distinct combination and composition of lanthanide ions (Figure ). Due to the large numbers of tunable structural and compositional parameters, and the complex network of energy transfer interactions between dopants, optimizing the intensity and wavelength for such complex heterostructures is extremely challenging. Thus, multi-shell UCNP heterostructures present a stringent test for any new DL model and representation.