Skip to main content
QUICK REVIEW

[Paper Review] A Neighbourhood Framework for Resource-Lean Content Flagging

Sheikh Muhammad Sarwar, Dimitrina Zlatkova|arXiv (Cornell University)|Mar 31, 2021
Hate Speech and Cyberbullying DetectionComputer Science40 references5 citations
TL;DR

This paper proposes $k$NN+, a novel, resource-lean, cross-lingual content flagging framework that uses Transformer-based k-nearest neighbour learning with query–neighbour interaction features to improve abusive language detection in low-resource languages. It achieves up to 9.5 absolute F1 point gains over strong baselines by learning label-agreement in a semantic representation space without retraining when new labels are introduced.

ABSTRACT

We propose a novel framework for cross-lingual content flagging with limited target-language data, which significantly outperforms prior work in terms of predictive performance. The framework is based on a nearest-neighbour architecture. It is a modern instantiation of the vanilla k-nearest neighbour model, as we use Transformer representations in all its components. Our framework can adapt to new source-language instances, without the need to be retrained from scratch. Unlike prior work on neighbourhood-based approaches, we encode the neighbourhood information based on query--neighbour interactions. We propose two encoding schemes and we show their effectiveness using both qualitative and quantitative analysis. Our evaluation results on eight languages from two different datasets for abusive language detection show sizable improvements of up to 9.5 F1 points absolute (for Italian) over strong baselines. On average, we achieve 3.6 absolute F1 points of improvement for the three languages in the Jigsaw Multilingual dataset and 2.14 points for the WUL dataset.

Motivation & Objective

  • To address the challenge of abusive language detection in low-resource languages with limited annotated training data.
  • To enable effective cross-lingual transfer from high-resource to low-resource languages without requiring model retraining when new labels are introduced.
  • To model the relationship between source and target datasets more systematically than heuristic mixing or sequential fine-tuning.
  • To develop a framework that supports dynamic label space adaptation and provides interpretable predictions via neighbourhood influence.

Proposed method

  • The framework uses a k-nearest neighbour architecture with pre-computed neighbour embeddings and run-time query encoding via a Transformer.
  • It computes interaction features between query and neighbour representations using either a cross-encoder or bi-encoder architecture to model query–neighbour interactions.
  • A self-attention mechanism aggregates interaction features across all neighbours to form a context-aware neighbourhood representation for classification.
  • The model is trained using a multi-task loss combining contrastive label loss ($\mathcal{L}_{cll}$) and label-agreement loss ($\mathcal{L}_{lal}$) to align semantic and label similarity.
  • Two variants are proposed: CE $k$NN+ (concatenated query–neighbour input) and BE $k$NN+ (separate encoding), with BE $k$NN+ offering better efficiency and comparable performance.
  • The framework leverages XLM-RoBERTa and LaBSE for sentence embeddings and supports incremental adaptation to new labels without retraining.

Experimental results

Research questions

  • RQ1Can a k-NN-based framework with learned query–neighbour interactions outperform strong baselines in low-resource, cross-lingual abusive language detection?
  • RQ2How does modeling label agreement through interaction features improve performance compared to standard fine-tuning or data mixing approaches?
  • RQ3To what extent can the framework adapt to new labels in the source dataset without retraining?
  • RQ4Does the bi-encoder variant maintain performance while improving inference efficiency in multilingual settings?
  • RQ5How effective is the learned representation space in distinguishing flagged from non-flagged content across languages?

Key findings

  • The $k$NN+ framework achieves up to 9.5 absolute F1 point improvement over strong baselines on Italian, with average gains of 3.6 F1 points on the Jigsaw Multilingual dataset and 2.14 F1 points on the WUL dataset.
  • The BE $k$NN+ variant with SRC pre-training outperforms the CE $k$NN+ variant in multilingual settings, likely due to increased training data size.
  • Re-ranking neighbours using the BE $k$NN+ representation space improves performance over LaBSE embeddings across all k-values, with consistent gains in F1 scores.
  • The model is robust to neighbours with incorrect labels, as it learns to downweight or disagree with them during training.
  • The optimal multi-task loss weight $\lambda$ for label-agreement loss is 0.7, as performance degrades when this weight is increased beyond that point.
  • The learned representation space effectively separates flagged and neutral content, assigning negative cosine similarities between flagged and neutral examples.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.