Skip to content

Futrell2018 GPT-Neo score changes at context overflow with HF sliding KV cache #415

Open

Description

@hxu129

Observation

The current HuggingfaceSubject behavioral-only sliding KV-cache path gives a materially different Futrell2018-pearsonr score for gpt-neo-1.3B once the 2,048-token context window is exceeded. This appears to be an evaluation-regime change, not only a runtime optimization.

Using the same local EleutherAI/gpt-neo-1.3B checkpoint, current Brain-Score Language benchmark/data, and official HF subject code, I compared:

  1. The current adapter unchanged (_use_kv enabled for reading times).
  2. The same adapter with only the _use_kv assignment forced to False, so each truncated context is recomputed.

On the complete 10,256-word Futrell dataset, the cached path returned raw Pearson r 0.346873, ceiling-normalized 0.404260. The no-cache path returned raw 0.277637, normalized 0.323570. The historical public gpt-neo-1.3B value is 0.32 at two-decimal display precision; this is a consistency check, not proof that every historical dependency was identical.

In a paired 2,600-word diagnostic saving every word's surprisal, the first 1,500 words agreed to median absolute differences below 0.000007 bits. The first difference above 0.1 bit was at zero-based word index 1719; the untruncated tokenizer context first exceeded 2,048 tokens at index 1718. For indices 2,000–2,599, the median absolute surprisal difference was 7.84 bits. On the post-overflow subset (indices 1718–2599, excluding sentence-initial words), correlation with the same human reading times was 0.3032 cached versus 0.2058 recomputed. Before overflow, both were approximately 0.3142.

The complete no-cache run saved all 10,256 predictions. Independently recomputing Pearson r on the 9,775 eligible words reproduced its receipt exactly, and its first 2,600 finite predictions matched the separate diagnostic with zero maximum absolute difference.

Why this matters

PR #400 added the sliding cache after the public GPT-Neo score was recorded. Slicing old KV states after overflow is not generally equivalent to recomputing the last 2,048 tokens, especially with absolute positional embeddings. As a result, comparing newly computed AR scores with existing public scores may mix operating regimes even for the same model and benchmark identifier.

Could the maintainers clarify whether the sliding cache is intended to define a new behavioral scoring regime? If it was intended as an exact acceleration, the overflow path may need a parity fix. If the change is intentional, a benchmark/score version or visible protocol note would help prevent misleading comparisons. I am reporting the measured discrepancy and cause isolation here, not claiming a model architecture effect.

Activity

  1. self-assigned this
    on Sep 29, 2026
  2. KartikP commented on Oct 5, 2026

    @KartikP
    Contributor

    Thanks for the detailed report and the careful cause isolation. This looks like an oversight in #400: the sliding cache was meant as a pure speedup, not a change to the scoring regime, so the overflow path should match recomputing the truncated window. I'm testing a parity fix now and will follow up here with results and on any scores that need to be recomputed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions