Since properties of nanomaterials are determined by their structures, characterizing nanostructure feature variability and diagnosing structure defects are of great importance for quality control in scale-up nanomanufacturing. It is known that nanostructure interactions such as competing for source materials during growth contribute strongly to nanostructure uniformity and defect formation. However, there is a lack of rigorous formulation to describe nanostructure interactions and their effects on nanostructure variability. In this work, we develop a method to relate local nanostructure variability (quality measure) to nanostructure interactions under the framework of Gaussian Markov random field. With the developed modeling and estimation approaches, we are able to extract nanostructure interactions for any local region with or without defects based on its feature measurement. The established connection between nanostructure variability and interactions not only provides a metric for assessing nanostructure quality, but also enables a method to automatically detect defects and identify their patterns based on the underlying interaction patterns. Both simulation and real case studies are conducted to demonstrate the developed methods. The insights obtained from real case study agree with physical understanding.