Constrained Training of Neural Networks via Theorem Proving

Mark Chevallier, Matthew Whyte, Jacques D. Fleuriot
7/8/2022
cs.AIcs.LGcs.LO

No confident code implementation found for this paper.

Abstract

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 $\mathcal{L}$ that we formally prove to be sound, and differentiable to a function $d\mathcal{L}$. We subsequently use Isabelle's automatic code generation mechanism to produce OCaml versions of LTL$_f$, $\mathcal{L}$ and $d\mathcal{L}$ 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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{chevallier2022constrained,
  title  = {Constrained Training of Neural Networks via Theorem Proving},
  author = {Mark Chevallier and Matthew Whyte and Jacques D. Fleuriot},
  year   = {2022},
  eprint = {2207.03880},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.03880v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.03880.svg)](https://codeofpaper.com/paper/2207.03880)

Discussion