Raster-Scan Anisotropy: code and result files for a top-heavy attention field in vision-language models

Xianzhe Liu · Zenodo (CERN European Organization for Nuclear Research) · 2026

Code, result files and rendered stimuli for a study of raster-scan anisotropy in vision-language models. What the work shows. A vision encoder flattens an image into a 1D token sequence by row-major raster scan, and a causal decoder can only attend backwards along that sequence. The resulting attention field is top-heavy: upper-half mass exceeds lower-half mass in 25/25 synthetic single-object stimuli (median ratio 1.97) and in 200/200 natural photographs (median 1.908). The effect reaches behaviour — moving only an object's row, with shape, colour and pixel count fixed, drops the probability that the model acknowledges it from 0.92 to 0.58 (denial 41.7% vs 8.3%) while colour identification stays flat at 0.875, so the failure is in reporting rather than in seeing. Three interventions locate the cause: re-serialising the identical vision-tower output in column-major order rotates the anisotropy from vertical to horizontal; destroying the height channel of the 2-D rotary encoding strengthens the bias rather than removing it; and collapsing the three-channel rotary decomposition to plain serial positions both collapses the field (median 1.44 → 0.81) and inverts it. A third architecture with 1D rotary positions shows no layer-mean field, bounding the claim. What is in the archive. The analysis package (attention-capture hooks for a stack in which output_attentions is silently ignored; the spatial visual anchoring intervention and its magnitude-matched permutation null; the scan-order permutation; the M-RoPE ablation; the rotary decay sweep), one script per experiment, the 28 result JSON files from which every reported statistic is computed, the rendered stimulus set, and the nine figures as vector PDF. Model weights are public releases and are not redistributed here. Verification without a GPU. code/verify_results.py recomputes 32 of the paper's headline statistics directly from results/*.json and prints each one next to the value the paper reports, exiting non-zero on any mismatch. It needs only numpy and scipy — no GPU, no model download, no LaTeX — and runs in about ten seconds. Scope. The top-heavy field is a property of the two tested vision-to-language stacks and holds on both synthetic and natural images. The behavioural consequence (position-dependent denial of a present object whose colour is still correctly identified) is specific to the primary model and to extreme synthetic displacement; it was not recovered on natural images at moderate or extreme framing. Claims are scoped accordingly in the paper.

Read the paper · More papers on PaperTik