arXiv:2608.23910cs.LGAug 2026

Manuscript Offprint

arXiv:2608.23910

Partial Optimal Transport on the Circle for All Transported Masses in O(N log N)

Soheil Kolouri

ABSTRACT

Partial optimal transport compares two measures while leaving part of the mass unmatched, which is what makes it robust to outliers, occlusion, and clutter. The quantity of interest is usually the whole profile — the optimal cost at every transported cardinality — because the right amount to transport is rarely known in advance, and on the real line the PAWL algorithm returns that profile in O(Nlog⁡N)O(N \log N). Much data is periodic rather than linear: angles, phases, orientations, time of day, hue, and every direction obtained by projecting onto a great circle. On the circle the same problem acquires a global circulation, or equivalently an optimized cut, which the naive exact method handles by running the line algorithm once per support gap, at O(N2log⁡N)O(N^2 \log N). We show that this factor NN is unnecessary. The line structure survives in cut-free form, and a free-gap invariant supplies, at every step, a cut at which all previous local updates remain valid line updates. This yields PAWC: an exact O(Nlog⁡N)O(N \log N) time, O(N)O(N) memory algorithm returning all K+1K + 1 costs, nested active sets and plans in one run, together with a single gap that is simultaneously optimal for every cardinality. Slicing over great circles extends it to Sd−1\mathbb{S}^{d-1}. Empirically the whole profile costs 0.56 ms at N=4096N = 4096 against 1.5 s for a single transported fraction from a general solver; on occluded, cluttered MPEG-7 shapes, holding the descriptor fixed and varying only the cost, it retains 66% of the clean-data retrieval score against 16% for balanced circular OT, and on S2\mathbb{S}^2 it halves the fitting error of spherical sliced Wasserstein against contaminated targets, synthetic and real. Code is available at https://github.com/mint-vu/Partial_Wasserstein_on_Circles.

1 INTRODUCTION

Optimal transport (OT) provides a geometry-aware framework for comparing measures (Villani, 2009; Peyré & Cuturi, 2019), but exact discrete solvers are generally expensive. Partial transport extends this framework by allowing only part of the distributions to be matched: conceptually, mass may be transported from the source to the target, destroyed if left unmatched at the source, or created if unmatched at the target, with corresponding transportation, destruction, and creation costs. In one dimension, Bai et al. (2023) exploited the ordering of the supports to develop an exact primal-dual solver for a fixed choice of these penalties, with worst-case complexity O(nmax⁡{m,n})O(n \max\{m, n\}), or O(N2)O(N^2) for distributions of comparable size. More recently, Chapel & Tavenard (2025) showed that the entire solution path indexed by the transported mass can be computed much faster: their PAWL algorithm returns exact partial transport plans for every possible transported mass in O(Nlog⁡N)O(N \log N) time, using nested active sets, neighboring candidate pairs, balanced chains, and a heap of chain marginals.

Unmatched mass is often part of the problem rather than a modeling nuisance. A partial correspondence isolates the structure shared by two measures without forcing spurious detections, occluded features, mislocated records, or outliers into geometrically implausible matches (Nietert et al., 2022). The appropriate amount of mass to match, however, is rarely known beforehand and may depend on a downstream robustness or coverage requirement. The natural object is therefore the entire partial-transport profile k⟼Ck∘k \longmapsto C_k^\circ, where Ck∘C_k^\circ is the minimum cost of matching exactly kk pairs. This profile quantifies the tradeoff between coverage and geometric fidelity: it shows which correspondences are retained as the transported mass increases and when admitting additional mass begins to require costly matches. Computing all Ck∘C_k^\circ at once allows the transported mass to be selected after examining this tradeoff, rather than fixed before solving the transport problem (Chapel & Tavenard, 2025).

Periodic geometry is ubiquitous rather than exceptional. Angles, phases, orientations, time-of-day variables, and hue are naturally represented on the circle, while many sliced constructions for directional data on the sphere produce measures supported on great circles. However, the cyclic geometry of the circle prevents a direct application of the efficient algorithms available on the line. The circle retains a cyclic order but has no canonical first point, last point, or zero-flow boundary. For balanced W1W_1, this missing boundary condition appears as a free additive circulation in the flow formulation, or equivalently as a cut over which a lifted line problem must be optimized (Delon et al., 2010; Rabin et al., 2011). Partial transport couples this topological freedom to the transported mass: as kk varies, both the active atoms and the optimal circulation, and hence the optimal cut, may change. Consequently, no single unwrapping of the circle recovers the full profile k↦Ck∘k \mapsto C_k^\circ. A direct exact reduction cuts the circle at every support gap, runs PAWL on each resulting line, and takes the lower envelope of the resulting profiles. Although correct, this repeats an O(Nlog⁡N)O(N \log N) computation across O(N)O(N) cuts and therefore costs O(N2log⁡N)O(N^2 \log N). The central algorithmic challenge is to recover the entire circular partial-transport profile without paying separately for every possible cut.

Contributions. The line structure survives on the circle in cut-free form (Section 3): circular-optimal active sets can be chosen nested, the two atoms activated at each step are cyclic neighbours among the inactive ones, and a free-gap invariant — every current cell always contains an original gap not yet used by any selected cell — supplies a cut at which all previous local updates are simultaneously valid line updates. This gives an exact greedy rule and a gap that is optimal for every cardinality at once, constructed rather than searched for (Theorems 3 and 4), and an O(Nlog⁡N)O(N \log N) time, O(N)O(N) memory algorithm returning all costs, nested active sets and plans in one run (Section 4). Slicing over great circles extends it to Sd−1S^{d-1} (Section 5), and Section 6 verifies exactness against an LP oracle, measures the scaling, and gives two applications where the profile is the object that matters — partial matching of shape descriptors on MPEG-7, and robust fitting on S2S^2 including a real earthquake catalogue.

References (22)