When someone online says "as a trans woman…" or "I'm 30F," the replies change. Large observational studies find a double-edged pattern: disclosing an identity brings more engagement and support, and also more hostility and lower appraisal. Nearly all of this evidence comes from regression models fit to heavily skewed, clustered, text-confounded data. In practice, rare identity categories get folded into a male/female binary because the usual tests stop being reliable when a group has only a few dozen people. This proposal builds a significance test for one specific question: given what a post says, does the author's disclosed identity change how the community responds? The test should keep its stated false-positive rate even for groups of 20 to 50 authors.
The construction is simple to state. Each disclosing author is placed in a small stratum with several similar non-disclosing authors. Similarity is measured on the text of their posts with the disclosure phrase masked out, within the same forum and time window. Disclosure status is then shuffled only inside strata, and the shuffle is weighted by how plausible each member is as the discloser. Two facts make this practical. Inside a stratum the weighted shuffle has a closed form. The overall null distribution of a count-valued statistic is then a convolution of small distributions, which can be computed exactly and quickly. We would use the method to re-test the visibility trade-off for the non-binary and transgender categories that existing studies collapse away.
Core Claim
Restricting a conditional permutation test to permutations within strata gives three things at once: validity under confounding, correct handling of author clustering, and an exact p-value in well under a second. That combination makes small-group identity effects testable where regression-based tests are unreliable.
In more detail, the conditional permutation test of The conditional permutation test tests whether an outcome $Y$ is independent of a variable $X$ given confounders $Z$. It does this by shuffling the observed $X$ values non-uniformly, with probability proportional to $\prod_i q(X_{\pi(i)} \mid Z_i)$. Here $q$ is an estimate of how likely each $X$ value is given $Z$, and $\pi$ is the shuffle. The original paper explores all $n!$ shuffles with a Markov chain sampler. We instead allow only shuffles that keep each stratum's members inside the stratum.
Suppose stratum $s$ holds one disclosing author and $m$ comparison authors. Then the null probability that member $j$ is the discloser is
$$ p_{s}(j) = \frac{q(1 \mid Z_j)/q(0 \mid Z_j)}{\sum_{k \in s} q(1 \mid Z_k)/q(0 \mid Z_k)}, $$
which is simply a normalized propensity odds. The validity argument of Berrett et al. holds after conditioning on which shuffles are allowed: if $q$ is correct, the test is exact whatever the stratum quality.
Let the test statistic be $T = \sum_s Y_{s,\text{treated}}$, the total count of hostile replies (or comments) received by whichever member is labeled as the discloser. Its null distribution is the convolution of the per-stratum categorical distributions. This is the same structure that Exact Paired-Permutation Testing for Structured Test Statistics solves exactly with dynamic programming and the fast Fourier transform. That paper handled only uniform swaps within pairs, and we generalize it to weighted, multi-member strata.
The unit being shuffled is the author, not the post. All of an author's posts move together, which is the blocked-permutation remedy that Multivariate classification of neuroimaging data with nested subclasses showed is needed when nested clusters inflate apparent effects. In their EEG data, clustering pushed the true null accuracy to 78.5%.
The estimand needs to be stated plainly. Masking the disclosure span and conditioning on the remaining text tests the effect of the marker holding the written content fixed. This is a direct effect. It is not the total effect of being a member of the group, because writing style may itself be shaped by identity. We report the test as answering that narrower and well-defined question.
Why This Gap, and Which Prior Work Plays Which Role
Three studies motivate the work, and each relies on parametric tests that the method replaces.
Self-reported Demographics and Discourse Dynamics in a Persuasive Online Forum built CMVGENDER, a ChangeMyView dataset with seven annotated gender categories. Using linear and logistic regression, it found that disclosure brings more comments but lower scores. It also propagated each author's label across their whole post history, which makes posts by the same author dependent.
"I Am 30F and Need Advice!" used hurdle negative binomial regression on r/Advice. Disclosing either age or gender raised replies, and disclosing both was sub-additive.
It's going to be okay found across 102 million interactions that female-signaling users receive both more support and more disparagement. Its labels came from a support classifier with Macro-F1 of only 0.52.
All three studies reduce gender to a binary or near-binary variable because the rare categories are too sparse. This proposal targets that reduction directly.
Two papers supply the method. The conditional permutation test of Berrett et al. provides the reweighting. Its reported result constrains our design: under a misspecified model of $X$ given $Z$, the conditional randomization test reached Type I error of 15–30% at nominal 5%, while the permutation test stayed near 5%. That is why we shuffle observed labels rather than resample synthetic ones. Zmigrod et al. provide the exact convolution, which ran in about 0.1 seconds for 10,000 items and was 10 times faster than Monte Carlo with 20,000 draws.
Two further papers are close relatives that we differ from. The local nearest-neighbor shuffle of K-Nearest-Neighbor Local Sampling Based Conditional Independence Testing shuffles $X$ uniformly among neighbors in $Z$. Its guarantees are only asymptotic, and it was evaluated on tabular data. Our propensity weighting protects validity when neighbors are imperfect, which matters because distances between 768-dimensional text embeddings are unreliable. Propensity score matching as used in Profile update builds comparison groups as we do, but then applies standard tests that assume independence and large samples.
The research file reports no prior work applying conditional or blocked permutation tests to identity disclosure.
Research Program
The work has three parts.
The first part builds the test. For each author we encode their posts with a sentence encoder after masking every span matched by disclosure heuristics. We use the CMVGENDER extraction rules and the 221-n-gram identity taxonomy from Choi et al. We fit $q$, a cross-fitted classifier that predicts disclosure from these masked features plus forum, month, and activity level. We form strata by exact matching on forum and month and nearest-neighbor matching on the masked embedding, with $m$ ranging from 1 to 10. We then compute the exact null of count statistics by dynamic programming. The visibility trade-off claims two things at once, more support and more hostility. We test it as an intersection-union test, which rejects only if both one-sided tests reject at level α.
The second part checks calibration on semi-synthetic data that keeps the real $X$ and $Z$. Outcomes are generated as nonlinear functions of the real text embeddings, plus heavy-tailed random effects per author and per thread, plus zero inflation. The true disclosure effect is set to zero to measure false-positive rates, and set to known sizes to measure power. Disclosing-group sizes are subsampled to 20, 50, 200, and 2,000 authors.
The third part re-analyzes real data. On CMVGENDER we test each of the seven categories separately against comment counts, score, and the toxicity of replies. On r/Advice we test the joint age-plus-gender disclosure against single-marker disclosure, matched within strata, as a non-parametric check of the sub-additivity finding. Its data are distributed in a privacy-stripped form, so this depends on whether the posts can be recovered. On Wang et al.'s tri-platform corpus we test the binary trade-off, where every method should agree. The contrast between that agreement and disagreement on rare categories is the main result.
Baselines
The naive reference point is the published analysis: post-level linear and logistic regression with the linguistic covariates used by Falenska et al. on CMVGENDER, and hurdle negative binomial regression as in Hale et al. on r/Advice. We run both on identical data and covariates. This shows what the field currently concludes.
The strongest parametric competitor is a regression that includes the top 50 principal components of the same masked embeddings, adds random effects for author and thread, and uses standard errors clustered by author. It receives the same features, the same cross-fitting, and the same hyperparameter budget as our $q$. If any baseline makes our method unnecessary, it is this one.
The strongest existing permutation methods are three. The first is Li et al.'s nearest-neighbor local shuffle with $k=7$ as reported, using the same embeddings. The second is Berrett et al.'s Markov-chain conditional permutation test over the full permutation space with the same $q$. The third is propensity score matching followed by a two-sample test, as in Choi et al.
The ablations isolate our key ingredients. We compare uniform shuffling with propensity-weighted shuffling inside strata, author-level with post-level shuffling, and masked with unmasked embeddings. The last should cause overlap to fail, because the disclosure text gives the answer away.
For reported figures, the file gives Berrett et al.'s 15–30% versus about 5% Type I error under misspecification. It also gives Li et al.'s Type I error at or below 0.05 with conditioning variables up to 100 dimensions, and an F-score of 0.82 against a best competitor of 0.78 on Flow-Cytometry. No reported result was found on Lacuna for the calibration of any test on CMVGENDER, r/Advice, or the tri-platform corpus. No reported coefficient for the CMVGENDER effects was found either.
We count our method as beating a baseline under two conditions. First, its semi-synthetic false-positive rate must stay within the Monte Carlo error of 5% at every group size, while the baseline's does not at 20 to 50 authors. Second, its power must be within 10 points of the best calibrated competitor at 2,000 authors.
Why not just…?
Why not just use mixed-effects regression with embedding covariates and clustered standard errors? This is the real threat. For the male/female contrast, with thousands of authors, we expect it to match our test, and we will report that agreement rather than hide it. Its weaknesses are specific. Clustered standard errors are only asymptotically correct and are known to be poorly calibrated with few treated clusters. The reported breakdown of asymptotic tests under extreme group imbalance in Accurate Computation of Survival Statistics in Genome-Wide Studies describes the same regime as a 30-author genderqueer group set against tens of thousands of controls. The semi-synthetic sweep over group size settles the question directly. If regression stays calibrated at 20 authors, the case for our method shrinks to the binary-free reporting it allows, and we will say so.
Why not just do propensity matching and run a t-test, as Choi et al. did? Our strata are a form of matching, so the difference is not in how comparison groups are built. A t-test on matched outcomes assumes independent, roughly Gaussian errors and a large sample. Reply counts are zero-inflated and heavy-tailed, and the posts are clustered by author. The author-level versus post-level ablation, together with the comparison against matched t-tests at small sizes, shows how much each assumption costs.
Why not just run Li et al.'s local shuffle, or Berrett et al.'s sampler, as published? The local shuffle is uniform among neighbors, so its validity depends on neighbors being close in a space where distances are unreliable. Its guarantees are only asymptotic. Berrett's sampler is valid but uses Markov-chain sampling over all permutations. That is slow at our scale, and with tiny groups the chain must find rare high-weight configurations. The ablations test both. We do not claim the exact computation is the core advance: Monte Carlo draws from our closed-form stratum distributions would give essentially the same p-values. The contribution is the restricted, weighted null. Exactness is a convenience that removes run-to-run variation.
Why not just bootstrap a confidence interval for the regression coefficient? The bootstrap is also asymptotic. With 20 heavy-tailed treated units it resamples a handful of extreme authors and tends to give intervals that are too narrow. It is included in the semi-synthetic sweep under the same conditions.
Decisive Checks
The first check is calibration. Across semi-synthetic nulls at every group size, our test must hold false positives at 5%, and we report how far each baseline departs from 5%.
The second check is a negative control on real data. CMVGENDER authors who disclose late provide earlier posts in which they had not yet disclosed. If the community is not reacting to a known reputation, disclosure status should not "predict" responses to those earlier posts. Any method that rejects here is detecting author-level confounding, not a reaction to disclosure.
The third check concerns the labels. Hostility labels come from classifiers with modest accuracy, so we repeat the main tests with two different toxicity scorers. On the five-rater toxicity data of Follow the leader(board) with confidence, we propagate rater disagreement by resampling which rater's label is used inside the null.
The outcome that would most change the field is a split result: the binary trade-off replicates under every method, while for one or more rare categories the parametric tests and our test disagree.
References
- The conditional permutation test
- Exact Paired-Permutation Testing for Structured Test Statistics
- Multivariate classification of neuroimaging data with nested subclasses: Biased accuracy and implications for hypothesis testing
- Self-reported Demographics and Discourse Dynamics in a Persuasive Online Forum
- "I Am 30F and Need Advice!": A Mixed-Method Analysis of the Effects of Advice-Seekers' Self-Disclosure on Received Replies
- It's going to be okay: Measuring Access to Support in Online Communities
- K-Nearest-Neighbor Local Sampling Based Conditional Independence Testing
- Profile update: the effects of identity disclosure on network connections and language
- Accurate Computation of Survival Statistics in Genome-Wide Studies
- Follow the leader(board) with confidence: Estimating p-values from a single test set with item and response variance