Paper · 2018-02-01 · cs.CL, cs.SI
A Unified Deep Learning Architecture for Abuse Detection
One GRU over GloVe word vectors and one dense network over tweet, user and network metadata, concatenated into a single classifier. Each mini-batch updates only one of the two paths, alternating between them. Author-reported AUC of 0.92 to 0.98 across four Twitter abuse datasets under 10-fold cross-validation, above the baselines they compare against.
Multimodal fusionTransfer learningText classificationToxicity detectionclassificationsocial-mediamulti-input-networktext-and-metadata
AI-compiled by claude-haiku-5-5 on 2026-11-06, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Online platforms have to catch many kinds of abusive posts: hate speech, sexism, racism, bullying, sarcasm. Most detectors are built for one of these and tuned to one platform, so they miss the others. This paper asks whether a single neural network can handle all of them.
The model reads two kinds of input about each tweet. One is the words of the tweet, turned into vectors that a pretrained word table supplies. The other is facts about the tweet and its author, such as counts of mentions, emotion scores, follower numbers and account age. Each input gets its own branch, and the two branches are joined near the end to make one decision.
Training two branches inside one network is tricky, because one branch can learn faster and drown out the other. The authors' fix is to let the branches take turns: on each batch, the whole network sees the data, but only one branch is allowed to change. The authors report that this turn-taking works best on all four datasets they tried, and that the same settings worked without retuning.
TL;DR
A single two-branch Keras model combines a GRU over pretrained word vectors with a dense network over Twitter metadata, trained with alternating updates between the branches § Deep Learning Architectures [§ Training the Combined Network]. On four Twitter abuse datasets, the authors report AUC between 0.92 and 0.98 under 10-fold cross-validation, above the baselines they compare against tab. 2. The paper's sections are unnumbered in the source, so the citations use section titles. There is no official code.
Problem
Abusive behaviour on Twitter takes several forms, and detectors are typically built for one type and one platform § Introduction. Text-only classifiers are the common approach, but the authors argue that text alone is not enough, and that per-task feature engineering is costly § Introduction § Deep Learning Architectures. They therefore want one architecture that takes text and metadata together, with no retuning per task § Introduction § Summary.
Method
The model has three parts: a text branch, a metadata branch and a classifier over their concatenated outputs fig. 2 [§ Combining the Two Classification Paths]. Each branch can also be trained alone, as a standalone classifier fig. 1 § Deep Learning Architectures.
Text branch § Text Classification Network:
- Tweets are cut or left-padded with zeros to 30 words. The length is the 95th percentile of tweet length in the corpus. Words that occur only once are removed.
- Each word is mapped to a 200-dimensional GloVe vector. Words missing from GloVe get random vectors, which the embedding layer then learns.
- A GRU with 128 units reads the sequence. Recurrent dropout is 0.5. Attention is switched off for tweets.
- The text branch outputs 128 activations, one per RNN unit.
Metadata branch § Metadata Network:
- The raw features are numeric. Categorical features are enumerated or one-hot encoded, and the features are listed in § Dataset and [§ Feature Extraction].
- A batch-normalisation layer standardises the batch.
- Five dense layers of sizes 512, 245, 128, 64 and 32 form a bottleneck, with tanh activations. A sixth dense layer brings the output to 128 units, the same width as the text branch.
Combined classifier § Combining the Two Classification Paths:
Concatenate the 128-unit text output and the 128-unit metadata output into 256 features, then apply a softmax dense layer with one unit per class fig. 2.
Training § Training the Combined Network § Experimental Setup:
The paper compares four ways to train the combined model. Naive training updates all weights at once. Transfer learning pretrains each branch, freezes them, and trains a new joining layer. Fine-tuning does the same but leaves the branches trainable. The interleaved method is the one the paper proposes and reports as best on every dataset § Experimental Results tab. 2. Its procedure:
# Interleaved training [§ Training the Combined Network]
# Input: text (N, 30) word ids; metadata (N, M); labels (N, C) one-hot
# Output: the trained combined network
def train_interleaved(text, metadata, labels, max_epochs):
# Two identical combined networks, A and B [fig. 2]
model_a = build_combined_network()
model_b = build_combined_network()
# Freeze the text path of A and the metadata path of B
# [§ Training the Combined Network]
freeze(model_a.text_path)
freeze(model_b.metadata_path)
for epoch_number in range(max_epochs):
for batch_number, (text_batch, meta_batch, y) in enumerate(
minibatches(text, metadata, labels, batch_size=512)
):
# Even (batch + epoch) uses A; odd uses B
# [§ Training the Combined Network]
if (batch_number + epoch_number) % 2 == 0:
active, other = model_a, model_b
else:
active, other = model_b, model_a
# Full forward pass; only the unfrozen path gets gradients
# [§ Training the Combined Network]
train_on_batch(active, [text_batch, meta_batch], y)
# Copy the updated weights so both models match
# [§ Training the Combined Network]
other.set_weights(active.get_weights())
return model_aKey loss: categorical cross-entropy over the whole network, optimised with Adam § Experimental Setup. There is no numbered equation in the source.
Hyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| Framework | Keras functional API, Theano backend | § Experimental Setup | |
| Hardware | three Tesla K40c GPUs | § Experimental Setup | |
| Input length | 30 words | § Text Classification Network | 95th percentile of tweet length; longer tweets truncated, shorter left-padded with zeros |
| Minimum word frequency | words occurring once removed | § Text Classification Network | |
| Word embedding | GloVe, 200 dimensions | § Text Classification Network § Feature Extraction | GloVe variant not named; words absent from GloVe get random init; embedding trainability is implied, not stated |
| Recurrent unit | GRU | § Text Classification Network | LSTM and bidirectional RNNs were tried and not chosen |
| RNN units | 128 | § Text Classification Network | |
| Recurrent dropout | 0.5 | § Text Classification Network | source defines p as the probability a neuron is available; see Pitfalls |
| Attention | off for tweets; on for texts over 100 words and for the gaming dataset | § Text Classification Network § Generalizing to Other Platforms | the gaming attention layer's details are not stated |
| Metadata normalisation | batch normalisation | § Metadata Network | placement, momentum and epsilon not stated |
| Metadata dense sizes | 512, 245, 128, 64, 32, then 128 | § Metadata Network | the value "245" is as printed; see Pitfalls |
| Metadata activation | tanh | § Metadata Network | which layers it covers is not stated explicitly |
| Joining | concatenation of 128 and 128 | § Combining the Two Classification Paths | |
| Output | softmax, one unit per class | § Text Classification Network § Combining the Two Classification Paths | |
| Loss | categorical cross-entropy | § Experimental Setup | |
| Optimiser | Adam | § Experimental Setup | learning rate, betas and decay not stated |
| Max epochs | 100 | § Experimental Setup | |
| Early stopping | stop after 10 epochs without validation-loss drop; restore best weights | § Experimental Setup | validation split size not stated |
| Mini-batch (interleaved) | 512 | § Training the Combined Network | 64 to 512 gave similar results; batch size for other methods not stated |
| Transfer-learning joining layer | converges in 3 to 5 epochs (observed) | § Experimental Results | |
| Standalone epochs (observed) | text 25 to 40; metadata 7 to 12 | § Experimental Results | |
| Trainable parameters | about 250,000, excluding embeddings | § Experimental Setup | |
| Cross-validation | 10-fold | § Evaluation | |
| Naive Bayes baseline | TF-IDF; top 10,000 words; lowercasing; stop-word removal | § Experimental Setup | stemmer and lemmatiser variants were tried; the chosen one is not named |
Results
Author-reported. Setup: 10-fold cross-validation; four Twitter datasets tab. 1; the same architecture and settings on each; baselines are a TF-IDF Naive Bayes model and each dataset's published method [§ Experimental Setup] § Experimental Results.
Datasets tab. 1, as printed:
| Dataset | Tweets | Classes (share) | Users | WV | TF | UF | NF |
|---|---|---|---|---|---|---|---|
| Cyberbullying (WebSci) | 6091 | Bully 8.5%, aggressive 5.5%, normal 86% | 891 | yes | yes | yes | yes |
| Racism and sexism (Offensive/NAACL) | 16059 | racism 12%, sexism 20%, none 68% | 1236 | yes | yes | yes | no |
| Hate (ICWSM) | 24783 | hate 6%, offensive 77%, neither 17% | blank | yes | yes | no | no |
| Sarcasm (WSDM) | 61075 | sarcastic 10.5%, normal 89.5% | 60255 | yes | yes | yes | no |
WV = word vectors, TF = tweet-based, UF = user-based, NF = network-based metadata. Counts are as printed; see Pitfalls for text-versus-table differences.
Table 2 tab. 2, as printed (AUC, Acc., Prec., Rec., F1):
| Dataset | Method | AUC | Acc. | Prec. | Rec. | F1 |
|---|---|---|---|---|---|---|
| WebSci (3 classes) | Baseline Naive Bayes | 0.73 | 0.88 | 0.88 | 0.88 | 0.88 |
| WebSci | Chatzakou et al. 2017 | 0.91 | 0.91 | 0.90 | 0.92 | 0.91 |
| WebSci | DL metadata only | 0.93 | 0.88 | 0.91 | 0.88 | 0.89 |
| WebSci | DL text only | 0.92 | 0.89 | 0.91 | 0.89 | 0.89 |
| WebSci | DL text and metadata, naive | 0.94 | 0.89 | 0.90 | 0.90 | 0.90 |
| WebSci | DL text and metadata, transfer | 0.95 | 0.90 | 0.92 | 0.90 | 0.90 |
| WebSci | DL text and metadata, transfer + FT | 0.95 | 0.90 | 0.91 | 0.90 | 0.91 |
| WebSci | DL text and metadata, interleaved | 0.96 | 0.92 | 0.93 | 0.92 | 0.93 |
| Racism/sexism | Baseline Naive Bayes | 0.79 | 0.81 | 0.81 | 0.81 | 0.81 |
| Racism/sexism | Waseem and Hovy 2016 | - | - | 0.74 | 0.73 | 0.78 |
| Racism/sexism | DL metadata only | 0.91 | 0.74 | 0.81 | 0.74 | 0.76 |
| Racism/sexism | DL text only | 0.93 | 0.83 | 0.84 | 0.83 | 0.83 |
| Racism/sexism | DL text and metadata, naive | 0.93 | 0.85 | 0.86 | 0.86 | 0.86 |
| Racism/sexism | DL text and metadata, transfer | 0.95 | 0.85 | 0.86 | 0.85 | 0.85 |
| Racism/sexism | DL text and metadata, transfer + FT | 0.95 | 0.86 | 0.87 | 0.86 | 0.86 |
| Racism/sexism | DL text and metadata, interleaved | 0.96 | 0.87 | 0.88 | 0.87 | 0.87 |
| Hate | Baseline Naive Bayes | 0.71 | 0.87 | 0.84 | 0.87 | 0.85 |
| Hate | Davidson et al. 2017 | 0.87 | 0.89 | 0.91 | 0.90 | 0.90 |
| Hate | DL metadata only | 0.75 | 0.61 | 0.80 | 0.61 | 0.66 |
| Hate | DL text only | 0.91 | 0.87 | 0.89 | 0.87 | 0.88 |
| Hate | DL text and metadata, naive | 0.90 | 0.87 | 0.89 | 0.87 | 0.88 |
| Hate | DL text and metadata, transfer | 0.91 | 0.87 | 0.89 | 0.87 | 0.88 |
| Hate | DL text and metadata, transfer + FT | 0.90 | 0.87 | 0.89 | 0.87 | 0.88 |
| Hate | DL text and metadata, interleaved | 0.92 | 0.90 | 0.89 | 0.89 | 0.89 |
| Sarcasm | Baseline Naive Bayes | 0.66 | 0.90 | 0.89 | 0.90 | 0.89 |
| Sarcasm | Rajadesingan et al. 2015 | 0.70 | 0.93 | - | - | - |
| Sarcasm | DL metadata only | 0.96 | 0.92 | 0.94 | 0.92 | 0.92 |
| Sarcasm | DL text only | 0.81 | 0.89 | 0.89 | 0.89 | 0.89 |
| Sarcasm | DL text and metadata, naive | 0.97 | 0.96 | 0.96 | 0.96 | 0.96 |
| Sarcasm | DL text and metadata, transfer | 0.97 | 0.95 | 0.95 | 0.95 | 0.95 |
| Sarcasm | DL text and metadata, transfer + FT | 0.97 | 0.95 | 0.95 | 0.95 | 0.95 |
| Sarcasm | DL text and metadata, interleaved | 0.98 | 0.97 | 0.96 | 0.97 | 0.97 |
Metadata importance on WebSci, AUC only tab. 3:
| Features | AUC |
|---|---|
| Network only (NF) | 0.641 |
| Tweet only (TF) | 0.799 |
| User only (UF) | 0.806 |
| User and tweet (UF+TF) | 0.887 |
| Network and tweet (NF+TF) | 0.908 |
| Text only (WV) | 0.915 |
| User and network (UF+NF) | 0.915 |
| All metadata (TF+UF+NF) | 0.923 |
| Text and tweet (WV+TF) | 0.930 |
| Text and network (WV+NF) | 0.931 |
| Text, user and tweet (WV+UF+TF) | 0.933 |
| Text, network and tweet (WV+NF+TF) | 0.936 |
| Text and user (WV+UF) | 0.938 |
| Text, user and network (WV+UF+NF) | 0.955 |
| All (WV+TF+UF+NF) | 0.961 |
Author-stated headline claims: the interleaved model is best on all four datasets § Classification performance; the abstract gives a 21 to 45% AUC improvement, which the body does not recompute as one figure § Abstract. On WebSci the paper itself says the comparison with Chatzakou et al. is not direct, because their results are user-level and this paper's are tweet-level § Experimental Results. On the toxic gaming dataset, the same model reaches accuracy 0.93 and AUC 0.89, which the authors say beats the easiest task in the original work § Generalizing to Other Platforms.
Paper vs code
No official code.
The arXiv abstract page lists no code link; its comments field holds only keywords. The source's commented-out line says an implementation is available at a link "redacted for double blind" § Introduction, commented in source. Searches: the arXiv abstract page; GitHub repository search for "abuse detection", "hate speech twitter metadata", "abuse detection unified architecture" and "hate speech founta" (no matching author repositories); a GitHub user search for "founta" (the matching account shows unrelated repositories). No project page was found.
Pitfalls
- Dataset counts disagree. The text gives 9,484 WebSci tweets before spam removal § Dataset, while Table 1 lists 6,091 tab. 1. The sarcasm text says about 60k tweets kept § Dataset, while Table 1 lists 61,075 tweets and 60,255 users. Use the table counts and mark the discrepancy.
- Hate dataset metadata is contradictory. The dataset section says no metadata is used beyond word vectors § Dataset. Table 1 marks tweet-based metadata as available for this dataset tab. 1, and the discussion says the classifier uses "the raw text and the tweet-based metadata" [§ Experimental Results]. Table 2's metadata-only row for this dataset (AUC 0.75) implies tweet-based features were used.
- Layer size "245". The metadata network is given as 512, 245, 128, 64, 32 § Metadata Network. The value 245 is probably a typo, but the paper does not say. Do not silently change it to 256; either flag it or test both.
- Recurrent dropout semantics. The paper says p=0.5 means each neuron is "available for activation with probability 0.5" [§ Text Classification Network]. Many frameworks define dropout as the probability of dropping a unit. Check which convention the implementation uses. The paper gives no code for this.
- Which path updates on which batch. The text says even batches update only the text path and odd batches only the metadata path [§ Training the Combined Network]. The procedure says model A (text path frozen) is used when (batch + epoch) is even, which would update only the metadata path. The two statements conflict. The pseudocode above follows the procedure (model A, frozen text path, on even parity) and the Keras-style freeze; verify against any released code before relying on it.
- Concatenation point. The 128 text activations are described as "one for each RNN unit" § Combining the Two Classification Paths. The paper does not say whether these are the last hidden state, a pooled sequence, or another reduction.
- Tanh scope and metadata details. The tanh activation is mentioned in the metadata paragraph, but whether it applies to all dense layers, and whether dropout or other regularisation applies to the metadata branch, is not stated. The definitions of sentiment, emotion and offensiveness scores are not given § Feature Extraction.
- Early stopping is underspecified. The validation-split size and which model's loss is monitored are not stated. Patience is 10 epochs [§ Experimental Setup].
- Learning rate and batch size for non-interleaved modes are not stated. Only the interleaved batch size (512) is given [§ Training the Combined Network].
- Architecture is not fully task-agnostic. The gaming experiment switches attention on § Generalizing to Other Platforms, and the paper concedes that per-task tuning could improve results § Summary. "No retuning" applies to the four Twitter datasets with the attention setting unchanged.
- Metadata features depend on external scorers. Sentiment, emotion and offensiveness scores are used but their source is not named [§ Feature Extraction]. Replicating them exactly is not possible from the paper alone.
- Cost. The authors trained on three GPUs § Experimental Setup. Interleaved training runs the whole network on every batch, but updates only one path, so each batch costs a full forward pass plus one weight copy [§ Training the Combined Network]. The paper gives no timing figures.
- No variance reported. Scores are given without standard deviations across folds tab. 2.
- Not directly comparable baselines. The WebSci comparison with Chatzakou et al. mixes user-level and tweet-level results § Experimental Results. The sarcasm experiments use the original imbalanced data, because the baseline's imbalanced results are the reference § Dataset.
- Data availability. The gaming dataset was obtained from its authors § Generalizing to Other Platforms. No public release is stated.
Lineage
- Builds on: interleaved training from Hidasi et al. 2016, which the paper cites for parallel recurrent networks in recommender settings [§ Training the Combined Network]. No arXiv id is given in the source. GloVe word vectors § Text Classification Network. Metadata features from Chatzakou et al. 2017 § Feature Extraction.
- Compared against: Naive Bayes with TF-IDF; Chatzakou et al. 2017; Waseem and Hovy 2016; Davidson et al. 2017; Rajadesingan et al. 2015 tab. 2.
- Superseded by: not known from content in this wiki.
Source and license
Adapted from “A Unified Deep Learning Architecture for Abuse Detection” by Antigoni-Maria Founta, Despoina Chatzakou, Nicolas Kourtellis, Jeremy Blackburn, Athena Vakali, Ilias Leontiadis (arXiv:1802.00385), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.