Title The reframing nDCG vs mAP Smoothing Relevance Training loop Embedding space k-NN Results Conclusions
Molina · Riba · Gomez · Ramos-Terrades · Lladós

Date Estimation
in the Wild

Don't classify the year. Don't regress it. Retrieve it — learn an embedding where the closer two photographs sit, the closer their dates, and read the answer off the neighbours.

Core idea
Date estimation as ranking
Loss
smooth-nDCG
Dataset
DEW · 1M photos · 1930–99
Prediction
k-NN to a support set
Explore the paper
The reframing

Three ways to ask "when?"

A classifier forces every photo into a decade bin and treats a one-year miss the same as a fifty-year miss. A regressor predicts a single number and is brittle far from its training mass. This paper takes a third route: train the network to rank a gallery by date-closeness to a query, so a wrong-but-near answer is still a good answer.

classification · regression · retrieval — hover the paradigms
Retrieval returns an ordering: even a near miss lands close, giving the archivist a usable "older / newer" answer.

"In the worst case, when the exact date is not estimated, the user can obtain a relative ordering — one photograph is older than another — which is useful in archival annotation."

Why a new metric · Section 3

mAP can't tell a near miss from a far one

Years are ordinal. mAP only knows "relevant / not relevant", so to it a photo one year off and one twenty years off are identical — both just "wrong". nDCG instead uses a graded relevance r(n) and a logarithmic discount, rewarding rankings that put the closest dates on top. Reorder the gallery below and watch the two metrics react differently.

QUERY 1950 · retrieved gallery (rank ↓) — move items
mAP — binary relevance (Δ ≤ 2 yr)
—
nDCG — graded relevance r = max(0, γ−Δ)
—

Swap two near years and mAP often doesn't budge — it already counted both as "relevant". nDCG moves, because it cares how the good answers are ordered and how the bad ones are spread through the list. That sensitivity to graded, ordinal ground truth is the paper's whole motivation.

Making it differentiable · Eq. 6–8

A sigmoid stands in for the step

Rank is a sum of hard comparisons 𝟙{sᵢ − sⱼ < 0} — counting how many items beat i. That indicator has no gradient. The trick (Qin et al.): replace it with a sigmoid G(x; τ) = 1 / (1 + e^(−x/τ)). Small τ hugs the true step (accurate but a near-flat gradient); large τ is smooth and trainable but blurrier. Drag τ to feel the trade-off (this is Fig. 1).

G(x; τ) and its derivative
τ 0.10
Designing relevance · Eq. 15–17

What counts as "close enough"?

nDCG needs a relevance score for every gallery item. The choice shapes the embedding: a hard clip says "anything within a decade is equally good"; an inverse or exponential law keeps pressing for the exact year. Pick a relevance function and see its profile against the year gap |y_q − y_n|.

relevance r vs |year gap|
Training loop · Algorithm 1

Embed → rank all-vs-all → score → back-propagate

No labels-as-targets here. A batch goes through a ResNet-101 into embeddings; an all-versus-all cosine matrix gives every image its ranking against the others; the relevance matrix (from the years) says what the ranking should be; smooth-nDCG measures the gap and the gradient flows back into the CNN. Step through one iteration.

one optimisation step
Cosine similarity is the distance; it could be swapped for any differentiable distance over the embedding.
What the loss does to the space · Fig. 7–8

The embedding sorts itself by time

This is the payoff. Each point is a photograph's projection; colour runs along the year gradient. Untrained ImageNet features cluster by visual look — dates scrambled. After smooth-nDCG, the cloud reorganises into a smooth temporal manifold: neighbours share a date. Morph between the two, then drag the query to see who its nearest neighbours are.

drag the ◎ query
1930year of the photograph1999

The paper also reports a cluster-similarity heatmap, but the organisation reads far more clearly as a PCA scatter of cluster centres (Fig. 7–8): in the trained space the colour flows continuously, so a query's 10 nearest neighbours nearly all share its decade — which is exactly why k-NN on this space estimates a plausible year.

Reading off the answer · Fig. 5

Predict by k-Nearest Neighbours

With the space sorted, prediction is just: embed the query, take its k nearest in a labelled support set, average their years. Too small a k is noisy; too large drags in unrelated dates. The sweet spot sits near k = 10. The slider below also drives the query's neighbourhood in the scatter above.

MAE vs k (support set of 128 images)
k 10
Results · Table 1 (DEW test set)

Competitive MAE, and a ranking the others can't give

MethodMAE ↓mAPnDCG ↑
Müller et al. — GoogLeNet (regression)7.5——
Müller et al. — GoogLeNet (classification)7.3——
Müller et al. — ResNet50 (cleaned test)7.12——
Visual-similarity baseline (ImageNet)12.4—0.69
Smooth-nDCG · 256-image support8.440.120.72
Smooth-nDCG · 1M support7.48—0.75
Smooth-nDCG · 1M support (weighted k-NN)7.52—0.75

The retrieval model lands within a few months of dedicated regressors/classifiers on MAE — despite never being trained to predict a year — and tops every method on nDCG, the metric that actually reflects ordering quality. The visual-similarity baseline shows the gap: similar-looking ≠ similar-dated.

Conclusions

Ranking beyond categories

ORDINAL GROUND TRUTH
Graded, not binary

Unlike smooth-AP, smooth-nDCG scores the whole sorted list — how good the good ones are, and how the bad ones are spread.

CONTEXTUAL ANSWER
A ranking, not a point

Even a missed year yields an "older/newer" ordering against the collection — what archivists actually need.

SWAPPABLE PARTS
Any domain, any distance

Change the relevance matrix and the same loss transfers to other ordered or tree-structured retrieval tasks.

CAVEAT
Category bias

Unbalanced classes (trains, vehicles) can cluster by object rather than date — the embedding inherits dataset skew.

Brown et al. smoothed the path to average precision; smooth-nDCG extends it to problems where different labels should not be punished equally — ranking images by a continuous, ordered criterion rather than a categorical one.