Abstract
This paper introduces ZO-RankSGD, the first zeroth-order optimization algorithm capable of finding the minimum of a function using only ranking feedback (e.g., "A is better than B") with provable convergence guarantees. By converting rankings into a directed graph to estimate gradients, the authors demonstrate that human-in-the-loop feedback can effectively fine-tune complex models. A prime example is improving the anatomical details of images generated by Stable Diffusion using human preference rankings.
The Challenge of Human Feedback
In many modern AI applications, particularly Reinforcement Learning from Human Feedback (RLHF), we aim to optimize a "black-box" objective function—like "human preference"—that cannot be expressed as a simple mathematical formula.
While we can ask humans to evaluate AI outputs, humans are notoriously bad at providing precise numerical scores (e.g., rating an image a 7.4 versus a 7.5). However, humans are highly reliable at ranking (e.g., stating Image A is better than Image B). Most existing "zeroth-order" (gradient-free) optimization methods assume access to exact function values. Those that do utilize rankings often rely on heuristics lacking mathematical proof of convergence or are restricted to simple convex functions. This paper bridges that gap by providing a mathematically rigorous method to optimize non-convex functions using only a "ranking oracle."
Introducing ZO-RankSGD
The authors propose ZO-RankSGD (Zeroth-Order Rank-based Stochastic Gradient Descent). The core logic operates through the following steps:
- Random Perturbation: At each step, the algorithm generates $m$ random variations (noise) around the current parameter point.
- Ranking Query: These variations are sent to a "ranking oracle" (which could be a human judge or a reward model), which returns the $k$ best variations in order of preference.
- Graph-Based Gradient Estimation: The algorithm constructs a Directed Acyclic Graph (DAG) where nodes are the variations and edges represent the ranking results.
- Descent: It uses the structure of this graph to estimate a descent direction, effectively pushing the parameters toward the "better" variations and away from the "worse" ones.
- Ranking-Based Line Search: Since the algorithm lacks actual function values, it employs a specialized line search that queries the ranking oracle to determine the optimal step size in the chosen direction.
The researchers also provide a rigorous variance analysis, demonstrating that as the number of items ranked ($m$) or the number of top items identified ($k$) increases, the "noise" in the gradient estimate drops, leading to faster convergence.
Experimental Validation
The authors evaluated ZO-RankSGD across three distinct domains:
- Synthetic Benchmarks: Standard optimization testbeds like the Quadratic and Rosenbrock functions (scaled up to 10,000 dimensions).
- Reinforcement Learning: The MuJoCo suite (Reacher-v2, Swimmer-v2, and HalfCheetah-v2), where the agent is trained using only rankings of episode rewards.
- Generative AI: Stable Diffusion. The authors optimized the latent embeddings of the diffusion model using real human ranking feedback to significantly improve image quality.
Key Insights and Results
- Ranking is Highly Informative: One of the most striking findings is that ranking information is nearly as useful as knowing the actual numerical values of a function. ZO-RankSGD performed almost as well as standard ZO-SGD, even though the latter had access to much more granular, continuous data.
- Variance Reduction via DAGs: By treating the ranking as a graph problem, the authors found a way to significantly reduce the variance of the gradient estimate. Specifically, they showed that the variance scales with $O(1/k)$, meaning identifying more "top" elements directly speeds up learning.
- Non-Convexity Support: Unlike previous theoretical work that required functions to be convex (bowl-shaped), this framework provides convergence guarantees for non-convex functions, which are standard in deep learning landscapes.
- Efficiency in RL: In MuJoCo environments, ZO-RankSGD significantly outperformed CMA-ES (a popular heuristic for ranking-based optimization), achieving a much higher episode reward for the same number of queries.
- Image Enhancement: In the Stable Diffusion experiments, the algorithm successfully improved fine image details (such as rendering human fingers and eyes more accurately) with only 10 to 20 rounds of human feedback.
- Theoretical Robustness: The authors proved a convergence rate of $O(\sqrt{d/T})$, where $d$ is the dimension and $T$ is the number of iterations. They also demonstrated empirically that the algorithm is robust to "noisy" rankings where the oracle occasionally makes mistakes.
Limitations and Future Directions
- Cognitive Burden: While mathematically ranking more items ($m$) improves gradient estimation, it increases the cognitive load on human judges. Future work should investigate the "sweet spot" between mathematical efficiency and human fatigue.
- Active Learning: Currently, the variations are sampled randomly. Integrating "active learning" to select variations that are most likely to yield informative rankings could further reduce the number of human queries required.
- Complex Noise Models: The current study uses a simple noise model for the ranking oracle. Real-world human preference is often inconsistent or context-dependent, warranting more complex modeling in future iterations.
Summary updated