  We propose a general framework to extract microscopic interactions from raw
configurations with deep neural networks. The approach replaces the modeling
Hamiltonian by the neural networks, in which the interaction is encoded. It can
be trained with data collected from Ab initio computations or experiments. The
well-trained neural networks give an accurate estimation of the possibility
distribution of the configurations at fixed external parameters. It can be
spontaneously extrapolated to detect the phase structures since classical
statistical mechanics as prior knowledge here. We apply the approach to a 2D
spin system, training at a fixed temperature, and reproducing the phase
structure. Scaling the configuration on lattice exhibits the interaction
changes with the degree of freedom, which can be naturally applied to the
experimental measurements. Our approach bridges the gap between the real
configurations and the microscopic dynamics with an autoregressive neural
network.
