Week 4 — Gardner’s Capacity Calculation
Notes for the neural-networks course, Unit 1. Written by an AI assistant under the researcher’s supervision; see ai-authorship.
Week 3 answered the feasibility question exactly, at zero margin, by counting regions. Demand a margin and the counting stops working, and the question becomes one of measuring a volume in a high-dimensional space with quenched disorder — which is the problem the replica method was invented for. This is the week where the course’s subject and the student’s training coincide most completely, and also the week where the course is most careful about what a method establishes.
Learning goals
- Say why the quenched average is the object of interest and not .
- Follow the replica calculation from integer moments to the replica-symmetric saddle, naming which step is exact and which is an assumption.
- Derive the capacity formula and recover as an independent check.
- State what the linearized regime and the interpolation peak add to the two questions Cover and Gardner leave open.
Reading
Primary text. Chapter 2, §2.4 for the calculation, and §2.5 for the supplement of §5 below. §2.5 has no lecture hours in the current syllabus document and is optional independent study.
Primary literature, through the bibliography: Gardner (1988) and Gardner and Derrida (1988); Engel and Van den Broeck (2001) for the full treatment; Mézard, Parisi and Virasoro (1987) for the replica method itself. For §5: Jacot, Gabriel and Hongler; Chizat, Oyallon and Bach; Belkin and collaborators; Hastie and collaborators. The bibliography now links the six previously pending arXiv records, checked on 2026-09-19.
Prerequisites. Week 3. Saddle-point evaluation of an integral with an extensive exponent. Gaussian integrals.
The problem and the reading route
Keep the spherical weight vector and normalized fields of Week 3: and . The patterns have independent standard Gaussian components and independent random signs. We ask for the largest load admitting for all patterns, with .
Follow the volume, its replicated moment, the overlap matrix and finally the boundary. The replica-symmetric calculation is displayed below; its continuation and symmetry ansatz are assumptions, not a proof of the capacity theorem. The optional generalization supplement at the end has no allocated lecture hours in the current syllabus.
1. Why the logarithm is averaged, and not the volume
The volume of admissible weights depends on the patterns, which are drawn once and held. On the typical satisfiable branch, scales exponentially with , so defines an entropy density of solutions. The usual quenched calculation aims to characterize that typical logarithm. A regularization is needed before identifying it with a finite- average.
Averaging first would give something else. A few unusually favourable pattern sets can dominate while contributing nothing to what a typical sample looks like, so is not the typical entropy. For a positive regularized volume, Jensen’s inequality gives ; a capacity conclusion needs additional analysis.
The state is a weight vector, the disorder is the fixed set of patterns, and the constraints remove regions of the sphere. This is the familiar quenched-disorder setup. Whether an entropy concentrates around a typical value is a property to establish for this ensemble, not a consequence of calling it a free energy.
2. The replica identity, and one subtlety before it
For a positive random variable with sufficient integrability, expand , average term by term, and differentiate at . The attraction is on the right-hand side — an average of a logarithm, which we cannot compute, has been traded for a moment, which we can.
In symbols,
For instance, with makes this identity well-defined at finite . Applying the replica method to a hard feasible volume needs further care. When the ensemble permits infeasible finite- samples, those samples have and . For example, this occurs with sufficiently many random zero-margin constraints; it does not occur for every . An unregularized finite- average of the logarithm is therefore not a finite typical entropy, and a positive regularizer can be introduced, with the physics calculation extracting a typical satisfiable branch through large-, small-regularizer and limits taken in an order that is itself part of the method.
Physical picture. Note what kind of object the “number of replicas” is. For integer , is the honest partition function of copies of the weight vector exposed to the same patterns, and the coupling between copies is induced entirely by that shared disorder. Everything up to this point is a calculation about a real system of interacting copies. What is not a calculation about any system is the continuation of that answer to , and the discipline of the week is to keep the two kinds of statement apart.
3. Overlaps, the saddle, and the symmetry ansatz
For positive integer the moment factorizes over patterns, because different patterns are independent. For one pattern the fields are jointly Gaussian with covariance , so all the dependence on the weights enters through the Gram matrix of the replicas. That matrix is the order parameter.
Inserting a delta function for each pair and integrating out the weights at fixed Gram matrix gives a density proportional to , and the moment becomes an integral over with an extensive exponent:
The two terms have a direct meaning and the lecture should stop on them: the first is the geometric multiplicity of weight configurations with prescribed mutual angles, the second the probability that such a configuration meets the constraints. The factor permits a saddle-point evaluation.
The replica-symmetric ansatz sets off the diagonal. It is an assumption about where the saddle sits, not a consequence of the permutation symmetry of the problem, and must be checked separately from that symmetry.
For one pattern the replica fields have covariance . Their simultaneous constraint probability is . On the replica-symmetric branch, write
where are independent standard Gaussians and this representation uses . The eigenvalues of are , with multiplicity , and , with multiplicity one. Consequently
Define and , the Gaussian tail. Here is not the entropy of Week 1. Conditioning on the shared Gaussian gives
After the formal continuation to , the coefficient of in the exponent has the two pieces
The replica-symmetric entropy is obtained from the stationary value of , with the appropriate branch and limit prescription. The notation above retained only the leading exponential order; normalization factors independent of do not affect the saddle.
Increasing overlap makes several replicas more likely to satisfy the same pattern together. Different patterns remain independent. This is the competition with the geometric cost encoded by ; satisfying one pattern does not make a new independent pattern easier.
4. The capacity boundary
On the replica-symmetric branch, feasibility ends as : the mutual angular separation of typical solutions tends to zero on this branch. This overlap statement alone is not a finite- uniqueness proof. Writing , use as . The region supplies the divergent part of :
Set to obtain below. The sum becomes
with the geometric term supplying the and the constraints the . Stationarity in turns that into a second-order pole whose vanishing as requires the residue to vanish, and the capacity follows:
At Gaussian symmetry gives and — the number Week 3 obtained by counting regions, with no replicas and no continuation. That agreement is the week’s most important single fact, and it is a check on a method, not a justification of the operations the method used. Integration by parts gives the useful closed form
where is the standard Gaussian density and its cumulative distribution. At it gives : a larger buffer from the boundary accommodates fewer random assignments.
Physical picture. The word “replica” appears in this group’s research in a different construction, and the two are worth holding apart deliberately. The gravitational replica trick computes Rényi entropies from -fold replicated geometries and continues to reach a von Neumann entropy; this one computes moments of a volume over replicated weight vectors and continues to reach a quenched free energy. Different limits, different objects replicated, different physics. What they share is the move that carries the risk in both cases — integer moments computed honestly, then continued in — and in both cases the continuation is an assumption rather than a theorem. A student who has met that fact here will recognize it in the holography course.
5. Optional study: fitting and generalization
Cover and Gardner ask whether suitable weights exist. A learning rule asks which weights are reached, and generalization asks how they predict fresh observations. The linearized-learning supplement derives the tangent-kernel evolution and works through a solvable noisy linear model. It includes the distinction between the interpolation threshold and the random sign-feasibility threshold . These values belong to specified ensembles; their ratio is not a universal conversion between equality and inequality constraints.
This supplement remains independent study. It adds no meeting or assessment requirement to the current syllabus.
Checkpoints with answers
1. What is shared between replicas? The random patterns. The weight vectors are separate integration variables, so their response to the same pattern is correlated through their overlap.
2. Which line first requires more than an integer number of copies? Extracting the derivative at from an expression computed for positive integers requires a justified continuation, or here a stated replica prescription. The integer moment by itself does not specify that continuation.
3. Why does recover two? by Gaussian symmetry and unit variance. Thus , agreeing with Cover’s independent counting result.
Subtleties and fine print
Which steps are exact. The integer-moment construction, the factorization over patterns, the Gaussian field covariance and the identification of as the order parameter are all exact for Gaussian patterns at integer . The continuation to , the order of limits, and the replica-symmetric ansatz are not.
The ansatz is an assumption about the saddle. Permutation symmetry of the replicas does not imply a permutation-symmetric saddle. In other disordered systems it fails, and the machinery for what replaces it is outside this course.
A check is not a justification. Recovering shows that the method reproduces a known answer in one case. It does not license the same operations for binary weights, structured patterns, or any other ensemble, each of which requires its own analysis.
Capacity is not memory. The result concerns a specified family of random patterns with random labels and a specified retrieval criterion. Week 5 asks a different question about a different construction and gets a very different number, and the two do not contradict each other.
The supplement of §5 has no lecture hours. It is optional independent study. Giving it a meeting requires revising the course’s official syllabus document, which is an open decision.
Key claims and status
| Claim | Status |
|---|---|
| [Exact] for positive with enough integrability | |
| Factorization of over patterns; as the order parameter | [Exact] at integer , Gaussian patterns |
| [Exact] at integer | |
| Saddle-point form with extensive exponent | [Asymptotic] leading exponential order at fixed integer replica number |
| off the diagonal | [Replica-symmetric] — an assumption |
| [Replica-symmetric] | |
| , agreeing with Week 3 | [Exact] by Week 3’s counting; here a check on the method |
| [Replica-symmetric] | |
| Tangent-kernel flow | [Exact] for the linearized model; [Controlled approximation] for the network, with the drift as the control |
| Risk of the minimum-norm interpolator on both sides of | [Thermodynamic limit], isotropic Gaussian inputs; optimal ridge removes the peak |
What the week establishes
- The quenched average is the object with an extensive logarithm, and the replica identity reaches it from integer moments by an elementary expansion.
- All dependence on the weights enters through the Gram matrix of the replicas, which reduces the problem to a saddle point in one order parameter under the symmetry ansatz.
- The capacity formula, with recovered independently and as the effect of demanding a margin.
- The distinction between feasibility, the result of a learning rule and prediction on fresh observations. The last two questions are developed in the optional supplement.
What to carry forward. Two things, and they pull in opposite directions. The method is powerful enough to answer a question counting cannot reach, and it reproduces the one answer that can be checked independently. The continuation, choice of saddle and exchanges of limits require assumptions, which the course labels as such and will keep labelling. Holding both at once is the skill this week exists to build.
The practical session — guided calculation, part II
Varied: the margin , and the replica index through the steps where it is still an integer. Held fixed: the pattern ensemble — independent standard Gaussians with independent equally likely labels, so that the labels can be absorbed. Measured: nothing numerical. The session is a derivation carried out on paper: the determinant expansion to first order in , the shared-Gaussian representation of the correlated fields, and the balance.
Product: the two eigenvalues of the replica-symmetric matrix with their multiplicities; the coefficient of in ; the closed form with evaluated; and a written statement of which equalities hold at integer and which require the continuation.
Connections to other parts of the wiki
- Week 3 supplies the independent check at zero margin, and the counting whose thresholds §5 contrasts with.
- Week 5 changes the question again: the couplings are held fixed and the state evolves, and the capacity that results has a different meaning and a different number.
- The gravitational replica trick shares this week’s technical move and little else; §4 states the comparison precisely, and the wiki’s holography course develops that side (Lecture 27 of the course syllabus).
- Week 13 reads claimed transitions in trained models against the standard Week 3 sets and §5 sharpens.
- nn-llm-unit-1 — the block skeleton this note implements.
Start here · All weeks · Book and experiments · Previous week · Next week