Imagine trying to explain to a 2019-era GPT-2 model that "ice" can mean "to kill." If you asked it to fill in the blank for "I have a feeling he’s gonna ____ himself someday," it would likely suggest "kill" (7.7% probability). The word "ice"? It would receive virtually 0% probability.
This is the core challenge addressed by researchers from the University of Toronto and the Vector Institute in their paper, "A Computational Framework for Slang Generation." While modern NLP excels at formal language, slang remains a "final frontier" due to its ephemeral nature, data scarcity, and the creative ways it repurposes existing vocabulary.
TL;DR
The researchers present a neural-probabilistic framework that models how speakers choose slang words by linking novel slang meanings to a word's conventional senses. By using contrastive learning to "warp" semantic embedding spaces, their model significantly outperforms state-of-the-art language models in predicting slang usage and even mirrors the historical emergence of slang over the last 50 years.
What Problem Does This Paper Address?
Standard NLP models are typically biased toward formal language. Slang is problematic for two reasons:
- Data Scarcity: Slang makes up a tiny fraction of the massive corpora used to train models like GPT or BERT.
- Semantic Shift: Slang often involves "innovative use," where a word like ice (conventionally "frozen water") takes on a completely different meaning ("to kill") based on metaphorical or functional similarities (e.g., "coldness").
Existing models see "frozen water" and "to kill" as semantically distant. This paper seeks to bridge that gap by modeling the generative process: how does a speaker decide that ice is an appropriate substitute for kill in an informal context?
Methods
The authors propose a three-part framework:
- Probabilistic Slang Choice Model: A Bayesian approach that calculates the probability of a word given an intended slang sense and a specific context.
- Contrastive Semantic Encoding (CSE): This is the architectural heart of the paper. Using a triplet loss function, the model learns a new embedding space where a word's slang sense (e.g., "to kill") is pulled closer to its conventional senses (e.g., "frozen water"). This allows the model to "understand" the relationship between a word's literal and figurative meanings.
- Contextual Priors:
- Syntactic-Shift Prior (SSP): Slang often changes a word's part of speech (e.g., the noun ice becoming a verb). The model explicitly counts these transitions in training data to predict likely shifts.
- Linguistic Context Prior (LCP): This uses a fine-tuned GPT-2 model to evaluate how well a candidate word fits the surrounding sentence structure.
Datasets
The researchers utilized three primary slang resources and one conventional dictionary:
- Online Slang Dictionary (OSD): Includes definitions and example sentences.
- Green’s Dictionary of Slang (GDoS): A massive historical resource with time-tagged references.
- Urban Dictionary (UD): A cleaned subset of the popular crowd-sourced site.
- Oxford Dictionary (OD): Used to provide the "conventional" or literal senses for the words found in the slang dictionaries.
Key Insights and Ideas
- Slang is Non-Random: The most successful model components were those that related slang senses to conventional senses. This confirms the linguistic theory that slang is an extension of existing meaning, not just arbitrary code-switching.
- Contrastive Learning is the "Secret Sauce": Simply using larger models (like SBERT vs. fastText) provided only minor gains. The real performance jump came from the CSE, which actively reshapes the embedding space to be "slang-sensitive."
- Historical Mirroring: Perhaps the most striking finding is that a model trained on older data could accurately predict which slang terms would emerge in subsequent decades (1960s through 2000s). This suggests the framework captures a fundamental logic in how English speakers innovate language.
Key Results
The researchers evaluated their model using Area-Under-Curve (AUC) for word choice prediction:
- Superior Accuracy: On the OSD dataset, the full model (SBERT + CSE + SSP + LCP) achieved an AUC of 79.5%, vastly outperforming the baseline SBERT (72.0%) and the GPT-2 infilling model (61.8%).
- Qualitative Wins: In head-to-head comparisons, the baseline model often suggested literal synonyms (e.g., for the sense "to kill," it suggested homicide). The full model successfully retrieved slang terms like spill, swallow, and ice, which share no surface similarity with "kill" but are common in informal usage.
- Robustness: The framework showed significant improvements in both "few-shot" (words seen in training with different senses) and "zero-shot" (entirely new word forms) scenarios.
Limitations and Future Work
While the model is a major step forward, the authors note several hurdles:
- Cultural Knowledge: Some slang is rooted in deep cultural associations that aren't in the text (e.g., why "red" means "communist"). The model struggles when the link between the literal and slang sense requires external world knowledge.
- Zero-Shot Challenges: Predicting a slang word that has never appeared in the training set remains difficult, as the model must infer the extension purely from conventional definitions.
- Future Directions: The authors suggest moving beyond single-word choice to generating entire informal sentences and exploring how this framework could improve "natural-sounding" chatbots or sarcasm detection.
Summary updated