Understanding Lexical Biases when Identifying Gang-related Social Media Communications

Dhiraj Murthy, Constantine Caramanis, Koustav RudraarXiv 2023 · DOI · arXiv

Abstract

Identifying individuals impacted by gang violence is a critical step for community-based intervention and trauma support. This research presents a machine learning framework for classifying Twitter users in Chicago who are "impacted" by violence—specifically friends and family of deceased gang-affiliated youth. The study investigates the performance of several architectures, including XGBoost and Logistic Regression, while critically examining the "lexical bias" inherent in these models. Results indicate that standard NLP features often misidentify African American English (AAE) as a marker of gang involvement, necessitating a cautious, ethics-first approach to automated social work.

Introduction

In urban centers like Chicago, the first line of defense against escalating violence often consists of community organizations, mediators, and street-level workers. These groups aim to provide timely intervention to individuals in the "periphery" of gang activity—those experiencing the profound grief and trauma that often precedes further violence. However, the scale of social media makes manual monitoring impossible. While previous automated efforts have focused on "criminality" markers like weapons or gang-specific hashtags, this research shifts the focus toward identifying those impacted by violence to facilitate care.

Methods

The researchers framed the identification problem as a binary classification task (Impacted vs. Not Impacted). They evaluated several machine learning architectures, including Naive Bayes, Random Forest, XGBoost, and Binary Logistic Regression. The feature set was multi-modal, incorporating:

  1. Linguistic Features: TF-IDF vectors at the word and bi-gram levels, alongside Part-of-Speech (POS) tagging proportions.
  2. Social Media Metadata: Frequency counts of hashtags and the top 10 most used emojis from 2015 (see Figure 5).
  3. Psychological Markers: Proportions of emotion-related words (e.g., anger, sadness, trust) derived from the NRC Emotion Lexicon.
  4. Bias Evaluation: A "bucketed" frequency analysis designed to detect if predictive features were disproportionately associated with African American English (AAE).
The top 10 most used emojis from 2015 used as social media metadata features in the classification models.

Datasets

The study utilized two primary data sources for training and evaluation:

  • Positive Class (Impacted): Approximately 4,300 tweets from two deceased gang-affiliated teenagers (Gakirah Barnes and Lamanta Reese) and their immediate social circles.
  • Negative Class (Random): Approximately 48,000 random tweets collected via the Twitter API using a geographic bounding box centered on Chicago (see Figure 1).
  • Dialect Evaluation Set: To test for lexical bias, a separate corpus of 1.1 million tweets was used, machine-labeled with a high probability (>0.8) of being written in AAE.
The geographic bounding box used to collect the random tweet dataset in Chicago.

Results and Discussion

The machine learning models significantly outperformed rule-based baselines. A simple keyword-based baseline for "Aggression/Loss" achieved only 8% precision, whereas the ML models reached much higher thresholds.

  • XGBoost demonstrated the highest precision (up to 97% in out-of-network tests) but suffered from low recall (17-24%), potentially missing many individuals in need.
  • Binary Logistic Regression emerged as a more balanced performer, maintaining 84% precision with a much higher recall of 42%.

A central finding of the study was the "Dialect Trap." Many of the most predictive features for the "Impacted" class were slang terms like "finna," "dat," or "dis." These are standard features of AAE rather than specific indicators of gang involvement or trauma. This lexical bias suggests that models might flag users based on their linguistic identity rather than their actual risk or need for intervention.

Conclusion

This work highlights the potential and the pitfalls of using "big data" for social work. While automated tools can help community organizations scale their outreach, the risk of algorithmic discrimination remains high. Future work must move beyond word-level emotion lexicons to capture the contextual nuances of emojis and sarcasm. Furthermore, incorporating geographic context and refining dialect-aware models will be essential for creating ethical, effective intervention tools.

Summary updated

Abstract

Individuals involved in gang-related activity use mainstream social media including Facebook and Twitter to express taunts and threats as well as grief and memorializing. However, identifying the impact of gang-related activity in order to serve community member needs through social media sources has a unique set of challenges. This includes the difficulty of ethically identifying training data of individuals impacted by gang activity and the need to account for a non-standard language style commonly used in the tweets from these individuals. Our study provides evidence of methods where natural language processing tools can be helpful in efficiently identifying individuals who may be in need of community care resources such as counselors, conflict mediators, or academic/professional training programs. We demonstrate that our binary logistic classifier outperforms baseline standards in identifying individuals impacted by gang-related violence using a sample of gang-related tweets associated with Chicago. We ultimately found that the language of a tweet is highly relevant and that uses of ``big data'' methods or machine learning models need to better understand how language impacts the model's performance and how it discriminates among populations.
BibTeX
@misc{murthy2023understanding,
  author = {Dhiraj Murthy and Constantine Caramanis and Koustav Rudra},
  title = {{Understanding Lexical Biases when Identifying Gang-related Social Media Communications}},
  year = {2023},
  eprint = {2304.11485},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.11485},
}
Figure