where the first four terms on the right hand side of the equation are explained in the main text. The last term, E Corr , accounts for correction terms arising from finite-size effects. The chemical potential, µ i = µ • i + ∆µ i , can be expressed as a deviation from the reference elemental chemical potential. We set ∆µ Mg = 1 2 ∆H Mg 2 Si and ∆µ Si = 0 for the Si-rich defect formation energy diagram, where ∆H Mg 2 Si is the formation enthalpy of Mg 2 Si.