---
title: MGFN in Video Anomaly Detection and Beyond
url: https://www.emergentmind.com/topics/mgfn
type: topic
---

# MGFN in Video Anomaly Detection and Beyond

Searching arXiv for papers associated with the acronym "MGFN" to ground the article in current literature.
MGFN is an acronym used for several distinct research constructs across computer vision, urban computing, and latent-variable modeling. In contemporary arXiv literature, it most prominently denotes the **Magnitude-Contrastive Glance-and-Focus Network** for weakly supervised video anomaly detection, introduced by Chen et al. [2211.15098], but it has also been used for the **Multi-Granularity Fusion Network** for temporal action proposal generation and localization [1907.12223] and for **Multi-Graph Fusion Networks** for urban region embedding [2201.09760]. A related but differently named method, **MMGFM**, extends generalized factor modeling to the multi-study, multi-modality, covariate-augmented setting [2507.09889]. The acronym therefore has no single field-independent meaning; its interpretation is domain-specific and must be resolved from context.

## 1. Acronym scope and disambiguation

The most common contemporary usage of MGFN in video understanding refers to the **Magnitude-Contrastive Glance-and-Focus Network**, a weakly supervised video anomaly detection framework designed for long untrimmed surveillance videos [2211.15098]. In a separate line of work on temporal action understanding, MGFN denotes the **Multi-Granularity Fusion Network**, a proposal-fusion framework for the ActivityNet Challenge 2019 tasks of temporal action proposal generation and temporal action localization/detection [1907.12223]. In urban computing, MGFN stands for **Multi-Graph Fusion Networks**, a method for learning urban region embeddings from human mobility data [2201.09760].

This multiplicity is not merely terminological. The three usages instantiate different methodological families: weakly supervised anomaly detection with snippet-level scoring [2211.15098], proposal fusion for temporal localization in untrimmed videos [1907.12223], and graph-based representation learning for urban analytics [2201.09760]. A plausible implication is that citing “MGFN” without expansion is ambiguous in bibliographic databases, benchmark tables, and secondary summaries.

A further source of confusion arises in recent benchmarking work on privacy-preserving surveillance analysis. “Unmasking Performance Gaps: A Comparative Study of Human Anonymization and Its Effects on Video Anomaly Detection” evaluates **MGFN** specifically in the sense of Chen et al.’s anomaly detector, not the ActivityNet fusion framework [2507.14083].

## 2. MGFN as Magnitude-Contrastive Glance-and-Focus Network

The **Magnitude-Contrastive Glance-and-Focus Network** addresses weakly supervised video anomaly detection under video-level supervision only [2211.15098]. The problem setting is characterized by long videos in which anomalous segments occupy only a small fraction of the temporal extent, making local evidence insufficient and exact temporal annotation unavailable. The method is motivated by two difficulties stated explicitly in the source paper: **long-video temporal reasoning** and **feature-magnitude inconsistency across scenes** [2211.15098].

Its pipeline consists of a feature extractor, a **Feature Amplification Mechanism (FAM)**, a **Glance Block (GB)** for global temporal context modeling, a **Focus Block (FB)** for local feature refinement, a prediction head, and a **Magnitude Contrastive Loss (MC loss)** [2211.15098]. Input videos are split into clips, represented as
$$
V_i \in \mathbb{R}^{N_i \times H \times W \times 3},
$$
with extracted clip-level features
$$
F=\{f^{i,t}\}, \quad i \in [1,B],\; t \in [1,T], \quad F \in \mathbb{R}^{B \times T \times P \times C}.
$$

The **Glance Block** is a global-context module built around a video clip-level transformer. It first reduces dimensionality with a convolution from \(C\) to \(C/32\), then applies a shortcut convolution and computes attention across clips [2211.15098]. The attention map is defined as
$$
A^{i,t_1,t_2}=\sum_{c=1}^C Q(F_{scc\_GB}^{i,t_1,c})K(F_{scc\_GB}^{i,t_2,c}),
$$
followed by softmax normalization across clips and weighted aggregation through a value projection. The stated purpose is to let each clip be interpreted in light of the whole sequence, learning “what the normal cases are like” from long-video context [2211.15098].

The **Focus Block** performs local refinement after global aggregation. It uses a shortcut convolution, **Self-Attentional Convolution (SAC)**, and a feed-forward network [2211.15098]. SAC is written as
$$
F_{sac\_FB}=F_{scc\_FB} \circledast F_{scc\_FB},
$$
and is intended to enhance local feature interactions within each clip without learnable attention weights. In the paper’s conceptual framing, the GB establishes whole-video context, while the FB sharpens clip-level discriminative cues [2211.15098].

The **Feature Amplification Mechanism** makes feature norm an explicit component of the representation rather than using it only implicitly. For each clip feature \(f^{i,t}\), it computes
$$
M^{i,t} =  \biggl(\sum_{c=1}^C \left|f^{i,t,c}\right|^2\biggl)^\frac{1}{2},
$$
and forms the amplified feature
$$
f^{i,t}_{FAM} =  f^{i,t}+ \alpha \text{Conv1D}(M^{i,t}).
$$
The paper’s motivation is that raw feature magnitude is affected by motion intensity, number of objects, number of people, scene attributes, and camera/viewpoint differences, so direct norm-based anomaly scoring is unstable [2211.15098].

The central learning innovation is the **Magnitude Contrastive Loss**, which replaces the rigid assumption that abnormal features should always have larger magnitude than normal ones. Instead, it learns a **scene-adaptive cross-video magnitude distribution** by reducing intra-class magnitude distances and increasing inter-class separation [2211.15098]. This is especially relevant under weak supervision because top-\(k\) snippets in abnormal videos are used as surrogates for anomalous segments, while top-\(k\) snippets in normal videos serve as hard normal cases.

## 3. Training, evaluation, and reported performance of the anomaly-detection MGFN

The original anomaly-detection implementation uses **PyTorch**, with **I3D** and **VideoSwin** as feature extractors, \(T=32\), \(P=10\), \(\alpha=0.1\), \(k=3\), \(\lambda_1=\lambda_2=1\), \(\lambda_3=0.001\), **Adam**, weight decay \(0.0005\), learning rate \(0.001\), and batch size \(B=16\), consisting of 8 normal and 8 abnormal videos [2211.15098]. The total objective is
$$
L = L_{sce} + \lambda_1 L_{ts} + \lambda_2 L_{sp} + \lambda_3 L_{mc}.
$$

The method is evaluated on **UCF-Crime** and **XD-Violence** [2211.15098]. On UCF-Crime, it achieves **86.98% AUC** with I3D features and **86.67% AUC** with VideoSwin features. On XD-Violence, it achieves **79.19% AP** with I3D features and **80.11% AP** with VideoSwin features [2211.15098]. The paper states that MGFN with I3D beats RTFM by **2.85% AUC** on UCF-Crime and by **1.38% AP** on XD-Violence, and that MGFN with VideoSwin exceeds MSL by **1.05% AUC** on UCF-Crime and by **more than 1.53% AP** on XD-Violence [2211.15098].

Ablation results isolate the contribution of the ordered glance-then-focus design. The reported structure comparison gives **FF: 82.66 AUC / 72.14 AP**, **FG: 83.10 AUC / 74.30 AP**, **RTFM: 84.30 AUC / 77.81 AP**, **GF-Fusion: 85.05 AUC / 78.03 AP**, and **MGFN (GF): 85.80 AUC / 78.50 AP** [2211.15098]. A separate ablation on magnitude-aware components reports **Baseline: 83.20 AUC / 75.11 AP**, **+FAM: 84.85 AUC / 76.13 AP**, **+MC loss: 86.05 AUC / 78.80 AP**, and **+FAM + MC loss: 86.98 AUC / 80.11 AP** [2211.15098].

These results establish the canonical meaning of MGFN in recent weakly supervised video anomaly detection literature. They also clarify the method’s internal logic: global temporal context, local refinement, and scene-adaptive magnitude discrimination are treated as complementary rather than interchangeable components [2211.15098].

## 4. MGFN under privacy-preserving human anonymization

Recent work studies how the anomaly-detection MGFN behaves when surveillance video is anonymized before feature extraction. In “Unmasking Performance Gaps: A Comparative Study of Human Anonymization and Its Effects on Video Anomaly Detection,” MGFN is evaluated as one of four benchmark detectors on anonymized UCF-Crime, termed **AUCF-Crime** [2507.14083]. In this study, MGFN is explicitly described as the **Magnitude-contrastive Glance-and-Focus Network** from Chen et al. and is **not re-designed**; it is evaluated as-is on anonymized video features [2507.14083].

The feature pipeline follows the standard weakly supervised VAD setup in the paper: **I3D** features are extracted from RGB video, **I3D is pretrained on Kinetics-400**, a **10-crop augmentation** strategy is used, and features are extracted for **16-frame non-overlapping segments** [2507.14083]. The protocol is applied to raw UCF-Crime and four anonymization settings: **blurring (HB)**, **masking / blackening (HM)**, **encryption (HEN)**, and **avatar replacement (H2D)** [2507.14083].

The evaluation metrics are **area under the receiver operating characteristics (AUC)**, **area under the precision-recall curve (AP)**, and **false alarm rate (FAR)**, along with \(AUC_{sub}\), \(AP_{sub}\), and class-wise AUC scores [2507.14083]. The reported MGFN results are as follows:

| Protection | AUC (%) | AP (%) |
|---|---:|---:|
| Raw-Ours | 80.16 | 22.05 |
| HB (blurring) | 80.57 | 20.45 |
| HM (masking) | 79.49 | 18.05 |
| HEN (encryption) | 81.20 | 22.04 |
| H2D (avatar replacement) | 79.46 | 18.70 |

The full table additionally reports \(AUC_{sub}\), \(AP_{sub}\), and FAR: Raw-Ours gives **60.96**, **24.50**, and **19.02**; HB gives **59.93**, **23.67**, and **26.42**; HM gives **59.57**, **22.49**, and **2.80**; HEN gives **60.99**, **24.86**, and **17.65**; H2D gives **57.66**, **21.56**, and **8.69** [2507.14083]. Using the study’s own Raw-Ours baseline of **80.16 AUC**, the main AUC changes are **+0.41** for HB, **−0.67** for HM, **+1.04** for HEN, and **−0.70** for H2D [2507.14083].

The study attributes MGFN’s sensitivity to anonymization to its **magnitude-driven design**. It uses **feature magnitude** to select snippets, and its **FAM module** amplifies features based on feature norm; anonymization changes the **magnitude distribution** of I3D features, which in turn shifts snippet selection and contrastive separation [2507.14083]. The paper states that MGFN demonstrates relatively high performance under **encryption-based anonymization (HEN)** and suggests that this is due to responsiveness to the noisy patterns introduced by encryption [2507.14083].

The authors interpret these gains cautiously. They explicitly argue that the improvement reflects **“the model over-sensitivity to noise rather than true effectiveness on context-based anomaly separation”** [2507.14083]. The class-wise discussion further notes that MGFN improves performance with most anonymization techniques on classes such as **“Arrest”, “Explosion”, “Fighting”, “Shoplifting”, “Stealing”, and “Vandalism”**, but the gains are class-dependent and are not treated as evidence of genuine robustness [2507.14083].

## 5. MGFN as Multi-Granularity Fusion Network for temporal action understanding

In the ActivityNet Challenge 2019 report, MGFN denotes the **Multi-Granularity Fusion Network**, a temporal proposal-fusion framework for **temporal action proposal generation** and **temporal action localization/detection** in untrimmed videos [1907.12223]. This MGFN is not an anomaly detector. It is a system for combining proposals from multiple frameworks in order to improve proposal quality, ranking, and downstream localization.

The report explicitly combines **APN**, **TAG**, **Improved-BSN**, and **CAR** [1907.12223]. APN is an anchor-based proposal network in a top-down style; TAG is a snippet-grouping, actionness-based bottom-up method; Improved-BSN is a refined bottom-up boundary-sensitive proposal method; and CAR is a complementary filtering and re-ranking stage [1907.12223]. The paper frames the key design principle as diversity considered from four perspectives: the **characteristic aspect**, the **data aspect**, the **model aspect**, and the **result aspect** [1907.12223].

From the **characteristic aspect**, the framework uses a two-stream network for video encoding, with RGB and optical flow, and several pretrained ConvNet backbones on Kinetics-400: **ResNet-50**, **ResNet-101**, **ResNet-152**, **ResNet-200**, **I3D**, **P3D**, **Inception-V3**, and **Inception-ResNet-V2** [1907.12223]. From the **data aspect**, feature sequences are linearly interpolated to a fixed length; training uses lengths **64, 100, 128, 192**; **2000 validation videos** are added to training; and inference uses both **fixed scales and free scales** [1907.12223]. From the **model aspect**, APN, TAG, Improved-BSN, and CAR are fused because they make different errors [1907.12223]. From the **result aspect**, the framework uses **complementary filtering**, **proposal matching**, **confidence re-ranking**, and **Soft-NMS** [1907.12223].

A core APN scoring rule is
$$
p_{conf} = p_{a}\cdot p_{c}\cdot p_{i},
$$
where \(p_a\) is actionness, \(p_c\) is completeness, and \(p_i\) is IoU score [1907.12223]. Improved-BSN uses a cross-model re-ranking rule
$$
p_{conf}^{\tau} = p_{s}^{\tau}\cdot p_{e}^{\tau}\cdot p_{iou}^{\tau}\cdot p_{match}^{\tau},
$$
where \(p_{match}^{\tau}\) is the confidence of the APN proposal with maximum IoU with \(\tau\) [1907.12223]. CAR performs complementary filtering, temporal boundary adjustment, and proposal ranking by exploiting APN/TAG complementarity and using three-stage unit features—left, central, and right—fed into an MLP [1907.12223].

On **ActivityNet-1.3**, the validation AUC table reports **APN: 62.45**, **TAG: 63.97**, **improved-BSN: 68.18**, **improved-BSN + APN: 68.58**, **CAR: 68.01**, and **improved-BSN + APN + CAR: 69.85** [1907.12223]. The abstract and experiment section report final challenge performance of **69.85 AUC** for **Task 1 (Temporal Action Proposal Generation)** and **38.90 mAP** for **Task 2 (Temporal Action Localization)** [1907.12223].

This usage of MGFN is therefore a **multi-model temporal proposal fusion framework** rather than a single monolithic network [1907.12223]. It integrates top-down and bottom-up proposal generators and uses cross-model agreement to filter and re-rank outputs.

## 6. MGFN as Multi-Graph Fusion Networks for urban region embedding

In urban computing, MGFN stands for **Multi-Graph Fusion Networks**, a framework for learning **urban region embeddings** from **human mobility data** for cross-domain tasks such as **crime prediction**, **check-in prediction**, and **land-use classification** [2201.09760]. The method is motivated by the claim that fine-grained mobility flows are too detailed and noisy to directly yield generalized region embeddings, and that a better strategy is to discover and fuse recurring **mobility patterns** [2201.09760].

The temporal input is modeled as a sequence of directed weighted graphs
$$
G_t = (V, E_t),
$$
and the full data as a mobility multi-graph
$$
\mathrm{G} = \cup_{t=0}^{T-1} \{G_t=(V,E_t)\}.
$$
A **mobility pattern** is produced by fusing similar mobility graphs into a set
$$
\mathcal{G} = \{ \mathcal{G}_0, \mathcal{G}_1, ..., \mathcal{G}_{N-1} \}
$$
[2201.09760].

The framework has two main stages: a **Mobility Graph Fusion (MGF) module** and a **Mobility Pattern Joint Learning module** [2201.09760]. The MGF module defines a **Mobility Graph Distance (MGD)** based on spatial and temporal similarity. Its components include distributional mean and variance differences, a **unidirectional flow index**
$$
UniF(G_t) = \sum_{v_i \in V}\sum_{v_j \in V} |\omega^t_{ij} - \omega^t_{ji}|,
$$
and a structural label distance based on XOR between binary edge-significance matrices [2201.09760]. The final distance is
$$
MGD(G_a, G_b) = Z(\Delta t)\sum c_i \, \mathrm{M}(D_i),
$$
where \(D_i \in \{D_{mean}, D_{var}, D_{unif}, D_{ss}\}\) [2201.09760].

The joint learning stage combines **intra-pattern message passing** with **inter-pattern message cross attention** [2201.09760]. Intra-pattern attention operates over neighbors within each mobility pattern, while inter-pattern cross attention computes, for region \(v_i\), attention weights between representations from different patterns:
$$
\alpha_{ab}^{v_i} = \frac{ \exp\left( \langle W_{\mathrm{q}^c} h^a_{v_i}, W_{\mathrm{k}^c} h^b_{v_i}\rangle/\sqrt{d} \right) }{ \sum_{k=0}^{N-1} \exp\left( \langle W_{\mathrm{q}^c} h^a_{v_i}, W_{\mathrm{k}^c} h^k_{v_i}\rangle/\sqrt{d} \right) }.
$$
The final embedding is obtained by combining residual intra-pattern representations and inter-pattern messages:
$$
\hat{h}_{v_i} = f\left( \frac{1}{N}\sum_{k=0}^{N-1} h_{v_i}^k + \bar{h}_{v_i} \right)
$$
[2201.09760].

The training objective matches the empirical destination distribution and the distribution predicted from embeddings:
$$
\mathcal{L} = \sum_{i,j} -p_{\omega}(v_j|v_i)\log \hat{p}_{\omega}(v_j|v_i).
$$
Experiments are conducted on **New York City** data with **180 regions** in Manhattan, about **10 million** taxi records in one month, about **40 thousand** crime records over one year, over **100 thousand** check-ins, and **12 district labels** [2201.09760]. The reported parameter settings include embedding dimension \(d = 96\), number of mobility patterns \(N = 7\), number of intra-pattern layers \(L = 1\), and MGD weights \(c_i = 1\) [2201.09760].

Reported results are **MAE = 70.21**, **RMSE = 89.60**, **\(R^2 = 0.63\)** for crime prediction; **MAE = 292.60**, **RMSE = 451.76**, **\(R^2 = 0.69\)** for check-in prediction; and **NMI = 0.75**, **ARI = 0.57** for land-use classification [2201.09760]. The paper states that MGFN can improve performance by **up to 13.11%** over the best baseline, and notes that removing mobility graph fusion reduces generalization by about **20%** in cross-domain settings [2201.09760].

## 7. Related naming and conceptual boundaries

A related 2025 paper introduces **MMGFM**, a **high-dimensional multi-study, multi-modality, covariate-augmented generalized factor model** [2507.09889]. MMGFM is not named MGFN, but it is structurally adjacent in acronym space and can be confused with MGFN in automated retrieval or acronym expansion tasks. Its model decomposes latent signal into a known offset term, covariate effects, **study-shared latent factor**, **study-specific latent factor**, **study-specific, modality-shared factor**, and idiosyncratic noise:
$$
y_{simj} = \tau_{sim} + z_{si}^{\top}\beta_{mj} + u_{si}^{\top}\lambda_{mj} + w_{si}^{\top}\gamma_{smj} + v_{sim} + \varepsilon_{simj}
$$
[2507.09889].

MMGFM uses a variational lower bound, profiles the variational parameters, develops a **variational EM algorithm**, and proposes a **step-wise singular value ratio (SVR)** criterion to determine the number of shared and study-specific factors [2507.09889]. The paper proves consistency and asymptotic normality, reports strong simulation performance relative to **GFM**, **MRRR**, **MSFR**, and **MultiCOAP**, and provides an R package on CRAN named **MMGFM** [2507.09889].

The presence of MMGFM reinforces a broader bibliographic point: MGFN-like acronyms often encode “multi-graph,” “multi-granularity,” or “magnitude-contrastive” constructions, but they do not form a coherent research family across domains. Any technical reading must therefore anchor the acronym to its full expansion and task definition. In current arXiv usage, the most visible and operationally consequential meaning of MGFN is the anomaly-detection architecture of Chen et al. [2211.15098], especially because subsequent privacy-preserving surveillance benchmarking adopts that exact model as a reference point [2507.14083].

Source: https://www.emergentmind.com/topics/mgfn