What Can Go Wrong in Authorship Profiling: Cross-Domain Analysis of Gender and Age Prediction (2024)

Abstract: Authorship Profiling (AP) aims to predict the demographic attributes (such as gender and age) of authors based on their writing styles. Ever-improving models mean that this task is gaining interest and application possibilities. However, with greater use also comes the risk that authors are misclassified more frequently, and it remains unclear to what extent the better models can capture the bias and who is affected by the models’ mistakes. In this paper, we investigate three established datasets for AP as well as classical and neural classifiers for this task. Our analyses show that it is often possible to predict the demographic information of the authors based on textual features. However, some features learned by the models are specific to datasets. Moreover, models are prone to errors based on stereotypes associated with topical bias.

## introduction authorship profiling (ap) aims to identify authors' demographic characteristics through their writing style. in recent years, this task has polarized the nlp community. on the one side, researchers emphasize the potential of ap for computational social science applications, where predicting who wrote given texts can enrich analyses of data that lacks explicit demographic information @xcite . such additional automatically predicted attributes could allow for uncovering demographic patterns in societal trends, political ideologies, or cultural shifts. the automatic prediction of such attributes may also be helpful to other practical applications, such as forensics, abuse detection, and marketing @xcite @xcite . as a result, the majority of work on ap is motivated by these practical applications and focuses primarily on improving model performance @xcite @xcite . on the other side, researchers are alarmed by the potential societal harm that ap models can cause. firstly, these tools come with the risk of privacy breaches and the dangers of using authors' features without their consent @xcite . secondly, the ap tasks and datasets commonly understate complexity of how demographic characteristics relate to the language production. for example, gender, one of the most frequently predicted demographic traits, is often analyzed in isolation from other related features like age @xcite and oversimplified @xcite . ap models traditionally treat gender as a binary variable and lack reflection on the spectrum of gender identities, potentially leading to reinforcing stereotypes and misrepresentations @xcite . finally, misclassifying people can lead to feelings of exclusion, negatively affecting individuals' self-esteem and confidence @xcite . to move forward, it is essential to reach a consensus regarding the circumstances necessitating the deployment of ap models. fundamental to this process is a thorough understanding of what these models learn, what type of biases they capture, and who is affected by their errors. to this end, this paper examines the core assumption underlying the majority of research motivated by the practical applications of ap: that demographically related signals are comparable across datasets. with a focus on gender and age -two demographic features that are strongly interrelated -we explore the extent to which writing styles are consistent and transferable across datasets. our work centers around three core research questions: we train classical and neural classifiers on two wellestablished datasets from two domains: online conversations and blog posts, and two languages: english and spanish. our findings indicate that neural classifiers have only a modest advantage when predicting gender and age. moreover, the performance of all classifiers drops close to the majority baseline in cross-domain applications ( §5). we perform a statistical analysis of authors' writing styles to uncover that gender and age differences found in one dataset are not fully reproducible within another. the finding is consistent across domains as well as languages ( §6). ## bias statement our work examines the behavior of ap models, focusing on how models predict gender and age across domains. we specifically define gender bias as a notable difference in prediction of an author's gender based on topic preference or writing style. in parts, such differences can be explained by the underlying training data used by ap models. for example, @xcite observe that male authors tend to use named entities at a higher rate in their writing compared to female authors, a phenomenon also related to topic choices that are rich in named entities, such as specific hobbies or career paths. despite such insights, approaches to author profiling sometimes rely only on style-based features and overlook topical differences. we ex-amine the impact regarding gender bias by testing how likely ap models mispredict gender when authors write about topics typically associated with another gender. for example, male authors discussing shopping-related topics may be mispredicted as female. this indicates that the model picks up on topics stereotypically associated with one gender and performs inadequately when authors from another gender engage with those same topics, which may cause representational harms @xcite . moreover, biases of ap models can easily be misinterpreted as general differences in gender or age, leading to an issue of reinforcing stereotypes. our work is grounded in the belief that uncovering biases is crucial for developing equitable nlp applications. we acknowledge as a main limitation that all data used in this work assumes a binary gender framework. therefore, our analyses may not fully capture the complexities and nuances of gender identity. future work should aim to include more inclusive and representative data to better understand and address gender bias in ap models. ## related work previous work can be roughly divided into three categories: work on the task of authorship profiling itself ( §3.1), sociolinguistic studies of stereotypes and gender differences ( §3.2) as well as efforts to model or counteract (topical) biases ( §3.3). ## data we use two well-explored datasets of texts annotated with self-reported gender and age of their authors -pan13 and blog. we select datasets that are fundamental to the ap research field: pan13, used in the first pan-ap shared task, and blog, used in the earliest work for studying gender effect on texts). pan13 originates from a shared task on plagiarism detection, authorship verification, and authorship identification @xcite . it includes conversations in two languages: english (referred to as pan13-en), comprising a total of 283,240 conversations and spanish (pan13-es), with 90,860 conversations. the dataset includes a variety of topics to reflect real-world usage and complexity, with an emphasis on everyday language in social media. in the data preparation step, we exclude posts from authors who pretend to be minors. foot_0 both english and spanish datasets come with the training and test split. to ensure a comparable analysis across languages, we downsample the training part of the english dataset so that it has the same number of samples as spanish (we do not alter test parts). blog is the blog authorship corpus @xcite , that was constructed in august 2004 from blogger.com, including a total of 71,000 blogs and 681,284 posts. each post is annotated with a date, blogger's id, self-provided gender ('female', 'male'), age, industry, and zodiac sign. the corpus does not include a pre-defined training and test split. therefore, we first randomly divide it into 80/20 split. secondly, since blog includes whole articles and not single conversation inputs, its data points are much longer than in pan13. therefore, to make these two datasets more comparable, we downsample the training part of blog to have approximately the same number of words as in pan13-es (keeping full articles intact). we ensure that all the datasets are balanced regarding the gender of the authors. we convert the ages in blog to the same categories as in pan13: '10s' (13-17), '20s' (23-27), and '30s' (33-47). for both of the datasets, we group and concatenate posts from the same author and take such concatenated texts as our data points. moreover, we eliminate urls in the preprocessing of the texts. ## gender and age prediction we start from answering what is the accuracy of standard classifiers when predicting gender and age for the given text. ## demographics vs. style the findings from the previous section highlight differences in classifier performance across datasets. next, our objective is to uncover the underlying causes behind these differences. given that the accuracy of ap models is often linked to the demographically influenced writing styles of authors (see section 3.2), our first analysis involves examining our datasets from the perspective of their style. ## demographics vs. topics as explained in section 3.3, topics are the second type of information frequently considered to influence classifiers' ability to predict demographic features of authors. thus, in this section, we analyze topic-based differences in our data and their influence on the classifiers' errors. this section focuses exclusively on the pan13-en dataset, which we identified as the most challenging for the classifiers in section 5. ## conclusion gender is a complex attribute, and linguistic signals can be very blurry to distinguish among demographic groups @xcite . ap tasks with binary gender classification tend to oversimplify these nuances, potentially reinforcing stereotypes and misrepresentations. in this work, we revisited the authorship profiling task to understand what bias ap models capture and where they make mistakes foot_9 . we started by demonstrating that standard classifiers achieve relatively low accuracy in predicting authors' gender and age, with varying performance across datasets. our feature analysis revealed that these differences might be attributed to altering demographically related signals. while the results confirmed that surface and syntactic features significantly correlate with the demographics of authors, surprisingly, the strength and direction of these correlations vary across datasets, irrespective of whether they are in the same or different languages. moreover, the signals that are consistent across datasets are insufficient for a successful transfer of models between them. finally, we show that a strong signal for classifiers is the topic of the text. however, classifiers that base their decisions more on the content and not style can exhibit biased behaviors, making mistakes in topics stereotypically associated with a particular interaction between gender and age, causing representational harm. with the evidence above, we emphasize that using and interpreting results even from ap classifiers that include only features for gender/age prediction necessitates caution, accounting for both the domains and the models' behavior. similarly to other nlp classification tasks, ap models aim to learn dataset-specific patterns. these patterns, once learned, are then applied to predict information about new texts. however, as we showed, dataset-specific patterns do not reflect general demographic differences. therefore, practically applying ap models to new data results in decisions that are either based mostly on stereotypes or that have very low accuracy. therefore, in use cases that require ap models, it is important to understand the differences between the training and application datasets. moreover, white-box classifiers that are easy to interpret are the better choice for the prediction methods.