Summary
The authors use n-gram statistics and regular expression templates to study how well they describe the predictions of Transformers-based models. They craft rules that vary in context length and/or the number of marginalised context variables to predict the next word. They use their framework to study overfitting (and memorisation) of increasingly complex template rules. They discover a counter-intuitive phenomenon: longer n-gram rules can be less predictive of a model's behaviour than shorter; an insight they name model-variance trade-off.
Strengths
The idea of defining templates that apply both to the data distribution and the model's generation is good and sound.
I appreciate the idea of having a mathematical methodology as it states clearly what is the objective and how rules are defined (despite a few things I do not fully understand and I reckon may be wrong; see next sections).
Findings are noticeable: 7-gram rules better approximate a model's behaviour than 8-grams (but please refer to the next section for. a caveat on this finding).
The model-variance explanation of why some rules are better than others is intriguing (but see weaknesses).
Weaknesses
I am concerned about the evaluation, in particular Eq. 10. You measure how closely the dataset adheres to the template rules and compare it to your model’s behaviour. With such a small dataset, the fact 7-gram rules better approximate the distribution of data may be caused by a considerable drop in the overall frequency (and thus, variance) of 8-grams (vs. 7-grams). See a question about that.
In summary, my biggest concern is whether the best-rule is identified by the model-variance trade-off or the intrinsic larger variance of 8- vs. 7-gram rules (i.e., 8-grams are more difficult to predict because you don't have enough data, so the 7-gram is optimal). With larger datasets and different models, results can vary.
In fact, another major concern is that you only have two datasets and one model to prove your hypothesis.
Furthermore, it is not clear if you take inspiration from Chinchilla's architecture (it seems to me you do not use a pre-trained model). Otherwise, it would be nice to test this hypothesis with smaller, purely next-word-prediction trained models (even gpt-2 or Pythia would be good).
Other concerns (in descending order of importance):
Figure 2: low R-squared may mean the regression failed and not lack of "correlation". Furthermore, you mention 7-grams but some plots are for 8grams (see y-axis of figs (a,b)). While I understand why, the plot is named 7-grams, so I was a bit confused at the beginning. It's better to show less in this case or make it clear also in the caption that the top-plots refer to 8grams.
(minor) Equation 10 seems to me wrong: p and q are distributions, you can’t subtract them (unless i stands for p(t=v_i |C), but that has to be clarified).
If not, probably you want to say something like Divergence(p || q). On a side note, I think this is one of the cases where an asymmetric rule makes sense. You want to measure the amount of “information” a model lacks to turn p (its prediction) into q (the ground truth).
(minor) I am a bit confused by the notation in Section 4 (see questions, though the general idea is clear enough).
Questions
In order of importance:
(major) Can you give a clear definition of model-variance in terms of predictive capabilities of the model and when compared to an n-gram rule?
(major) Have you checked if there is a large drop in the variance of 7 vs. 8 grams in your dataset? I suspect that causes the 7-gram rules to be optimal and not the model-variance trade-off. In other words, the variance of 8-grams in your dataset is so large (because you don't have enough data), that the architecture you use cannot approximate it.
(minor) What if the optimal rule you find only correlates with a model's behaviour (e.g., due to the size of the dataset)? Can you give some evidence that a model is actually using n-gram rules to predict the next token?
(minor) Eq. 10: what is i? Is p(t=v_i | C), with v_i the i-th token in the vocabulary, or the i-th run of the model?
(minor) Line 111, the expression +-*+ should produce C_{-5}*C_{-1} and not C_{-4}*C_{-1}, or am I missing something in your notation? Is it for the left padding you mention earlier?
(minor) Eq. 6 (left hand side): why don’t you have C_{-4} at the denominator?