Close and Sort: Exact Maximum-Likelihood Aggregation of Cyclic Rank-Two Preferences
Abstract
Pairwise probabilities arise in rank aggregation, recommendation, and human or LLM evaluation, yet converting them into a maximum-likelihood list is a weighted Kemeny problem and is NP-hard in general. Known exact algorithms for rank-two tournaments use only comparison signs and do not optimize this likelihood. We show that the weighted problem is exactly solvable when the skew-symmetric log-odds matrix has rank two, including when the induced preferences contain cycles. Writing and adding the closing vector turns the objective into twice the signed area of a closed polygon. This geometry yields CloseSort, which polar-sorts the edge vectors, cuts after , and returns a global maximum-likelihood order in time from the factors. The same geometry identifies the runner-up and gives a stability certificate beyond exact rank two. When the smallest determinant of two consecutive edges in the closed angular cycle is positive, it is exactly the best-to-runner-up log-likelihood gap. For , the CloseSort order of has regret at most on and remains optimal whenever this sum is below , a worst-case tight threshold. In 5,120 determinant-logit simulations, increasing the observations per pair from 4 to 64 raises the fraction on which rank-two projection outperforms the empirical plug-in optimum from 68.6% to 85.7%. On 3,600 Arena-Hard LLM-judge profiles drawn from 63 systems and ten judges, the leading rank-two component captures 89.2% of the log-odds energy. On profiles containing a directed majority triangle, CloseSort reduces normalized regret by 44% relative to Borda and improves the mean normalized objective over each of eight baselines. With factors supplied, it is 8,407 times faster than exact dynamic programming on 18-item rankings.
Create a lesson
Metadata
- Categories
- cs.DS, cs.IR, cs.LG, stat.ML
- Comments
- 10 pages, 3 figures, 5 tables. Accepted at the 20th ACM International Conference on Web Search and Data Mining (WSDM 2027). Code: https://github.com/sarinstein-yan/close-and-sort
Related papers
Sorting by block-reversals: closing the gap
Shared title terminologycs.DSLászló Kozma
Rounded Potentials Certify Exact Maximum Flow
Shared title terminologycs.DSOhad Trabelsi
Small Maximum Likelihood on Fixed Cavender-Farris-Neyman Trees: An Approximation Scheme and Limits to Fully Polynomial Approximation
Shared title terminologycs.DSMohammad-Hadi Foroughmand-Araabi, Sama Goliaei
SAT-Driven Exact Treewidth via Safe Separators and Structure-Aware Encodings
Shared title terminologycs.DSYannik Krone
Improved Exact Algorithms and Parameterized Results for Monopolar Graph Problems
Shared title terminologycs.DSSoumen Mandal, Ashutosh Rai
Exact edge cover by strict and non-strict temporal walks
Shared title terminologycs.DSDuc Thien Quach, Manh Cuong Tran