{'fraction_non_alphanumeric': 0.03098185479257717, 'fraction_numerical': 0.01594856188362355, 'mean_word_length': 4.767982050943645, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Uncovering Latent Biases in Text: Method and Application to Peer Review

Quantifying systematic disparities in numerical quantities such as employment rates and wages between population subgroups provides compelling evidence for the existence of societal biases. However, biases in the text written for members of different subgroups (such as in recommendation letters for male and non-male candidates), though widely reported anecdotally, remain challenging to quantify. In this work, we introduce a novel framework to quantify bias in text caused by the visibility of subgroup membership indicators. We develop a nonparametric estimation and inference procedure to estimate this bias. We then formalize an identification strategy to causally link the estimated bias to the visibility of subgroup membership indicators, provided observations from time periods both before and after an identity-hiding policy change. We identify an application wherein"ground truth"bias can be inferred to evaluate our framework, instead of relying on synthetic or secondary data. Specifically, we apply our framework to quantify biases in the text of peer reviews from a reputed machine learning conference before and after the conference adopted a double-blind reviewing policy. We show evidence of biases in the review ratings that serves as"ground truth", and show that our proposed framework accurately detects these biases from the review text without having access to the review ratings.


Introduction
Societal biases against individuals based on race, gender, and other attributes can lead to disparities in hiring (Bertrand and Mullainathan, 2004), wages (Blau and Kahn, 2017) and incarceration rates (Alesina and La Ferrara, 2014), among other socioeconomic outcomes. Uncovering evidence of such biases informs the creation of policies to eliminate long-standing gaps between different population subgroups.
Many important socioeconomic outcomes are influenced by written feedback, such as academic hiring that is influenced by reference letters, and employee appraisals that rely on managerial performance reviews. Previous studies have reported biases in the text of such feedback (Mitchell and Martin, 2018;Madera et al., 2019;Correll et al., 2020). Mitchell and Martin (2018) find that student evaluations of female faculty teaching were more likely to focus on communication ability. Madera et al. (2019) find that academic letters of recommendation for women were more likely to contain "doubt-raising" phrases. In the context of managerial feedback provided during employee appraisals, Correll et al. (2020) find that "women were more likely to receive vague feedback that did not offer specific details of what they had done well and what they could do to advance". Such biases in text can have severe economic consequences. For example, differences in the media framing of natural disasters were found to be associated with large disparities in the amount of allocated foreign aid (Strömberg, 2007;Kweifio-Okai, 2014). Similarly, online reviews of Asian and Indian restaurants declared them "unauthentic" when they defied the negative stereotypes of uncleanliness, leading to significant losses in revenue (Kay, 2019).
Biases in text are more prevalent than those in numerical feedback due to the absence of enforced structure (Mackenzie et al., 2019), and are more difficult to detect due to their subtle manner of expression (Morstatter et al., 2018). In addition, the inherently unstructured nature of text makes it challenging to quantify the biases it contains. Without the ability to quantify and provide credible evidence of such biases, society remains at risk of widening socioeconomic gaps fueled by the unchecked expression of prejudices in written feedback.
In this work, we propose a framework to quantify biases in text, provided data from time periods both before and after an identity-hiding policy change. Our proposed framework extends the difference-in-differences causal inference methodology introduced by Card and Krueger (1994) (which compares differences in numerical quantities over time) to handle differences in unstructured text over time. We motivate and evaluate our framework in the setting of scholarly peer review, which is a key mechanism of feedback and quality assurance in scientific research. Specifically, we assemble a dataset of peer reviews from the International Conference of Learning Representations (ICLR), which switched from single-blind to double-blind reviewing in 2018. We test for biases in the peer review text, which is prone to prejudice due to the lack of enforced structure. Importantly, our dataset enables estimating "ground truth" biases using the peer review ratings (a numerical quantity). The goal of our proposed framework is to quantify biases in the peer review text that are consistent with the "ground truth", without having access to the review ratings.
Our main contributions are: I. We formalize bias as a causal estimand -the disparity in the peer review text between the subgroups caused by the visibility of author identities -that relies on a weaker assumption than "no unobserved confounders". We propose a nonparametric estimation and inference procedure to quantify this bias. Our procedure makes no assumptions on the data-generating process of the peer review text and requires no feature engineering.
II. We apply our proposed framework to quantify the bias in the text of peer reviews from the International Conference on Learning Representations (ICLR). We detect a statistically significant bias with respect to the authors' affiliation, but find no evidence of bias with respect to the authors' perceived gender.
III. Our chosen application is motivated by the opportunity to evaluate our proposed framework on "ground truth" biases derived from review ratings. Specifically, we evaluate our proposed framework by comparing the estimated biases in the peer review text with the biases in the peer review ratings estimated using the difference-in-differences methodology (Card and Krueger, 1994;Angrist and Pischke, 2008). We show that the biases in the peer review text estimated using our proposed framework are consistent with the "ground truth".
In Appendix B, we also evaluate an alternative measure of disparity in the text proposed by Gentzkow et al. (2019), and this empirical evaluation reveals that our proposed measure of disparity has greater statistical power. Finally, although presented in the context of peer review, our proposed framework can also be applied to other settings such as testing for biases in feedback provided by employers when reviewing employees (Goldin and Rouse, 2000) and evaluating potential hires (Capowski, 1994).
Replication code and data for this work is available at https://emaadmanzoor.com/biases-in-text/.
Our approach compares single-blind and double-blind reviews for gender and affiliation-based population subgroups. A number of previous studies have quantified biases using the peer-review ratings provided for different subgroups under single-blind and double-blind reviewing policies. Blank (1991b) conducts a randomized control trial and finds no significant difference in the review ratings for male and female authors under single and double-blind reviewing. Ross et al. (2006) compare single and double-blind reviewing in different years at a medical conference and find that the association between abstract acceptance and whether the authors were affiliated to institutions in the USA reduces significantly when reviewing is double-blind. Madden and DeWitt (2006) compare single and double-blind reviewing for the SIGMOD conference in different years and find that the mean number of accepted of papers by a "prolific" author remained largely similar before and after the switch to double-blind reviewing. In contrast, Tung (2006) find a significant reduction in the median number of accepted papers by a "prolific" author after SIGMOD switched to double-blind reviewing. More recently, Tomkins et al. (2017) conduct a semi-randomized controlled trial with the WSDM 2017 conference and do not find a significant association between a paper's single-blind review rating and whether its authors were women, or whether its authors were affiliated to institutions in the USA. Salimi et al. (2020) compare single and double-blind reviewing in several conferences and find a significant effect of institutional prestige on review ratings when reviewing was single-blind (and none when reviewing was double-blind). In the context of single-blind journal peer review, Thelwall et al. (2020) find that reviewers are biased in favor of authors from their home country. Our work complements these studies by focusing on biases in the review text, instead of on biases in numerical quantities.
Our proposed framework is closely related to the bias discovery method proposed by Field and Tsvetkov (2020), who train a machine learning model to identify differences in online comments addressed towards men and women. Their method also relies on the idea that text which is predictive of gender is likely to contain bias. They show that their method can detect gender bias on a labeled dataset from a different domain than the one their model was trained on. However, the method proposed by Field and Tsvetkov (2020) crucially depends on the "no unobserved confounders" assumption. This assumption is restrictive and unlikely to hold in practice. In contrast, our proposed framework relies on a weaker assumption that remains valid under a large class of unobserved confounders (though requiring additional data, from two different time periods). We also overcome a key limitation in the (Field and Tsvetkov, 2020) by evaluating our proposed framework on "ground truth" derived from the same peer review process used for bias estimation, instead of on secondary datasets or tasks.

Problem Definition
We assume the availability of peer reviews from a conference in two different years, with author identities (their names, emails, and affiliations) visible to reviewers during the peer review process in exactly one of the two years. Our goal is to quantify biases in the text of the peer reviews written for papers belonging to two pre-specified subgroups based on a selected identifying attribute of their authors.
Previous studies have reported systematic disparities in the text written for different population subgroups. For example, Madera et al. (2019) report that recommendation letters for women are more likely to contain "doubt-raising" language then those for men. However, such disparities by themselves are not sufficient evidence of bias (Rathore and Krumholz, 2004). While disparities are observed differences in the review text, biases are observed differences that are caused by author identity visibility, and not other factors.
In a counterfactual universe where the author identities are hidden, the bias must be zero (since its cause no longer exists) but the observed disparity can be nonzero. For example, if we partition papers into subgroups based on their first author's affiliation country, disparities in the review text could also arise due to country-specific preferences for different research topics. When defining bias, our goal is to separate the disparity caused by author identity visibility from the disparity caused by other factors. We now formalize bias as a causal estimand with the potential outcomes framework (Imbens and Rubin, 2015), and derive an expression that relates bias to the disparities observed in different time periods.
Consider papers submitted to a conference in the years t SB and t DB , where the conference employed single-blind reviewing in year t SB and double-blind reviewing in year t DB . We partition the papers into two subgroups G 0 and G 1 based on a selected identifying attribute of their authors (such their affiliation or perceived gender). Our goal is to formalize bias as the disparity in the review text for papers in each subgroup caused by the visibility of this identifying attribute to reviewers during the peer review process.
We denote by ∆ t the observed disparity in the review text in year t ∈ {t SB , t DB }. While we propose a careful nonparametric formulation of ∆ t in Section 4, ∆ t can be viewed as any measure of the difference in the review text in year t between subgroups G 0 and G 1 . We denote by ∆ SB t and ∆ DB t the counterfactual disparities in the review text in year t that would have been observed had author identities been visible to and hidden from reviewers, respectively. Only one of the quantities ∆ DB t and ∆ SB t is visible in each year. When t = t SB and reviewing was single-blind, ∆ DB t SB is unobserved and quantifies the disparity in year t SB had reviewing been double-blind instead. When t = t DB and reviewing was double-blind, ∆ SB t DB is unobserved and quantifies the disparity in year t DB had reviewing been single-blind instead.
We define the bias (our causal estimand) as a difference in counterfactual disparities: Eq.
(1) subtracts the disparity ∆ SB t DB (caused by both author identity visibility and other factors) from the disparity ∆ DB t DB (caused by other factors only) to isolate the disparity caused by author identity visibility only. Note that the bias could also have been defined as ∆ DB t SB − ∆ SB t SB (the change in the disparity that would have been observed had reviewing in year t SB been double-blind instead). Either definition is valid and applicable to our framework (after minor algebraic changes).
Note that our definition of bias does not restrict how the subgroups are defined. As such, the bias with respect to subgroups based on different identifying attributes that lead to the same partitions G 0 and G 1 will be identical, and must be interpreted based on domain expertise. For example, the bias with respect to subgroups based on the authors' seniority would be similar to the bias with respect to subgroups based on the authors' "fame" if senior authors are likely to have had more time to publish, engage with their community and develop connections than junior authors. In practice, we recommend defining subgroups based on hypotheses grounded in socioeconomic theory, and disentangling the biases with respect to different subgroup definitions using institutional knowledge.

Proposed Framework
Our goal is to estimate the bias defined in Eq. (1) given the peer reviews from a conference in years t SB and t DB , with author identities visible to reviewers during the peer review process in year t SB and hidden in year t DB . In this section, we first provide an identification proof to link the causal estimand in Eq. (1) (that contains unobservable counterfactual quantities) with an empirical estimand (that contains observable quantities only). We then propose a nonparametric estimation and inference procedure to estimate the bias from the available peer review data.

Identification
The bias as defined in Eq. (1) contains the unobservable counterfactual disparity ∆ SB t DB (the disparity in year t DB had reviewing been single-blind), and cannot be estimated without further assumptions; this is the fundamental problem of causal inference (Holland, 1986). The process of linking a causal estimand defined in terms of unobserved counterfactual quantities with an empirical estimand defined in terms of observed quantities is called identification, and relies on one or more identification assumptions. We make the following identification assumption: Assumption 1. The disparity in t = t DB had author identities been visible is equal to the disparity in t = t SB when author identities were indeed visible: Assumption 1 implies that the change in disparity from year t SB to t DB was caused only by the author identities being hidden in year t DB , and not other factors. Assumption 1 remains valid in the presence unobserved confounders that affect the review text and (i) that do not vary from t SB to t DB , or (ii) that vary from t SB to t DB but affect the review text for both subgroups identically (such as a more critical reviewer pool in year t DB ). Hence, it is less restrictive than the "no unobserved confounders" assumption in prior work (Field and Tsvetkov, 2020). We further discuss the validity of Assumption 1 for our setting in Appendix A.
Let ∆ t be the observed disparity in year t ∈ {t SB , t DB }. Given Assumption 1, we link the bias (that contains an unobservable counterfactual disparity) with an empirical estimand (that contains observable disparities only) with the following identification proof : where the equation (i) follows from the definition in Eq. (1), equation (ii) follows from Assumption 1, and equation (iii) follows from the fact that reviewing was indeed double-blind in year t DB (∆ DB t DB = ∆ t DB ) and single-blind in year t SB (∆ SB t SB = ∆ t SB ).

Estimation and Inference
Having defined the bias in the review text in terms of observable disparities in Eq.
(2), we now focus on estimating this bias from the available peer review data in years t SB and t DB . Formalizing the disparities ∆ t SB and ∆ t DB in the text in a manner that is both substantively meaningful and that permits estimation and inference is non-trivial. In this section, we formalize the disparities in the text and propose a nonparametric procedure to estimate them from the peer reviews in years t SB and t DB .
Intuitively, the disparity ∆ t in the review text in year t is a measure of how the text of the reviews written for G 0 differ from those written for G 1 . A simple approach to quantify the disparity is to select a "feature" of the review text (such as its "politeness"), annotate the review text based on this feature (either manually or via natural language processing methods) and then compare the value of this feature in the reviews for papers in each of the two subgroups G 0 and G 1 . However, the disparities and bias quantified in this manner are sensitive to feature selection and annotation.
In contrast, we propose measuring the ∆ t nonparametrically, without any feature selection and annotation. We rely on the intuition that if the text of the reviews written for G 0 differs systematically from the text of those written for G 1 , a binary machine-learning classifier should be able to distinguish between the reviews written for each subgroup using the review text. Hence, we could use any measure of the performance (such as the accuracy, precision, or recall) of such a classifier as a measure of the disparity ∆ t .
However, disparities in the review text may also be caused by differences in the research topics pursued by each subgroup. To "control for" subgroup differences in research topics, we rely on the following intuition: subgroup differences in research topics should be reflected in the text of their paper abstracts. Hence, we quantify subgroup differences in research topics by the ability of a binary machine-learning classifier to distinguish between the papers belonging to each subgroup using their abstract text.
We now define the disparity in the review text based on the intuition discussed previously. Let f (·) be a binary classifier mapping a paper's review text to its subgroup and g(·) be a binary classifier mapping a paper's abstract text to its subgroup. Let perf(f ; t) and perf(g; t) be the chosen measures of classification performance of f (·) and g(·) respectively, such as their area under the ROC curve (AUC), accuracy or precision. We measure the disparity in the review text as the ratio of the performances of the two classifiers on the peer review data in year t: Normalizing perf(f ; t) by perf(g; t) as in Eq. (3) "controls for" subgroup differences in research topics: if perf(f ; t) is high due to subgroup differences in research topics, perf(g; t) will also be high. While any binary classifier may be used for f (·) and g(·), poor classifiers are more likely to underestimate the bias (due to equally poor classification performance in both t SB and t DB ).
In Section 6, we report results with multinomial Naive Bayes classifiers for f (·) and g(·) and the AUC as our chosen measure of classification performance. We estimate the value of perf(f ; t) and perf(g; t) using k-fold cross-validation. To eliminate any dependence on the choice of cross-validation folds, we repeat the bias estimation procedure many times with the data belonging to each fold randomized uniformly in each iteration. We use the empirical distribution of bias estimates from these iterations to construct confidence intervals on the estimated bias.

Subgroup Definition
Year A final issue we address is that perf(f ; t) and perf(g; t) can differ in t SB and t DB due to differences in the sample size (number of reviews) or due to differences in the proportion of papers belonging to each subgroup in t SB and t DB . Hence, when estimating ∆ t DB we downsample the available peer review data in year t DB 1 such that (i) the number of peer reviews or abstracts is equal to that in t SB , (ii) the proportion of abstracts or peer reviews written for papers in subgroup G 0 is equal to that in t SB , and (iii) the proportion of abstracts or peer reviews written for papers in subgroup G 1 is equal to that in t SB . As with the cross-validation folds, the downsampling is randomized uniformly in each iteration.

Data
We assemble a dataset of 16,880 peer reviews from the OpenReview platform for all the 5,638 papers submitted to the International Conference on Learning Representations (ICLR) from 2017 to 2020. Each paper receives 3 peer reviews on average (with a standard deviation of 0.3). Each peer review contains textual comments and a numerical rating, from 1 to 10 in ICLR 2017-2019 and in {1, 3, 6, 8} in ICLR 2020. Fig. 1 reports the number of papers submitted and the proportion of papers accepted in each year.
We investigate the existence of biases in the peer review text with respect to two types of author attributes: (i) the country of their affiliation, and (ii) their perceived gender. Affiliation and gender biases have been a recurring theme in prior work on improving fairness in peer review (Blank, 1991a;Ross et al., 2006;Tomkins et al., 2017;Salimi et al., 2020). We focus on testing for affiliation and gender bias in the review text to complement prior findings, though biases with respect to other attributes may also exist.
ICLR was co-founded by researchers affiliated with institutions in the USA and Canada. In addition, the general, program and area chairs of ICLR were almost exclusively affiliated with institutions in the USA and Canada since its inception in 2013. Motivated by the possibility of "in-group bias" (Taylor and Doria, 1981), we test for reviewer biases caused by visible author identities in favor of (or against) papers having at least one author with an affiliation in the USA or Canada. We partition the submitted papers into two subgroups, G 0 and G 1 , based on the countries of the affiliations of their authors. We allocate all papers having at least one author affiliated to a university, organization, or company in the USA or Canada to G 0 , and all other papers to G 1 . Author affiliations are extracted from the submitted paper PDFs in ICLR 2017, and from the authors' registered emails on the OpenReview platform in ICLR 2018, 2019 and 2020. The goal of this affiliation-based partitioning is to quantify the extent to which reviewers are biased by visible author affiliations.
In addition to affiliation-based subgroups, we consider subgroups based on the authors' gender as perceived by the reviewer (and not self-reported). Since we do not observe how reviewers infer gender from authors' names, we approximate the perceived gender of each author using the following protocol. We first use historical self-reported gender records from the U.S. Social Security Administration to compute the probability of an author's first name being reported as male. 2 If this probability is greater than 90%, we annotate the author's perceived gender as male. If this probability is less than 10%, we annotate the author's perceived gender as non-male. If this probability is between 10% and 90%, an external human annotator manually infers the gender of the author (male or non-male) using visible information on their homepage and Google Scholar profile (found with a Google search). We expect our annotation protocol to approximate the authors' gender as perceived by reviewers 3 .
We allocate all papers having at least one author perceived to be non-male to G 1 , and those with all authors perceived to be male to G 0 . The goal of this gender-based partitioning is to quantify the extent to which reviewers are biased in favor of (or against) papers having at least one author perceived to be non-male. Table 1 reports the proportion of papers submitted to ICLR in each year that belong to subgroup G 1 for affiliation-based and gender-based subgroup definitions. Since our external human annotations of gender only span ICLR 2017 and 2018, our analyses of bias with gender-based subgroups excludes data from ICLR 2019 and 2020.
A key policy change during this period is ICLR's switch to double-blind reviewing from 2018 onwards. We exploit this policy change to estimate the bias while eliminating the impact of a large class of unobserved confounders, as discussed in Section 4. We also exploit this policy change in Section 6 to construct a "ground truth" measure of bias in the peer review ratings using the difference-in-differences methodology. We then evaluate whether the biases estimated by our 2. We do this using the gender package available at https://github.com/ropensci/gender. 3. We designed our annotation protocol to approximate how reviewers perceive the gender of an author from their name without knowledge of the author's self-reported gender. As such, our annotations may contradict authors' gender and cause unintended psychological harm. To prevent this, we do not plan to make our gender annotations public. However, we have described our annotation protocol in sufficient detail for replication.
proposed framework are consistent with the presence and absence of the "ground truth" bias in each year.
Since ICLR permits non-anonymized submissions to arXiv and other preprint servers while the paper is under review, it is likely that some author identities were visible even during the double-blind reviewing process in ICLR 2018, 2019 and 2020. Hence, we expect our bias estimates to be conservative (attenuated towards zero).

Evaluation
We now evaluate the ability of our proposed framework to detect biases in the text of peer reviews. Evaluating the validity of causal estimates is challenging in general due to the lack of "ground truth" causal effects to compare with, which can only be obtained using randomized control trials that are often expensive and time-consuming. Hence, as in prior work (Field and Tsvetkov, 2020), evaluation is typically carried out using secondary tasks or semi-synthetic datasets such as the IBM Causal Inference Benchmark (Shimoni et al., 2018).
Instead of relying on secondary tasks or semi-synthetic datasets that may not represent peer reviewer behavior in the real world, we construct "ground truth" bias estimates based on the ratings provided by peer reviewers. Specifically, we apply the difference-in-differences methodology to quantify the presence or absence of biases in the review ratings using peer reviews from each consecutive pair of years between ICLR 2017 and 2020. We then apply our proposed framework to estimate biases in the review text.
We evaluate whether (i) the estimated bias in the review text is statistically significant when the estimated bias in the review ratings is statistically significant, and (ii) the estimated bias in the review text is statistically insignificant when the estimated bias in the review ratings is statistically insignificant. The underlying intuition is that the rating of a review must also be reflected in its text (with language expressing praise or criticism, for example). Hence, an accurate textual bias estimation framework must be able to detect biases (when present) using the review text without having access to the review ratings.
We begin in Section 6.1 with a detailed discussion on estimating the "ground-truth" affiliation bias using the difference-in-differences methodology and review ratings. We then estimate and evaluate the affiliation bias in the review text in Section 6.2. In Section 6.3, we estimate and evaluate the bias due to perceived gender. In Appendix A, we further discuss the validity of the identification assumptions used in our evaluation. In Appendix B, as a comparative baseline, we evaluate an alternate measure of disparity in the text proposed by (Gentzkow et al., 2019) and empirically show that our proposed measure of disparity has greater statistical power.

Constructing "ground truth" affiliation biases from peer review ratings
We first provide descriptive evidence in Fig. 2 of reviewer bias in favor of papers having at least one author with an affiliation in the USA or Canada (subgroup G 0 ) in ICLR 2017, when reviewing was single-blind. Fig. 2a shows that the median review rating for papers in G 0 was 1 unit higher than that for papers in G 1 in ICLR 2017. This median ratings disparity disappears after the switch to double-blind reviewing in ICLR 2018. Similarly, Fig. 2b shows that the mean review rating for papers in G 0 was 0.665 units higher than that for papers in G 1 in ICLR 2017, and 0.297 units higher in ICLR 2018. Thus, switching to double-blind reviewing coincided with a reduction in mean ratings disparity of 0.369 units.
We now estimate the ratings bias using the difference-in-differences causal inference methodology (Card and Krueger, 1994;Angrist and Pischke, 2008). The difference-in-differences methodology can be viewed as an analogue of our proposed framework to quantify biases in numerical quantities, instead of biases in unstructured text. This framework has been previously used to quantify gender biases in peer review ratings and hiring decisions (Blank, 1991b;Goldin and Rouse, 2000), among several other settings.
The difference-in-differences methodology, like our proposed framework, requires peer reviews in two years t SB (with single-blind reviewing) and t DB (with double-blind reviewing). Let r ij be the rating that reviewer i gave to paper j, let T j ∈ {t SB , t DB } be the year in which paper j was submitted, and let S j ∈ {G 0 , G 1 } be subgroup that paper j belongs to. The difference-in-differences methodology defines the ratings disparity ∆ rating t in each year t ∈ {t SB , t DB } as: where the expectations are over all papers j and their respective reviewers i. The ratings bias γ is defined as the difference in the ratings disparities between the year with single-blind reviewing and the year with double-blind reviewing: Interpreting γ as a ratings bias -the difference in mean subgroup ratings caused by visible author identities -requires the parallel trends identification assumption. This assumption states that, had the conference never switched to double-blind reviewing, the change in expected rating for subgroup G 1 from t SB to t DB would have been equal that for subgroup G 0 from t SB to t DB . It is a special case of Assumption 1 when the disparity in each year is defined as a difference in mean subgroup ratings, as in Eq. (4). The parallel trends assumption is less restrictive than the "no unobserved confounders" assumption. We discuss the validity of this assumption in our setting in Appendix A.  Table 2: "Ground truth" and estimated bias with respect to affiliation. "Ground truth" differencein-difference estimates of the bias in the review ratings (left) and bias in the review text estimated by our proposed framework (right). Standard errors reported in brackets. Estimates in each row are computed using ICLR peer reviews in consecutive years t SB and t DB . Estimates in bold are statistically significant at the 5% level.
The ratings bias γ in Eq. (5) is typically estimated using a "two-way fixed-effects" regression (Imai and Kim, 2020) on peer reviews from the years t SB and t DB : where the coefficients ρ, α, β and γ are estimated using ordinary least squares (OLS). The error term ij is assumed to be Gaussian with zero-mean, which enables deriving asymptotic confidence intervals and p-values for the estimates.
We estimate the ratings bias using the two-way fixed-effects regression model in Eq. (6) on peer reviews from ICLR 2017 (t SB ) and 2018 (t DB ). Recall that Fig. 2b reports a change in the mean ratings disparity from ∆ rating 2017 = 0.665 to ∆ rating 2018 = 0.297, for a total of ∆ rating 2018 − ∆ rating 2017 = −0.369 units after switching to double-blind reviewing. The estimated bias in the first row of Table 2 (left) mirrors this. In addition, the confidence intervals and p-value indicate that the estimated bias is statistically significant (p = 0.024).
Recall that reviewing in ICLR was double-blind in the years 2018, 2019 and 2020. Hence, as "placebo tests", we also estimate γ using the two-way fixed-effects regression model in Eq. (6) using peer reviews in the year pair (t SB = 2018, t DB = 2019), and the year pair (t SB = 2019, t DB = 2020). The estimates are reported in the second and third rows of Table 2 (left). The ratings bias estimated using either of these year pairs is statistically insignificant. This is consistent with the fact that reviewing was double-blind during both years in the pair, and lends support to the validity of the parallel trends assumption.
Table 2 (left) thus comprises the "ground truth" presence and absence of bias for each year pair, which we expect our proposed framework to uncover from the review text without having access to the review ratings.

Estimating and evaluating affiliation bias in the review text
We now estimate the bias in the review text using equations (1) and (3). We use multinomial Naive Bayes classifiers with add-one smoothing for f (·) and g(·) on frequencies of unigrams and bigrams in the review and abstract text respectively. We use the area under the ROC curve (AUC) for both perf(f ; t) and perf(g; t), estimated using 10-fold cross-validation. We downsample the reviews and abstracts in year t DB to equalize the sample sizes and subgroup proportions in t SB and t DB , as  Table 3: "Ground truth" and estimated bias with respect to perceived gender. Estimated bias in the review text and review ratings with respect to the authors' perceived gender using ICLR peer reviews in the years 2017 and 2018. Standard errors reported in brackets.
described in Section 4. We repeat the bias estimation procedure 1,000 times with downsampling and the cross-validation folds randomized uniformly in each iteration. We use the empirical distribution of bias estimates from these iterations to construct confidence intervals on the estimated bias. We compute the p-value from the confidence intervals using the analytical method proposed by Altman and Bland (2011).
The estimated biases in the review text for the year pair (t SB = 2017, t DB = 2018) and the placebo year pairs (t SB = 2018, t DB = 2019) and (t SB = 2019, t DB = 2020) are reported in Table 2 (right). The first row of Table 2 (right) reports a statistically significant (p = 0.002) estimated bias corresponding to a reduction of 0.166 units (and hence, a negative estimate) in the classification performance ratio (see Eq. 3) from ICLR 2017 to 2018. The second and third rows of Table 2 (right) report statistically insignificant bias estimates using peer reviews in the double-blind year pairs (t SB = 2018, t DB = 2019) and (t SB = 2019, t DB = 2020). The biases in the review text in each year pair estimated using our proposed framework are consistent with the presence and absence of "ground truth" ratings bias in each year pair reported in Table 2 (left). This validates the effectiveness of our proposed framework.

Estimating and evaluating bias with respect to the authors' perceived gender
Different types of biases may be expressed in the text against population subgroups defined in different ways (such as by affiliation, race or gender). Our proposed framework does not rely on linguistic feature-engineering targeted at any specific type of bias. Hence, we evaluate the ability of our proposed framework to test for biases with subgroups defined based on the authors' gender as perceived by the reviewer (and not their self-reported gender). We detailed our gender-based subgroup definition and our gender annotation protocol earlier in Section 5.
Since our manual gender annotations only span ICLR 2017 and 2018, we report the estimated bias in the review ratings and text using ICLR 2017 and 2018 in Table 3. The "ground truth" bias in the review ratings (estimated using the difference-in-differences methodology as in Section 6.1) is statistically insignificant. The bias in the review text estimated using our proposed framework is also statistically insignificant, and hence, consistent with the "ground truth".
In summary, given our data and choice of gender-based subgroups, we cannot reject the null hypotheses of there being no bias in the review ratings and text against papers with at least one author perceived to be non-male. It is, however, important to note that failing to reject the null hypothesis does not confirm the absence of gender bias.

Conclusion and Discussion
Our work addresses an important yet relatively overlooked medium through which biases can harm society -that of text-based communication. We propose a framework to nonparametrically estimate biases expressed in text, which is robust to a larger class of unobserved confounders than prior work. We evaluate our approach in the setting of scholarly peer-review, wherein the "ground truth" bias can be inferred, and show that our proposed framework detects bias in the peer review text that is consistent with the "ground truth". Our framework can be used by policymakers to formulate more effective bias-mitigation policies that improve the equitability of hiring, promotion and other socioeconomic processes.
More generally, our work extends the difference-in-differences methodology to accommodate unstructured text as the "outcome". It operates on text observed in two time periods associated with two population subgroups before and after a (potentially identity-hiding) policy change, such as switching to age-blind recruitment (Capowski, 1994), blind performance reviews (Goldin and Rouse, 2000) or blind grading (Hanna and Linden, 2012). Our proposed framework quantifies the causal effect of the policy change on the difference in the text associated with each population subgroup. As such, our work also contributes to the nascent literature on causal inference from text Egami et al., 2018;Pryzant et al., 2018;Sridhar and Getoor, 2019;Keith et al., 2020) with "text as the outcome".
As a policymaking tool, one should take care in using our proposed framework appropriately. Our evaluation study in Section 6 is a detailed example of how the estimates and confidence intervals from our proposed framework are to be interpreted, both when they are statistically significant and insignificant. We expect that, with this example, users of our proposed framework are motivated to employ similar care when interpreting the bias estimates in their setting.
A correct use of our proposed framework would entail carefully considering the validity of the underlying identification assumption (Assumption 1). If an unobserved confounder exists that violates Assumption 1, our estimates will quantify the change in disparity from t SB to t DB caused by a combination of hiding author identities and the unobserved confounder, which cannot be interpreted as bias. While this assumption is empirically untestable (since it involves unobserved counterfactual quantities), placebo tests can be used to empirically support its validity. However, note that while the failure of a placebo test implies that the identification assumption does not hold, the success of a placebo test does not confirm that the identification assumption holds.
In our peer review setting, a potential confounder is an increase in research funding only for the institutions comprising G 1 from ICLR 2017 to 2018, and not for those comprising G 0 . In Fig. 2, note that the subgroup disparity in the mean and median review ratings decreases from ICLR 2017 to 2018 (the mean and median review ratings for the two subgroups become more similar in 2018). However, also note that the reduction in disparity is due to a decrease in the mean and median ratings for subgroup G 0 in 2018. Had research funding for the institutions comprising G 1 increased, we would have expected an increase in the mean or median ratings for subgroup G 1 in 2018. Hence, the temporal trends in ratings in Fig. 2 contradict the hypothesis of confounding due to an increase in research funding for the institutions comprising G 1 . In Appendix A, we detail this argument further and show how a combination of substantive reasoning, empirical tests and external evidence must be used to assess the validity of the identification assumption.  Table 4: Affiliation bias estimated using (Gentzkow et al., 2019). Estimated affiliation biases in the review text using ICLR peer reviews in consecutive years t SB and t DB . The disparity in the text is estimated using the method proposed by Gentzkow et al. (2019). Standard errors are reported in brackets.
from ICLR 2017 to 2020, and compare these estimates with the "ground truth" biases estimated in Section 6.1. Gentzkow et al. (2019) propose measuring subgroup disparities in text by estimating a regularized Poisson generative model of word frequencies as a function of subgroup membership. Specifically, the disparity for each word in the review (or abstract) text is estimated using an L 1 -regularized Poisson regression of the word frequency on the subgroup membership indicator. The magnitude of the regularization penalties are chosen to minimize the Bayesian Information Criterion (BIC) of the estimated model. The overall disparity in the review (or abstract) text is computed by aggregating all word-level disparities. Confidence intervals are constructed by repeated estimation using random subsampling without replacement.
We estimate the bias in the review text using equations (1) and (3), with perf(f ; t) and perf(g; t) replaced by disparities in the review and abstract text (respectively) estimated using the method proposed by Gentzkow et al. (2019). As in Section 6.2, we downsample the reviews and abstracts in year t DB and repeat the bias estimation procedure 1,000 times to construct confidence intervals. The estimated biases are reported in Table 4. For any year pair, with disparities in the text estimated using the method proposed by Gentzkow et al. (2019), we cannot reject the null hypothesis of there being no bias in the review text.
Hence, compared to our proposed method to measure disparity in the text, the method proposed by Gentzkow et al. (2019) lacks statistical power for the data used in our setting. We attribute this to two factors. First, the frequencies of most words used in the reviews and abstracts are low, which would lead to noisy estimates of word-level disparities, and hence, noisy overall disparity estimates. Second, the Poisson regression imposes strong distributional assumptions on how the text is generated that are unlikely to hold in all settings.