Discipline

Social science

2 records

Social science · Paper · October 2025

Counterfactual Loss Improves Feature-Token Transformer Performance in Community Homelessness Prediction

Tashvi Bansal

Two issues persist within the homelessness domain: lack of accuracy in current homelessness prediction models and the need to reduce spending because of inefficiency in homelessness funding. This study has two hypotheses. First, we hypothesized that the addition of a counterfactual loss configuration will improve FT-Transformer’s accuracy on homelessness data because sparsity regularization penalizes complex feature combinations and reduces overfitting to noise in highdimensional data. Second, we hypothesized that generating post-hoc counterfactuals will identify “what-if” changes to the input features that will prescribe budgeting more efficiently. This study’s dataset is from the U.S. Department of Housing and Urban Development (HUD), with community-level factors associated with homelessness as input features and homelessness rates per Continuum of Care as the target. The study evaluated the performance of FTTransformer versus FT-Transformer with a modified loss function. The modified loss function integrated sparsity, a metric measuring how many feature values differ between an instance and its counterfactuals. Supporting the first hypothesis, FT-Transformer with counterfactual loss achieved an R2 of 0.850—higher than vanilla FT-Transformer’s R2 of 0.831—and attention analysis revealed significant variance reduction in attention scores for FT-Transformer with the loss configuration. This variance reduction indicated attention is more concentrated on a smaller set of features, demonstrating that the sparsity-based optimization successfully penalized complex feature combinations and reduced overfitting to noise. The second hypothesis received only partial support, as post-hoc counterfactuals successfully reduced budgets but exhibited low feasibility and yield. This work lays foundations for transparent and data-driven homelessness policy interventions.

Social science · Paper · July 2023

Inferring Hate Speech Trends for Contemporary Tweets Using a Novel Machine Learning Approach from Supervised Learning Algorithms

Aryan Singhal

Social media platforms such as Twitter have become ubiquitous in our contemporary society, providing a platform for individuals to express their opinions and engage in discussions on a wide range of topics including those that are neutral and controversial. However, the growing popularity of Twitter has also led to an increase in the prevalence of hate speech, which raises concerns about its impact on individuals and society. This research investigates hate speech trends on Twitter by utilizing supervised machine learning classification, specifically Naive Bayes, and employing Natural Language Processing (NLP) features such as on a range of neutral and controversial topics. The study compares the prevalence of hate speech in these topics and tracks such trends from January 2022 to January 2023. The results show that hate speech was nearly 400% more prevalent in controversial topics than in neutral topics over the course of the year. In addition, this research finds that controversial topics are consistently more vulnerable to hate speech throughout the course of the year when compared to neutral topics. To conduct this study, a Multinomial Naive Bayes classification model was trained on a publicly available Twitter dataset that was specifically labeled for semantic hate speech and achieved an accuracy rate of 94.46%. Ultimately, the higher vulnerability of controversial topics should necessitate policymakers to introduce stricter warnings or frequent policy reminders to platform users. Such changes will foster a respectful and inclusive platform for users, preserving their freedom of expression and encouraging constructive discussions.