Documentation

Complexity.Crypto.Computational.Pseudoentropy.Selection

Uniform bounds for indexed predictors #

An efficient sampler supplies fresh labeled examples for empirical predictor selection. A single uniform predictor then performs almost as well as every candidate in a polynomial-size family. Consequently a pseudoentropy gap bounds all candidates simultaneously, with any prescribed inverse-polynomial slack. The bound allows the best candidate to vary arbitrarily with the security parameter; that choice is never supplied to the algorithm.

Main definitions #

Main results #

References #

Adapted from the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8.

def Cslib.Crypto.Pseudoentropy.selectPredictor (count trials : ℕ) (source : ProbComp (List Bool × Bool)) (predict : ℕ → List Bool → ProbComp Bool) (observation : List Bool) :

Compare predictors on fresh labeled samples, then use the chosen predictor on the challenge. The challenge's hidden label is never an input to this program.

Instances For

    Empirical prediction is strict PPT when the sampler, indexed predictors, and counts are efficient. All callbacks may capture the original input.

    theorem Cslib.Crypto.Pseudoentropy.eval_predictionGame_selectPredictor (sample : ℕ → ProbComp (List Bool × Bool)) (predict : ℕ → ℕ → List Bool → ProbComp Bool) (count trials : ℕ → ℕ) (n : ℕ) :
    (predictionGame sample (fun (n : ℕ) => selectPredictor (count n) (trials n) (sample n) (predict n)) n).eval = (do let i ← OracleComp.selectBest (count n) (trials n) fun (i : ℕ) => predictionGame sample (fun (n : ℕ) => predict n i) n predictionGame sample (fun (n : ℕ) => predict n i) n).eval

    Selection is independent of the challenge, so its final correctness game is a fresh trial of the selected candidate.

    theorem Cslib.Crypto.Pseudoentropy.selectPredictor_error_le (sample : ℕ → ProbComp (List Bool × Bool)) (predict : ℕ → ℕ → List Bool → ProbComp Bool) (count confidence inverseTolerance : ℕ → ℕ) (n i : ℕ) (hi : i < count n) (htolerance : 0 < inverseTolerance n) :
    ((predictionGame sample (fun (n : ℕ) => selectPredictor (count n) ((confidence n + 1) * inverseTolerance n ^ 2) (sample n) (predict n)) n).eval false).toReal ≤ ((predictionGame sample (fun (n : ℕ) => predict n i) n).eval false).toReal + 2 / ↑(inverseTolerance n) + ↑(count n) * (1 / 2) ^ confidence n

    The selected predictor's error is bounded by every candidate's error plus estimation and selection losses, with the challenge sampled independently of all validation samples.

    A pseudoentropy gap bounds every member of a uniformly efficient polynomial-size family at once, allowing any efficient inverse-polynomial slack. No computable choice of index is assumed, and the eventual threshold is common to all indices at each parameter.