Abstract
We lay the foundations for a database-inspired approach to interpreting andunderstanding neural network models by querying them using declarativelanguages. Towards this end we study different query languages, based onfirst-order logic, that mainly differ in their access to the neural networkmodel. First-order logic over the reals naturally yields a language which viewsthe network as a black box; only the input--output function defined by thenetwork can be queried. This is essentially the approach of constraint querylanguages. On the other hand, a white-box language can be obtained by viewingthe network as a weighted graph, and extending first-order logic with summationover weight terms. The latter approach is essentially an abstraction of SQL. Ingeneral, the two approaches are incomparable in expressive power, as we willshow. Under natural circumstances, however, the white-box approach can subsumethe black-box approach; this is our main result. We prove the result concretelyfor linear constraint queries over real functions definable by feedforwardneural networks with a fixed number of hidden layers and piecewise linearactivation functions.