  We present two new developments for computing excited state energies within
the $GW$ approximation. First, calculations of the Green's function and the
screened Coulomb interaction are decomposed into two parts: one is
deterministic while the other relies on stochastic sampling. Second, this
separation allows constructing a subspace self-energy, which contains dynamic
correlation from only a particular (spatial or energetic) region of interest.
The methodology is exemplified on large-scale simulations of nitrogen-vacancy
states in a periodic hBN monolayer and hBN-graphene heterostructure. We
demonstrate that the deterministic embedding of strongly localized states
significantly reduces statistical errors, and the computational cost decreases
by more than an order of magnitude. The computed subspace self-energy unveils
how interfacial couplings affect electronic correlations and identifies
contributions to excited-state lifetimes. While the embedding is necessary for
the proper treatment of impurity states, the decomposition yields new physical
insight into quantum phenomena in heterogeneous systems.
