Specification Generation for Neural Networks in Systems
Isha Chaudhary, Shuyi Lin, Cheng Tan, Gagandeep Singh
TL;DR
This work tackles the trustworthiness problem of neural networks deployed in computer systems by automatically generating expressive specifications from traditional reference algorithms. It formalizes specifications as Hoare-style preconditions and postconditions ${\varphi_{\mathcal{S}}}$, ${\psi_{\mathcal{S}}}$ over inputs ${\mathcal{X}}$ and outputs ${\mathcal{Y}}$, and introduces SpecTRA to cluster observations of reference behaviors into concise specs. Applied to adaptive bitrate streaming (Pensieve) and congestion control (Aurora), SpecTRA yields high-coverage, interpretable specifications and uncovers previously unknown vulnerabilities in state-of-the-art networks. The framework supports verification-driven development and offers a practical route to more reliable NN components in dynamic systems.
Abstract
Specifications - precise mathematical representations of correct domain-specific behaviors - are crucial to guarantee the trustworthiness of computer systems. With the increasing development of neural networks as computer system components, specifications gain more importance as they can be used to regulate the behaviors of these black-box models. Traditionally, specifications are designed by domain experts based on their intuition of correct behavior. However, this is labor-intensive and hence not a scalable approach as computer system applications diversify. We hypothesize that the traditional (aka reference) algorithms that neural networks replace for higher performance can act as effective proxies for correct behaviors of the models, when available. This is because they have been used and tested for long enough to encode several aspects of the trustworthy/correct behaviors in the underlying domain. Driven by our hypothesis, we develop a novel automated framework, SpecTRA to generate specifications for neural networks using references. We formulate specification generation as an optimization problem and solve it with observations of reference behaviors. SpecTRA clusters similar observations into compact specifications. We present specifications generated by SpecTRA for neural networks in adaptive bit rate and congestion control algorithms. Our specifications show evidence of being correct and matching intuition. Moreover, we use our specifications to show several unknown vulnerabilities of the SOTA models for computer systems.
