Self-Prediction Residual: A New Method for Detecting Incorrect Target Boxes in a Single Pass

Linear decoding of a box from hidden states and comparison with the written box enables single-pass identification of VLM incorrect target boxes.
Target boxes generated by vision-language models often box the wrong object, and the average probability of coordinate tokens poorly discriminates box correctness. A study proposes the "self-prediction residual": linearly decode a predicted box from the model's hidden states and compare it with the actually written box; the difference serves as a single-pass detection signal without extra sampling or labels. On RefCOCOg, the residual improves AUROC for incorrect target box detection across fifteen single-pass scores by 0.026 to 0.049. But it does not universally improve detection of all errors—it changes the type of errors discovered: when reviewing 20% of answers, incorrect target box capture rises from 0.505 to 0.607 while overall error capture increases only slightly. Cost-weighted analysis shows the method breaks even when incorrect target boxes cost about 0.86 times other errors. The study is limited to RefCOCOg and MS-COCO; generalization remains to be verified.
Vision-language models (VLMs) can now box out targets in an image based on a text description, but the coordinates the model produces are often unreliable—it may box the wrong object. What's worse, the model's confidence in the box (the average probability of the coordinate tokens) has little to do with whether the box is correct. A recent study proposes using the "self-prediction residual" as a single-pass detection signal to identify incorrect target boxes without additional computation, providing downstream tasks with a more reliable screening criterion.

Why do we need to detect "incorrect target boxes"?
In grounded vision-language models, boxes are generated as text. When the task only cares about "whether the target object exists," boxing the wrong object (box on another object) has serious consequences. For example, in visual question answering, if the box points to a similar object in the background, subsequent reasoning may go completely off track.
However, existing methods usually rely on the average probability of the coordinate tokens as confidence, but this metric has weak discriminative power for box correctness. The researchers wanted to find a signal that can be computed in a single forward pass, without multi-round sampling, to flag cases where the box is on another object.
Grounded vision-language models refer to vision-language models that can align language expressions with image regions. Their typical output is not a simple category label but a sequence of coordinates generated as text (e.g., [x1, y1, x2, y2]), thereby "boxing out" the target referred to by the text in the image. Such models are usually based on autoregressive decoders that discretize coordinates into tokens and predict them one by one, so the quality of the box directly depends on the generation quality of these coordinate tokens. Unlike traditional object detectors, the box in a grounded VLM is part of the language generation process, and the model does not explicitly output a calibrated confidence score, which makes it difficult to judge "whether the box is actually correct."
AUROC (Area Under the Receiver Operating Characteristic curve) is a common metric for measuring the ranking ability of a binary classifier, with values between 0 and 1. In the error detection setting, it represents the probability that, when randomly drawing one incorrect box and one correct box, the incorrect box receives a higher detection score than the correct box. The closer AUROC is to 1, the better the score distinguishes incorrect from correct; 0.5 is equivalent to random guessing. AUROC is used rather than accuracy at a fixed threshold because it does not depend on a specific threshold choice and is suitable for comparing the overall discriminative power of different detection signals.
Self-prediction residual: "reading back" the box from hidden states
The researchers' core idea is intuitive: since the model's hidden states already encode information about the box location before it writes the box, one can linearly decode a "predicted box" from the hidden states and compare it with the box the model actually writes—the difference between the two is the "self-prediction residual."
In implementation, they fit a linear mapping for each model (no labels required) to read the box location from the hidden states. Although the accuracy of this reader is far lower than that of the model itself, the inconsistency between its output and the written box can effectively indicate that "the box is on the wrong object."
The researchers fixed the residual weights using labels from two models to ensure cross-model comparability.
A linear probe is a lightweight interpretability analysis tool: a linear classifier or regressor is fitted on the hidden states of a certain layer of a model to test whether a certain attribute is linearly encoded in that layer's representation. In this study, the researchers used a linear mapping to regress box coordinates from hidden states, essentially asking "whether the box location information already exists linearly in the hidden states." The probe can be fitted without labels (e.g., principal component regression or ridge regression) or trained with a small amount of annotated data. The probe's lower accuracy than the model itself is not contradictory—it only mines the linearly readable portion of information in the hidden states, whereas the model also relies on nonlinear computation and context when generating the box. But it is precisely the difference between this "imperfect" reader and the box written by the model that constitutes a detection signal sensitive to incorrect boxes.
Experimental results: AUROC improvement and error-type shift
On 1,200 reproduced items from the RefCOCOg test set, the researchers evaluated the enhancement of the self-prediction residual on fifteen single-pass detection scores. The results showed that for every base score, the residual improved the detection performance for incorrect target boxes: with the label-free probe and the probe trained on 2,000 annotated items, the AUROC improvement ranged from 0.026 to 0.049.
Interestingly, however, when evaluating all types of errors, the residual's effect on AUROC for the label-free probe was less than 0.02 (95% confidence interval). This means the residual does not universally improve error detection but rather changes the type of errors that are discovered. When reviewing 20% of the answers, the proportion of all errors captured rose slightly from 0.518 to 0.524, while the capture rate for incorrect target boxes increased significantly from 0.505 to 0.607 (post-hoc analysis).
In other words, the residual makes the system more "biased" toward discovering errors where the box is on the wrong object, rather than other types of errors.
Trade-offs in cost-sensitive scenarios
This shift in error type requires careful trade-offs in cost-weighted recall. The researchers point out that when the cost of an incorrect target box is about 0.86 times that of other errors, the residual method exactly breaks even; under the equal-cost assumption, its point estimate of benefit is positive.
This finding suggests that the value of the self-prediction residual depends on the application scenario. If boxing the wrong object is more costly (e.g., in autonomous driving or medical imaging), then the residual signal can bring real benefits; conversely, if all errors are equally important, the improvement is limited.
Cost-weighted recall is a method for evaluating detection systems when the costs of errors are unequal. Ordinary recall treats all errors equally, whereas cost-weighted recall assigns different weights to different types of errors and computes the weighted proportion of captured errors. When the cost of "boxing the wrong object" is higher than that of other errors, the system should prioritize capturing this type of error; otherwise, it need not. In this study, by varying the relative cost of incorrect target boxes, the researchers found the break-even point at which the method's benefit is zero (about 0.86 times), thereby quantifying under what cost structure the method is worth deploying. This analytical framework is commonly used in scenarios highly sensitive to specific error types, such as medical diagnosis and autonomous driving.
Limitations and outlook
The current results are based on the RefCOCOg list and MS-COCO images, and generalization to other datasets and model architectures still needs verification. In addition, the accuracy of the linear reader is far lower than that of the model itself, indicating that there is still room to mine box information from hidden states. Future work could explore more complex readers or combine multimodal signals to further improve the reliability of single-pass detection.
Overall, the self-prediction residual provides a lightweight approach to detecting incorrect boxes that requires no additional sampling, making it particularly suitable for downstream applications sensitive to incorrect target boxes.
One-line Summary
Linear decoding of a box from hidden states and comparing it with the written box enables single-pass identification of incorrect target boxes in VLMs.
Paragraph Summary
Target boxes generated by vision-language models often box the wrong object, and the average probability of coordinate tokens has weak discriminative power for box correctness. A study proposes the "self-prediction residual": linearly decode a predicted box from the model's hidden states and compare it with the actually written box; the difference can serve as a single-pass detection signal without additional sampling or labels. On the RefCOCOg test set, the residual improves AUROC for incorrect target box detection across fifteen single-pass scores by 0.026 to 0.049. However, the residual does not universally improve detection of all errors but changes the type of errors discovered—when reviewing 20% of answers, the capture rate for incorrect target boxes rises from 0.505 to 0.607, while the overall error capture rate increases only slightly. Cost-weighted analysis shows that the method breaks even when the cost of an incorrect target box is about 0.86 times that of other errors. The study is limited to RefCOCOg and MS-COCO, and generalization remains to be verified.
Related articles

Prompt Engineering for Beginners: From Writing Prompts to Engineering Thinking
Starting from the essence and four functions of prompts, this article systematically explains the six-step process, four success criteria, learning value, and practical limitations of prompt engineering to help you build a complete understanding.

Anthropic Launches Nasdaq IPO: AI Giant's Listing and Risk Disclosures
Anthropic officially launches its Nasdaq IPO under ticker ANT, with market valuation expected to potentially exceed SpaceX's record. The prospectus devotes nearly 100 pages to AI risks, while first-half revenue grew over 14x but net losses widened sharply, reigniting the AI bubble debate.

Rust cURL Clone Uses 4,832 unsafe Blocks—Is the Memory Safety Myth Broken?
A Rust cURL clone uses 4,832 unsafe keywords, challenging Rust's memory safety narrative. We analyze what unsafe really means, compare Fil-C, and examine rewrite motives.