This talk is concerned with an inpainting method based on mechanism learning, from the perspective of inverse problems. The underlying data mechanism, characterized by linear differential equations, is identified from data on the known area and then exploited to infer the missing area, which gives interpretability. Benefitted from the PDE based model, the filling process is stable, which gives generalizability. Attention is paid to incorporation of historical or prior information as higher order mechanism. Numerical examples show effectiveness, robustness and flexibility of the method and it performs well over mechanism/scientific data. Similar idea can further be applied to scientific data compression.