Gradual Sensitivity Typing

08/03/2023
by   Damian Arquez, et al.
0

Reasoning about the sensitivity of functions with respect to their inputs has interesting applications in various areas, such as differential privacy. In order to check and enforce sensitivity, several approaches have been developed, notably sensitivity type systems. In these systems, sensitivity can be seen as an effect in the sense of type-and-effects systems as originally proposed by Gifford and Lucassen. Because type-and-effect systems can make certain useful programming patterns tedious or overly conservative, there is value in bringing the benefits of gradual typing to these disciplines in order to ease their adoption. In this work, we motivate, formalize, and prototype gradual sensitivity typing. The language GSoul supports both the unrestricted unknown sensitivity and bounded imprecision in the form of intervals. Gradual sensitivity typing allows programmers to smoothly evolve typed programs without any static sensitivity information towards hardened programs with a mix of static and dynamic sensitivity checking. In particular, we show that gradual sensitivity supports recursive functions for which fully static checking would be overly conservative, seamlessly enabling exact runtime sensitivity checks. GSoul satisfies both the gradual guarantees and sensitivity type soundness, known as metric preservation. We establish that, in general, gradual metric preservation is termination insensitive, and that one can achieve termination-sensitive gradual metric preservation by hardening specifications to bounded imprecision. We implement a prototype that provides an interactive test bed for gradual sensitivity typing. This work opens the door to gradualizing other typing disciplines that rely on function sensitivity such as differential privacy, as well as other quantitative type-based reasoning techniques.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/16/2021

DDUO: General-Purpose Dynamic Analysis for Differential Privacy

Differential privacy enables general statistical analysis of data with f...
research
10/21/2020

Contextual Linear Types for Differential Privacy

Language support for differentially-private programming is both crucial ...
research
07/13/2018

Metric Semantics for Probabilistic Relational Reasoning

The Fuzz programming language [Reed and Pierce, 2010] uses an elegant li...
research
07/13/2018

Probabilistic Relational Reasoning via Metrics

The Fuzz programming language [Reed and Pierce, 2010] uses an elegant li...
research
05/29/2019

Fuzzi: A Three-Level Logic for Differential Privacy

Curators of sensitive datasets sometimes need to know whether queries ag...
research
07/13/2021

From Identity to Difference: A Quantitative Interpretation of the Identity Type

We explore a quantitative interpretation of 2-dimensional intuitionistic...

Please sign up or login with your details

Forgot password? Click here to reset