Learning to Reason with Neural Networks: Generalization, Unseen Data and Boolean Measures
Anonymous Author(s)
AfﬁliationAddress email
Abstract
This paper considers the Pointer Value Retrieval (PVR) benchmark introducedin [ZRKB21], where a ‘reasoning’ function acts on a string of digits to producethe label.
More generally, the paper considers the learning of logical functionswith gradient descent (GD) on neural networks.
It is ﬁrst shown that in orderto learn logical functions with gradient descent on symmetric neural networks,the generalization error can be lower-bounded in terms of the noise-stability ofthe target function, supporting a conjecture made in [ZRKB21].
It is then shownthat in the distribution shift setting, when the data withholding corresponds tofreezing a single feature (referred to as canonical holdout), the generalizationerror of gradient descent admits a tight characterization in terms of the Booleaninﬂuence for several relevant architectures.
This is shown on linear models andsupported experimentally on other models such as MLPs and Transformers.
Inparticular, this puts forward the hypothesis that for such architectures and forlearning logical functions such as PVR functions, GD tends to have an implicitbias towards low-degree representations , which in turn gives the Boolean inﬂuencefor the generalization error under quadratic loss.
Introduction
Recently [ZRKB21] introduced the pointer value retrieval (PVR) benchmark.
This benchmarkconsists of a supervised learning task on MNIST [LCB10] digits with a ‘logical’ or ‘reasoning’component in the label generation.
More speciﬁcally, the functions to be learned are deﬁned on
MNIST digits organized either sequentially or on a grid and the label is generated by applying some‘reasoning’ on these digits, with a speciﬁc digit acting as a pointer on a subset of other digits fromwhich a logical/Boolean function is computed to generate the label.
For instance, consider the PVR setting for binary digits in the string format, where a string of MNISTdigits is used as input.
Consider in particular the case where only 0 and 1 digits are used, such asin the example of Figure 1.
The label of this string is deﬁned as follows: the ﬁrst 3 bits 101 deﬁnethe pointer in binary expansion, and the pointer points to a window of a given length, say 2 in thisexample.
Speciﬁcally, the pointer points at the ﬁrst bit of the window.
To generate the label, one has to thus look the 6th window 1 of length 2 given by 11 , and there the label is produced by applying some ﬁxed function, such as the parity (so the label would be 0 in this example)
In [ZRKB21], the benchmark is also deﬁned for matrices of digits rather than strings we focus here on the string that all the of the PVR study
[Table]
[Figure]
This benchmark is introduced to understand the limits of deep learning on tasks that go beyondclassical image recognition, investigating in particular the trade-off between memorization andreasoning by acting with a particular distribution shift at testing (see further details below).
In order to learn such PVR functions, one has to ﬁrst learn the digit identiﬁcation and then the logicalcomponent on these digits.
Handling both tasks successfully at once is naturally more demanding thansucceeding at the latter assuming the ﬁrst is successful.
One can thus focus on the ‘logical component’as a necessary component to learn, and this corresponds to learning a Boolean function.
The overallfunction that maps the pixels of an image to its label in the PVR is of course also a Boolean function(like any computer-encoded function), but the structural properties of such meta-functions are morechallenging to describe.
In any case, to understand the limits of deep learning on such benchmarks,we focus on investigating ﬁrst the limits of deep learning on the logical/Boolean component.
We next re-state formally one of the PVR benchmarks from [ZRKB21], focusing on binary digitsfor simplicity.
We will use the alphabet { 0 , 1 } to describe the benchmark to connect to the MNIST 45 dataset, but will later switch to the alphabet { +1 ,  1 } for the problem of learning Boolean functions 46 with neural networks.
Recall for d 2 N , F d 2 = { 0 , 1 } d .
Deﬁnition 1 (Boolean PVR with sliding windows) .
The input x consists of n bits and the label isgenerated as
[Equation]
where p is the number of bits in the pointer, w is the window size, g : F w 2 !
R is the aggregation 50 function, P : F p 2 !
[ p +1 : n ] is the pointer map, x j denotes the bit in position j and x p = ( x 1 , ..., x p )denotes the pointer bits.
We often set n = p + 2 p , and hence the last window starts at the last digit.
In words, the ﬁrst p bits give a pointer to the beginning of a window of w consecutive bits, and thelabel is produced by applying a Boolean function g on these w bits.
Remark 1 .
If w > 1 , for some values of the pointer, P ( x p ) + w  1 would exceed the dimension ofinput n .
This issue can be solved by using cyclic indices or by using non-overlapping windows asdeﬁned in Appendix D.
However, in the experiments of this paper, we mainly truncate windows (ifnecessary) in order to capture the underlying asymmetries (e.g., the last windows have smaller sizes).
In this paper we consider the problem of learning in the holdout setting, i.e. when some data arewithheld (or ‘unseen’) during training.
We focus on a speciﬁc type of holdout setting, that we call‘canonical holdout’, which we deﬁne here.
Deﬁnition 2 (Canonical holdout) .
Let F be the class of Boolean functions on n bits and let f be 62 a speciﬁc function in that class.
For k 2 [ n ] , consider the problem of learning F from samples 63 ( X  k , f
( X  k )) , where the X  k ’s are independently drawn from the distribution that freezes component k to 1 and that draws the other components i.i.d.
Bernoulli (1 / 2) .
Let
˜ f
k be the functionlearned under this training distribution.
We are interested in the generalization error with squareloss when the k -th bit is not frozen at testing, i.e.,
[Equation]
where by X ⇠ U F n 2 we mean that X is chosen uniformly at random from F n 2 , and similarly forf ⇠ U F .
We denote by ˜ f
the function learned in the case where the k -th component is not frozen at 69 training, i.e., when the train and test distributions are both uniform on the Boolean hypercube, anduse the following notation for the corresponding generalization error:
[Equation]
The ‘canonical’ holdout is thus a special case of holdout where a single feature/bit is frozen at training.
In [ZRKB21], different types of holdout are allowed where a given string is absent from the windowsrather than a given bit as in the canonical version.
We believe that the canonical holdout still capturesthe essence of the PVR benchmark: other windows will get to see the strings that are withheld due tothe bit freezing, and thus the goal is still to investigate whether neural networks trained by GD willmanage to patch together the different pieces.
Finally, we will often consider neural network architectures that have invariances on the input, suchas permutation invariance.
In the PVR setting, this means that we do not assume that the learner hasknowledge of which bits are in the window.
In such cases, instead of learning a class of function F , 80 one can equivalently talk about learning a single function f (with the implicit F deﬁned as the orbit 81 of f through the permutation group), and deﬁne
[Equation]
and
[Equation]
1.1 Contributions of this paper
The contributions of this paper are:1.
In the matched setting (i.e., train and test distributions are matching), we prove a lowerbound (Theorem 1) on the generalization error for gradient descent 2 (GD), that degrades forfunctions having large noise-sensitivity (or low noise-stability), supporting thereby with aformal result a conjecture put forward in [ZRKB21].2.
In the mismatched setting, speciﬁcally in the canonical holdout where a single featureis frozen at training and released to be uniformly distributed at testing, we hypothesizethat (S)GD on the square loss 3 and on certain network architectures such as MLPs and Transformers has an implicit bias towards low-degree representations when learning logicalfunctions such as Boolean PVR functions.
This gives a new insight into the implicit biasstudy of GD on neural networks for the case of logical functions.
We then show (Lemma 1) that under this hypothesis, the generalization error in the canonicalholdout setting is given by the Boolean inﬂuence, a central notion in Boolean Fourieranalysis.3.
We provide experiments supporting this hypothesis for various target functions and architectures such as MLPs and the Transformers [VSP + 17] in Section 3.2 and
Appendix F. Theserely on mini-batch stochastic gradient descent (see Section 3.2 for more details).4.
We establish formally the hypothesis for GD and linear regression models in Section 3.3,and conduct experiments to support it on multi-layer neural networks of large depths andsmall initialization scales in Section 3.3 (with further arguments in Appendix G).
1.2 The low-degree bias hypothesis: illustration
We now discuss the hypothesis put forward in this paper that “GD on certain architectures such as
MLPs and Transformers has an implicit bias towards lower-degree representations when learning
PVR and, more generally, logical functions.” Before starting our illustration let us recall somebasic notions from Boolean analysis (we refer to [O’D14] for details). Any Boolean functionf : {± 1 } n ! R can be written in terms of its Fourier-Walsh transform: f ( x ) =
P
[Equation]
[Equation]
f ( T )  T ( x ) ,where  T ( x ) =
Q
i 2 T x i and ˆ f ( T ) = 2  n
P x 2 {± 1 } n f ( x )  T ( x ) are respectively the basis elementsand the coefﬁcients of the Fourier-Walsh transform of f .
Deﬁnition 3 (Boolean inﬂuence [O’D14]) .
Let f : {± 1 } n !
R be a Boolean function and let ˆ f be 112 its Fourier-Walsh transform.
The Boolean inﬂuence of variable k 2 [ n ] on f is deﬁned by Inf k ( f ) :=
P
T ✓ [ n ]: k 2 T ˆ f ( T ) 2 .
In particular, if f : {± 1 } n ! {± 1 } , Inf k ( f ) =
P ( f ( X ) 6 = f
( X + e k )) , where
X + e k corresponds to the vector obtained by ﬂipping the k -th component of X .
Consider the following example of a PVR function with a 1-bit pointer, 2 overlapping windows oflength 2, and parity for the aggregation function.
We consider f : {± 1 } n ! {± 1 } (i.e., with ± 1 117 variables instead of 0 , 1 , to simplify the expressions), with f given by
[Equation]
We can rewrite f in terms of its Fourier-Walsh expansion (i.e., pulling out all the multivariatemonomials appearing in the function, see Section 3.1 for more details), which gives
[Equation]
Consider now training a neural network such as a Transformer as in Section 3.2 on this function,with quadratic loss, and a canonical holdout corresponding to freezing x 2 = 1 at training.
Under thisholdout, and under the ‘low-degree implicit bias’ hypothesis, the low-degree monomials are learnedﬁrst (see experiments in Section 3.2), resulting in the following function being learned at training:
[Equation]
Thus, according to Lemma 1 proved in Appendix C, the generalization error is given by
[Equation]
which is the probability that ﬂipping the frozen coordinate changes the value of the target function,i.e., the Boolean inﬂuence (where we denoted by X + e 2 the vector obtained by ﬂipping the secondentry in X ).
As shown in this paper, neural networks tend to follow this trend quite closely, and wecan prove this hypothesis on simple linear models.
Notice that an ERM-minimizing function couldhave taken a more general form than a degree minimizing function, i.e.,
[Equation]
for any choice of r : {± 1 } 4 ! {± 1 } .
In the special case of r = 0 , f ERM corresponds to f  2 (the 131 low-degree representation).
For instance, among such ERM-minimizers, one can check that theminimum ` 2 -norm interpolating solution would be given by
[Equation]
This gives a generalization error of 12 E ( f ( X )  f ` 2  2 ( X )) 2 = 4( 14 ) 2 = 14 , i.e., half the error of f  2 , 134 yet still bounded away from 0.
In order to improve on this, under the same canonical holdout with x 2 = 1 , one would like to rely ona type of minimum description length bias, since describing f may be more efﬁcient than f  2 due to 137 the stronger symmetries of f .
Namely, f corresponds to taking the parity on the middle two bits ifx 1 = 1 , and on the last two bits otherwise.
On the other hand, f  2 requires changing the function 139 depending on x 1 = 1 or x 1 =  1 , since it is once the function x 3 and once the function x 3 x 4 .
So 140 an implicit bias that would exploit such symmetries, featuring in PVR tasks, would give a differentsolution than the low-degree implicit bias, and could result in lower generalization error.
We leave tofuture work to investigate this ‘symmetry compensation’ procedure.
1.3 Related literature
GD lower bounds.
Several works have investigated the difﬁculties of learning a class of functionswith descent algorithms and identiﬁed measures for the complexity in this setting.
In particular, [BFJ + 94, Kea98] prove that the larger the statistical dimension of a function class is, the moredifﬁcult it is for an statistical query (SQ) algorithm to learn.
We refer to [AKM + 21, DGKP19]for further references on SQ-like lower bounds.
For GD with mini-batch and polynomial gradientprecision, [AS20] uses the m -Cross-Predictability (CP) of a class of functions to show that classessufﬁciently small CP and large batch-size are not efﬁciently learnable.
This is further generalized in[AKM + 21] to a broader range of batch size and gradient precision.
In [AGNZ18], the noise-stabilityfor deep neural networks is deﬁned as the stability of each layer’s computation to noise injected at lower layers, and is used to show correctness of a compression framework.
However, no bounds onthe generalization error of GD depending on the noise stability of the target function is derived in thiswork.
The noise-stability, the statistical dimension and the cross-predictability are measures for somegiven function or function class.
One can obtain measures that are deﬁned for a dataset and a networkarchitecture.
For that purpose, [ACHM22] introduced the “Initial Alignment” (INAL) between thetarget function and the neural network at initialization and proves that for fully connected networkswith Gaussian i.i.d.
initialization, if the INAL is negligible, then GD will not learn efﬁciently.
Weremark that the problem of approximating and learning Boolean functions appear in other areas aswell.
For instance, [HPV19] considered the problem of approximating Boolean functions, usingfunctions coming from restricted classes (namely k-juntas and linear Boolean functions); [JSR + 19]proposes two algorithms to learn sparse Boolean formulae; and [Udo21] proposes techniques formodeling Boolean functions by mixed-integer linear inequalities.
Implicit bias.
The implicit bias of neural networks trained with gradient descent has been extensively studied in recent years [NTS14, NBMS17, MGW + 20, JT19, GLSS18a].
In particular,[SHN + 17] proved that gradient descent on linearly-separable binary classiﬁcation problems converges to the maximum ` 2 -margin direction.
Several subsequent works studied the implicit bias inclassiﬁcation tasks on various networks architectures, e.g., homogeneous networks [LL19], two layersnetworks in the mean ﬁeld regime [CB20], linear and ReLU fully connected networks [VSS21], andconvolutional linear networks [GLSS18b].
Among regression tasks, the problem of implicit bias hasbeen analysed for matrix factorization tasks [GWB + 17, RC20, ACHL19], and also gradient ﬂow ondiagonal networks [PPVF21].
However, all these works consider functions with real inputs, insteadof logical functions which are the focus of this work.
On the other hand, as discussed in Section 1.2,the Boolean inﬂuence generalization characterization reﬂects the implicit bias of GD on neuralnetworks to learn low-degree representations.
Similar types of phenomena can implicitly be foundin [XZX18, XZL + 19, RBA + 19], in particular as the “spectral bias” in the context of real valuedfunctions decomposed in the classical Fourier basis (where the notion of lower degree is replacedby low frequencies).
In [ABAB + 21, ABAM22], the case of Boolean functions is considered as inthis paper, and it is established that for various ‘regular’ architectures (having some symmetry intheir layers), gradient descent can learn target functions that satisfy a certain ‘staircase’ property.
However, these papers do not investigate lower-bounds in terms of noise stability, neither distributionshift as in the canonical holdout.
We note that the problem of regularizing a learning algorithmto avoid overﬁtting appears in other areas of research, e.g., in the analysis of ﬁtness functions inbiology [ANO + 21].
Distribution shift.
Many works were aimed at characterizing when a classiﬁer trained on a trainingdistribution (also called the “source” distribution) performs well on a different test domain (alsocalled the “target” distribution) [QCSSL09].
On the theoretical side, [BDBC + 10] obtains a boundof the target error of a general empirical risk minimization algorithm in terms of the source errorand the divergence between the source and target distribution, in a setting where the algorithm hasaccess to a large dataset from the source distribution and few samples from the target distribution.
Werefer to [SQZY17] for a further result in a similar setting.
Instead, in this work we focus on gradientdescent on neural networks in the setting where no data from the target distribution is accessible.
Onthe empirical level, several benchmarks have been proposed to evaluate performance for a wide rangeof models and distribution shifts [WGS + 22, MTR + 21, SKL + 21].
Despite this signiﬁcant body ofworks on distribution shift, we did not ﬁnd works that related the generalization error under holdoutshift in terms of the Boolean inﬂuence.
Matched setting: a formal lower-bound on noise stability and generalization
Our ﬁrst result provides a lower bound on the generalization error in the setting where the trainingand test distributions of the inputs are both uniform on the Boolean hypercube, i.e., the “matchedsetting”.
We directly relate the generalization error achieved by GD, or SGD with large batch-size, tothe complexity of the task, providing theoretical support to the empirical claim in [ZRKB21], thatcomplex tasks are more difﬁcult to learn for GD/SGD on neural networks.
The latter work used thenoise sensitivity as a dual measure of the target function complexity, whereas we use here the noisestability ( Stab  [ f ] ).
Deﬁnition 4 (Noise stability) .
Let f : {± 1 } n !
R and  2 [0 , 1 / 2] .
Let X be uniformly distributed 207 on the Boolean n -dimensional hypercube, and let Y be formed from X by ﬂipping each bit independently with probability  .
We deﬁne the  -noise stability of f by Stab  [ f ] :=
E ( X,Y )
[ f ( X ) · f ( Y )] .
Intuitively, Stab  [ f ] measures how stable the output of f is to a perturbation that ﬂips each input bitwith probability  , independently.
The noise stability can be easily related to the noise sensitivity 211 NS  [ f ] 4 , used in [ZRKB21].
The generalization error depends as well on the complexity of the network, which is quantiﬁed interms of the number of edges in the network, the number of time steps, and gradients precision in thegradient descent algorithm.
We give one more deﬁnition before stating our result.
Deﬁnition 5 (N-Extension) .
For a function f : R n !
R and for N > n , we deﬁne its N -extension¯ f : R N !
R as ¯ f ( x 1 , x 2 , ..., x n , x n +1 , ..., x N ) =
f
( x 1 , x 2 , ..., x n ) .
Theorem 1.
Consider a neural network of size E with initialization that is target agnostic in thesense that it is invariant under permutations of the input 5 .
Let f : {± 1 } n ! {± 1 } be a balancedtarget function.
Let ¯ f be the 2 n -extension of f as deﬁned in Deﬁnition 5.
Let f ( t )NN be the output of
SGD with gradient precision C and batch-size b after t time steps.
Then, for  small enough 6 and forb large enough 7 , the generalization error satisﬁes
[Equation]
[Equation]
Theorem 1 states a lower bound for learning in the extended input space.
We use the input doubling toguarantee that the hypothesis class F resulting from the orbit of ¯ f , i.e., orb( ¯ f ) =
{ ¯ f  ⇡ : ⇡ 2 S 2 n } , 224 is not degenerate to a single function, as this could then be learned using a proper choice of theinitialization (i.e., one can simply set the weights of the neural network at initialization to representthe unique function, if the network has enough expressivity).
Instead, the input doubling prohibitssuch representation shortcut and ensures that the structural properties of the function is what createsthe difﬁculty of learning, irrespective of the choice of the initialization.
For instance, consider thefull parity function on all of the input bits.
The orbit of this function contains only that speciﬁcfunction, and one can learn that function by choosing a proper initialization on a neural net ofdepth 2.
However, with an input doubling, this function becomes hard to learn no matter what theinitialization is [Kea98, AS20].
One can remove this input doubling requirement by assuming that fis non-extremal (i.e., no terms of degree ✓ ( n ) in the Fourier basis) and non-dense (i.e., poly ( n ) -sized
Fourier spectrum)
, see Appendix B.
The proof of Theorem 1 uses [AS20] which obtains a lower-bound in terms of the cross-predictability(CP) (instead of the noise stability).
The CP is a complexity measure of a class of functions, rather thana single function.
For the orbit of ¯ f , the CP is deﬁned as CP(orb( ¯ f ))
= E ⇡ ⇠ U S 2 n [ E X ⇠ U F 2 n 2 [ ¯ f ( X ) ·¯ f  ⇡ ( X )] 2 ] .
We give a more general deﬁnition of CP in Appendix A (we believe that the CP alsoextends to other invariances than permutations and non i.i.d. distributions).
Theorem 1 states that if the target function is highly noise unstable, speciﬁcally if there exists 241  < 1 / 4 such that Stab  [ f ] decreases faster than any inverse polynomial in n , then GD will notlearn the 2 n -extension of f (or f itself if it is non-extremal/dense) in polynomial time and with apolynomially sized neural network initialized at random.
So in that sense, the noise-stability givesa proxy to generalization error, as observed in [ZRKB21].
More speciﬁcally, this result is aboutfailure of the weakest form of learning no matter what the architecture is.
One could also consider‘regular’ architectures (such as with isotropic layers) and stronger learning requirements; for this itis known that the ‘Fourier leap’ from [ABAB + 21] is a relevant complexity measure, and we leaveinvestigations of regular architectures to future work.
More details of the proof of Theorem 1 are in
Appendix A. In Appendix D, we explain how the noise stability of PVR functions can be computed,and the implications to the result of Theorem 1.
Mismatched setting
In this section, we focus on the generalization error under the distribution shift setting, more speciﬁcally the canonical holdout setting deﬁned in Deﬁnition 2.
Namely, assume that at training component 254 k is frozen to 1 , and assume it to be released to Unif {± 1 } at testing.
Our experiments show that in 255 this setting, for some relevant architectures, the generalization error is close to the value of a standardmeasure in Boolean analysis, namely the Boolean inﬂuence of variable k on f .
3.1 Boolean inﬂuence and generalization
To explain the connection between generalization error and Boolean inﬂuence, we start with a simplelemma relating the Boolean inﬂuence to the ` 2 -distance between the true target function and thefunction obtained by freezing component k (which we call the “frozen function”).
Lemma 1.
Let f : {± 1 } n !
R be a Boolean function and let f  k be deﬁned as f  k ( x ) :
= f
( x  k ) 262 where x  k
( i )
= 1 if i =
k and x  k ( i ) =
x ( i ) otherwise.
Then, 12 E X ( f ( X )  f  k ( X ))
=
Inf k ( f ) .
The proof of Lemma 1 can be found in Appendix C. In Section 3.2, we present experiments thatdemonstrate the relation between the Boolean inﬂuence and the generalization error for differentarchitectures.
In Section 3.3, we focus on linear models, namely, linear regression and linear networks.
3.2 Experiments
We consider three architectures for our experiments: multi-layer perceptron (MLP) with 4 hiddenlayers, the Transformer [VSP + 17], and MLP-Mixer [THK + 21].
For each architecture, we train themodel while freezing coordinate 1, then coordinate 2 and so on, until coordinate n and comparethe generalization error with the Boolean inﬂuence of the corresponding coordinates of the targetfunction.
We train our models using ` 2 loss and mini-batch SGD with momentum and batch-sizeof 64 as the optimizer.
Moreover, we have repeated each experiment 40 times and averaged theresults.
Furthermore, note that for the MLP model, we pass the Boolean vector directly to themodel.
However, for the Transformer and MLP-Mixer, we ﬁrst encode +1 and  1 tokens into 256 275 dimensional vectors and then we pass the embedded input to the models.
More details on trainingprocedure as well as further experiments are presented in Appendix F.
Inﬂuence v.s. canonical holdout generalization.
In this section, we consider a Boolean PVR 278 function (as in Def. 1) with 3 pointer bits to be learned by the neural networks.
For this functionwe set window size to 3 and use majority-vote (deﬁned as g ( x 1 , . . .
x r ) = sign( x 1 + · · · + x r ) , 280 outputting  1 , 0 , or 1 ) as the aggregation function on the windows.
The generalization error of the 281 models on this PVR function and its comparison with the Boolean inﬂuence are presented in Figure 2.
The x-axis corresponds to the index of the frozen coordinate, that is from 4 to 11 (we do not freezethe pointer bits).
On the y-axis, for each frozen coordinate we report the generalization error obtainedin the corresponding holdout setting for MLP, the Transformer, and MLP-Mixer, together with thevalue of the Boolean inﬂuence of the frozen coordinate on the target function.
It can be seen that the generalization error of MLP and the Transformer can be well approximated by the Boolean inﬂuence.
Whereas, the generalization error of MLP-Mixer follows the trend of the Boolean inﬂuence with anoffset.
We remark that in Figure 2, the value of the Boolean inﬂuence (and gen. error) in the PVRtask varies across different indices due to boundary effects and the use of truncated windows (see
Def. 1).
We refer to Appendix F for further experiments on other target functions.
Implicit bias towards low-degree representation.
Consider the problem of learning a function 292 f in the canonical holdout setting freezing x k = 1 .
Denote the Fourier coefﬁcients of the frozenfunction
f  k (as deﬁned in Lemma 1), by ˆ f  k ( S ) , for all S ✓ [ n ] := { 1 , ..., n } (recall, ˆ f  k ( S ) =
E X
[ f  k ( X )  S ( X )] ).
For S such that k 62 S , the neural network can learn coefﬁcient ˆ f  k ( S ) 295 using either  S ( x ) or x k ·  S ( x ) =
S [ { k } ( x ) (since these are indistinguishable at training).
The 296 low-degree implicit bias states that neural networks have a preference for the lower degree monomial,i.e.,  S .
According to Lemma 1, the generalization error will be close to the Boolean inﬂuence if S is learned faster than  S [ { k } and thus the term ˆ f  k ( S )  S ( x ) in the Fourier expansion of f  k , is 299 mostly learned by the lower degree monomial.
Figure 3 shows this bias empirically for the abovementioned PVR function and for frozen coordinate k = 6 .
Figure 3 (left) shows that the MLP modelhas a strong preference for low-degree monomials, i.e., it captures the monomials in the originalfunction using monomials that exclude the frozen index.
Therefore the generalization error of MLPis very close to the Boolean inﬂuence as seen in Figure 2.
Whereas, Figure 3 (right) shows that
the
MLP-Mixer model has a weaker preference for lower degree monomials and hence, its generalizationerror follows the trend of Boolean inﬂuence with an offset, which is also presented in Figure 2.
The coefﬁcient of these monomials in the original function are ˆ f ( { 6 } )
= 0 .
1875 , ˆ f ( { 3 , 6 , 7 , 8 } ) = 0 .
0625 , ˆ f ( { 6 , 7 , 8 } )
=
0 .
0625 , and ˆ f ( { 1 , 6 } )
=
0 .
3.3 Linear Models
In this section, we will focus on linear functions and linear models.
First, we state a theorem forlinear regression models.
Furthermore, we show experiments on the generalization error of linearneural networks and its relation with the depth and initialization of the model.
Theorem 2.
Let f : {± 1 } n !
R be a linear function, i.e., f ( x 1 , · · · , x n ) =
ˆ f ( ; ) +
P ni
=
ˆ f ( { i } ) x i .
311 Consider the canonical holdout where the k -th component is frozen at training for a linear regressionmodel where weights and biases are initialized independently with the same mean and variance 313  2 .
Also assume the frozen function is unbiased, i.e., E X  k
[ f ( X )]
= 0.
In this case, the expected 314 generalization error (over different initializations) of the function learned by GD after t time steps isgiven by E ⇥
[gen( f, ˜ f
( t )  k )] =
Inf k ( f ) + o  2 (1) + O ( e  ct ) , where c is a constant dependent on thelearning rate.
Moreover, if the frozen function is biased, the expected generalization error is equal to
E ⇥
[gen( f, ˜ f
( t )  k )]
=
( ˆ f ( ; )  ˆ f ( { k } ))
+ o  2 (1) + O ( e  ct ) .
Remark 2 (Kernel regression) .
Our result would still hold if, instead of linear regression, we performed kernel regression with a kernel K that is invertible under the training distribution, i.e. suchthat E X,X
⇠ U  k [ K ( X, X 0 )] is invertible.
Furthermore, one could try to remove the invertibility 321 assumption by adding a regularization term.
Remark 3 (Staircase learning) .
An attempt to extend the above result to non-linear function consistsof considering staircase functions [ABAB + 21, ABAM22], and extending [ABAM22] to a settingwith bias in order to show that SGD learns the lowest-degree representation under proper mean-ﬁeldinitialization of depth-2 neural networks.
The proof of Theorem 2 is presented in Appendix C.
In the rest of this section, we empiricallyshow that the condition of zero bias stated in Theorem 2 is no longer necessary if linear neuralnetworks of large enough depth or small enough initialization are used.
In fact, the generalizationerror of linear neural networks makes a transition from the value proved in Theorem 2 to the Booleaninﬂuence as deeper models or smaller scales of initialization are used.
We take f ( x 1 , x 2 , . . .
, x 11 )
[-=
-]{+= 331 
+}
+ 2 x 1  3 x 2 + 4 x 3  · · ·  11 x 10 + 12 x 11 as the function that we want to learn.
We consider 332 linear neural networks with hidden layers of size 256.
Figure 4 (left) shows the effect of depth: weinitialize weights and biases independently using the uniform distribution
U (  1 p N in , 1 p N in ) where
N in is the input dimension of the respective layer.
We plot the generalization error in the holdoutsetting with respect to the corresponding frozen coordinate at training, together with the value of the
Boolean inﬂuence of each coordinate.
We observe that with the increase of depth, the generalizationerror tends to the Boolean inﬂuence.
Figure 4 (right) show the role of initialization: we take a linearneural network with 3 layers and we initialize weights and biases using the uniform distribution
U (  N  ↵ in , N  ↵ in ) with ↵ taking value in { 0 . 5 , 1 , 1 . 5 , 2 , 2 . 5 } .
It can be seen that as the initialization 340 scale decreases, the generalization error tends to the Boolean inﬂuence.
Conclusion
This paper ﬁrst establishes a formal result that supports a conjecture made in [ZRKB21], relatingthe noise sensitivity of a target function to the generalization error.
This gives a ﬁrst connectionbetween a central measure in Boolean analysis, the noise-sensitivity, and the generalization errorwhen learning Boolean functions with GD.
The paper then investigates the generalization error underthe canonical holdout.
The ‘low-degree implicit bias hypothesis’ is put forward and supported bothexperimentally and theoretically for certain architectures.
This gives a new insight on the implicit biasof GD when training neural networks, that is speciﬁc to Boolean functions such as the Boolean PVR,and that relates to the fact that certain networks tend to greedily learn monomials by incrementingtheir degree.
In particular, this allows to characterize the generalization error in terms of the Booleaninﬂuence, a second central notion in Boolean Fourier analysis.
Boolean measures thus seem to havea role to play in understanding generalization when learning of ‘reasoning’ or ‘logical’ functions.
There are now many directions to pursue such as: (1) extending the realm of architectures/models forwhich we can prove formally the Boolean inﬂuence tightness, (2) considering more general holdoutor distribution shift models, (3) investigate how the picture changes when the bits/digits are givenby MNIST images, (4) better understanding when the low-degree implicit bias is taking place ornot, within and beyond PVR, since the Boolean inﬂuence is not always tight in our experiments(e.g., MLP-Mixers seem to have a worse performance than the Boolean inﬂuence on PVR; see also
Appendix F for other functions), (5) investigating how to ‘revert’ the implicit bias towards low-degreewhen it is taking place, to compensate for the unseen data; this will require justifying and engineeringwhy certain symmetries are favorable in the learned function.
Checklist
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’scontributions and scope?
[Yes](b) Did you describe the limitations of your work?
[Yes](c)
Did you discuss any potential negative societal impacts of your work?
[N/A]
Webelieve there are no potential negative societal impacts.(d)
Have you read the ethics review guidelines and ensured that your paper conforms tothem?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes]
(b) Did you include complete proofs of all theoretical results?
[Yes]
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[Yes] See supplemen
-tary material
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how theywere chosen)?
[Yes] See Section 3.2 and Appendix on experiment details.
[Table] (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] The 95% conﬁdence interval is reported if relevant.(d)
Did you include the total amount of compute and the type of resources used (e.g.,type of GPUs, internal cluster, or cloud provider)?
[Yes] See Appendix on experimentdetails [Table]
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[Yes]
[Table]
(b) Did you mention the license of the assets?
[Yes]
[Table]
(c) Did you include any new assets either in the supplemental material or as a URL?
[Yes](d) Did you discuss whether and how consent was obtained from people whose data you’re [Table]
using/curating?
[N/A](e)
Did you discuss whether the data you are using/curating contains personally identiﬁableinformation or offensive content?
[N/A]
[Table]
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, ifapplicable?
[N/A](b)
Did you describe any potential participant risks, with links to Institutional Review
[Table]
Board (IRB) approvals, if applicable?
[N/A](c)
Did you include the estimated hourly wage paid to participants and the total amountspent on participant compensation?
[N/A]
[Table]