A Modal Type Theory of Expected Cost in Higher-Order Probabilistic Programs
Vineet Rajani, Gilles Barthe, Deepak Garg
Abstract
The design of online learning algorithms typically aims to optimise the incurred loss or cost , e.g., the number of classification mistakes made by the algorithm. The goal of this paper is to build a type-theoretic framework to prove that a certain algorithm achieves its stated bound on the cost. Online learning algorithms often rely on randomness, their loss functions are often defined as expectations, precise bounds are often non-polynomial (e.g., logarithmic) and proofs of optimality often rely on potentialbased arguments. Accordingly, we present pλ-amor, a type-theoretic graded modal framework for analysing (expected) costs of higher-order probabilistic programs with recursion. pλ-amor is an effect-based framework which uses graded modal types to represent potentials, cost and probability at the type level. It extends prior work ( λ-amor) on cost analysis for deterministic programs. We prove pλ-amor sound relative to a Kripke step-indexed model which relates potentials with probabilistic coupling. We use pλ-amor to prove cost bounds of several examples from the online machine learning literature. Finally, we describe an extension of pλ-amor with a graded comonad and describe the relationship between the different modalities.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d025c683-f98f-4347-807d-1aef93763275Cited by top-tier papers1
Ask how each one uses itBuilds on5
- A modular cost analysis for probabilistic programsMartin Avanzini, Georg Moser, Michael SchaperOOPSLA 2020 · 41 citations
- A unifying type-theory for higher-order (amortized) cost analysisVineet Rajani, Marco Gaboardi, Deepak Garg, Jan HoffmannPOPL 2021 · 26 citations
- A Calculus for Amortized Expected RuntimesKevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja et al.POPL 2023 · 22 citations
- Central moment analysis for cost accumulators in probabilistic programsDi Wang, Jan Hoffmann, Thomas W. RepsPLDI 2021 · 18 citations
- Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic ChoiceAlejandro Aguirre, Lars BirkedalPOPL 2023 · 13 citations
Related papers
- Decalf: A Directed, Effectful Cost-Aware Logical FrameworkHarrison Grodin, Yue Niu, Jonathan Sterling, Robert HarperPOPL 2024 · 11 citations
- A relational theory of effects and coeffectsUgo Dal Lago, Francesco GavazzoPOPL 2022 · 22 citations
- A cost-aware logical frameworkYue Niu, Jonathan Sterling, Harrison Grodin, Robert HarperPOPL 2022 · 23 citations
- PλωNK: functional probabilistic NetKATAlexander Vandenbroucke, Tom SchrijversPOPL 2020 · 2 citations
- Resource-Aware Soundness for Big-Step SemanticsRiccardo Bianchini, Francesco Dagnino, Paola Giannini, Elena ZuccaOOPSLA 2023 · 6 citations
