  Free boundary problems appear naturally in numerous areas of mathematics,
science and engineering. These problems present a great computational challenge
because they necessitate numerical methods that can yield an accurate
approximation of free boundaries and complex dynamic interfaces. In this work,
we propose a multi-network model based on physics-informed neural networks to
tackle a general class of forward and inverse free boundary problems called
Stefan problems. Specifically, we approximate the unknown solution as well as
any moving boundaries by two deep neural networks. Besides, we formulate a new
type of inverse Stefan problems that aim to reconstruct the solution and free
boundaries directly from sparse and noisy measurements. We demonstrate the
effectiveness of our approach in a series of benchmarks spanning different
types of Stefan problems, and illustrate how the proposed framework can
accurately recover solutions of partial differential equations with moving
boundaries and dynamic interfaces. All code and data accompanying this
manuscript are publicly available at
\url{https://github.com/PredictiveIntelligenceLab/DeepStefan}.
