Summary
This paper revists the idea of "entropy calibration" ([Braverman et al., 2020]) and proposes a new algorithm to calibrate the entropy of a language model:
- This paper examines the entropy of large language models (Llama 2 up to 70B, with and without instruction tuning), and shows that these models still exhibit a growing entropy rate, unlike human text's entropy rate which is lower and decreasing.
- This paper examines commonly used sampling methods (temperature, epsilon sampling, top-p sampling, top-k sampling), and shows that while these methods can achieve better entropy calibration with properly chosen parameters, the improvement comes at the cost of worse log-loss.
- This paper proposes a calibration algorithm that does not sacrifice log loss. The proposed algorithm is more practical than Algorithm 1 of [Braverman et al., 2020] and more accurate than Algorithm 2 of [Braverman et al., 2020].
[Braverman et al., 2020]: https://proceedings.mlr.press/v119/braverman20a.html "Calibration, Entropy Rates, and Memory in Language Models"
Strengths
- (clarity, quality) The examination of entropy rate of Llama 2 at various sizes and with various sampling methods clearly demonstrates that growing entropy rate is still a relevant problem for LLMs, making this paper very well motivated.
- (originality, quality, significance) The proposed calibration algorithm is more practical than Algorithm 1 of [Braverman et al., 2020] and more accurate than Algorithm 2 of [Braverman et al., 2020].
[Braverman et al., 2020]: https://proceedings.mlr.press/v119/braverman20a.html "Calibration, Entropy Rates, and Memory in Language Models"
Weaknesses
### Evaluation metrics
This paper presents extensive results when examining the issue of growing entropy rates with baseline models and sampling methods. It would be very useful if the proposed algorithm were also evaluated in the same manner. Currently, in Section 5.2, there is only an indirect evaluation of future entropy rates to justify the proposed method, and a small number of generation samples (from an uncalibrated model) are provided in the appendix with subjective qualitative evaluation. Providing a comparison in entropy rate in the same manner as Figures 1 & 4, as well as log loss will better support the claims in this paper.
### Novelty
The proposed algorithm can be viewed as an extension of Algorithm 2 of [Braverman et al., 2020]. The connection is not clearly discussed in the paper, and drawing the connection will help the readers better understand the contribution of this paper in context.
- In Algorithm 2 of [Braverman et al., 2020], the future entropy of only the immediate next step of the input model $\hat{p}$ is used in calibration and a single $\alpha$ is used to adjust weights at all time steps.
- In the proposed algorithm, the future context window is extended to $T$, the LLM's max sequence length, and a set of per-position $\{ \alpha_t \}$ is used instead.
- The proposed algorithm initially uses a recursive definition (Eq 9), but to improve practicality, an approximate surrogate
$\hat{p}'_\alpha$
(line 429) is instead used for the main results. This paper does not discuss in the choice of $\hat{p}'_\alpha$ in detail. It appears to me that the most obvious choice of that surrogate would be $\hat{p}$ just like Algorithm 2 of [Braverman et al., 2020].
### Experiment design
Algorithm 2 of [Braverman et al., 2020], while with a limited one-step lookahead entropy, is still an algorithm that should improve entropy calibration without hurting log loss. Therefore, the contribution of the proposed method would be much better quantatively understood if it could be compared with Algorithm 2 of [Braverman et al., 2020], especially given the close connection discussed above.
One of the main difference of the proposed algorithm from Algorithm 2 of [Braverman et al., 2020] is the future window size (1 vs $T$). It would be useful to also consider the possible window sizes in between for experiments, because smaller windows are cheaper computationally, and there might be a diminishing return in larger window sizes. Knowing the quality-compute tradeoff would be of great help to practioners.
The choice of $\hat{p}'_{\alpha}$ should also be evaluated in experiments. (Sorry, I had to break my paragraph here, otherwise the LaTeX markdowns mess up the text.)
While $\hat{p}$ appears to the most immediate choice, one can imagine an iterative process where the calibrated model from the previous iteration could be used as $\hat{p}'_\alpha$ for a new iteration to obtain a more accurately calibrated model. Perhaps that could be another way to get calibrated models more cheaply?
[Braverman et al., 2020]: https://proceedings.mlr.press/v119/braverman20a.html "Calibration, Entropy Rates, and Memory in Language Models"
Questions
- A few models achieve lower entropy than the log loss of human text (e.g. Llama-2-70b-chat-hf in Figure 1; many params in Figure 4). However, the log loss of human text is only an upperbound of the entropy of human text, one cannot thus conclude that such a model is not entropy calibrated merely based on the information presented so far in the paper (admittedly these models are unlikely to be entropy calibrated given how big the gap there is between them and the log loss of human text; but we don't know the difference between the log loss and the true entropy of human text either). Would there be a method to better substantiate the claim of such models not being entropy calibrated?
- In a few places (lines 17, 44, 246), entropy is described with the phrase "i.e. confidence". Should it be "i.e. uncertainty" instead, since higher entropy means less confidence (more uncertainty)?