In the fast-evolving landscape of Natural Language Processing (NLP), Large Language Models (LLMs) like ChatGPT are often viewed as "jack-of-all-trades" superheroes. But when it comes to the specialized task of Lexical Semantic Change (LSC)—detecting how word meanings shift over decades or even centuries—is the "old guard" (BERT) still the hero we need?
A recent paper titled "(Chat)GPT v BERT: Dawn of Justice for Semantic Change Detection" pits these two architectural titans against each other to find out.
TL;DR
While ChatGPT is a generative powerhouse, BERT remains the superior "superhero" for detecting semantic changes in text. The study reveals that while ChatGPT 3.5 shows promise in identifying long-term historical shifts, it struggles significantly with short-term changes in dynamic environments like social media, where BERT’s contextualized embeddings still reign supreme.
What Problem Does This Paper Address?
Language is not static. The word "gay" shifted from meaning "cheerful" to "homosexual" over the last century; on social media, words can take on new slang meanings in a matter of weeks. Detecting these shifts is vital for historians, sociologists, and lexicographers.
The current state-of-the-art (SOTA) involves using BERT-based models to compare word embeddings across different time periods. However, with the rise of ChatGPT, many assumed these newer, larger models would naturally outperform BERT. The authors sought to test this assumption, specifically looking at diachronic (across time) text—a unique challenge for models' ability to generalize.
Methods
The researchers framed the problem as a Word-in-Context (WiC) task: given a target word used in two different sentences from different time periods, the model must decide if the word has the same or a different meaning.
They compared BERT (base-uncased) against GPT-3.5 (both the official API and the web interface). Their methodology included:
- Prompt Engineering: Testing Zero-shot (no examples), Few-shot (a few examples), and Many-shot (many examples) prompting.
- Temperature Tuning: Adjusting the "creativity" hyperparameter of GPT (from 0.0 to 2.0) to see how randomness affects accuracy.
- Layer Analysis: For BERT, they extracted embeddings from all 12 layers to see which provided the most "meaning-aware" representations.
Datasets
The study utilized two primary benchmarks:
- TempoWiC: An existing benchmark for detecting short-term semantic changes in social media (Twitter/X).
- HistoWiC: A newly introduced benchmark adapted from SemEval historical data. It focuses on long-term changes in English between the 19th century (1810–1860) and the late 20th/early 21st century (1960–2010).
Key Insights and Ideas
- Determinism Wins: Lower temperature settings (closer to 0.0) yielded better results for GPT. As temperature increased, not only did accuracy drop, but the model began to fail at following the requested output format.
- The API Advantage: Using the official OpenAI API consistently outperformed the ChatGPT web interface. This suggests that the web version might be using internal settings (like a fixed intermediate temperature) that aren't optimal for specialized logic tasks.
- In-Context Learning is Fickle: Interestingly, while providing examples (Few-shot) helped GPT on social media data, it actually hurt performance on historical data compared to Zero-shot prompting.
- BERT's Layered Wisdom: BERT's performance varies by layer. For historical text, middle layers are best because they are less "over-contextualized" by modern training data. For social media, the final layers are more effective.
Key Results
The quantitative results show a clear hierarchy:
- BERT is the SOTA: BERT (last layer) achieved a Macro-F1 of 0.743 on HistoWiC and 0.750 on TempoWiC.
- GPT Struggles with Speed: On the short-term changes of TempoWiC, the best GPT API score was only 0.622—significantly lower than BERT.
- Historical Parity: On long-term historical changes (HistoWiC), GPT performed much better, reaching a best score of 0.689, making it "comparable" to BERT, though still slightly behind.
Limitations and Future Work
The authors acknowledge several hurdles:
- Reproducibility: ChatGPT's inherent nondeterminism means results can vary slightly even with the same settings.
- Cost and Scale: Due to API costs and rate limits, the study was limited to English and relatively small subsets of data.
- Model Versioning: The study focused on GPT-3.5. Preliminary evidence suggests GPT-4 may close the gap, which the authors plan to investigate in future work.
In conclusion, while ChatGPT is an impressive tool, it hasn't yet made BERT obsolete for the nuanced work of historical linguistics. For now, BERT remains the "hero" the NLP world needs for semantic change detection.
Summary updated