Adaptive learners computed by small circuits #
An adaptive membership-query learner chooses each query from the answers to the queries before
it. Given queries Q, where Q i maps the answers to the first i queries to the i-th queried
point, and a hypothesis H of all q answers, UniformLearning.QueryLearner.ofAdaptive Q H is the
learner asking these queries in turn, a decision tree of depth q
(UniformLearning.QueryLearner.queriesAtMost_ofAdaptive). Run on a target f, it outputs H of
the answers of f (UniformLearning.QueryLearner.eval_ofAdaptive,
UniformLearning.QueryLearner.answersUpTo).
A learner has an adaptive circuit of size S with q queries
(UniformLearning.QueryLearner.HasAdaptiveCircuit) when, on every seed, each query is computed from
the earlier answers by a De Morgan circuit, and the hypothesis at x from all answers followed by
x, with at most S gates in all. The queries do not depend on x: as in
UniformLearning.QueryLearner, the learner outputs a hypothesis. This is learning by circuits with
adaptive membership queries, the adaptive counterpart of
UniformLearning.QueryLearner.HasCircuit, which is the special case of constant queries
(UniformLearning.QueryLearner.HasCircuit.hasAdaptiveCircuit). Such a learner agrees with one
making at most q queries (UniformLearning.QueryLearner.HasAdaptiveCircuit.exists_queriesAtMost).
The other model of adaptive queries in the library is the oracle circuit of
CslibFrontier.Computability.Circuit.Boolean.Oracle, one circuit whose oracle gates take arguments
computed from the answers of other oracle gates;
UniformLearning.QueryLearner.HasCircuit.exists_oracleCircuit turns a non-adaptive learner with a
circuit into one. Here the queries and the hypothesis are separate circuits, so that the answers
can be read from a truth table, and no adaptive counterpart of that bridge is proved.
Reading the answers from a truth table T of 2 ^ n entries costs at most the gates of the
queries plus 2 ^ n (2 n + 3) + 1 gates per query, for selecting the entry at the computed address
(UniformLearning.QueryLearner.complexity_append_answers_le). This bounds the circuits that test a
learner on truth tables in CslibFrontier.MachineLearning.UniformLearning.CryptoHardness.Circuit.
The size counts the circuits of the queries and of the hypothesis separately, so gates shared between them are counted once for each; neither depth nor running time is certified.
Main definitions #
Cslib.MachineLearning.UniformLearning.QueryLearner.answersUpTo: the answers of a target to the firstkadaptive queries.Cslib.MachineLearning.UniformLearning.QueryLearner.ofAdaptive: the learner asking adaptive queries.Cslib.MachineLearning.UniformLearning.QueryLearner.HasAdaptiveCircuit: on every seed, adaptive queries and a hypothesis computed by circuits with at mostSgates in all.
Main results #
Cslib.MachineLearning.UniformLearning.QueryLearner.eval_ofAdaptive,Cslib.MachineLearning.UniformLearning.QueryLearner.queriesAtMost_ofAdaptive: the adaptive learner outputs the hypothesis of the answers and makes at mostqqueries.Cslib.MachineLearning.UniformLearning.QueryLearner.HasAdaptiveCircuit.exists_queriesAtMost: a learner with an adaptive circuit agrees with one making at mostqqueries.Cslib.MachineLearning.UniformLearning.QueryLearner.HasCircuit.hasAdaptiveCircuit: a non-adaptive learner with a circuit ofSgates has an adaptive circuit ofS + 2 qgates.Cslib.MachineLearning.UniformLearning.QueryLearner.complexity_append_answers_le: reading the answers from a truth table.
The answers of the target f to the first k adaptive queries Q: the query Q i maps the
answers to the queries before it to the point queried next.
The answers to constant queries are the values at the queried points.
The decision tree asking the remaining r adaptive queries after the answers a to the first
k, then outputting H of all q answers.
Run on f after the answers of f to the first k queries, the tree outputs H of all the
answers of f.
The adaptive learner: on the seed ω, it asks the queries Q ω, each computed from the
answers to the earlier ones, and outputs the hypothesis H ω of all q answers.
Run on f, the adaptive learner outputs the hypothesis of the answers of f.
The adaptive learner makes at most q queries.
An adaptive learner computed by small circuits: on every seed ω, the i-th query is
computed from the answers to the earlier queries by a De Morgan circuit, and the hypothesis at x
from all q answers followed by x, with at most S gates in all. Exposed: clients build and take
apart the witnesses.
A learner with an adaptive circuit agrees with a learner making at most q queries.
Non-adaptive learners are adaptive. A learner with q non-adaptive queries and a circuit of
S gates has an adaptive circuit of S + 2 q gates: each fixed query is a constant, of two
gates.
Reading the answers from a truth table. Computing, from the truth table T of a target on
n bits, the table followed by the answers of the target to the adaptive queries Q costs at most
the gates of the queries plus 2 ^ n (2 n + 3) + 1 gates per query, for selecting the entry at the
computed address.