ExAIS: Executable AI Semantics

02/20/2022
by   Richard Schumi, et al.
0

Neural networks can be regarded as a new programming paradigm, i.e., instead of building ever-more complex programs through (often informal) logical reasoning in the programmers' mind, complex 'AI' systems are built by optimising generic neural network models with big data. In this new paradigm, AI frameworks such as TensorFlow and PyTorch play a key role, which is as essential as the compiler for traditional programs. It is known that the lack of a proper semantics for programming languages (such as C), i.e., a correctness specification for compilers, has contributed to many problematic program behaviours and security issues. While it is in general hard to have a correctness specification for compilers due to the high complexity of programming languages and their rapid evolution, we have a unique opportunity to do it right this time for neural networks (which have a limited set of functions, and most of them have stable semantics). In this work, we report our effort on providing a correctness specification of neural network frameworks such as TensorFlow. We specify the semantics of almost all TensorFlow layers in the logical programming language Prolog. We demonstrate the usefulness of the semantics through two applications. One is a fuzzing engine for TensorFlow, which features a strong oracle and a systematic way of generating valid neural networks. The other is a model validation approach which enables consistent bug reporting for TensorFlow models.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/04/2019

A Denotational Engineering of Programming Languages

The book is devoted to two research areas: (1) Designing programming lan...
research
02/15/2021

JEST: N+1-version Differential Testing of Both JavaScript Engines and Specification

Modern programming follows the continuous integration (CI) and continuou...
research
11/02/2022

A logical framework to model software development by multiple agents following a common specification

In this paper, we address program development by multiple different prog...
research
06/09/2019

Whither Programs as Specifications

Unifying theories distil common features of programming languages and de...
research
07/20/2017

A monadic solution to the Cartwright-Felleisen-Wadler conjecture

Given a programming language, can we give a monadic denotational semanti...
research
04/18/2023

A Neural Lambda Calculus: Neurosymbolic AI meets the foundations of computing and functional programming

Over the last decades, deep neural networks based-models became the domi...
research
07/11/2023

DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph Optimization

DL compiler's primary function is to translate DNN programs written in h...

Please sign up or login with your details

Forgot password? Click here to reset