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.
翻译:噪音数据、 非convex 目标、 模型区分错误和数字不稳定都可能导致机器学习系统中的不理想行为。 因此, 发现实际执行错误可能非常困难。 我们展示了一种方法,让开发者使用互动验证助理来实施他们的系统, 并给出一个正式的理论来定义其系统正确意味着什么。 在验证助理中以互动方式验证该理论的过程暴露了所有执行错误, 因为程序中的任何错误都会导致失败。 作为案例研究, 我们实施了一个新的系统, 即 Certigrad, 优化了随机计算图, 我们生成了一个正式的( 机器可检查的) 证据, 证明系统取样的梯度是真实数学梯度的不偏向估计。 我们用 Certigrad 来培训一个变式自动编码器, 并发现其性能与在TensorFlow 培训同一模型相似 。