Lipschitz oracle programs #
A program program : ProbOracleComp spec α is K-Lipschitz at an oracle oracle
(ProbOracleComp.LipschitzAt K oracle program) when replacing oracle by any oracle whose reply
to every query is within statistical distance ε moves the output law of program by at most
K * ε. Private samples are uniform and each external query is answered by an independent draw
from the oracle's reply law (OracleComp.evalWith).
This is the stability condition under which stochastic oracle debate is correct
[BrownCohenIrvingPiliouras2024, Definition 6.1], stated for every reply and output type. On Bool
replies and a Bool output it is the source's condition (lipschitzAt_bool_iff): the probability
of outputting true moves by at most K times the largest difference, over queries, of the
probabilities of replying true.
A program making at most n external queries is n-Lipschitz at every oracle
(LipschitzAt.of_isQueryBounded), by replacing replies one query at a time. The constant can be
much smaller than the number of queries: a program that queries many times but returns only its
first reply is 1-Lipschitz.
Main definitions #
Cslib.ProbOracleComp.LipschitzAt:K-Lipschitz at an oracle.
Main results #
Cslib.ProbOracleComp.LipschitzAt.of_isQueryBounded:nexternal queries give constantn.Cslib.ProbOracleComp.LipschitzAt.bind: constants add under sequencing.Cslib.ProbOracleComp.lipschitzAt_bool_iff: agreement with [BrownCohenIrvingPiliouras2024, Definition 6.1] onBoolreplies and output.Cslib.ProbOracleComp.closeTo_run_of_isQueryBounded: running aQ-queryProbOracleCompagainstε-close probabilistic oracles stays within statistical distanceQ * ε.
References #
program is K-Lipschitz at the oracle oracle: against any oracle oracle' whose reply
law at every query is within statistical distance ε of oracle's, the output law of program
is within K * ε of its output law against oracle.
The condition is relative to the one oracle oracle, as in
[BrownCohenIrvingPiliouras2024, Definition 6.1], and quantifies over the tolerance ε in place of
the supremum distance between oracles. The source writes a strict inequality, which no machine
satisfies (take oracle' = oracle); the bound here is non-strict, as in the Lean formalization
accompanying the source (google-deepmind/debate, Oracle.lipschitz). The source takes K > 0;
K = 0 is admitted here and says that the output law does not depend on the oracle.
A larger constant is still a Lipschitz constant.
Query-bounded programs. A program making at most n external queries on every path is
n-Lipschitz at every oracle: replacing the replies one query at a time moves the output law by
at most ε per query, and private samples are answered identically on both sides.
Sequencing. If program is K₁-Lipschitz at oracle and every continuation is
K₂-Lipschitz there, the sequenced program is (K₁ + K₂)-Lipschitz at oracle.
Deterministic postprocessing keeps the constant.
Agreement with the source on Bool. For Bool replies, a Bool output and a finite
constant K, being K-Lipschitz at oracle is [BrownCohenIrvingPiliouras2024, Definition 6.1]:
against every other oracle, the probability of outputting true moves by at most K times the
largest difference, over queries, of the probabilities of replying true.
Replacing an oracle oracle₁ by an ε-close probabilistic oracle oracle₂ moves the
output law of any Q-query ProbOracleComp program by at most Q * ε.