{"id":"f2071a37-e8b5-44a3-8650-e89dcf278f95","arxiv_id":"2507.06679","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":6.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":4,"one_line_summary":"QUANet improves text-promptable object counting by training with quantity-specified text prompts, a vision-text quantity alignment loss, and a dual-stream density decoder.","lead":"This paper presents QUANet, a text-promptable object counter that trains a vision-language model to understand object quantities by adding numeric information to text prompts and using ranking-based losses. It reports state-of-the-art results on standard counting benchmarks and shows improved generalization to unseen object categories.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"The density-decoder prompt F_C is obtained by deleting the [num] token from the same contextualized QTP sequence used for L_align, so the true count leaks into density regression at training; the reported QTP gain may reflect this leakage rather than quantity awareness in the vision encoder.","rationale":"The reader identified the learnability of cosine similarity as the weakest assumption, but I find a more concrete and potentially more damaging confound: the training-time F_C is not equivalent to the inference-time category-only prompt because of BERT's contextualized representations. Even if the global similarity can be shaped by L_align, the density decoder may be exploiting count information that leaks through the remaining tokens after deleting the [num] token. This directly undermines the paper's causal story that quantity-oriented prompts improve counting via enhanced quantity awareness in the vision encoder. The concern is testable with a simple ablation, and the paper provides code, so a conditional verdict rather than rejection is appropriate. I did not choose the inconsistency in Eq. 2 for odd N=7 as the primary concern because it is likely a notational bug and does not challenge the core mechanism. The backbone mismatch in the SOTA table is also real but does not affect the internal ablation evidence. The leakage concern, however, is about the validity of the central ablation itself. Thus the reader's CONDITIONAL verdict is preserved: the authors should run the leakage-control ablation and report both the numbers and the F_C similarity diagnostic before the mechanism claim is accepted.","tokens_in":16298,"tokens_out":6006,"duration_ms":74209,"concrete_test":"Run an ablation in which F_C is computed by separately encoding the category-only prompt 'a photo of [class]' (no number) for the density-decoder branch, while still applying L_align to the full QTP-encoded sequences as in Sec. 3.4. Keep all other settings identical (N=7, µ=0.1, last-six-layer DINOv2 fine-tuning). If test MAE on FSC-147 remains close to 13.24 (within ~0.3), the QTP gain is attributable to alignment; if it rises toward the 15.10 of w/o QTPs, the reported gain is largely leakage. As a supplementary check, measure the cosine distance between F_C from 'a photo of 14 kiwis' after removing the '14' token and F_C from 'a photo of kiwis' encoded directly; a large distance under the frozen BERT would confirm the leak is non-trivial.","verdict_should_be":"UNCHANGED","load_bearing_attack":"Section 3.2 states that the category-conditioning feature F_C is obtained by 'removing the word embedding of the [num] token from F_Q'. Since the text encoder is a frozen BERT-base (top 9 blocks), token embeddings are contextualized: after encoding 'a photo of 14 kiwis', deleting the vector for '14' does not erase its influence on the surrounding tokens, so F_C still carries information about the number. During training, the density decoder therefore conditions on a prompt embedding that is a function of the true count, while at inference the category prompt 'a photo of kiwis' contains no count and produces a different F_C. The comparison between QUANet (test MAE 13.24) and QUANet w/o QTPs (15.10) consequently conflates two effects: (i) L_align improving the vision encoder's quantity awareness, and (ii) the decoder learning to read the count from leaked contextual embeddings. The paper does not ablate this distinction, and the Fig. 5 similarity visualization only shows that global image-text similarity increases after training, which does not isolate the mechanism. This is load-bearing because the central claim is that quantity-oriented prompting enhances counting through vision-encoder quantity awareness; a training-leakage confound would invalidate that attribution.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper introduces QUANet, a text-promptable object counting method that augments category prompts with explicit count information during training. A frozen BERT text encoder and a fine-tuned DINOv2 vision encoder are used with a novel quantity alignment loss applied to factual and counterfactual 'a photo of [num] [class]' prompts. The method also proposes a dual-stream adaptive counting decoder with Transformer and CNN streams, T2C-adapters, and a cross-stream quantity ranking loss. Experiments on FSC-147 and cross-dataset evaluations on CARPK, PUCPR+, and ShanghaiTech report state-of-the-art results among text-promptable methods, with extensive ablations of each component.","tokens_in":16579,"tokens_out":4319,"duration_ms":48660,"significance":"If the reported results and attributions hold, QUANet would be a meaningful advance in text-promptable class-agnostic counting, closing much of the gap to exemplar-based methods and demonstrating strong cross-dataset generalization. The paper's strengths include a clearly described loss formulation, systematic ablations of the proposed components, cross-dataset evaluation on four benchmarks, and public code release. However, the central mechanistic claim—that quantity-oriented prompts improve counting by enhancing quantity awareness in the vision encoder—is currently confounded by a training-time information leak in the category-conditioning feature, and the headline SOTA comparisons are partly confounded by a backbone change relative to prior methods.","major_comments":[{"comment":"","section":"Section 3.2, Section 3.4, Table 4"},{"comment":"","section":"Section 4.2, Table 1"},{"comment":"","section":"Section 3.2, Eq. (2), Sec. 4.1"}],"minor_comments":[{"comment":"","section":"Section 4.1"},{"comment":"","section":"Section 4.4, Fig. 5"},{"comment":"","section":"Section 3.4, Eq. (3)"},{"comment":"","section":"Table 5"}],"recommendation":"major_revision","confidential_remarks":"The central empirical results are likely reproducible from the described setup, and the ablations are commendably thorough. The main risk is that the paper's core scientific claim—that quantity awareness is enhanced in the vision encoder—has not been cleanly separated from a training-time label leak into the decoder input. That is fixable with the proposed ablation, so I recommend major revision rather than rejection. I would also encourage the editor to ask for a shared-backbone comparison with at least one prior text-promptable method, as the current SOTA table is not apples-to-apples."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Plainly: this is one of the stronger text-promptable counting papers I have seen recently. The quantity-ranked alignment loss is a real step past Paiss's coarse 1-to-10 negatives, the dual-stream decoder with unidirectional T2C adapters is a sensible architectural bet, and the cross-stream patch-ranking loss is new. The ablations are unusually thorough: each component is removed, replaced, or perturbed, and the DAC decoder is transplanted into CLIP-Count and VLCounter. Code is promised. That earns a serious referee.\n\nThe genuinely new pieces are the ordinal constraints on counterfactual prompt similarities and the cross-stream ranking loss. The citation set is honest and engages the relevant text-counting works; I do not see a self-citation problem.\n\nThe main soft spot is exactly the one in the stress-test note. Section 3.2 builds F_C by deleting the [num] token from F_Q, but with a frozen contextual BERT the remaining tokens still encode the number. At training the decoder therefore sees a prompt feature that leaks the true count; at inference it does not. The QTP-vs-no-QTP ablation (15.10 vs 13.24 test MAE) mixes two effects: the intended alignment-driven improvement in the vision encoder, and the decoder exploiting a training-time shortcut. I would not call this fatal, because test-time gain survives the train/test mismatch and the mAP ranking experiment (80.10 to 85.70) suggests genuine quantity awareness, but the attribution is muddied. The clean experiment is to keep QTPs and L_align while extracting F_C from a category-only prompt, and also to run a control with category prompts but no count anywhere.\n\nTwo smaller issues: the SOTA comparison is confounded by a backbone change (DINOv2+BERT vs CLIP in most baselines), though their same-backbone Baseline partially covers this; and there are no error bars, plus an odd/even N inconsistency in Eq. (2) given N=7. These are minor by comparison.\n\nBottom line: send it out. I would require the leak-control ablation before accepting the mechanism claim, and I would ask for seed-level variance, but the architecture and training scheme are worth engaging and will likely be built on.","headline":"Well-ablated counting paper with a real but fixable training-time leak confound in the prompt-feature ablation; worth reviewing, but the mechanism claim needs a clean control.","tokens_in":17125,"tokens_out":6150,"would_cite":true,"duration_ms":73125,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"Counting by naming counts: quantity-aware text prompts lift text-promptable counting on FSC-147, CARPK, PUCPR+, and ShanghaiTech.","keywords":["text-promptable object counting","quantity awareness","vision-language model","density map estimation","zero-shot counting","counterfactual text prompts","dual-stream decoder","ranking loss"],"falsifier":"Train QUANet with the counterfactual counts' labels randomly permuted (so the ordinal structure of $L_{\\text{align}}$ is broken while the positive/negative distinction stays); if test MAE on FSC-147 does not rise relative to the ordered version, the ordinal constraint is not the source of the gain. Alternatively, feed a fixed image with prompts 'a photo of k objects' for k = 1...20 and check whether predicted density changes monotonically; if it stays flat, the alignment did not transfer to inference.","tokens_in":16111,"feed_emoji":"🔢","tokens_out":5533,"duration_ms":53432,"temperature":0.7,"pith_summary":"The paper argues that text-promptable object counting fails to learn quantity because standard category prompts and contrastive losses treat all wrong numbers alike. To fix this, it proposes QUANet, which trains with quantity-oriented text prompts—'a photo of 14 kiwis' as a positive pair and 'a photo of 10/12/16/18 kiwis' as counterfactual negatives—and enforces an ordinal structure on image–text similarity scores. The claim is that this injected quantity awareness carries over to inference, when no number appears in the prompt, improving density-map counting. The paper also attributes gains to a dual-stream decoder that combines Transformer and CNN features through T2C-adapters and a cross-stream ranking loss. If right, it shows that auxiliary number-ordering supervision, not just category semantics, is what makes vision-language counters accurate.","feed_headline":"Quantity-aware text prompts top zero-shot counting on FSC-147","feed_subtitle":"Counterfactual count phrases in training cut MAE to 13.24 and transfer to four benchmarks.","key_machinery":"The central object is the quantity-oriented text prompt, written as 'a photo of [num] [class]' with the factual count $a_p$ and $N=7$ counterfactual counts $a_p \\pm k\\Delta$ for a dynamically chosen interval $\\Delta$ proportional to the count magnitude. Around it sit three mechanisms: (1) the vision-text quantity alignment loss $L_{\\text{align}}$ that orders image-text similarity scores by numerical distance from the true count; (2) the dual-stream adaptive counting decoder, which runs a Transformer stream and a CNN stream in parallel, with T2C-adapters (a cross-attention block plus a channel-excitation block) passing global Transformer knowledge into the CNN stream and a gating net fusing the two density maps; and (3) the cross-stream quantity ranking loss $L_{\\text{rank}}$ that compares patch counts across and within streams with an interval $l=5$. The machine does its work by making quantity ordering a training signal, then converting the enhanced visual features into density predictions.","core_discovery":"On the paper's own terms, the discovery is that a vision-language counter can be made quantity-aware by supervising the ordinal relation between an image and text prompts that state different object counts. QUANet constructs a factual prompt with the ground-truth count $a_p$ and counterfactual prompts with counts $a_p \\pm k\\Delta$, then applies a vision-text quantity alignment loss $L_{\\text{align}}$ that forces the positive pair to have the highest cosine similarity and forces negative pairs to be ranked by numerical closeness to $a_p$. A cross-stream quantity ranking loss $L_{\\text{rank}}$ additionally enforces patch-level count ordering inside and across the two decoder streams. With this training, the model reaches a test MAE of 13.24 on FSC-147, outperforming prior text-promptable methods (CountDiff: 14.83) despite removing the count from the prompt at inference, and generalizes zero-shot to CARPK (MAE 6.32), PUCPR+ (MAE 44.34), and ShanghaiTech SHA (MAE 140.2).","pith_inferences":["The ordinal constraint between negative pairs is effectively a form of embedding-space regression: it teaches the model to represent 'how different' two numbers are, which could be extended to directly predicting counts from similarity slopes rather than from density integration.","If the mechanism is robust, synthetic counterfactual prompting could be applied to other VLM tasks where ordinal quantities matter, such as referring expression counting or visual grounding of 'more/less' relations.","A testable extension: train on FSC-147 with an expanded count range or synthesized images with known counts to see whether the alignment loss scales beyond the 1,000-object ceiling of the training data.","The direction of knowledge transfer (Transformer to CNN only) suggests that global contextual cues are most valuable when injected into local density estimation; a similar asymmetry may appear in other dense prediction tasks."],"forward_implications":["Text-promptable counting narrows the gap to exemplar-based counting: QUANet's 13.24 test MAE approaches CounTR (11.95) and LOCA (10.79) without needing manual exemplars.","The alignment loss's ordinal supervision transfers to inference: at test time the count is absent from the prompt, yet the model counts better, implying quantity awareness is baked into visual features rather than read off the text.","The DAC-decoder is a portable component: replacing the decoders of CLIP-Count and VLCounter with it improves their FSC-147 MAE, suggesting the dual-stream design generalizes beyond QUANet.","Adaptive intervals matter for counts spanning 7 to 1912: fixed intervals $\\Delta=3,5,7,9$ all underperform the count-proportional $\\Delta$ schedule.","Zero-shot domain transfer works: training only on FSC-147 yields strong results on drone car lots (CARPK) and dense crowds (ShanghaiTech) without fine-tuning."],"supporting_citations":[{"why":"Supplies the FSC-147 dataset, the training set and main evaluation benchmark for all experiments.","marker":"[38]"},{"why":"Provides the DINOv2 vision encoder whose last six layers are fine-tuned with the alignment loss.","marker":"[31]"},{"why":"Provides the BERT text encoder used to embed the quantity-oriented prompts.","marker":"[6]"},{"why":"Source of the four cross-attention blocks used to fuse category information into visual features.","marker":"[23]"},{"why":"CountDiff is the strongest text-promptable baseline that QUANet outperforms on FSC-147.","marker":"[14]"},{"why":"VLCounter is a text-promptable baseline and one of the decoders swapped for the DAC-decoder in the generalizability test.","marker":"[16]"},{"why":"Earlier work changing numbers in prompts for contrastive learning; the baseline that QUANet's alignment loss refines.","marker":"[32]"},{"why":"CLIP supplies the pretrained vision-language model underlying the contrastive loss formulation.","marker":"[35]"},{"why":"CounTX provides the inference prompt style and the frozen text encoder training recipe.","marker":"[1]"}],"fun_headline_variants":["Counterfactual count prompts sharpen zero-shot object counting","Train with fake counts, count real objects accurately","Quantity-aware prompts cut counting MAE to 13.24 on FSC-147","Zero-shot counting via counterfactual quantity prompts","Text-prompt counting learns numbers from counterfactual examples"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The improvement depends on the model actually learning, from the auxiliary pairs, that a text number closer to the true count should look more similar to the image; if the vision–text embedding cannot represent that numerical closeness, the quantity alignment loss cannot be what improves counting.","fun_headline_variants_meta":{"raw":{"variants":["Counterfactual count prompts sharpen zero-shot object counting","Train with fake counts, count real objects accurately","Quantity-aware prompts cut counting MAE to 13.24 on FSC-147","Zero-shot counting via counterfactual quantity prompts","Text-prompt counting learns numbers from counterfactual examples"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.001211,"raw_usage":{"total_tokens":4998,"prompt_tokens":970,"completion_tokens":4028,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":586,"completion_tokens_details":{"reasoning_tokens":3946}},"tokens_in":586,"tokens_out":4028,"duration_ms":32599,"temperature":1.0,"reasoning_tokens":3946,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-06T18:56:51.942588+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Train QUANet with the counterfactual counts' labels randomly permuted (so the ordinal structure of $L_{\\text{align}}$ is broken while the positive/negative distinction stays); if test MAE on FSC-147 does not rise relative to the ordered version, the ordinal constraint is not the source of the gain. Alternatively, feed a fixed image with prompts 'a photo of k objects' for k = 1...20 and check whether predicted density changes monotonically; if it stays flat, the alignment did not transfer to inference.","supporting_citations":[{"cited_title":"Learning to count everything","cited_arxiv_id":null,"evidence_quote":"Supplies the FSC-147 dataset, the training set and main evaluation benchmark for all experiments."},{"cited_title":"Class-agnostic object counting with text-to-image diffusion model","cited_arxiv_id":null,"evidence_quote":"CountDiff is the strongest text-promptable baseline that QUANet outperforms on FSC-147."},{"cited_title":"Vlcounter: Text-aware visual representation for zero- shot object counting","cited_arxiv_id":null,"evidence_quote":"VLCounter is a text-promptable baseline and one of the decoders swapped for the DAC-decoder in the generalizability test."},{"cited_title":"Teaching clip to count to ten","cited_arxiv_id":null,"evidence_quote":"Earlier work changing numbers in prompts for contrastive learning; the baseline that QUANet's alignment loss refines."},{"cited_title":"Learning transferable visual models from natural language supervi- sion","cited_arxiv_id":null,"evidence_quote":"CLIP supplies the pretrained vision-language model underlying the contrastive loss formulation."},{"cited_title":"Amini-Naieni, K","cited_arxiv_id":null,"evidence_quote":"CounTX provides the inference prompt style and the frozen text encoder training recipe."}],"review_version":1}