TL;DR
LMBot is a novel framework that "bakes" social graph knowledge into a Language Model (LM) to detect Twitter bots with state-of-the-art accuracy. By using iterative knowledge distillation, it achieves the performance of complex graph-based models while allowing for "graph-less" deployment, making inference significantly faster and more practical for real-world use.
What Problem Does This Paper Address?
Detecting malicious bots on Twitter is a high-stakes game of cat-and-mouse. Currently, the most effective methods are graph-based: they look at the "Twittersphere"—the complex web of who follows whom—to spot bot clusters.
However, these methods have a massive deployment bottleneck. To classify a single user, a Graph Neural Network (GNN) often needs to fetch data for neighbors multiple "hops" away. Because of Twitter's strict API rate limits and slow response times, fetching this neighborhood data can take minutes per user. Furthermore, random sampling of neighbors can introduce bias, leading to less reliable results. The authors sought a way to keep the high accuracy of graph-based models without the crippling data dependency at inference time.
Methods
The core idea of LMBot is to use a GNN as a "teacher" during training and a Language Model as a "student" that can eventually work alone.
- User as Text: Every user is represented as a single textual sequence combining their metadata (e.g., account age, follower count), profile description, and recent tweets.
- Domain Adaptation: A pretrained LM (like RoBERTa or DeBERTa) is first finetuned specifically on the bot detection task to get a "feel" for the Twitter domain.
- Iterative Distillation: This is the framework's engine. The LM provides high-quality initial embeddings to a GNN. The GNN then processes the social graph structure. Finally, the GNN's prediction logits (soft labels) are used to guide the LM's training. This loop repeats, allowing the LM to gradually absorb the structural inductive biases of the graph.
- Graph-less Deployment: Once training is complete, the LM can perform inference independently. It no longer needs to know who a user follows to make a highly accurate prediction.
Datasets
The researchers evaluated LMBot on four widely-used Twitter bot detection benchmarks:
- Cresci-2015 and TwiBot-20: These include both user features and social graph structures.
- Cresci-2017 and Midterm-2018: These are "graph-less" datasets, used to demonstrate the model's versatility across different data types.
Key Insights and Ideas
-
LMs are Underestimated: The authors found that simply finetuning a pretrained LM on bot detection (without any graph info) already beats most non-graph state-of-the-art methods. Finetuned LMs vs. SOTA benchmarks.
-
Structural Knowledge is Transferable: The most significant "aha" moment is that an LM can effectively learn the "vibe" of a social graph through distillation. It doesn't need to see the edges at test time if it has been taught how those edges typically influence a user's profile.
-
Mutual Enhancement: The iterative process isn't just about the GNN teaching the LM; the LM also provides better starting features for the GNN, creating a virtuous cycle of performance gains. Convergence curves showing how LM and GNN improve together over iterations.
-
Metadata is Crucial: Ablation studies revealed that metadata (account info) is the most influential part of the textual sequence, even more so than the content of the tweets themselves.
Key Results
- State-of-the-Art Performance: LMBot outperformed all 10 competitive baselines across all four datasets. On TwiBot-20, it achieved an accuracy of 85.63%, surpassing traditional graph-based models.
-
Massive Speedup: In a simulated deployment, inferring 20 new users took just 60 milliseconds with LMBot. A standard GNN, which had to fetch 552 additional neighbors via the Twitter API, took approximately 400 seconds. The exponential growth of nodes fetched by GNNs compared to the constant efficiency of LMs.
-
Robustness: The model remained stable even when 90% of training labels or graph edges were removed, showing high data efficiency.
Limitations and Future Work
- Training Intensity: While inference is lightning-fast, the training process is computationally heavy because it involves iteratively updating both a large LM and a GNN.
- Sequence Length Limits: Current LMs have a maximum input length (e.g., 512 tokens). This forces the model to truncate a user's tweet history, potentially missing useful information.
- Future Directions: The authors plan to explore ways to scale LMBot to massive datasets like TwiBot-22 and investigate more efficient ways to compress long user histories into the LM's limited input window.
Summary updated