Papers › Rethinking the Optimization of Average Precision: Only Penalizing Negative Instances...

Rethinking the Optimization of Average Precision: Only Penalizing Negative Instances before Positive Ones is Enough

9 Feb 2021arXiv:2102.04640archive 2025-07-28

Zhuo Li, Weiqing Min, Jiajun Song, Yaohui Zhu, Liping Kang, Xiaoming Wei, Xiaolin Wei, Shuqiang Jiang

Optimizing the approximation of Average Precision (AP) has been widely studied for image retrieval. Limited by the definition of AP, such methods consider both negative and positive instances ranking before each positive instance. However, we claim that only penalizing negative instances before positive ones is enough, because the loss only comes from these negative instances. To this end, we propose a novel loss, namely Penalizing Negative instances before Positive ones (PNP), which can directly minimize the number of negative instances before each positive one. In addition, AP-based methods adopt a fixed and sub-optimal gradient assignment strategy. Therefore, we systematically investigate different gradient assignment solutions via constructing derivative functions of the loss, resulting in PNP-I with increasing derivative functions and PNP-D with decreasing ones. PNP-I focuses more on the hard positive instances by assigning larger gradients to them and tries to make all relevant instances closer. In contrast, PNP-D pays less attention to such instances and slowly corrects them. For most real-world data, one class usually contains several local clusters. PNP-I blindly gathers these clusters while PNP-D keeps them as they were. Therefore, PNP-D is more superior. Experiments on three standard retrieval datasets show consistent results with the above analysis. Extensive evaluations demonstrate that PNP-D achieves the state-of-the-art performance. Code is available at https://github.com/interestingzhuo/PNPloss

PaperPDFCode

Syntology This paper's arXiv id is not in Syntology's Atlas id list (549,449 ids, as this build read them; the read time is in the build record), so this page links to no Syntology page for it. The list is not the whole graph; Syntology's feed shows papers as they enter the graph.

Code

interestingzhuo/pnp_loss officialmentioned in paperpytorchSyntology: not harvested report
interestingzhuo/pnploss officialmentioned in paperpytorchSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Image RetrievalRetrievalVehicle Re-Identification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Retrieval SOP PNP Loss R@1 81.1 #6 of 14 Archive leaderboard report
Image Retrieval iNaturalist PNP Loss R@1 66.6 #10 of 10 Archive leaderboard report
Image Retrieval iNaturalist PNP Loss R@16 89.7 #10 of 10 Archive leaderboard report
Image Retrieval iNaturalist PNP Loss R@32 92.6 #10 of 10 Archive leaderboard report
Vehicle Re-Identification VehicleID Large PNP Loss Rank-1 93.2 #3 of 10 Archive leaderboard report
Vehicle Re-Identification VehicleID Large PNP Loss Rank-5 96.6 #3 of 10 Archive leaderboard report
Vehicle Re-Identification VehicleID Medium PNP Loss Rank-1 94.2 #3 of 9 Archive leaderboard report
Vehicle Re-Identification VehicleID Medium PNP Loss Rank-5 96.9 #3 of 9 Archive leaderboard report
Vehicle Re-Identification VehicleID Small PNP Loss Rank-1 95.5 #3 of 13 Archive leaderboard report
Vehicle Re-Identification VehicleID Small PNP Loss Rank-5 97.8 #3 of 13 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections