  Statistical inference is central to many scientific endeavors, yet how it
works remains unresolved. Answering this requires a quantitative understanding
of the intrinsic interplay between statistical models, inference methods and
data structure. To this end, we characterize the efficacy of direct coupling
analysis (DCA)--a highly successful method for analyzing amino acid sequence
data--in inferring pairwise interactions from samples of ferromagnetic Ising
models on random graphs. Our approach allows for physically motivated
exploration of qualitatively distinct data regimes separated by phase
transitions. We show that inference quality depends strongly on the nature of
generative models: optimal accuracy occurs at an intermediate temperature where
the detrimental effects from macroscopic order and thermal noise are minimal.
Importantly our results indicate that DCA does not always outperform its
local-statistics-based predecessors; while DCA excels at low temperatures, it
becomes inferior to simple correlation thresholding at virtually all
temperatures when data are limited. Our findings offer new insights into the
regime in which DCA operates so successfully and more broadly how inference
interacts with data structure.
