acceptodds
Under review as a conference paper at ICLR 2027

Batch size is not sample size: near-tie amplification in contrastive membership inference

Abstract

Dataset inference asks whether a set of examples was used to train a model. At web scale each example carries almost no evidence, so audits average a per-example score over the set and rely on a square-root law: separability grows as the square root of the number of examples. We show that this law fails for contrastive image–text models when the score is the InfoNCE loss computed within a batch, because batch size is then not sample size: a larger batch averages more pairs but also gives every pair more negatives to beat. On a CLIP model trained on 400M pairs with a pre-training holdout, the effect size of the batch-mean loss at the trained temperature grows as , whereas scoring the same pairs against fixed negatives restores . The mechanism is near-tie amplification: the loss mean shift increases when a true pair barely beats its hardest negative; the gain over therefore peaks at an intermediate number of negatives and then reverses. Fixed-negative measurements alone predict the in-batch curve up to batch size on three separately trained checkpoints and, in a pre-registered test, the optimal number of negatives and the detector ranking on a 40M-pair checkpoint of the same recipe. Because the signal lives in a pair's own similarity, auditors need no negatives beyond their reference set and no temperature: the expected crossing score obeys the square-root law and, when membership mainly affects poorly aligned pairs, outperforms the in-batch loss by up to 11 AUC points on 1,024 pairs and raises the true-positive rate at 1% false-positive rate by up to 38 percentile points (57% vs. 95%). Audits remain fragile: verdicts need thousands of pairs, can become uninterpretable when fewer than about a fifth of candidates are members, and can be manufactured by deleting of the least-aligned non-member pairs. We recommend blind-model controls and pre-registered candidate sets.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
membership inference, dataset inference, contrastive learning, CLIP, InfoNCE, vision-language models, training data provenance, privacy auditing, batch size

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_ysYnOpenReview ↗
Rating
1
Confidence
3
Informativeness
2
Presentation
1
Soundness
2
Read review
Paper summary

This paper studies dataset inference for CLIP-style dual encoders when the set-level score is the batch-mean InfoNCE loss. The authors argue that the usual m\sqrt{m} scaling of separability breaks down in this setting, because a larger batch also gives each pair more negatives. On a 400M-pair CLIP model, the effect size of the in-batch loss grows as B0.64B^{0.64}, while scoring the same pairs against a fixed bank of negatives gives B0.50B^{0.50}. They explain this with a design-effect decomposition and attribute the extra growth to pairs whose positive similarity barely exceeds that of their hardest negative. Building on this analysis, they propose per-pair detectors that need only embeddings, study the sample size and failure modes of set-level audits, and test several predictions on additional checkpoints, including one pre-registered test.

Critical strengths
  • The paper targets a relevant problem. Data-provenance audits for multimodal foundation models are of growing practical interest, and the observation that in-batch contrastive scores depend on what else is in the batch is a valid caution for those who wants to use a contrastive loss as a membership score.
  • The experiments of this work are quite thorough. The paper uses exchangeable member/non-member splits, includes a blind-model control, and replicates the main measurements on several checkpoints. This kind of falsifiable setup is rare in this area, and the paper reports the predictions that failed as well as those that passed.
Critical weaknesses
  1. The paper's main negative claim—that the square-root law fails—seems to target a position that previous work does not actually hold. In the introduction, the authors state that "the standard justification is a central-limit argument" and derive d′(m)=m Δ/σd'(m) = \sqrt{m}\,\Delta/\sigma, yet this sentence carries no citation. The dataset-inference studies cited in the same paragraph (Maini et al., 2021; 2024; Dziedzic et al., 2022; Puerto et al., 2025) aggregate per-example scores with a t-test and report required sample sizes empirically. However, none of them derives a m\sqrt{m} scaling or refers to a square-root law. The "approximately square root function" in Puerto et al. relates paragraph-level AUROC to collection-level AUROC, which is a different quantity from the number of aggregated examples. Nor is the reading that the law, "taken at face value", implies that "any score, however weak, suffices given enough examples" attributed to any prior work. More importantly, the related-work section also states that existing methods "all aggregate a per-example statistic that does not depend on what else is aggregated, and so inherit the square-root law". The reported failure therefore concerns only the batch-mean InfoNCE loss, and the paper cites no audit that uses this statistic. The detectors recommended in Sec. 5 are again per-example statistics that "obey the square-root law by construction", which is the kind of statistic prior dataset-inference work already uses. I therefore find it difficult to identify an existing practice that the main finding corrects, and the paper’s practical contribution appears limited.

  2. I am also not convinced that the best-performing detectors have much to do with the near-tie mechanism. The lower-tail mean −min⁡(cii,Qref(0.2))-\min(c_{ii}, Q_{\mathrm{ref}}(0.2)) is essentially the cosine-similarity attack of Ko et al. (2023), which is the mean-alignment baseline in Sec. 5, combined with a Min-K%-style aggregation over the lower tail (Shi et al., 2024). The related work section already describes the two as parallel. The expected crossing score ψN(cii)=1−F(cii)N\psi_N(c_{ii}) = 1 - F(c_{ii})^N is a monotone transform of where ciic_{ii} falls in the reference distribution, so in practice it also puts more weight on the lower tail. The paper's own experiments point the same way. The permutation test in Table 29 concludes that the advantage of the crossing score "is a property of where the shift sits in the distribution of ciic_{ii}, not of any pair's own rivals", and Sec. 5 states that "which quantiles of ciic_{ii} a score reads matters more than its form". In other words, what helps is reading the right quantile, and the near-tie analysis plays little role in choosing it. On checkpoint B, where the shift is uniform, the advantage disappears and no score does significantly better than mean alignment. Overall, the main contribution seems to be an explanation of why a suboptimal statistic is suboptimal, even though no cited audit uses that statistic (see point 1). The paper also proposes a tail detector that builds on existing ideas and only helps if the auditor already knows the shape of the shift.

  3. More broadly, I do not see how the near-tie analysis translates into practical guidance for an auditor, and several claims in the main text are stronger than the evidence in the appendices. The 1.53 ratio that the near-tie model "reproduces" in Sec. 4 is obtained by feeding in checkpoint A's own measured shift. When A's shape is used to predict a new model, the near-tie gain misses (see point 2), and the authors attribute this to a "residual shape difference". In practice, this means the shift has to be measured on every new model before the mechanism can say which detector wins. The claim in Sec. 3.3 that "the largest available batch is not the best one" (B≈13,127B \approx 13{,}127) also rests only on the per-pair estimator. In Table 18, the direct estimator gives local slopes of 0.56, 0.56 and 0.57 between 4k and 32k, which never drop below 1/2, although its intervals are too wide to rule the claim out. Finally, the paper acknowledges that the best operating point "sits where the shift is, which an auditor does not know in advance". On checkpoint B, a bank sized for pˉ=0.1\bar{p} = 0.1 keeps only 0.59 of the effect size of mean alignment, against 0.91 at its own optimum. Appendix N also reports that selecting the bank by near-tie density "is never better than random selection". The final recommendation, reporting the test at two operating points with a Bonferroni correction, is sensible. However, it does not visibly rely on the near-tie analysis.

  4. I also struggled with the writing, and I suspect many readers will. To be honest, I directly work in this area and am quite familiar with MIA, but this paper is still extremely difficult to read for me. The ideas are not especially hard, but getting to them took me far longer than it should have. The sentences are also heavily compressed. A single sentence often strings three or four claims together with colons and semicolons, attaches a number and an interval to each of them, and then moves on with almost no transition.

    • The paper coins too many non-standard new terms. The standard term "negatives" becomes "rivals", and the reader then meets "near-ties", "the near-tie gain", "the negative swap", "the symmetrization gain", "neutral banks", "the confound floor", "exposure-balanced controls", "admissible targets", "signatures" and a "strong pass". The smaller checkpoints are called "rungs", a word that appears 35 times and first shows up as a row label in Table 1 without explanation, presumably because they sit on "the ladder" of Appendix P. Several of these terms are never properly introduced in the main text. The "near-tie gain", for example, makes its first appearance in Sec. 6 only to report that it "misses (1.32 against 1.60)". The "signatures" appear in the contributions list long before the reader can work out what they are, and the "symmetrization gain" shows up only as a row label in an appendix table. Reading the paper often feels like joining a long-running project halfway through, where everyone except the reader already knows what a "symmetrization gain" is.

    • On top of this, the same concept often goes by several names. Separability, effect size, d′d' and "signal" refer to roughly the same quantity. The same goes for "negatives", "rivals", "the fixed bank" and "the reference set", for "temperature" and "logit scale", for "cosine similarity" and "alignment", and for "collision rate" and "crossing rate". The recommended detector is called the "expected crossing score" in the abstract and a "rival-free lower-tail statistic" in the contributions. The main text then splits it into a "bank crossing score" and a "lower-tail mean". To be honest, matching these names up felt more like detective work than reading. I had to piece together clues from figure captions, table headers and appendices, and sometimes simply guess, before I could be reasonably sure which terms referred to the same thing. I am still not confident that I solved every case. For instance, I never worked out why the "rival-free" ψN\psi_N contains the number of rivals NN in its formula.

    • The image–text pairs in this paper also seem to have very colorful lives. They have a "true partner" and a "strongest rival", some "win comfortably", others are "overtaken", and in the end they face an audit whose "verdict" can be "manufactured". Meanwhile, the square-root law makes a "promise", the signal "lives in" the similarity, and the loss "outgrows" the law. Each metaphor is easy enough on its own. Together, however, they mean that almost every sentence has to be translated back into technical terms before it can be followed.

    • Finally, the information density is too high. The paper appears to compress a 42-page manuscript into nine pages of main text with little selection, as if every result had to be reported there. The abstract alone contains more than a dozen numbers, and a single paragraph in Sec. 3.2 reports seven confidence intervals. The pair of slopes 0.50 and 0.64 appears four times before Sec. 2, and the slogan "batch size is not sample size" appears in the title, the abstract, the introduction and the heading of Sec. 3. Even section headings are written as conclusions, such as "A marginal shift, not relational structure". The whole paper is also flooded with numbers, equations and confidence intervals. To be honest, I do not know why this paper needs an interval on nearly every number it reports. Some of the CIs, in my opinion, can completely be OK to be placed into the Appendix. With this much quantitative detail on every page, I found it very hard to grasp the core idea, or to tell which of the many numbers actually carry the paper's message.

Overall, the reader has to get through a layer of notation, a layer of new names and a layer of metaphors before reaching the actual claims. I would suggest that the authors keep one name per concept (using the standard term "negatives"), add a notation table, and move most of the interval estimates in the main text to the appendix.

Questions for authors
  1. Is there any published dataset inference or audit method that uses the batch-mean InfoNCE loss as its set statistic? If not, which existing practice does the reported failure of the square-root law correct?
  2. Since α=1/2\alpha = 1/2 holds by construction for fixed-bank scores, which result in Sec. 3 could have contradicted the near-tie mechanism? Relatedly, given that the near-tie gain missed in the pre-registered test (1.60 against 1.32), can the model predict which detector wins on a new checkpoint without first measuring that checkpoint's shift?
  3. Beyond guiding the choice of the quantile qq, what does the near-tie analysis add over the similarity score of Ko et al. (2023) combined with Min-K%-style tail aggregation? When the shape of the shift is unknown in advance, how should an auditor choose between these statistics and their operating points?
Reviewer_MrRAOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper studies dataset inference for contrastive image–text models, focusing on audits based on InfoNCE loss. It observes that increasing the audit batch size increases both the number of examples being averaged and the number of negatives against which each example is compared. Consequently, increasing the audit batch size can improve the ability to distinguish member sets from non-member sets more than would be expected from averaging more independently scored examples. They explain this behavior through “near-tie amplification” and examine how the per-pair effect size rises and falls as the number of negatives increases. They use a fixed negative bank to vary the number of negatives independently of the number of examples being audited. They also formulate an audit test comparing average scores between candidate and reference sets, and evaluate several scoring choices.

Critical strengths
  • The authors identify an important distinction between audit batch size and the number of examples being averaged. They demonstrate its consequences for dataset inference and show how using a fixed negative bank separates the effect of averaging more examples from that of comparing each example against more negatives.
  • The explanation of the rise and fall of the per-pair effect size through near-tie amplification is nice, and is supported by empirical results.
  • The experimental evaluation is extensive. Comparisons across checkpoints with different training regimes help assess how broadly the findings hold and reveal where the proposed methods are less effective.
Critical weaknesses
  • I found the presentation, and hence communication of the central argument and results, unnecessarily hard to follow. Sections 3.2-3.3 and 5 are particularly dense and hard to parse; they read as a block of numbers rather than communicating the findings from the results and interpretations of the plots. The main text should include the information needed to understand its central results without the appendix. There is also some ambiguity in notation: B is a model checkpoint and the batch size (also undefined in the abstract). For me, I found the “admissible targets” paragraph somewhat confusing as C1 and C2 read as requirement, whereas C3 is not.
  • It seems that even if there is a statistically significant difference between the candidate and reference set, it does not necessarily mean that the candidate set was using in training — the aim of dataset inference. The authors acknowledge this and include controls, but I did not come away with a clear understanding of what confounds they can rule out and when a membership conclusion is possible.
  • The paper explains which scores work well under known member and non-member distributions, this isn’t known in practice. Section 5 acknowledges this and recommends two operating points with a Bonferroni correction, however, the complete procedure for choosing a score and calibrating the audit remains elusive to me.
  • The paper clearly sets out previous work in the field, but I don’t think it communicated the place this piece sits in the wider literature. In particular, it is unclear whether its results change the interpretation of previous findings or primarily provide guidance for future evaluations. Explaining this would make the significance of the contributions clearer.
  • Several numerical results need clearer explanation or correction:
    • Section 3.3 reports an optimum of 4096, this appears at odds with the plot (it looks less than 4000). The explanation appears in the appendix but should be contained in the main text.
    • Section 4 reports a lowest-quintile shift of 2.91 times the mean shift and a highest-quintile shift of 0.22, but gives their difference as 2.49.
    • I think the use of the per-pair estimator in the large batch results in Figure 3b is insufficiently explained in the main text.
Questions for authors
  • What assumptions, beyond a statistically significant score difference, are needed to interpret the outcome of an audit as evidence of membership? Which alternative explanations do the control experiments rule out, what remains?
  • Could the authors specify the complete procedure an auditor should follow when membership labels are unavailable? In particular, what reference data are required, how should the score and its parameters be selected, and which data should be used for calibration? What assumptions about dependence between examples and reuse of reference data are needed for the reported p-values?
  • Which existing dataset-inference protocols or conclusions are affected by the distinction between audit sample size and negative-bank size? Do the findings suggest that any previous results need reinterpretation, or is the main implication a recommendation for future experimental design?
Reviewer_cYs1OpenReview ↗
Rating
2
Confidence
4
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper studies the problem of Dataset Inference in CLIP models, that is, determining whether a set of image–text pairs was used to train a model. The authors show that, when using the InfoNCE loss computed within the batch as a score, the separability between members and non-members increases faster than expected. This is because increasing the batch size simultaneously increases both the number of pairs being averaged and the number of competitors each pair has to compete against. The authors explain this effect, validate it through predictions across several models, and propose simpler detectors that do not depend on these competitors.

Critical strengths

Strengths

  • The paper is well written and easy to follow. The content is developed incrementally, and the terminology used helps with understanding. The figures are highly explanatory and well developed.

  • The paper's structure and explanations are generally good. The experiments are appropriate, rigorous, and easy to follow, with predictions validated across several checkpoints and controls at each step.

  • The paper demonstrates strong methodological rigor. Furthermore, the result is interesting, as it shows that the way evidence is measured can provide a misleading picture of the evidence in this type of audit, and it offers useful recommendations for conducting these audits more reliably.

Critical weaknesses

Weaknesses

  • The problem is very narrowly scoped. The introduction states that Membership Inference does not work properly when the data come from the same distribution, especially when using the loss. The paper cites evidence that several per-sample methods fail in this scenario, but there are many other Membership Inference methods. It would be useful to provide a clearer justification for why the strongest ones are ruled out and to include them as baselines aggregated over the dataset.

  • The authors move to Dataset Inference, a theoretically simpler problem, but one that is also more difficult to apply in the real world. In general, Dataset Inference requires very specific conditions, such as having a candidate dataset suspected of having been used during training and another dataset known not to have been used for training, with both coming from the same distribution. This is difficult to achieve in practice. Furthermore, in many cases, it is less useful because the analysis must be performed at the dataset level rather than on individual samples.

  • The main issue is the applicability of this method. The paper itself shows that thousands of pairs are required, that small differences between the candidate and reference datasets, or removing a small fraction of the least-aligned pairs, can produce false positives, and that in the single-pass model (checkpoint B), which is closer to how current models are trained, the effect almost disappears.

  • The conclusions are based on the experiments and methodology presented for CLIP-like models, specifically ViT-B/16 models trained using the InfoNCE loss and a single training batch size (8,192). This is a very specific scenario. Although the mechanism described in Proposition 1 is presented in general terms, the empirical validation is limited to this setting.

  • The novelty also seems limited. The paper contributes a mechanism that explains the effect and introduces new detectors, but the novelty of the individual components is limited. More emphasis could have been placed on experimentation to at least show that this effect also occurs with other, larger architectures, other loss functions (e.g., the sigmoid loss), or changes in model training, such as batch size, to determine whether this effect occurs across a broader range of architectures. I understand that models with a valid partition between members and non-members are scarce and that training them at this scale is expensive, but some evidence in this direction would significantly strengthen the paper.

  • Minor: The abstract is somewhat dense, with many figures and terms that are difficult to understand before reading the paper.

Overview

My current assessment is a Weak Reject, but I am open to reconsidering my rating based on the authors' responses and any additional experimental evidence they can provide.

Questions for authors

Questions for the Authors

  1. Could the authors clarify why other strong Membership Inference methods are not considered in the same-distribution setting? Have they been evaluated as baselines aggregated over the dataset, and if not, what is the justification for excluding them?

  2. How do the authors envision applying the proposed Dataset Inference method in real-world scenarios, given the specific requirements regarding candidate and reference datasets? Are there practical settings in which these assumptions can be reliably satisfied?

  3. Could the authors clarify the implications of the results showing that small differences between candidate and reference datasets, or removing a small fraction of the least-aligned pairs, can lead to false positives? How robust is the method under these conditions?

  4. Why does the effect almost disappear in the single-pass model (checkpoint B), which is closer to how current models are trained? What does this imply about the applicability of the proposed method to modern training pipelines?

  5. Have the authors considered validating their findings on larger architectures, alternative loss functions (e.g., the sigmoid loss), or different training configurations, such as batch sizes? If not, what are the main obstacles to conducting these experiments?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.