  Optimization decomposition methods are a fundamental tool to develop
distributed solution algorithms for large scale optimization problems arising
in fields such as machine learning and optimal control. In this paper, we
present an algebraic framework for hierarchically composing optimization
problems defined on hypergraphs and automatically generating distributed
solution algorithms that respect the given hierarchical structure. The central
abstractions of our framework are operads, operad algebras, and algebra
morphisms, which formalize notions of syntax, semantics, and structure
preserving semantic transformations respectively. These abstractions allow us
to formally relate composite optimization problems to the distributed
algorithms that solve them. Specifically, we show that certain classes of
optimization problems form operad algebras, and a collection of first-order
solution methods, namely gradient descent, Uzawa's algorithm (also called
gradient ascent-descent), and their subgradient variants, yield algebra
morphisms from these problem algebras to algebras of dynamical systems. Primal
and dual decomposition methods are then recovered by applying these morphisms
to certain classes of composite problems. Using this framework, we also derive
a novel sufficient condition for when a problem defined by compositional data
is solvable by a decomposition method. We show that the minimum cost network
flow problem satisfies this condition, thereby allowing us to automatically
derive a hierarchical dual decomposition algorithm for finding minimum cost
flows on composite flow networks. We implement our operads, algebras, and
algebra morphisms in a Julia package called AlgebraicOptimization.jl and use
our implementation to empirically demonstrate that hierarchical dual
decomposition outperforms standard dual decomposition on classes of flow
networks with hierarchical structure.
