Developing Bug-Free Machine Learning Systems With Formal Mathematics
Daniel Selsam, Percy Liang, David L. Dill · arXiv (Cornell University) · 2017
Noisy data, non-convex objectives, model misspecification, and numerical instability can all cause undesired behaviors in machine learning systems. As a result, detecting actual implementation errors can be extremely difficult. We demonstrate a methodology in which developers use an interactive proof assistant to both implement their system and to state a formal theorem defining what it means for their system to be correct. The process of proving this theorem interactively in the proof assistant exposes all implementation errors since any error in the program would cause the proof to fail. As a case study, we implement a new system, Certigrad, for optimizing over stochastic computation graphs, and we generate a formal (i.e. machine-checkable) proof that the gradients sampled by the system are unbiased estimates of the true mathematical gradients. We train a variational autoencoder using Certigrad and find the performance comparable to training the same model in TensorFlow.
Cited by 38 works. doi:10.48550/arxiv.1706.08605 Open-access PDF
Authors
References
- Adam: A Method for Stochastic Optimization
- Auto-Encoding Variational Bayes
- Accuracy and stability of numerical algorithms
- Introduction to HOL: a theorem proving environment for higher order logic
- Edinburgh LCF: A mechanised logic of computation
- The Lean Theorem Prover (System Description)
- HOL Light: A tutorial introduction
- A Machine-Checked Proof of the Odd Order Theorem
- The bedrock structured programming system
- A formal proof of the Kepler conjecture