The question
Given two molecules, A and B, predict the excitonic coupling between them from their geometries alone. The library holds 200 A-monomers and 200 B-monomers, which pair into 40,000 dimers, and every coupling in the table was paid for with a quantum-chemistry calculation. So the question a model is actually asked here is not whether it can fit 40,000 numbers. It is how few of those calculations you need before the model can supply the rest. That is what a learning curve measures, and it is the deliverable.
The curve I got was not the shape I expected, and chasing the reason turned out to be worth more than the model.
The representation
Every monomer in the library has the same 15 atoms, the same composition (C6H5NO3),
and — this is the part worth noticing — the same atomic order. That makes the usual Coulomb-matrix
machinery unnecessary. Row k already denotes the same atom in every molecule, so there is
nothing to sort and no reason to fall back on eigenvalues. The diagonal, 1⁄2 Z2.4,
is then identical in all 400 molecules and carries no information at all, so it goes. What is left
is the 105 off-diagonal entries of the upper triangle, checked against dscribe.
Model and cost
A pair is scored with the product kernel K((A,B),(A′,B′)) = k(A,A′) · k(B,B′), with k Laplacian, exp(−d/σ), and d the L1 distance between descriptors. On a full grid of training dimers the kernel matrix is a Kronecker product, K = KA ⊗ KB, so kernel ridge regression can be solved from the eigendecompositions of the two 200 × 200 blocks rather than from the product — O(n3) instead of O(n6).
That is not a micro-optimisation. Fitting all 40,000 dimers takes 8 ms. The dense 40,000 × 40,000 solve it replaces would need a 12.8 GB kernel matrix before it did any arithmetic. Hyperparameters come from cross-validation grouped by monomer, so no monomer leaks across folds, and targets are centred before solving.
Two regimes, and they disagree
There are two different questions hiding in "how much data do you need", and they have to go on the same axis to be compared. Hold out dimers, and you are asking the model to predict a new pairing of molecules it has already met. Hold out monomers, and you are asking it to predict a molecule it has never seen. The horizontal axis is training pairs in both cases, because a pair is what costs a calculation; the 400 monomer geometries are cheap by comparison.
The lower curve does what a learning curve should. It passes through the reference band the brief quotes as achievable and ends at an MAE of 0.0083 with 8,000 training pairs. That also settles a question the raw data leaves open: the couplings have a standard deviation of 38.4 and a range of about ±110, so a reference MAE of 0.01 to 0.1 is either quoted in different units or the target is simply very learnable. It is the second. There is no unit mismatch.
The upper curve does nothing at all. Going from 16 training pairs to 10,000 — six hundred times the reference data — moves the error from about 22 to about 11, against a target standard deviation of 38. Same kernel, same descriptor, same solver. It survives a wide search over σ and λ, both kernel families, and standardised descriptors, and it barely moves as the training monomers go from 50 to 180, so it is not a tuning failure. The cause is visible directly in the descriptors: take any monomer's nearest neighbour in Coulomb-matrix space, and the two most similar molecules in the library still differ in their latent coupling factors by about three quarters of the typical magnitude. Two hundred molecules scattered through a 105-dimensional space have no local neighbourhood to interpolate across.
So the 40,000 labels carry far less information than their count suggests. They pin down the 400 monomers in the library and say very little about a 401st. More pairs cannot fix that. Only more molecules could.
The kernel width has no interior optimum
Worth stating plainly, because it makes the fixed σ a deliberate choice rather than a loose end. Widen the kernel and the error keeps falling, while the kernel matrix becomes numerically catastrophic — and the error does not care.
| σ (× median L1) | test MAE | cond(K) |
|---|---|---|
| 4 | 0.24171 | 3.5 × 105 |
| 16 | 0.06062 | 8.3 × 106 |
| 64 | 0.01535 | 1.5 × 108 |
| 256 | 0.00386 | 2.4 × 109 |
| 1024 | 0.00097 | 3.9 × 1010 |
| 4096 | 0.00025 | 6.3 × 1011 |
A kernel that keeps improving as it flattens towards a linear model is telling you the target is much simpler than the representation. Re-tuning σ at every point of the learning curve would only track the edge of whatever grid it was given, and would make each point a different model, so the curves above fix σ at 64 × the median L1 distance and λ at 10−10.
The knee
Now the shape. A learning curve in this field is normally a straight line on log-log axes — error falling as a power of training-set size — and the exponent is the number you quote. This one is not straight. It is nearly flat out to a few hundred pairs, drops two orders of magnitude between 500 and 2,000, and flattens again. Fitting a power law would produce a number, and the number would be a summary of something that is not a power law.
The drop lands at about 800. And 800 is 2 × (200 + 200): exactly the number of free parameters if every coupling were a product of two numbers per monomer. That is a hypothesis read off a curve, which is worth very little until it is checked directly — so, checked directly. The coupling matrix is exactly rank 2. Its third singular value is 1.1 × 10−10 against a leading 5,586; that is the cliff in the figure at the top of this page. Fit the best rank-2 matrix agreeing with the observed entries and read off the rest, using no chemistry whatsoever — not the Coulomb matrix, not the kernel, not σ — and every held-out coupling comes back to a maximum error of 10−11.
Which is the real explanation of the knee. The error collapses exactly where enough dimers have been seen to fix 800 numbers.
Putting the two together
The obvious reading — that the chemistry was never needed — is wrong, and the way it is wrong is the useful part. Completion has to identify 800 numbers, and below roughly that many observations the problem is underdetermined: some monomers appear in too few measured pairs to place at all, and the method does not degrade so much as fail. Kernel ridge never fails that way. It has a smooth prior to fall back on, so it is graceful when data is scarce, even though it plateaus early when data is plentiful. The two have precisely opposite strengths, and the crossover sits where the count of observations passes the count of unknowns.
So: seed the completion with the kernel's prediction instead of with zeros. Where observations are plentiful they pin the matrix down and the seed is irrelevant. Where they are scarce and the matrix is underdetermined, the seed decides which of the many consistent completions gets chosen, and the kernel's smooth guess is a good one.
| training pairs | kernel ridge | rank-2 completion | hybrid |
|---|---|---|---|
| 125 | 9.37 | 31.2 | 9.37 |
| 250 | 5.66 | 31.8 | 5.65 |
| 500 | 1.70 | 33.2 | 1.65 |
| 1,000 | 0.195 | 10.3 | 0.122 |
| 2,000 | 0.041 | 0.857 | 0.0036 |
| 4,000 | 0.0157 | 4.1 × 10−4 | 2.4 × 10−7 |
| 8,000 | 0.0083 | 2.1 × 10−12 | 1.9 × 10−12 |
The crossover region is exactly the one that matters if the point is to spend fewer reference calculations. At 2,000 training pairs the kernel alone sits at 0.041 and the completion at 0.86, while the hybrid is at 0.0036 — an order of magnitude below the better of its two parents. At 4,000 it is at 2.4 × 10−7 while the kernel is still near 0.016. That is the same accuracy from far fewer calculations, which is what putting structure and chemistry together buys over choosing one of them.
The Gaussian process variant
With the same product kernel, a GP and kernel ridge give the same prediction — the posterior mean is the ridge solution, with the noise variance playing the role of λ. What the GP adds is a posterior variance, and the useful question is whether that variance is honest about the split the learning curve just exposed. It should be small for a pair of monomers seen elsewhere in training and large for a pair involving a genuinely new molecule. It is:
| test pairs drawn from | posterior variance | reading |
|---|---|---|
| monomers seen in training | 1.0 × 10−12 | effectively certain |
| monomers never seen | 3.5 × 10−5 | seven orders of magnitude less sure |
A model that is going to fail on unseen molecules should at least know that it will. This one does, which is the difference between a limitation and a hazard.
Scope
- The exact rank-2 structure is a property of this generated dataset, not a claim about coupling in general. A real coupling table would be only approximately low-rank, its working rank read off the singular-value spectrum rather than assumed — and the hybrid degrades gracefully in that case, because the kernel seed is what carries it when the low-rank part is not exact.
- The monomer-transfer limit is the honest headline. The model transfers between dimers of known monomers; it does not transfer to new molecules. Predicting a new molecule needs more molecules, not more dimers.
- The learning curve's error bars cover draw-to-draw variance at fixed σ and λ, not the hyperparameter selection itself.
- 200 monomers a side is small enough that the 105-dimensional descriptor space is essentially empty, which is the direct cause of the upper curve's flatness. A larger library is the experiment that would settle it.
Reproducibility
The notebook runs top to bottom from a clean kernel and is self-checking: the correctness
conditions are asserts, not printed output. The Coulomb matrices are checked against
dscribe, the Kronecker solve against a dense solve, and the product kernel against the
concatenated-descriptor kernel it claims to be identical to. Every figure on this page regenerates
from one script against the original data.