Skip to content
FRFederico Raponi
All work

ProjectDec 2025 – Jan 2026

Transfer Learning from Text-Motion Retrieval to Violence Classification

Violent actions are rare in motion datasets, so standard classifiers ignore them. We adapt TMR++ text-aligned motion embeddings with first-order MAML and a violence-aware loss: at 30 shots per class the model detects 73.1% of violent actions at a 1% false-positive rate.

Detecting violence from 3D skeletal motion matters for surveillance, content moderation and assistive robotics, but violent actions are rare: in typical action datasets they have tens of examples while walking has thousands. Supervised models trained on that imbalance learn to ignore the rare classes. The question here was whether representations learned for text-to-motion retrieval carry enough meaning to recognise violent actions from only a few labelled examples.

Approach

  • Backbone: TMR++. A Transformer motion encoder (6 layers, 4 heads) pretrained to align motion with text on HumanML3D and KIT-ML. It maps 263-dimensional joint features at 20 Hz to a 256-dimensional embedding.
  • Few-shot head. Class prototypes built from support examples, adapted with first-order MAML (20 inner steps) so the embedding space can move towards the rare classes.
  • Violence-aware episodes. Six violent categories (kick, punch, hit, martial art, evade, grab person) make up 40% of the classes in every training episode, so each meta-update sees them.
  • Three losses. Binary cross-entropy for the multi-label task, a center loss to keep each action compact, and a hinge loss that pushes the centroid of violent prototypes away from the non-violent one.

Results on BABEL-120

On the full 120-class vocabulary, evaluated on the 1,911-sequence test set:

Model mAP Violence detection rate False-positive rate
Prototypes, 30-shot 0.516 67.7% 0.9%
MAML, 30-shot 0.585 73.1% 1.0%
Fully supervised 0.683 63.4% 0.6%

MAML beats the static prototypes at every shot count. In the 1-shot setting it raises the detection rate from 62.4% to 66.7% while halving false positives, and in 5-way 5-shot episodes it lifts Top-1 accuracy from 75.8% to 78.6%.

What did not work

An early version pulled all violent samples into one cluster with a plain contrastive loss. It merged “punch” and “kick” into a generic “violence” blob and hurt fine-grained accuracy, a form of class collapse. Splitting the objective into the center loss (per action) and the hinge loss (only on group centroids) fixed it.

The fully supervised model still has about 10 points more mAP, so meta-learning is the right tool when labels are scarce or a new kind of violence has to be added quickly, not a replacement for training on the full data.