Constrained Training of Neural Networks via Theorem Proving

07/08/2022
by   Mark Chevallier, et al.
6

We introduce a theorem proving approach to the specification and generation of temporal logical constraints for training neural networks. We formalise a deep embedding of linear temporal logic over finite traces (LTL_f) and an associated evaluation function characterising its semantics within the higher-order logic of the Isabelle theorem prover. We then proceed to formalise a loss function ℒ that we formally prove to be sound, and differentiable to a function dℒ. We subsequently use Isabelle's automatic code generation mechanism to produce OCaml versions of LTL_f, ℒ and dℒ that we integrate with PyTorch via OCaml bindings for Python. We show that, when used for training in an existing deep learning framework for dynamic movement, our approach produces expected results for common movement specification patterns such as obstacle avoidance and patrolling. The distinctive benefit of our approach is the fully rigorous method for constrained training, eliminating many of the risks inherent to ad-hoc implementations of logical aspects directly in an "unsafe" programming language such as Python.

READ FULL TEXT

page 5

page 8

page 15

page 16

research
05/24/2019

Graph Representations for Higher-Order Logic and Theorem Proving

This paper presents the first use of graph neural networks (GNNs) for hi...
research
04/27/2020

On the Complexity of Linear Temporal Logic with Team Semantics

A specification given as a formula in linear temporal logic (LTL) define...
research
03/01/2017

HolStep: A Machine Learning Dataset for Higher-order Logic Theorem Proving

Large computer-understandable proofs consist of millions of intermediate...
research
08/08/2016

Holophrasm: a neural Automated Theorem Prover for higher-order logic

I propose a system for Automated Theorem Proving in higher order logic u...
research
06/23/2020

Logical Neural Networks

We propose a novel framework seamlessly providing key properties of both...
research
08/28/2020

Practical Idiomatic Considerations for Checkable Meta-Logic in Experimental Functional Programming

Implementing a complex concept as an executable model in a strongly type...
research
03/19/2023

Logic of Differentiable Logics: Towards a Uniform Semantics of DL

Differentiable logics (DL) have recently been proposed as a method of tr...

Please sign up or login with your details

Forgot password? Click here to reset