Online Mean Average Precision (omAP)
- Online Mean Average Precision (omAP) is a family of formulations that adapts traditional AP/mAP to online, streaming, or train-time settings by overcoming global ranking dependencies.
- omAP methods range from exact probabilistic baselines and fixed-size histogram approximations to minibatch surrogates and timeliness-aware streaming metrics, each addressing specific evaluation challenges.
- These approaches tackle the difficulty of integrating AP into real-time and SGD environments by approximating global evaluations with analytic estimators, state-size constraints, or time-dependent weighting.
Online Mean Average Precision (omAP) denotes a set of formulations that make Average Precision or mean Average Precision usable before a full offline ranked evaluation is available, or adapt AP/mAP to streaming settings in which timeliness matters. In current arXiv literature, the term does not refer to a single canonical metric. It can denote an exact online random-baseline model for , a graph-friendly train-time approximation to COCO mAP, a minibatch surrogate used as a learning objective, an analytic estimator of the marginal change in dataset-level mAP for online data curation, or a timeliness-aware AP variant for online video grounding. This suggests that omAP is best understood as a family of online, train-time, or streaming adaptations of AP/mAP rather than a single standardized quantity (Manzhos et al., 4 Nov 2025, Wood et al., 2022, Revaud et al., 2019, Sun et al., 18 Nov 2025, Zeng et al., 16 Aug 2025).
1. Core problem: why AP and mAP are difficult to make online
The central obstacle is that AP is a ranking metric. In object detection and retrieval, AP depends on the relative order induced by confidence or similarity scores, and mAP is then obtained by averaging AP values across classes, queries, IoU thresholds, or users depending on the task. Exact COCO-style mAP is dataset-level rather than batch-local: it depends on a global ranking of detections by confidence across the entire evaluation set, requires maintaining dynamic-sized state, and must handle differing numbers of boxes per image. These properties are precisely what make standard offline evaluators awkward inside static computation graphs or incremental training-time metric pipelines (Wood et al., 2022).
A second difficulty is that online use in the SGD sense is not the same as online use in the streaming-evaluation sense. In direct detector training, mAP can be computed over the current minibatch after NMS and used for updates, but that minibatch mAP is explicitly described as a biased estimator of mAP over the population of images, and its batch-to-batch variance is substantially higher than that of standard classification losses. The same work also emphasizes that AP after NMS is piecewise constant in the scores, with ordinary gradients that are zero almost everywhere and undefined at discontinuities (Henderson et al., 2016).
These constraints have produced several distinct omAP strategies. Some lines of work derive exact expectation and variance formulas under an online probabilistic model. Others approximate the global ranking with fixed-size state, compress AP into minibatch surrogates for optimization, or estimate the marginal contribution of a sample to dataset-level mAP without recomputing the entire metric.
2. Exact online under a probabilistic online model
A particularly explicit use of online MAP appears in the random-ranking analysis of and . In that formulation, one user’s average precision at cutoff is
with
The paper distinguishes this online model from an offline model with a fixed number of relevant items . In the online setting, there is no fixed known per user, so the normalization uses , not 0 (Manzhos et al., 4 Nov 2025).
The online model assumes binary relevance and independent Bernoulli sampling across ranks. For positions 1, the indicators 2 satisfy
3
with a common relevance probability 4. Under this model,
5
The expectation is given in closed form: 6 where
7
The variance is also derived exactly: 8 with
9
In this usage, omAP is not an approximate detector metric or a train-time surrogate, but the expectation of user-level 0 under an online sampling-with-replacement model, interpreted as the random baseline for 1 (Manzhos et al., 4 Nov 2025).
This formulation is exact within its assumptions and provides a probabilistic baseline rather than an optimization target. It also makes clear that chance-level online 2 is not simply 3: the harmonic correction term matters, and the expectation approaches 4 as 5 grows.
3. Train-time and streaming computation of COCO-style mAP
A different use of omAP concerns the practical computation of COCO mAP inside a training or evaluation loop. One graph-friendly approach replaces the variable-length list of all detections with fixed-size histograms over confidence scores. The state consists of true-positive and false-positive bucket counts, 6 and 7, together with the ground-truth count 8. For a confidence 9, the bucket index is
0
Per batch, detections are matched to ground truth at each IoU threshold, each prediction increments either 1 or 2, and 3 is updated by the number of ground-truth boxes. After all updates, cumulative sums
4
yield approximate precision and recall sequences,
5
from which COCO-style interpolated AP is approximated. The method is explicitly described as an accurate approximation algorithm for Mean Average Precision, with a recommended setting of 6, and for cases without area range filtering the reported MaP and recall errors are less than 7 relative to pycocotools (Wood et al., 2022).
A second systems-oriented line of work keeps exact or near-exact sufficient statistics batch by batch and defers only the final global sort. In that formulation, detections and ground-truth boxes are padded, masked, matched in parallel for the whole mini-batch, and then reduced to running lists of non-ignored detection class labels, confidence scores, TP/FP indicators, and per-class easy-ground-truth counts. Because these statistics are accumulated as inference goes, mAP can be computed immediately after the last batch without rerunning matching. However, the method still requires a final global sort over accumulated detections, so it is not strict streaming AP in the strongest sense. It is best characterized as batched deferred evaluation with near-online accumulation. It also uses trapezoidal area under the raw PR curve in its “every element” parallel mode rather than the classical interpolated precision-envelope computation used in VOC all-point AP (Wang, 2022).
These approaches address online computation rather than online optimization. Their main concern is fixed-size state, vectorization, and compatibility with train-time validation, not direct gradient-based learning of AP.
4. Minibatch AP/mAP as an optimization objective
A separate tradition uses AP or mAP inside SGD itself. In object detection, one end-to-end approach trains a Fast R-CNN-style detector directly on minibatch mAP after NMS. Because mAP after NMS is piecewise constant, the method introduces pseudo partial derivatives and pseudo-gradients for piecewise-constant functions, with the symmetric difference estimator and mean envelope estimator as two practical variants. The training objective is
8
This is not a streaming omAP metric: it is direct minibatch mAP optimization, and the paper is explicit that mAP over a minibatch of images is a biased estimator of mAP over the population (Henderson et al., 2016).
In image retrieval, a more explicitly listwise formulation computes a batch-level mAP objective by treating each image in the batch as a query against the rest of the batch. With descriptors 9 and relevance matrix 0, the batch-level quantized mean AP is
1
and the loss is
2
This is a minibatch approximation to retrieval mAP, not exact dataset-level mAP, and it relies on a histogram-binning approximation to make AP differentiable. The paper reports large-batch operation with 3 and typically uses 4 bins (Revaud et al., 2019).
Smooth-AP makes the same move with a different approximation. It replaces the hard ranking indicator by a temperature-controlled sigmoid,
5
yielding a smoothed AP surrogate that is computed per query within the mini-batch and averaged across queries through
6
This again corresponds to an online or batch-wise AP/mAP surrogate in the SGD sense, not to exact streaming mAP. The reported ablations favor 7 (Brown et al., 2020).
These methods are often grouped with omAP in practice because they make AP or mAP available during training. Strictly, however, they are optimization surrogates or biased minibatch objectives, not online evaluation metrics.
5. Online mAP-aware data curation in object detection
A more recent object-detection formulation does not optimize AP directly and does not maintain an exact online metric. Instead, it defines an explicit online estimator of an image’s marginal contribution to dataset-level COCO-style mAP and uses that estimate for sample selection. The dataset-level target is
8
where 9 can be COCO’s IoU thresholds 0. For a candidate image 1, the marginal change is defined as
2
and the teacher-student contribution gap is
3
Large 4 indicates that the teacher can extract more mAP utility from 5 than the current student, so the image is prioritized (Sun et al., 18 Nov 2025).
The derivation begins from a continuous precision-recall view in the score-threshold domain. The paper writes non-interpolated AP as
6
then derives approximate marginal AP changes for TP and FP insertions at score 7. For tractability during training, the deployed method assumes a uniform prior 8 over confidence scores, so the marginal TP and FP effects admit closed form. Those closed forms are monotone in score: higher-score TPs help more and higher-score FPs hurt more. Image-level DetGain is then obtained by summing these class-wise and IoU-threshold-wise contributions under a first-order additive approximation (Sun et al., 18 Nov 2025).
Operationally, each training step loads a super-batch 9 of 0 images, runs both teacher and student in prediction mode, computes per-image DetGain for teacher and student, forms the gap 1, selects the top-2 images, and backpropagates only on that subset. In the main experiments, each iteration first scores an 80-image super-batch and keeps the top 3. The method is architecture-agnostic, requires only predicted boxes, scores, labels, and IoUs, and adds 4 cost per detection once the closed form is adopted, although the extra teacher and student forward passes raise total wall-clock cost to about 5 uniform sampling at the default 6 selection ratio. Reported AP@[50:95] gains include Faster R-CNN 7, FCOS 8, and Deformable DETR 9 (Sun et al., 18 Nov 2025).
This is one of the clearest examples of online mAP in the sense of an online estimator of marginal change in dataset-level mAP. It is not a new benchmark metric, not a differentiable omAP loss, and not an exact streaming evaluator.
6. Timeliness-aware omAP in online video grounding
In online video grounding, omAP is used in a different and more literal streaming sense. The task assumes that video is streamed, the model only sees a sliding window 0 at time 1, and once a prediction is made it cannot be modified or removed in future steps. Standard offline metrics can still assign high scores to predictions that are correct but late, which the paper describes as unrealistic for real-time applications. To address this, offline metrics are adapted to the online setting through time-dependent weighting (Zeng et al., 16 Aug 2025).
The key device is a timeliness factor 2. If a prediction is made on the ground-truth end time, then 3; otherwise, 4 linearly decreases until it reaches zero once the prediction time exceeds the ground truth by a threshold
5
Final reported metrics are averaged over these 6 thresholds. At IoU threshold 7, the paper defines
8
where 9 is an AP-style summation over ranked cutoffs in which the precision-recall accumulation is reweighted by timeliness factors 0. The intent is explicit: both recall increments and precision are multiplied by 1 so that earlier true positives contribute more than delayed ones (Zeng et al., 16 Aug 2025).
The online inference protocol is anchor-based. At each time step 2, the model predicts anchors
3
then refines them and keeps only anchors with foreground score 4. omAP is therefore computed over temporally streamed moment proposals ranked by confidence. On QVHighlights-Unify, the proposed method reports 5, compared with 6 for TwinNet and 7 to 8 for offline grounding methods modified to online use (Zeng et al., 16 Aug 2025).
Here omAP is neither a minibatch surrogate nor a detector-side approximation to COCO mAP. It is a task-specific online metric that explicitly fuses localization correctness with decision timeliness.
7. Competing meanings, common ambiguities, and critiques of mAP-based online evaluation
A persistent ambiguity is that “OmAP” in audio tagging does not mean online mAP at all. In that literature, OmAP denotes ontology-aware mean Average Precision. It uses shortest-path distances in the AudioSet ontology graph and evaluates predictions at multiple coarse-grained levels 9. One description states that 0 does not take false positives into account if the ontology distance between the false positive and the target is smaller than or equal to 1, and that the reported OmAP is the average over all 2. A related formalization reweights false positives by
3
and averages ontology-aware AP across classes and coarse-graining levels. In both cases, OmAP means ontology-aware mean Average Precision, not online mAP (Liu et al., 2023, Liu et al., 2022).
A different ambiguity appears in online mapping. There, the standard evaluation pipeline is often mAP/AP built from a geometric similarity measure such as Chamfer distance, thresholded into hard TP/FP decisions and averaged across map-element classes. A recent critique argues that this pipeline lacks sensitivity to point ordering and discards geometric quality once thresholding is applied. It proposes sequence optimal sub-pattern assignment for single-instance comparison and polyline localisation and detection as a soft multi-instance alternative, explicitly positioning them against the standard CD-plus-AP evaluation framework rather than introducing a formal new omAP name (Lehocine et al., 21 May 2026).
Taken together, these usages show that omAP is highly context dependent. In some papers it is an exact probabilistic online baseline; in others it is an approximation to COCO mAP computed with fixed-size state; in others it is a minibatch loss, an analytic marginal-gain estimator, or a timeliness-aware streaming metric. A plausible implication is that any technical use of “omAP” should specify four things explicitly: the ranking universe being summarized, whether the quantity is exact or approximate, whether it is used for evaluation or optimization, and whether “OmAP” refers instead to ontology-aware mean Average Precision.