Lune

OOPSLA2024Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Denotational Foundations for Expected Cost Analysis cites A unifying type-theory for higher-order (amortized) cost analysis
  • Denotational Foundations for Expected Cost Analysis cites A Calculus for Amortized Expected Runtimes
  • Denotational Foundations for Expected Cost Analysis cites A modular cost analysis for probabilistic programs
  • A Calculus for Amortized Expected Runtimes cites A unifying type-theory for higher-order (amortized) cost analysis
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Denotational Foundations for Expected Cost AnalysisPedro H. Azevedo de AmorimOOPSLA 2025 · 4 citations

Builds on5

  1. A modular cost analysis for probabilistic programsMartin Avanzini, Georg Moser, Michael SchaperOOPSLA 2020 · 41 citations
  2. A unifying type-theory for higher-order (amortized) cost analysisVineet Rajani, Marco Gaboardi, Deepak Garg, Jan HoffmannPOPL 2021 · 26 citations
  3. A Calculus for Amortized Expected RuntimesKevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja et al.POPL 2023 · 22 citations
  4. Central moment analysis for cost accumulators in probabilistic programsDi Wang, Jan Hoffmann, Thomas W. RepsPLDI 2021 · 18 citations
  5. Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic ChoiceAlejandro Aguirre, Lars BirkedalPOPL 2023 · 13 citations

Related papers

  1. Decalf: A Directed, Effectful Cost-Aware Logical FrameworkHarrison Grodin, Yue Niu, Jonathan Sterling, Robert HarperPOPL 2024 · 11 citations
  2. A relational theory of effects and coeffectsUgo Dal Lago, Francesco GavazzoPOPL 2022 · 22 citations
  3. A cost-aware logical frameworkYue Niu, Jonathan Sterling, Harrison Grodin, Robert HarperPOPL 2022 · 23 citations
  4. PλωNK: functional probabilistic NetKATAlexander Vandenbroucke, Tom SchrijversPOPL 2020 · 2 citations
  5. Resource-Aware Soundness for Big-Step SemanticsRiccardo Bianchini, Francesco Dagnino, Paola Giannini, Elena ZuccaOOPSLA 2023 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines