arXiv is now an independent nonprofit! Learn more
License: CC BY 4.0
arXiv:2506.05878v3 [cs.LG] 14 May 2026
 

A Projection-Based Framework for Gradient-Free and Parallel Learning

 

Andreas Bergmeister          Manish Krishan Lal          Stefanie Jegelka          Suvrit Sra

TU Munich, MCML          TU Munich, MCML          TU Munich, MCML MIT CSAIL          TU Munich, MCML MIT LIDS

Abstract

We present a feasibility-seeking approach to neural network training. This mathematical optimization framework is distinct from conventional gradient-based loss minimization and uses projection operators and iterative projection algorithms. We reformulate training as a large-scale feasibility problem: finding network parameters and states that satisfy local constraints derived from its elementary operations. Training then involves projecting onto these constraints, a local operation that can be parallelized across the network. We introduce PJAX, a JAX-based software framework that enables this paradigm. PJAX composes projection operators for elementary operations, automatically deriving the solution operators for the feasibility problems (akin to autodiff for derivatives). It inherently supports GPU/TPU acceleration, provides a familiar NumPy-like API, and is extensible. We train diverse architectures (MLPs, CNNs, RNNs) on standard benchmarks using PJAX, demonstrating its functionality and generality. Our results show that this approach is a compelling alternative to gradient-based training, with clear advantages in parallelism and the ability to handle non-differentiable operations.

1 INTRODUCTION

Figure 1: Neural network training paradigm shift. (a) Gradient-based methods iteratively minimize a loss function L(𝜽)L({\bm{\theta}}) using local gradients. (b) Our projection-based feasibility approach finds a point 𝒛{\bm{z}} in the intersection of constraint sets (e.g., 𝒞1,𝒞2{\mathcal{C}}_{1},{\mathcal{C}}_{2}) via iterative projections onto these sets.

Deep learning models have achieved remarkable success across diverse applications, largely driven by the effectiveness of gradient-based optimization. The backpropagation algorithm (Rumelhart et al., 1986), paired with stochastic gradient descent (SGD) and its adaptive variants (Duchi et al., 2011; Tieleman, 2012; Kingma and Ba, 2014), forms the bedrock of neural network training by efficiently computing loss gradients to iteratively adjust network parameters. Despite their undeniable success, gradient-based methods have several limitations. They often converge to local minima or high-error saddles (Dauphin et al., 2014; Choromanska et al., 2015), can suffer from vanishing or exploding gradients in deep architectures (Hochreiter, 1991; Bengio et al., 1994), and fundamentally require network components and loss functions to be (sub)differentiable. Moreover, the sequential nature of backpropagation limits parallelism and prolongs update latency. Finally, the global error backpropagation mechanism, requiring symmetric feedback pathways, is widely considered biologically implausible (Crick, 1989; Lillicrap et al., 2016). These challenges, along with inspiration from neuroscience and alternative optimization paradigms, motivate the search for fundamentally different approaches to training neural networks.

The research landscape includes various alternatives to end-to-end backpropagation. Zeroth-order methods such as Evolution Strategies (Salimans et al., 2017) or Genetic Algorithms (Holland, 1992) optimize the global loss using only function evaluations, at the cost of high sample complexity and poor scalability. Biologically inspired approaches use local rules but face distinct challenges: Hebbian methods (Hebb, 1949) lack supervised error integration, while spiking neural networks (Song et al., 2000; Gerstner and Kistler, 2002) contend with non-differentiable dynamics and credit assignment difficulties. Gradient approximation methods like Target Propagation (Lee et al., 2015), Feedback Alignment (Lillicrap et al., 2016) attempt to alleviate some backpropagation issues but often trade off convergence speed and performance. The recent Forward–Forward algorithm (Hinton, 2022) eliminates the backward pass altogether by training each layer on a local contrastive “goodness” objective; though its effectiveness on large-scale benchmarks has yet to be demonstrated.

This paper investigates a paradigm shift: reformulating neural network training from a loss minimization task (Fig. 1a) into a large-scale feasibility problem (Fig. 1b). Instead of navigating a complex loss landscape, we seek to identify network parameters and intermediate states that simultaneously satisfy a collection of local constraints derived from the network’s structure and the desired input-output mappings. Our approach achieves this through a fine-grained decomposition of the network into its elementary operations—termed primitive functions (e.g., inner products, pointwise activations). For these primitive functions, orthogonal projections onto their graphs (set of valid input–output pairs) are often computationally inexpensive. The availability of such efficient projections allows us to recast training as the problem of finding a point in the intersection of numerous local constraint sets, a task well-suited for iterative projection algorithms rooted in convex optimization (Bauschke and Combettes, 2011). This feasibility perspective builds upon conceptual work by Elser (2021).

This feasibility-driven paradigm offers several inherent advantages over traditional gradient-based methods. First, training relies on the availability of projection operators for primitive functions rather than on their differentiability, naturally accommodating non-differentiable components within network architectures. Second, the updates are local, modifying only adjacent variables in the computation graph. This eliminates the need for global error backpropagation and its associated weight transport problem, aligning more closely with notions of biological plausibility. Crucially, this locality, particularly when coupled with a bipartite structuring of the computation graph (Section 3), enables fully parallelizable updates across the network. While other strategies also decompose the global training objective into simpler, coupled sub-problems to enable parallel execution, such as layer-wise ADMM (Glowinski and Marroco, 1975; Boyd et al., 2011) or the Method of Auxiliary Coordinates (MAC) (Carreira-Perpiñán and Wang, 2014), they often face computational challenges such as large matrix inversions or intricate dual-variable bookkeeping (Taylor et al., 2016). In contrast, our fine-grained decomposition requires only a collection of efficiently computable local projections.

This paper delivers the rigorous formulation, a robust software framework, and systematic empirical validation necessary to establish projection-based training as a concrete, implementable, and explorable alternative. Our specific contributions are:

  1. 1.

    A detailed graph-structured feasibility formulation using edge variables. This formulation allows us to solve the problem efficiently with parallelizable projection algorithms (e.g., Alternating Projections and Douglas-Rachford) by exploiting a bipartitioning of the computation graph (Section 3).

  2. 2.

    A set of projection operators for key primitive functions (e.g., dot product, ReLU of sum, max pooling) that are fundamental building blocks for neural networks. The mathematical derivations for these operators are provided in Section C.1.

  3. 3.

    PJAX (Projection JAX)11 1 PJAX is available at https://github.com/AndreasBergmeister/pjax, a complete numerical framework built upon JAX (Bradbury et al., 2018). Designed for this compositional projection-based paradigm, it serves a role analogous to automatic differentiation systems for gradient-based methods. PJAX inherits JAX’s GPU/TPU acceleration and JIT compilation capabilities, provides a familiar API mirroring NumPy/JAX, automatically orchestrates the iterative solution of user-defined feasibility problems, and supports extension with new primitive functions and projection operators.

  4. 4.

    Extensive empirical validation across diverse neural network architectures (MLPs, CNNs, RNNs) on standard benchmarks (Section 5). These experiments demonstrate the viability of our projection-based approach and provide an initial characterization of its performance.

2 BACKGROUND AND PRELIMINARIES

We work in finite-dimensional Euclidean spaces d\mathbb{R}^{d}. The inner product is 𝒙,𝒚=𝒙𝒚\langle{\bm{x}},{\bm{y}}\rangle={\bm{x}}^{\top}{\bm{y}}, inducing the Euclidean norm 𝒙=𝒙,𝒙\|{\bm{x}}\|=\sqrt{\langle{\bm{x}},{\bm{x}}\rangle}, which in a product space is (𝒙1,,𝒙n)2=i=1n𝒙i2\|({\bm{x}}_{1},\ldots,{\bm{x}}_{n})\|^{2}=\sum_{i=1}^{n}\|{\bm{x}}_{i}\|^{2}.

2.1 Projection and Proximal Operators

The concept of projection onto sets is central to our method. Given a non-empty closed set 𝒞d{\mathcal{C}}\subseteq\mathbb{R}^{d}, the projection of 𝒙d{\bm{x}}\in\mathbb{R}^{d} onto 𝒞{\mathcal{C}} is

P𝒞(𝒙)=argmin𝐲𝒞𝐱𝐲2.\mathrm{P}_{{\mathcal{C}}}({\bm{x}})=\argmin_{{\bm{y}}\in{\mathcal{C}}}\|{\bm{x}}-{\bm{y}}\|^{2}. (1)

This projection always exists. If 𝒞{\mathcal{C}} is convex, P𝒞(𝒙)\mathrm{P}_{{\mathcal{C}}}({\bm{x}}) is unique; the operator P𝒞\mathrm{P}_{{\mathcal{C}}} is non-expansive, and its fixed points constitute 𝒞{\mathcal{C}}. If 𝒞{\mathcal{C}} is non-convex, the minimizer may not be unique, rendering P𝒞\mathrm{P}_{{\mathcal{C}}} set-valued; P𝒞(𝒙)\mathrm{P}_{{\mathcal{C}}}({\bm{x}}) then denotes an arbitrary choice from the set of minimizers.

Projections onto product sets 𝒞=𝒞1××𝒞m{\mathcal{C}}={\mathcal{C}}_{1}\times\dots\times{\mathcal{C}}_{m} (where each 𝒞idi{\mathcal{C}}_{i}\subseteq\mathbb{R}^{d_{i}} is non-empty and closed) separate as follows: for (𝒙1,,𝒙m)d1××dm({\bm{x}}_{1},\ldots,{\bm{x}}_{m})\in\mathbb{R}^{d_{1}}\times\dots\times\mathbb{R}^{d_{m}},

P𝒞1××𝒞m(𝒙1,,𝒙m)=(P𝒞1(𝒙1),,P𝒞m(𝒙m)).\mathrm{P}_{{\mathcal{C}}_{1}\times\dots\times{\mathcal{C}}_{m}}({\bm{x}}_{1},\ldots,{\bm{x}}_{m})=(\mathrm{P}_{{\mathcal{C}}_{1}}({\bm{x}}_{1}),\ldots,\mathrm{P}_{{\mathcal{C}}_{m}}({\bm{x}}_{m})). (2)

The proximal operator is associated with functions. For a proper, lower semi-continuous function f:d(,+]f:\mathbb{R}^{d}\to(-\infty,+\infty] and λ>0\lambda>0, the proximal operator of ff at 𝒙0d{\bm{x}}_{0}\in\mathbb{R}^{d} is

proxλf(𝒙0)=argmin𝐱d(f(𝐱)+12λ𝐱𝐱02).\operatorname{prox}_{\lambda f}({\bm{x}}_{0})=\argmin_{{\bm{x}}\in\mathbb{R}^{d}}\left(f({\bm{x}})+\frac{1}{2\lambda}\|{\bm{x}}-{\bm{x}}_{0}\|^{2}\right). (3)

If ff is convex, this minimizer is unique (Moreau, 1965). A point 𝒙{\bm{x}} is a minimizer of ff if and only if it is a fixed point of the proximal operator, proxλf(𝒙)=𝒙\operatorname{prox}_{\lambda f}({\bm{x}})={\bm{x}}. The proximal operator generalizes the projection operator: if ff is the indicator function of a closed convex set 𝒞{\mathcal{C}}, then proxλf(𝒙0)=P𝒞(𝒙0)\operatorname{prox}_{\lambda f}({\bm{x}}_{0})=\mathrm{P}_{{\mathcal{C}}}({\bm{x}}_{0}).

2.2 Feasibility Problems and Projection Algorithms

Many problems involve finding a point in the intersection of multiple constraint sets. Given closed sets 𝒞1,,𝒞Nd{\mathcal{C}}_{1},\ldots,{\mathcal{C}}_{N}\subseteq\mathbb{R}^{d}, the feasibility problem seeks 𝒙d{\bm{x}}\in\mathbb{R}^{d} such that

𝒙i=1N𝒞i,{\bm{x}}\in\bigcap_{i=1}^{N}{\mathcal{C}}_{i}, (4)

assuming a non-empty intersection. Iterative projection algorithms are apt for such problems, particularly when individual projections P𝒞i\mathrm{P}_{{\mathcal{C}}_{i}} are computationally simpler than directly finding a point in the intersection.

Classical algorithms include Alternating Projections (AP) for two sets 𝒞1,𝒞2{\mathcal{C}}_{1},{\mathcal{C}}_{2}, with the sequence:

𝒙k+1=P𝒞1(P𝒞2(𝒙k)).{\bm{x}}_{k+1}=\mathrm{P}_{{\mathcal{C}}_{1}}(\mathrm{P}_{{\mathcal{C}}_{2}}({\bm{x}}_{k})). (5)

Cyclic Projections (CP) extends this to N>2N>2 sets:

𝒙k+1=P𝒞N(P𝒞N1(P𝒞1(𝒙k))).{\bm{x}}_{k+1}=\mathrm{P}_{{\mathcal{C}}_{N}}(\mathrm{P}_{{\mathcal{C}}_{N-1}}(\dots\mathrm{P}_{{\mathcal{C}}_{1}}({\bm{x}}_{k}))). (6)

Douglas-Rachford (DR) for two sets 𝒞1,𝒞2{\mathcal{C}}_{1},{\mathcal{C}}_{2} uses reflections R𝒞(𝒙)=2P𝒞(𝒙)𝒙\mathrm{R}_{{\mathcal{C}}}({\bm{x}})=2\mathrm{P}_{{\mathcal{C}}}({\bm{x}})-{\bm{x}}:

𝒙k+1=12(𝒙k+R𝒞1(R𝒞2(𝒙k))).{\bm{x}}_{k+1}=\tfrac{1}{2}\left({\bm{x}}_{k}+\mathrm{R}_{{\mathcal{C}}_{1}}(\mathrm{R}_{{\mathcal{C}}_{2}}({\bm{x}}_{k}))\right). (7)

When the sets 𝒞i{\mathcal{C}}_{i} are convex with a non-empty intersection, AP (Bregman, 1965) and CP (Gubin et al., 1967) converge to a point in this intersection. For DR, under similar conditions, the sequence of projections (e.g., {P𝒞2(𝒙k)}\{\mathrm{P}_{{\mathcal{C}}_{2}}({\bm{x}}_{k})\}) converges to such a point (Douglas and Rachford, 1956; Lions and Mercier, 1979). These algorithms form the basis for solving feasibility problems in our work.

3 METHOD

Figure 2: Computation graph for (ReLU(wxi),yi)\ell(\operatorname{ReLU}(w\cdot x_{i}),y_{i}) on two samples, showing projection operators for hidden function and loss nodes.

Consider a supervised learning setting with dataset 𝒟={(𝒙i,𝒚i)}i=1N{\mathcal{D}}=\{({\bm{x}}_{i},{\bm{y}}_{i})\}_{i=1}^{N}, where 𝒙idin{\bm{x}}_{i}\in\mathbb{R}^{d_{\text{in}}} and 𝒚idtarget{\bm{y}}_{i}\in\mathbb{R}^{d_{\text{target}}}. Let 𝒇:din×dθdout{\bm{f}}:\mathbb{R}^{d_{\text{in}}}\times\mathbb{R}^{d_{\theta}}\to\mathbb{R}^{d_{\text{out}}} be a parametric function (e.g., a neural network), and let :dout×dtarget\ell:\mathbb{R}^{d_{\text{out}}}\times\mathbb{R}^{d_{\text{target}}}\to\mathbb{R} be a loss function. The conventional approach minimizes the empirical risk

min𝜽dθ1Ni=1N(𝒇(𝒙i,𝜽),𝒚i).\min_{{\bm{\theta}}\in\mathbb{R}^{d_{\theta}}}\frac{1}{N}\sum_{i=1}^{N}\ell\bigl({\bm{f}}({\bm{x}}_{i},{\bm{\theta}}),{\bm{y}}_{i}\bigr). (8)

We reformulate training as a feasibility problem by translating the per-sample objective of minimizing the loss into a set of hard constraints. The architecture of 𝒇{\bm{f}}, viewed as a composition of elementary operations, provides further constraints: each operation’s output must align with its inputs according to its defining function. Training then becomes the search for a state (network parameters and internal activations) that simultaneously satisfies this entire collection of local constraints. We formally construct this feasibility problem by defining these constraints over variables within a computation graph.

3.1 Constraint formulation via computation graph

For a given input 𝒙{\bm{x}}, parameters 𝜽{\bm{\theta}}, and target 𝒚{\bm{y}}, we represent the computation of (𝒇(𝒙,𝜽),𝒚)\ell({\bm{f}}({\bm{x}},{\bm{\theta}}),{\bm{y}}) as a directed acyclic graph (DAG) G=(𝒱,)G=({\mathcal{V}},{\mathcal{E}}), the computation graph. Nodes represent constant inputs, parameters, elementary operations of 𝒇{\bm{f}} (primitive scalar functions), and the loss function. Edges represent data flow: an edge (u,v)(u,v)\in{\mathcal{E}} indicates that the value from node uu serves as an input to the operation at node vv. We denote the set of parent nodes of vv as 𝒩(v){\mathcal{N}}^{-}(v) and its children as 𝒩+(v){\mathcal{N}}^{+}(v). Crucially, we decompose 𝒇{\bm{f}} into its scalar component functions (e.g., addition, inner products, ReLU activations); the nodes in the graph that correspond to operations therefore represent these scalar functions. Consequently, only scalar values pass along the edges. This granularity allows us to derive tractable projection operators onto the constraint sets associated with these primitive functions.

We introduce a variable zuvz_{uv}\in\mathbb{R} for each edge (u,v)(u,v)\in{\mathcal{E}}, representing the value carried along that edge. The state vector 𝒛=(zuv)(u,v){\bm{z}}=(z_{uv})_{(u,v)\in{\mathcal{E}}}\in\mathbb{R}^{{\mathcal{E}}} collects all edge variables. For each node in 𝒱{\mathcal{V}}, we define a constraint set in \mathbb{R}^{{\mathcal{E}}}. For a single sample (𝒙,𝒚)({\bm{x}},{\bm{y}}) (where 𝒙=(x1,,xdin){\bm{x}}=(x_{1},\dots,x_{d_{\text{in}}}) and 𝒚=(y1,,ydtarget){\bm{y}}=(y_{1},\dots,y_{d_{\text{target}}})), we categorize these constraints by node type as follows:

Constant input nodes cj𝒱c_{j}\in{\mathcal{V}} correspond to each input component xjx_{j} for j[din]j\in[d_{\text{in}}]. The constraints

𝒞cj={𝒛w𝒩+(cj):zcjw=xj}{\mathcal{C}}_{c_{j}}=\{{\bm{z}}\in\mathbb{R}^{{\mathcal{E}}}\mid\forall w\in{\mathcal{N}}^{+}(c_{j}):z_{c_{j}w}=x_{j}\}

enforce that edges outgoing from the respective node carry its value. The projection operator P𝒞cj(𝒛)\mathrm{P}_{{\mathcal{C}}_{c_{j}}}({\bm{z}}) sets zcjwz_{c_{j}w} to xjx_{j}.

Parameter nodes pk𝒱p_{k}\in{\mathcal{V}} correspond to each parameter component θk\theta_{k} for k[dθ]k\in[d_{\theta}]. The constraints

𝒞pk={𝒛u,w𝒩+(pk):zpkw=zpku}{\mathcal{C}}_{p_{k}}=\{{\bm{z}}\in\mathbb{R}^{{\mathcal{E}}}\mid\forall u,w\in{\mathcal{N}}^{+}(p_{k}):z_{p_{k}w}=z_{p_{k}u}\}

enforce consensus among all outgoing edge values from a parameter node. The projection operator P𝒞pk(𝒛)\mathrm{P}_{{\mathcal{C}}_{p_{k}}}({\bm{z}}) sets the values of outgoing edges zpkwz_{p_{k}w} to the average of the current values {zpkww𝒩+(pk)}\{z_{p_{k}w}\mid w\in{\mathcal{N}}^{+}(p_{k})\}.

Target node t𝒱t\in{\mathcal{V}} receives the network’s output and ensures minimal loss with respect to the target 𝒚{\bm{y}}. Depending on the loss function \ell, we either project onto the constraint set

𝒞t={𝒛(zut)u𝒩(t)argmin𝐲(𝐲,𝐲)}{\mathcal{C}}_{t}=\{{\bm{z}}\in\mathbb{R}^{{\mathcal{E}}}\mid(z_{ut})_{u\in{\mathcal{N}}^{-}(t)}\in\argmin_{{\bm{y}}^{\prime}}\ell({\bm{y}}^{\prime},{\bm{y}})\}

or apply the proximal operator of the loss function (with λ>0\lambda>0) to the current predicted outputs

(zut)u𝒩(t)proxλ(,𝒚)((zut)u𝒩(t)).(z^{\prime}_{ut})_{u\in{\mathcal{N}}^{-}(t)}\leftarrow\operatorname{prox}_{\lambda\ell(\cdot,{\bm{y}})}\bigl((z_{ut})_{u\in{\mathcal{N}}^{-}(t)}\bigr).

See Section C.2 for details. Note that a fixed point of the proximal operator is a minimizer of the loss function (see Section 2.1), so it satisfies the constraint 𝒞t{\mathcal{C}}_{t}.

Hidden function nodes h𝒱h\in{\mathcal{V}} represent the application of a primitive function fhf_{h} to their inputs. The constraints

𝒞h={𝒛\displaystyle{\mathcal{C}}_{h}=\{{\bm{z}}\in\mathbb{R}^{{\mathcal{E}}}\mid w𝒩+(h):\displaystyle\forall w\in{\mathcal{N}}^{+}(h):
zhw=fh((zuh)u𝒩(h))}\displaystyle z_{hw}=f_{h}\bigl((z_{uh})_{u\in{\mathcal{N}}^{-}(h)}\bigr)\}

enforce that all outgoing edge values equal the result of applying fhf_{h} to its inputs. Projecting onto 𝒞h{\mathcal{C}}_{h} involves: (1) computing an average of current values on outgoing edges, z¯=(w𝒩+(h)zhw)/|𝒩+(h)|\bar{z}=(\sum_{w\in{\mathcal{N}}^{+}(h)}z_{hw})/|{\mathcal{N}}^{+}(h)|; (2) projecting the incoming edge values (zuh)u𝒩(h)(z_{u^{\prime}h})_{u^{\prime}\in{\mathcal{N}}^{-}(h)} and the average z¯\bar{z} onto the graph of fhf_{h}: (zuh,zhw)=PGraph(fh)((zuh)u𝒩(h),z¯)(z^{\prime}_{u^{\prime}h},z^{\prime}_{hw})=\mathrm{P}_{\operatorname{Graph}(f_{h})}((z_{u^{\prime}h})_{u^{\prime}\in{\mathcal{N}}^{-}(h)},\bar{z}); (3) set incoming edge values zuhzuhz_{u^{\prime}h}\leftarrow z^{\prime}_{u^{\prime}h} and outgoing edge values zhwzhwz_{hw}\leftarrow z^{\prime}_{hw} for all w𝒩+(h)w\in{\mathcal{N}}^{+}(h). Theorem 3 formally justifies these steps.

The overall feasibility problem involves finding a state vector 𝒛{\bm{z}} that lies in the intersection of all such individual node constraints

Find 𝒛v𝒱𝒞v.\text{Find }{\bm{z}}\in\bigcap_{v\in{\mathcal{V}}}{\mathcal{C}}_{v}. (9)

The formulation extends to batches of samples by constructing a single, larger computation graph with NN instances of data-dependent components (input nodes, function nodes, and loss nodes for each sample ii), while sharing parameter nodes across instances. Conceptually, we construct a computation graph for the function

((𝒙1,𝒚1),,(𝒙N,𝒚N),𝜽)\displaystyle(({\bm{x}}_{1},{\bm{y}}_{1}),\ldots,({\bm{x}}_{N},{\bm{y}}_{N}),{\bm{\theta}})\mapsto
((𝒇(𝒙1,𝜽),𝒚1),,(𝒇(𝒙N,𝜽),𝒚N)),\displaystyle\quad(\ell({\bm{f}}({\bm{x}}_{1},{\bm{\theta}}),{\bm{y}}_{1}),\ldots,\ell({\bm{f}}({\bm{x}}_{N},{\bm{\theta}}),{\bm{y}}_{N})), (10)

as Fig. 2 illustrates. The following theorem justifies the correctness of our formulation, showing that if a solution to the feasibility problem exists, it yields a set of parameters that minimizes the empirical risk in Eq. 8.

Theorem 1 (Optimality of feasibility solution).

Let 𝐳{\bm{z}}^{*}\in\mathbb{R}^{{\mathcal{E}}} be a solution to the feasibility problem in Eq. 9 for the function (𝐟(𝐱,𝛉),𝐲)\ell({\bm{f}}({\bm{x}},{\bm{\theta}}),{\bm{y}}) applied to a dataset 𝒟{\mathcal{D}} as described above. Then the consensus values of the outgoing edges from the parameter nodes pkp_{k} (k[dθ])(k\in[d_{\theta}]) in 𝐳{\bm{z}}^{*} minimize the empirical risk in Eq. 8.

Proof.

A feasible state vector 𝒛{\bm{z}}^{*} satisfies all node constraints. Specifically, satisfying the target node constraints means that the outputs of the network, 𝒚^i\hat{{\bm{y}}}_{i}^{*}, minimize the per-sample loss. Parameter node constraints ensure their outgoing edges yield common consensus values, θk\theta_{k}^{*}, which define the overall network parameters 𝜽dθ{\bm{\theta}}^{*}\in\mathbb{R}^{d_{\theta}}. The input and hidden function node constraints then ensure that these loss-minimizing values 𝒚^i\hat{{\bm{y}}}_{i}^{*} are precisely the outputs of the network function 𝒇(𝒙i,𝜽){\bm{f}}({\bm{x}}_{i},{\bm{\theta}}^{*}). Consequently, 𝜽{\bm{\theta}}^{*} minimizes the empirical risk in Eq. 8. ∎

We solve the feasibility problem in Eq. 9 with the iterative projection algorithms described in Section 2.2. When the intersection is non-empty and the sets 𝒞v{\mathcal{C}}_{v} are convex, these algorithms converge to a feasible point under standard assumptions. In the nonconvex setting, they should be viewed as heuristic iterative methods that often find useful approximate solutions in practice, but without comparable general convergence guarantees. To efficiently compute the projections in parallel across the computation graph, we leverage the structure of the graph, specifically its bipartite nature, as the following theorem details. Notably, neural network computation graphs are often bipartite; if not, they can be made bipartite by inserting identity operations (dummy nodes with fv(z)=zf_{v}(z)=z).

Theorem 2 (Parallelizable projections via bipartition).

Let G=(𝒱,)G=({\mathcal{V}},{\mathcal{E}}) be a computation graph with a bipartition 𝒱=𝒜{\mathcal{V}}={\mathcal{A}}\cup{\mathcal{B}}, where 𝒜{\mathcal{A}} and {\mathcal{B}} are disjoint sets of nodes. The constraints for each node v𝒱v\in{\mathcal{V}} are defined as above. Then, the feasibility problem Eq. 9 is equivalent to the two-set feasibility problem

Find 𝒛𝒞𝒜𝒞,\displaystyle\quad{\bm{z}}\in{\mathcal{C}}_{{\mathcal{A}}}\cap{\mathcal{C}}_{{\mathcal{B}}}, (11)
where 𝒞𝒜=v𝒜𝒞v and 𝒞=v𝒞v.\displaystyle\quad{\mathcal{C}}_{{\mathcal{A}}}=\bigcap_{v\in{\mathcal{A}}}{\mathcal{C}}_{v}\text{ and }{\mathcal{C}}_{{\mathcal{B}}}=\bigcap_{v\in{\mathcal{B}}}{\mathcal{C}}_{v}. (12)

Furthermore, the projection P𝒞𝒜(𝐳)\mathrm{P}_{{\mathcal{C}}_{{\mathcal{A}}}}({\bm{z}}) (and analogously P𝒞(𝐳)\mathrm{P}_{{\mathcal{C}}_{{\mathcal{B}}}}({\bm{z}})) can be computed by independently (and in parallel) applying the projection operators P𝒞v(𝐳)\mathrm{P}_{{\mathcal{C}}_{v}}({\bm{z}}) for all v𝒜v\in{\mathcal{A}} (or vv\in{\mathcal{B}}).

Proof.

The equivalence v𝒱𝒞v=𝒞𝒜𝒞\bigcap_{v\in{\mathcal{V}}}{\mathcal{C}}_{v}={\mathcal{C}}_{{\mathcal{A}}}\cap{\mathcal{C}}_{{\mathcal{B}}} is definitional. Consider distinct nodes u,w𝒜u,w\in{\mathcal{A}}. By the bipartition, they are not adjacent. Since P𝒞u\mathrm{P}_{{\mathcal{C}}_{u}} only modifies edge variables incident to uu (similarly for ww), and u,wu,w share no incident edges, these projections act on disjoint sets of coordinates in 𝒛{\bm{z}}. Therefore, all operators {P𝒞v}v𝒜\{\mathrm{P}_{{\mathcal{C}}_{v}}\}_{v\in{\mathcal{A}}} modify mutually disjoint components of 𝒛{\bm{z}}. By Eq. 2 (projections onto product sets), P𝒞𝒜(𝒛)\mathrm{P}_{{\mathcal{C}}_{{\mathcal{A}}}}({\bm{z}}) is then computed by applying these individual projections independently, enabling parallel execution. An analogous argument for P𝒞(𝒛)\mathrm{P}_{{\mathcal{C}}_{{\mathcal{B}}}}({\bm{z}}) reduces the original problem to a two-set feasibility problem with parallelizable projection steps. ∎

Algorithm 1 summarizes the complete projection-based training procedure with batch processing.

Algorithm 1 Projection-based training
1: Model 𝒇{\bm{f}}, Loss function \ell, Initial parameters 𝜽0{\bm{\theta}}_{0}, Dataset 𝒟{\mathcal{D}}, Batch size BB, Projection steps per batch KK, Projection method ProjMethod.
2: Optimized parameters 𝜽{\bm{\theta}}.
3: 𝜽𝜽0{\bm{\theta}}\leftarrow{\bm{\theta}}_{0}
4: while not converged do
5:   ((𝒙1,𝒚1),,(𝒙B,𝒚B))𝒟(({\bm{x}}_{1},{\bm{y}}_{1}),\ldots,({\bm{x}}_{B},{\bm{y}}_{B}))\sim{\mathcal{D}}
6:   Gcomputation graph for batch loss (10)G\leftarrow\text{computation graph for batch loss (\ref{eq:batch_loss})}
7:   𝒛initial edge state vector{\bm{z}}\leftarrow\text{initial edge state vector}\in\mathbb{R}^{{\mathcal{E}}}
8:   for k=1k=1 to KK do
9:    𝒛ProjMethod(G,𝒛,{P𝒞v}v𝒱){\bm{z}}\leftarrow\texttt{ProjMethod}(G,{\bm{z}},\{\mathrm{P}_{{\mathcal{C}}_{v}}\}_{v\in{\mathcal{V}}})
10:   end for
11:   𝜽extract parameters from 𝒛{\bm{\theta}}\leftarrow\text{extract parameters from }{\bm{z}}
12: end while
13: return 𝜽{\bm{\theta}}

4 COMPLEXITY ANALYSIS

Having detailed the projection-based training methodology, we now analyze its computational and memory complexity. All considered projection algorithms perform a single projection per step onto the constraints 𝒞v{\mathcal{C}}_{v} for each node v𝒱v\in{\mathcal{V}}. We focus on the complexity of these projections, as they dominate the overall computational cost.

Computational complexity per step

Projecting onto a single node’s constraint 𝒞v{\mathcal{C}}_{v} typically has a cost comparable to the forward evaluation of the primitive function fvf_{v}. For example, the projection for the dot product, which implements neuron pre-activation, involves solving a scalar quintic equation (e.g., via 5 Newton steps) followed by rescaling inputs/outputs. Similarly, the projection for ReLU computes two candidate solutions in closed form and selects the one minimizing distance. See Section C.1 for details on these and other primitive functions. Therefore, the total cost per step of the projection method is roughly proportional to the cost of executing all primitive operations in the computation graph, similar to a forward pass. However, unlike the sequential forward and backward passes that backpropagation requires, the projection updates within each partition (𝒜{\mathcal{A}} or {\mathcal{B}}) are fully parallelizable.

Memory complexity

Storing the state vector 𝒛{\bm{z}}\in\mathbb{R}^{{\mathcal{E}}} leads to O(||)O(|{\mathcal{E}}|) memory complexity. In contrast, standard backpropagation only requires storing a primitive function’s output and its gradient, resulting in O(|𝒱|)O(|{\mathcal{V}}|) complexity. Since many networks have significantly more edges |||{\mathcal{E}}| than nodes |𝒱||{\mathcal{V}}|, our method generally requires more memory. This requirement is pronounced in architectures with extensive weight sharing. For instance, during batch processing, processing NN samples requires replicating the state associated with shared parameters NN times in 𝒛{\bm{z}}, as each sample interacts with the parameters via distinct edges in the expanded graph. Similarly, in sequence models (e.g., RNNs), unrolling over TT time steps necessitates storing distinct edge states for shared parameters at each step. Convolutional networks (CNNs) also exhibit this effect: applying a convolutional kernel at multiple spatial locations means each application corresponds to graph connections that require separate edge states. Our experiments made this evident: the high memory demands of the 4-layer CNN necessitated reducing the number of hidden units per layer to 16 to fit within the available 96GB GPU memory. In contrast, architectures with less parameter sharing, like MLPs, could accommodate larger sizes. Gradient-based methods are more memory-efficient in these cases because they aggregate gradients for shared parameters (e.g., by summation) and only need to store one copy of the parameters and their accumulated gradients.

In summary, the projection-based approach trades potentially higher memory usage, especially with shared parameters, for significant gains in parallelizability compared to gradient-based methods. The overall convergence rate (number of steps) depends on the specific problem and projection algorithm used. However, as our experiments empirically demonstrate (Section 5), projection-based training can achieve convergence rates that are competitive with first-order SGD methods on several tasks.

5 EXPERIMENTS

This section presents an empirical evaluation of our projection-based training method, outlined in Algorithm 1. We compare three projection methods (ProjMethod), Alternating Projections (AP), Douglas-Rachford (DR), and Cyclic Projections (CP), against standard gradient-based optimizers, Stochastic Gradient Descent (SGD) and Adam (Kingma and Ba, 2014), and non-backpropagation baselines, Feedback Alignment (FA) (Lillicrap et al., 2016) on MLPs and Forward–Forward (FF) (Hinton, 2022) on MLPs and CNNs. For AP and DR, we utilize the two-set feasibility problem derived from the bipartite graph formulation (Theorem 2). For CP, we apply the multi-set feasibility problem formulation directly, projecting cyclically onto node constraints and merging constraints within the same layer for efficiency (e.g., performing all ReLU projections in parallel). The projection order for CP follows a backward breadth-first search (BFS) from the target node.

5.1 Datasets and tasks

We evaluate our approach on diverse standard machine learning tasks. These include image classification using MNIST (28×2828\times 28 grayscale images, 10 classes) and CIFAR-10 (32×3232\times 32 color images, 10 classes), binary classification on the HIGGS dataset (distinguishing signal from background noise in particle physics), and character-level language modeling with the Shakespeare dataset. We use the default train/test splits (approximately 80% train, 20% test) and reserve 10% of training data for validation (hyperparameter tuning and early stopping). Across all tasks, we employ the standard cross-entropy loss and report accuracy as the primary evaluation metric. For the sequence modeling task, accuracy specifically refers to the fraction of correctly predicted next characters.

5.2 Neural network architectures

We test three representative architectures: A Multilayer Perceptron (MLP) with fully connected layers (linear + bias) and ReLU activations. A Convolutional Neural Network (CNN) with 3×33\times 3 convolutional layers (stride 1, padding 1) and ReLU activations; the output feature maps are spatially max-pooled into vectors before passing through a final linear layer. We implement a Recurrent Neural Network (RNN) with an MLP cell that processes the concatenation of a learned character embedding and the previous hidden state (𝒉t1{\bm{h}}_{t-1}) at each step tt. The MLP outputs both logits for the next character and a raw hidden state (𝒉t{\bm{h}}_{t}^{\prime}). Activating this state via 𝒉t=ReLU(𝒉t){\bm{h}}_{t}=\operatorname{ReLU}({\bm{h}}_{t}^{\prime}) produces the input state for step t+1t+1.

For each architecture, we evaluate both shallow (1 hidden layer) and deep (4 hidden layers) variants. For deep models, we also test a skip-connection design tailored to projection-based training: we concatenate the post-activation outputs of all hidden layers and feed the resulting vector to the final linear readout. This shortens the path from early layers to the output, which is important because projection-based training relies on local projection operators that only update adjacent variables in the computation graph. Without additional shortcuts, information from early layers reaches the output only after many iterations. Crucially, the design preserves the bipartite structure of the computation graph and thus our parallel projection scheme. It differs from the usual ResNet-style residual connection, which replaces a module f(x)f(x) with x+f(x)x+f(x) and does not limit the distance to the output as effectively.

Implementation and hyperparameters

We implement projection-based methods (AP, DR, CP) using our PJAX framework (Appendix B) and all baselines with JAX and Flax (Heek et al., 2024), ensuring fair comparison, as PJAX uses JAX as its backend. Notably, defining models in PJAX’s pjax.nn API closely mirrors standard JAX/Flax usage. For the output layer constraint, we use the proximal operator for cross-entropy (Theorem 11, with λ=5\lambda=5), finding it more robust than margin constraints (Theorem 10), which require careful tuning of the margin parameter.

FA and FF are implemented in line with their original formulations (Lillicrap et al., 2016; Hinton, 2022). Neither method is applied to skip-connection architectures, which are not part of their original design. For FF, we report results with both SGD and Adam optimizers, since performance varies substantially with the choice of optimizer.

We use consistent parameters across experiments: learning rate 10310^{-3} for SGD, Adam and FF, 10410^{-4} for FA, batch size 256256 for all methods, and K=50K=50 projection steps per batch for AP/DR/CP. Each projection step counts as one training step, so projection methods process 5050 times fewer batches than baseline methods per reported step. Accordingly, the horizontal axes in Figs. 3 and 4 compare optimization steps rather than equal amounts of data processed.

5.3 Results

Figure 3: Test accuracy vs. training steps.
Figure 4: Impact of network depth and skip connections.

We present an overview of our experimental findings here. Appendix D provides detailed numerical results, including final test accuracies, convergence steps, and timings of all conducted experiments on a single NVIDIA H100 GPU with 96GB of memory.

Overall trends.

Figure 3 displays representative test accuracy curves from our experiments, highlighting a general trend: while Adam consistently achieves the highest test accuracy and generally converges fastest, projection-based methods prove viable across tasks and architectures. Among the projection algorithms, DR often outperforms AP on MLPs and RNNs in accuracy, while AP is competitive on CNNs. CP yields almost identical accuracy to AP but is slower due to its sequential nature (hence we omit CP from plots for clarity; see Appendix D for results). We also find that AP/CP tend to exhibit higher run-to-run variance than DR, likely due to greater sensitivity to initialization. DR’s reflection (overshoot) step enlarges the effective basin of attraction and reduces stalling in shallow basins, leading to more consistent outcomes across seeds. The specific characteristics of projection-based training, such as convergence to optimal solutions and step efficiency, vary with network architecture. For MLPs (Table 2), projection methods, particularly DR in shallow cases, approach SGD’s accuracy with notable computational efficiency per step (often 10×\sim 10\times faster). For CNNs (Table 3), the accuracy gap relative to gradient-based methods widens, and step speed decreases due to higher memory requirements for shared parameters (see Section 4 for theoretical details). For RNNs (Table 4), projection methods possess a structural advantage, as no backpropagation through time is performed, thereby sidestepping issues with vanishing or exploding gradients (see Fig. 6). This results in significantly faster convergence in terms of training steps compared to SGD, though Adam still achieves the best overall results, managing training dynamics effectively. The memory demands for shared parameters in RNNs also impact step times, similar to CNNs.

FF and FA baselines.

Our experiments do not reveal a consistent ranking between projection-based methods and FF/FA baselines for all tasks. On CIFAR-10 CNN, for example, the 4-layer projection-based model with skip connections outperforms both FF (even when trained with Adam) and FA (implemented without skips, as in prior work). In other settings, FF or FA achieve better performance. A clear pattern is that FF is highly optimizer-dependent: it performs well with Adam but degrades sharply with SGD. Figures 3 and 4 report FF results with Adam, while additional SGD results are provided in Appendix D.

Depth and skip connections.

A key consideration for projection-based methods, which rely on local updates, is their effectiveness in deeper networks. Figure 4 explores this using an MLP trained on MNIST with the Douglas-Rachford (DR) algorithm. While shallow MLPs (left panel) train readily, the performance of a deep MLP without skip connections (center panel) degrades, highlighting challenges in propagating information through many layers via local projections alone. The introduction of skip connections (right panel) substantially improves training for the deep MLP. These connections provide shorter paths for information flow, proving crucial for effective learning in deeper architectures using projection methods, while maintaining the bipartite graph structure essential for parallelization.

Figure 5: Scalability of projection vs. gradient-based methods with network depth.
Figure 6: Computation graph for RNN: each unrolled cell ff has a local parameter copy (wtw_{t}). Projections are performed separately (possibly concurrently) for each time step. Parameter consensus is enforced through the parameter node.

Figure 5 further analyzes the computational efficiency of projection methods. It compares step times of SGD, CP, and AP for an MLP (16 hidden units per layer) on a single MNIST sample, across varying network depths. These algorithms serve as direct proxies for the gradient-based, sequential projection, and parallel projection paradigms, respectively, avoiding the complexities of other optimizers like Adam or more involved projection schemes like DR. The analysis reveals two main trends. First, both CP and AP achieve lower step times than SGD, likely due to their intensive data reuse (K=50K=50 updates per sample). Second, AP’s step time increases less steeply with network depth compared to SGD and CP. This favorable scaling stems from the parallelization of updates across all layers via the bipartite graph structure (Theorem 2), a concurrency efficiently harnessed by modern hardware like GPUs, in contrast to the sequential processing inherent in SGD (backpropagation) and CP (cyclic projections). Consequently, AP’s parallel advantage becomes more pronounced for deeper networks.

6 DISCUSSION

We reframe neural network training as a feasibility problem and solve it with iterative projections. Because the method requires projections rather than derivatives, it naturally supports non-differentiable components such as quantization (Theorem 9) and logical constraints (e.g., the margin loss in Theorem 10). Updates are local to adjacent variables in the computation graph, which removes global error backpropagation, enables parallelization across network components, and aligns with biological learning principles. The PJAX framework (Appendix B) composes projection operators analogously to how autodiff composes derivatives via the chain rule, providing a practical tool for investigating and extending this paradigm. To the best of our knowledge, it is the only gradient-free training approach accompanied by a general-purpose framework rather than a single-task implementation.

Beyond these advantages, our formulation keeps the standard vector-to-vector interface with single-pass inference. In contrast, Forward–Forward (Hinton, 2022) learns a scalar “goodness” for each (input, label) pair, which implies a per-class forward pass at inference and presents challenges for scaling to large output spaces (as in language modeling) or extending to continuous targets.

Empirically, projection methods train diverse architectures (MLPs, CNNs, and RNNs) reliably. They achieve competitive step times and benefit from parallel updates; RNNs particularly benefit from avoiding backpropagation through time. Douglas–Rachford is often the most stable, though performance still falls short of highly optimized adaptive gradient methods such as Adam. For both gradient- and projection-based optimizers, the train-test gap is often modest (Appendix D), suggesting that the gap reflects limits in fitting the training data rather than a fundamental lack of generalization.

The main limitation is memory. The algorithm maintains distinct edge variables for each interaction between parameters and data, so requirements scale with batch size, sequence length, and the number of convolutional locations.

Promising directions include: (i) improved projection dynamics (adaptive damping/relaxation, preconditioning, acceleration, learned step sizes); (ii) hybrid schemes that interleave projections with occasional gradient steps; (iii) tailored architectures that shorten paths to the output and use structured sparsity (e.g., Mixture-of-Experts) to limit parameter–data interaction; (iv) memory-saving techniques (low-rank or quantized edge states); and (v) refined analyses of convergence and generalization for nonconvex, possibly set-valued projections. We hope PJAX lowers the barrier to exploring these directions.

ACKNOWLEDGMENTS

This project was funded by the Alexander von Humboldt Foundation.

References

  • Abadi et al. (2016) M. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis, J. Dean, M. Devin, S. Ghemawat, G. Irving, M. Isard, et al. TensorFlow: a system for large-scale machine learning. In 12th USENIX symposium on operating systems design and implementation (OSDI 16), pp. 265–283. Cited by: Appendix B.
  • Bauschke et al. (2022) H. H. Bauschke, M. K. Lal, and X. Wang Projecting onto rectangular hyperbolic paraboloids in hilbert space. arXiv preprint arXiv:2206.04878. Cited by: §C.1.
  • Bauschke and Combettes (2011) H. H. Bauschke and P. L. Combettes Convex analysis and monotone operator theory in hilbert spaces. CMS Books in Mathematics, Springer, New York, NY. External Links: ISBN 978-1-4419-9466-0, Document Cited by: §1.
  • Bengio et al. (1994) Y. Bengio, P. Simard, and P. Frasconi Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks 5 (2), pp. 157–166. Cited by: §A.1, §1.
  • Bengio (2014) Y. Bengio How auto-encoders could provide credit assignment in deep networks via target propagation. arXiv preprint arXiv:1407.7906. Cited by: §A.4.
  • Bertsekas (1997) D. P. Bertsekas Nonlinear programming. Journal of the Operational Research Society 48 (3), pp. 334–334. Cited by: §A.5.
  • Bienenstock et al. (1982) E. L. Bienenstock, L. N. Cooper, and P. W. Munro Theory for the development of neuron selectivity: orientation specificity and binocular interaction in visual cortex. Journal of Neuroscience 2 (1), pp. 32–48. Cited by: §A.3.
  • Boyd et al. (2011) S. Boyd, N. Parikh, E. Chu, B. Peleato, J. Eckstein, et al. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends® in Machine learning 3 (1), pp. 1–122. Cited by: §A.5, §1.
  • Bradbury et al. (2018) J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, G. Necula, A. Paszke, J. VanderPlas, S. Wanderman-Milne, and Q. Zhang JAX: composable transformations of Python+NumPy programs. External Links: Link Cited by: Appendix B, item 3.
  • Bregman (1965) L. M. Bregman The method of successive projections for finding a common point of convex sets. In Soviet Math. Dokl., Vol. 6, pp. 688–692. Cited by: §2.2.
  • Carreira-Perpiñán and Wang (2014) M. Á. Carreira-Perpiñán and W. Wang Distributed optimization of deeply nested systems. In Artificial Intelligence and Statistics (AISTATS), Cited by: §A.5, §1.
  • Choromanska et al. (2015) A. Choromanska, M. Henaff, M. Mathieu, G. B. Arous, and Y. LeCun The loss surfaces of multilayer networks. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics (AISTATS 2015), pp. 192–204. Cited by: §A.1, §1.
  • Crick (1989) F. Crick The recent excitement about neural networks. Nature 337 (6203), pp. 129–132. Cited by: §1.
  • Dauphin et al. (2014) Y. N. Dauphin, R. Pascanu, C. Gulcehre, K. Cho, S. Ganguli, and Y. Bengio Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. In Advances in Neural Information Processing Systems 27 (NeurIPS 2014), pp. 2933–2941. Cited by: §A.1, §1.
  • Davies et al. (2018) M. Davies, N. Srinivasa, T. Lin, G. Chinya, Y. Cao, S. H. Choday, G. Dimou, P. Joshi, N. Imam, S. Jain, et al. Loihi: a neuromorphic manycore processor with on-chip learning. Ieee Micro 38 (1), pp. 82–99. Cited by: §A.3.
  • Douglas and Rachford (1956) J. Douglas and H. H. Rachford On the numerical solution of heat conduction problems in two and three space variables. Transactions of the American mathematical Society 82 (2), pp. 421–439. Cited by: §2.2.
  • Duchi et al. (2011) J. Duchi, E. Hazan, and Y. Singer Adaptive subgradient methods for online learning and stochastic optimization. Journal of machine learning research 12 (7). Cited by: §A.1, §1.
  • Elser (2003) V. Elser Phase retrieval by iterated projections. Journal of the Optical Society of America A 20 (1), pp. 40–55. Cited by: §B.3.
  • Elser (2021) V. Elser Learning without loss. Fixed Point Theory and Algorithms for Sciences and Engineering 2021 (1), pp. 12. Cited by: §A.5, §1.
  • Gerstner and Kistler (2002) W. Gerstner and W. M. Kistler Spiking neuron models: single neurons, populations, plasticity. Cambridge university press. Cited by: §A.3, §1.
  • Glowinski and Marroco (1975) R. Glowinski and A. Marroco Sur l’approximation, par éléments finis d’ordre un, et la résolution, par pénalisation-dualité d’une classe de problèmes de dirichlet non linéaires. Revue française d’automatique, informatique, recherche opérationnelle. Analyse numérique 9 (R2), pp. 41–76. Cited by: §A.5, §1.
  • Gubin et al. (1967) L. Gubin, B. T. Polyak, and E. Raik The method of projections for finding the common point of convex sets. USSR Computational Mathematics and Mathematical Physics 7 (6), pp. 1–24. Cited by: §2.2.
  • Hebb (1949) D. O. Hebb The organization of behavior: a neuropsychological theory. Wiley. Cited by: §A.3, §1.
  • Heek et al. (2024) J. Heek, A. Levskaya, A. Oliver, M. Ritter, B. Rondepierre, A. Steiner, and M. van Zee Flax: a neural network library and ecosystem for JAX. External Links: Link Cited by: §5.2.
  • Hinton et al. (2006) G. E. Hinton, S. Osindero, and Y. Teh A fast learning algorithm for deep belief nets. Neural computation 18 (7), pp. 1527–1554. Cited by: §A.3, §A.4.
  • Hinton (2002) G. E. Hinton Training products of experts by minimizing contrastive divergence. Neural computation 14 (8), pp. 1771–1800. Cited by: §A.3.
  • Hinton (2022) G. Hinton The forward-forward algorithm: some preliminary investigations. arXiv preprint arXiv:2212.13345. Cited by: §A.4, §1, §5.2, §5, §6.
  • Hochreiter (1991) S. Hochreiter Untersuchungen zu dynamischen neuronalen netzen. Diploma, Technische Universität München 91 (1), pp. 31. Cited by: §A.1, §1.
  • Holland (1992) J. H. Holland Adaptation in natural and artificial systems: an introductory analysis with applications to biology, control, and artificial intelligence. MIT press. Cited by: §A.2, §1.
  • Hopfield (1982) J. J. Hopfield Neural networks and physical systems with emergent collective computational abilities.. Proceedings of the national academy of sciences 79 (8), pp. 2554–2558. Cited by: §A.3.
  • Jaderberg et al. (2017) M. Jaderberg, W. M. Czarnecki, S. Osindero, O. Vinyals, A. Graves, K. Kavukcuoglu, and D. Silver Decoupled neural interfaces using synthetic gradients. In International Conference on Machine Learning, pp. 1627–1635. Cited by: §A.4.
  • Kennedy and Eberhart (1995) J. Kennedy and R. Eberhart Particle swarm optimization. In Proceedings of ICNN’95-international conference on neural networks, Vol. 4, pp. 1942–1948. Cited by: §A.2.
  • Kingma and Ba (2014) D. P. Kingma and J. Ba Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980. Cited by: §A.1, §1, §5.
  • Korthikanti et al. (2023) V. A. Korthikanti, J. Casper, S. Lym, M. McAfee, M. Subramanian, S. Li, S. Kotha, W. Hoover, G. Ananthanarayanan, P. Dubey, et al. Reducing activation recomputation in large transformer models. Proceedings of Machine Learning and Systems 5, pp. 341–353. Cited by: §A.1.
  • Lee et al. (2015) D. Lee, S. Zhang, A. Fischer, and Y. Bengio Difference target propagation. In Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2015, Porto, Portugal, September 7-11, 2015, Proceedings, Part I 15, pp. 498–515. Cited by: §A.4, §1.
  • Lillicrap et al. (2016) T. P. Lillicrap, D. Cownden, D. B. Tweed, and C. J. Akerman Random synaptic feedback weights support error backpropagation for deep learning. Nature communications 7 (1), pp. 13276. Cited by: §A.4, §1, §1, §5.2, §5.
  • Lions and Mercier (1979) P. Lions and B. Mercier Splitting algorithms for the sum of two nonlinear operators. SIAM Journal on Numerical Analysis 16 (6), pp. 964–979. Cited by: §2.2.
  • Merolla et al. (2014) P. A. Merolla, J. V. Arthur, R. Alvarez-Icaza, A. S. Cassidy, J. Sawada, F. Akopyan, B. L. Jackson, N. Imam, C. Guo, Y. Nakamura, et al. A million spiking-neuron integrated circuit with a scalable communication network and interface. Science 345 (6197), pp. 668–673. Cited by: §A.3.
  • Moreau (1965) J. Moreau Proximité et dualité dans un espace hilbertien. Bulletin de la Société mathématique de France 93, pp. 273–299. Cited by: §2.1.
  • Nesterov (1983) Y. Nesterov A method for solving the convex programming problem with convergence rate o (1/k2). In Dokl akad nauk Sssr, Vol. 269, pp. 543. Cited by: §A.1.
  • Nøkland (2016) A. Nøkland Direct feedback alignment provides learning in deep neural networks. Advances in neural information processing systems 29. Cited by: §A.4.
  • Oja (1982) E. Oja Simplified neuron model as a principal component analyzer. Journal of mathematical biology 15, pp. 267–273. Cited by: §A.3.
  • Paszke et al. (2019) A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala PyTorch: an imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems, Vol. 32. Cited by: Appendix B.
  • Polyak (1964) B. T. Polyak Some methods of speeding up the convergence of iteration methods. Ussr computational mathematics and mathematical physics 4 (5), pp. 1–17. Cited by: §A.1.
  • Radhakrishnan et al. (2024) A. Radhakrishnan, D. Beaglehole, P. Pandit, and M. Belkin Mechanism for feature learning in neural networks and backpropagation-free machine learning models. Science 383 (6690), pp. 1461–1467. External Links: Document Cited by: §A.4.
  • Rechenberg (1978) I. Rechenberg Evolutionsstrategien. In Simulationsmethoden in der Medizin und Biologie: Workshop, Hannover, 29. Sept.–1. Okt. 1977, pp. 83–114. Cited by: §A.2.
  • Rumelhart et al. (1986) D. E. Rumelhart, G. E. Hinton, and R. J. Williams Learning representations by back-propagating errors. nature 323 (6088), pp. 533–536. Cited by: §A.1, §1.
  • Salimans et al. (2017) T. Salimans, J. Ho, X. Chen, S. Sidor, and I. Sutskever Evolution strategies as a scalable alternative to reinforcement learning. arXiv preprint arXiv:1703.03864. Cited by: §A.2, §1.
  • Scellier and Bengio (2017) B. Scellier and Y. Bengio Equilibrium propagation: bridging the gap between energy-based models and backpropagation. In International Conference on Learning Representations, Cited by: §A.4.
  • Schmidhuber (1987) J. Schmidhuber Evolutionary principles in self-referential learning, or on learning how to learn: the meta-meta-… hook. Ph.D. Thesis, Technische Universität München. Cited by: §A.2.
  • Schwefel and Schwefel (1977) H. Schwefel and H. Schwefel Evolutionsstrategien für die numerische optimierung. Springer. Cited by: §A.2.
  • Song et al. (2000) S. Song, K. D. Miller, and L. F. Abbott Competitive hebbian learning through spike-timing-dependent synaptic plasticity. Nature neuroscience 3 (9), pp. 919–926. Cited by: §A.3, §1.
  • Taylor et al. (2016) G. Taylor, R. Burmeister, Z. Xu, B. Singh, A. Patel, and T. Goldstein Training neural networks without gradients: a scalable ADMM approach. In International conference on machine learning, pp. 2722–2731. Cited by: §A.5, §1.
  • Team et al. (2016) T. T. D. Team, R. Al-Rfou, G. Alain, A. Almahairi, C. Angermueller, D. Bahdanau, N. Ballas, F. Bastien, J. Bayer, A. Belikov, et al. Theano: a Python framework for fast computation of mathematical expressions. arXiv preprint arXiv:1605.02688. Cited by: Appendix B.
  • Tieleman (2012) T. Tieleman Lecture 6.5-RMSProp: divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning 4 (2), pp. 26. Cited by: §A.1, §1.
  • Xu et al. (2025) X. Xu et al. Activation sharding for scalable training of large models. Transactions on Machine Learning Research. Cited by: §A.1.
 

A Projection-Based Framework for Gradient-Free and Parallel Learning:
Supplementary Materials

 

Appendix A RELATED WORK

Deep neural network training is overwhelmingly dominated by gradient-based optimization methods. However, the limitations of gradient-based methods and inspiration from neuroscience have driven research into non-gradient-based learning. This section reviews prominent families of these methods.

A.1 Gradient-based optimization: The standard paradigm

Gradient-based methods are foundational in deep learning. The backpropagation algorithm, as popularized in the seminal work by Rumelhart et al. (1986), remains the dominant paradigm for training neural networks. Backpropagation leverages the chain rule of differentiation to compute the gradient of a global loss function with respect to all network parameters efficiently. These gradients are then typically used within variants of stochastic gradient descent (SGD) to iteratively update the parameters and minimize the loss.

To address issues such as slow convergence, navigation of complex loss landscapes, and sensitivity to learning rates, several improvements to vanilla SGD have been proposed. Momentum-based methods, including Polyak’s momentum (Polyak, 1964) and Nesterov accelerated gradient (Nesterov, 1983), incorporate a history of past updates to accelerate progress along consistent descent directions and dampen oscillations. Adaptive methods such as AdaGrad (Duchi et al., 2011), RMSProp (Tieleman, 2012), and Adam (Kingma and Ba, 2014) adjust learning rates on a per-parameter basis, adapting to the geometry of the loss landscape and helping networks train more robustly, especially with sparse gradients. For large models, memory-efficient variants of backpropagation have also been developed, e.g., reducing activation storage or recomputation overheads (Korthikanti et al., 2023; Xu and others, 2025).

Despite their success, gradient-based methods face several challenges. They can converge to suboptimal local minima or encounter prevalent high-error saddle points, particularly in high-dimensional non-convex optimization problems (Dauphin et al., 2014; Choromanska et al., 2015). Furthermore, they can suffer from vanishing or exploding gradients in deep networks (Hochreiter, 1991; Bengio et al., 1994), require the objective function and network components to be differentiable (or sub-differentiable), and can be sensitive to hyperparameter choices. The computational cost and sequential nature of computing and propagating gradients through deep networks can also be significant bottlenecks for parallelization across layers. These limitations motivate the exploration of alternative training schemes.

A.2 Derivative-free and zeroth-order methods

A direct alternative is to forgo gradient calculation entirely and use derivative-free optimization (DFO) or zeroth-order methods. These methods typically rely only on evaluations of the objective function (the global loss). Evolution Strategies (ES) (Rechenberg, 1978; Schwefel and Schwefel, 1977) are a prominent example. ES optimizes parameters by sampling points in the parameter space around the current estimate, evaluating the loss at these points, and moving the estimate in a direction informed by these evaluations, effectively approximating a gradient direction or directly seeking improvement (Salimans et al., 2017). While computationally intensive due to the need for multiple forward passes per update, ES has shown surprising effectiveness, particularly in reinforcement learning domains (Salimans et al., 2017). Other population-based methods like Genetic Algorithms (GAs) (Holland, 1992) and Particle Swarm Optimization (PSO) (Kennedy and Eberhart, 1995) maintain a population of candidate solutions (network parameters) and iteratively refine them using operators inspired by biological evolution (selection, crossover, mutation) or social behavior (particle movement). The objective is typically to maximize a fitness function directly related to the global loss. Evolutionary approaches have also been applied to meta-learning problems, such as optimizing learning rules or hyperparameters (Schmidhuber, 1987). The primary objective of these DFO methods is the minimization of the global loss function. However, they often exhibit high sample complexity compared to gradient-based methods, requiring many loss evaluations, which can be prohibitive for large networks and datasets. Scalability to extremely high-dimensional parameter spaces remains a challenge.

A.3 Biologically inspired local learning rules

Drawing inspiration from neuroscience, another class of methods employs local learning rules that do not require global error backpropagation. Rooted in neuroscientific theory, Hebbian learning follows the principle “cells that fire together, wire together.” This principle, introduced by Donald Hebb in his 1949 book (Hebb, 1949), states that the synaptic strength between two neurons increases if they are co-activated. Early neural network research used simplified Hebbian rules for unsupervised representation learning. Modern variants, such as Oja’s rule (Oja, 1982) and the Bienenstock–Cooper–Munro (BCM) rule (Bienenstock et al., 1982), build on the classical Hebbian framework to ensure weight stabilization and learn principal components or other low-dimensional representations. Relatedly, attractor networks like the Hopfield network (Hopfield, 1982) also utilize Hebbian-style rules to store patterns as stable states (attractors) within an energy function, suitable for tasks like associative memory and pattern completion. Another important family of models leveraging local updates includes energy-based models like Boltzmann Machines (BMs) and particularly their simplified variant, Restricted Boltzmann Machines (RBMs) (Hinton, 2002). RBMs are stochastic networks trained to model a probability distribution over their inputs, typically via Maximum Likelihood. While exact gradient calculation is intractable for general BMs, RBMs can be effectively trained using algorithms like Contrastive Divergence (CD) (Hinton, 2002), which relies on Gibbs sampling and local computations between connected layers to approximate the gradient. This made RBMs instrumental as building blocks for Deep Belief Networks (Hinton et al., 2006), offering a biologically more plausible route to unsupervised feature learning and generative modeling. A common appealing property of these various local learning rules, whether Hebbian or energy-based, is their independence from global gradient signals. Instead, they rely on updates based on local neuronal activity (e.g., correlations, timing, sampling statistics) or principles like energy minimization. The objective is often related to maximizing correlation, capturing variance, achieving representational stability, minimizing a network energy function, or modeling data distributions, rather than directly minimizing a global supervised loss function for input-output mappings. This locality can be advantageous for large-scale or biologically plausible architectures where global signals are unavailable or costly. However, directly applying or adapting these principles to match the performance of gradient-based methods on complex supervised tasks remains challenging.

Inspired by the brain’s event-driven architecture, neuromorphic computing focuses on spiking neural networks (SNNs) that communicate via discrete spike events instead of continuous-valued activations. Conventional backpropagation becomes difficult in spiking systems due to the non-differentiable nature of spike functions. As a result, a variety of alternative learning rules, such as Spike-Timing-Dependent Plasticity (STDP) in spiking neural networks (Song et al., 2000; Gerstner and Kistler, 2002), have emerged. STDP aligns closely with Hebbian-like principles, adjusting synaptic strengths based on the relative timing of pre- and post-synaptic spikes. The objective here is local synaptic modification driven by temporal correlations. Neuromorphic chips like IBM’s TrueNorth (Merolla et al., 2014) and Intel’s Loihi (Davies et al., 2018) have been designed to implement such models efficiently, potentially offering significant energy savings. Because learning in SNNs often occurs locally within each synapse, neuromorphic approaches can circumvent the need for global gradient signals. However, training SNNs for complex, real-world tasks comparable to those solved by deep learning remains an active research area, and performance often lags behind conventional networks. Such methods also inherently handle non-differentiable spike events, a property shared with the projection-based methods discussed in this work.

A.4 Gradient approximation and decoupled training methods

Several approaches attempt to retain some benefits of gradient-based learning while avoiding full backpropagation, often motivated by biological plausibility (e.g., the weight transport problem) or computational considerations. Target Propagation (TP) (Bengio, 2014; Lee et al., 2015) aims to compute layer-specific targets instead of gradients. An inverse mapping or autoencoder associated with each layer generates target activations that, if achieved, would reduce the global loss. The layer then updates its weights locally to better map its input to these targets. The objective is local: minimize the mismatch between layer outputs and computed targets, serving as a proxy for the global loss. TP can avoid propagating precise gradients but requires learning or defining inverse mappings, which can be challenging and potentially unstable. Equilibrium Propagation (Scellier and Bengio, 2017) is another line of work in this direction: it computes updates from differences between free and weakly clamped network states in energy-based models, avoiding explicit reverse-mode backpropagation through layers. Feedback Alignment (FA) (Lillicrap et al., 2016) replaces the transposed weight matrices used in backpropagation’s backward pass with fixed, random feedback matrices. Surprisingly, the network can learn by aligning its forward weights to leverage these random pathways for error signaling. The objective remains the global loss, but the gradient information is approximated. FA solves the weight transport problem but typically learns slower and may achieve lower final performance compared to backpropagation. Direct Feedback Alignment (DFA) (Nøkland, 2016) further simplifies this by sending the error signal directly from the output layer to each hidden layer via fixed random matrices. Decoupled Neural Interfaces (synthetic gradients) (Jaderberg et al., 2017) similarly reduce strict sequential dependencies by learning gradient predictors for intermediate modules. Layer-wise training provides another way to decouple learning. Initially popular for pre-training Deep Belief Networks (Hinton et al., 2006), this involves training layers sequentially, often using unsupervised objectives like reconstruction error before potential end-to-end fine-tuning. The objective is local per layer/stage. While useful for initialization, purely greedy layer-wise training may not yield globally optimal solutions for the final task. More recently, the Forward-Forward algorithm (Hinton, 2022) was proposed as a potential alternative inspired by biology. It discards backpropagation entirely, using two forward passes—one with positive (real) data and one with negative data—and updating weights based on a local goodness metric specific to each layer. The objective is layer-local: maximizing goodness for positive samples and minimizing it for negative samples. This avoids backpropagation but requires generating negative data and doubles the computation per update compared to a single forward pass. Its scalability and performance across diverse tasks are still under investigation. Further exploring alternatives to full backpropagation, Radhakrishnan et al. (2024) recently introduced the Average Gradient Outer Product (AGOP) as a backpropagation-free mathematical mechanism to characterize and enable feature learning. Their work demonstrates that AGOP captures learned features across diverse architectures and can instill feature learning capabilities in models like kernel machines, notably through their Recursive Feature Machine (RFM) algorithm.

A.5 Alternative mathematical optimization frameworks

Beyond heuristic or bio-inspired approaches, alternative mathematical optimization frameworks have been applied to neural network training, often by reformulating the learning problem. The Alternating Direction Method of Multipliers (ADMM) (Boyd et al., 2011) is a general framework for constrained optimization that decomposes a large problem into smaller, potentially easier subproblems that are solved iteratively. It has been explored for training neural networks, sometimes by introducing auxiliary variables and constraints to decouple layers or enforce structure (Glowinski and Marroco, 1975; Taylor et al., 2016). The Method of Auxiliary Coordinates (MAC) represents another such decomposition strategy for deeply nested systems (Carreira-Perpiñán and Wang, 2014). The objective in these frameworks is typically the original global loss, subject to reformulations. ADMM can handle non-differentiable regularizers and constraints but requires careful problem formulation, and solving the subproblems efficiently can be challenging, often involving overhead from dual variable updates or the solution of complex subproblems like large matrix inversions (Taylor et al., 2016). Block Coordinate Descent (BCD) methods optimize the network parameters block by block (e.g., layer by layer) while keeping other parameters fixed (Bertsekas, 1997). Each subproblem optimizes the global loss with respect to a subset of variables. BCD can be simpler to implement and potentially more memory-efficient than SGD for certain structures, but its convergence can be slow, dependent on the block partitioning strategy, and it may struggle with highly correlated parameters.

Crucially, the perspective of training as a feasibility problem (finding parameters 𝜽{\bm{\theta}} such that 𝒇(𝒙i,𝜽)=𝒚i{\bm{f}}({\bm{x}}_{i},{\bm{\theta}})={\bm{y}}_{i} for all ii) provides a distinct reformulation suitable for iterative projection methods like AP or DR. This “learning without loss” approach was conceptually explored by Elser (2021), who proposed using the Difference Map algorithm (related to DR) to find feasible points in the intersection of constraints derived from individual data samples. Elser demonstrated the concept with illustrative examples. The projection-based method detailed in our work builds directly on this feasibility perspective, leveraging a fine-grained decomposition based on the computation graph’s primitive functions, which allows for efficient, parallelizable projection steps.

A.6 Symbolic, logic-based, and combinatorial optimization approaches

A less common direction treats network training or design as a discrete or symbolic problem. By formulating aspects of a neural network’s parameters or structure (e.g., activation functions, connectivity) as a discrete optimization problem, one can sometimes leverage mature combinatorial solvers like SAT solvers or integer programming techniques. These approaches often arise in the context of “neuro-symbolic AI,” aiming to integrate neural learning with symbolic reasoning. The objective might be to find a network satisfying certain logical constraints or optimizing a discrete objective. However, these methods often suffer from severe scalability challenges as network dimensions grow and are typically applicable only to specific problem types or network architectures.

Appendix B PJAX: A PROJECTION-BASED NUMERICAL COMPUTATION FRAMEWORK

Building upon the reformulation of neural network training as a feasibility problem solvable via projection methods (Section 3), we introduce PJAX, a numerical computation framework designed to implement and solve such problems efficiently. PJAX aims to be an analogue of modern automatic differentiation (autodiff) libraries like Theano (Team et al., 2016), TensorFlow (Abadi et al., 2016), PyTorch (Paszke et al., 2019), and JAX (Bradbury et al., 2018). However, unlike autodiff libraries that compute gradients, PJAX’s core computational mechanism revolves around projection operators. By leveraging JAX as its backend (hence the name PJAX, with “P” signifying Projection), our framework inherits JAX’s just-in-time (JIT) compilation capabilities and seamless execution across different hardware accelerators, including CPUs, GPUs, and TPUs.

The core design principle of PJAX mirrors that of autograd frameworks: users write numerical code using functions provided by the library, and the framework automatically tracks these computations to build an underlying representation—in our case, a computation graph suitable for projection-based methods rather than gradient calculation. An optimizer module then utilizes this graph and the associated projection operators to find feasible solutions to the defined problem. The primary goal is to offer the core functionality of a projection-based computation framework with an interface familiar to users of JAX or similar libraries, complemented by a high-level API for streamlined machine learning model definition.

B.1 Core components

PJAX is built upon core components implemented using JAX primitives. Accessed only indirectly via the high-level API, these components form the foundational building blocks, implementing the essential primitive functions and projection operators required for the optimization process:

Primitive functions

correspond to the hidden function nodes in the computation graph described in Section 3.1. Examples include fundamental operations like identity, add, dot, sum_relu, max, and quantize. For each primitive function ff, we implement both its standard forward evaluation and the corresponding projection operator PGraph(f)\mathrm{P}_{\operatorname{Graph}(f)}. Detailed definitions and derivations of these projection operators are included in Section C.1.

Loss functions

correspond to the target nodes in the computation graph. For now, we provide a cross_entropy and margin_loss loss for classification tasks. Further details can be found in Section C.2.

Shape transformations,

such as index, reshape, transpose, repeat, concat, padding, and conv_patch, are treated as special no-ops nodes that manipulate the shape or layout of data without altering its numerical values. These transformations must be invertible, and PJAX implements both the forward and inverse operations. These transformations do not impose feasibility constraints themselves (i.e., they do not define sets 𝒞v{\mathcal{C}}_{v} for projection). Instead, when a projection operator P𝒞v\mathrm{P}_{{\mathcal{C}}_{v}} associated with a computational node vv needs to access values from incoming edges or distribute values to outgoing edges, these values are automatically passed through any intermediate shape transformation nodes using their forward or inverse implementations as needed. This design allows users to incorporate complex tensor manipulations common in neural networks without requiring additional projection operators.

B.2 User API

Users interact with PJAX through a high-level API designed to closely resemble the JAX / NumPy interface, facilitating adoption for those already familiar with these libraries.

Computation container

The Computation class is fundamental for objects managed by PJAX. A Computation instance can hold input data (as an Array or Parameter) or represent the symbolic output of a PJAX operation, maintaining references to the operation and its inputs. This mechanism allows PJAX to trace the sequence of operations and construct the computation graph implicitly.

Data containers

include Array (for constant inputs) and Parameter (for variables to be optimized). Both are subclasses of Computation and act as wrappers around standard JAX arrays (jax.numpy.ndarray).

API functions

provided by PJAX operate on Computation objects and return new Computation objects, thereby extending the computation graph. This includes wrappers for the core primitive functions, output constraints, and shape transformations. Furthermore, PJAX offers functions designed to mirror the jax.numpy API, such as dot (with batching semantics), matmul, swapaxes, moveaxis, expand_dims, squeeze, stack, etc. These higher-level functions are implemented internally using combinations of PJAX core functions and the vmap utility, obviating the need to define unique projection operators for each one.

Vectorization (vmap)

is supported through a utility, pjax.vmap, with a signature and semantics analogous to jax.vmap. It is used internally to implement batch-aware operations (e.g., matmul from dot) and is exposed to the user, enabling automatic vectorization of user-defined functions composed of PJAX operations. This is critical for achieving high performance on modern hardware.

B.3 Optimizer module (pjax.optim)

The pjax.optim module contains the algorithms that solve the feasibility problem defined by the computation graph. Currently available optimizers include Alternating Projections (AP), Cyclic Projections (CP), Douglas–Rachford (DR), and the Difference Map algorithm (Elser, 2003). The optimizer’s update function accepts:

  • A user-defined Python function that computes the desired output using PJAX operations. This function implicitly defines the computation graph and constraints. It is analogous to the function one might pass to jax.grad, often representing the forward pass of a model, 𝜽𝒇(𝒙,𝜽){\bm{\theta}}\mapsto{\bm{f}}({\bm{x}},{\bm{\theta}}), whose output is then constrained according to the graph (e.g., via Output Constraint nodes).

  • A dictionary (or other pytree structure) holding the current state of the Parameter objects (e.g., network weights).

The optimizer then applies the function to the parameters, computes and stores intermediate outputs, forms a bipartition of the graph, and performs a specified number of update steps using the chosen projection algorithm. Finally, it returns a dictionary containing the updated consensus values for the parameters.

B.4 High-level neural network API (pjax.nn)

Inspired by Flax, pjax.nn simplifies model definition and training via a compositional Module interface for reusable components (e.g., layers, blocks). It automates parameter handling (initialization, naming, sharing), enabling users to define complex architectures with familiar concepts, which are readily compatible with the pjax.optim module for projection-based training.

B.5 Example: MLP definition and computation graph

To illustrate how a neural network is defined using the pjax.nn API and how PJAX subsequently constructs a detailed computation graph, we consider an MLP with a single hidden layer and ReLU activation. Mathematically, this MLP is defined as

𝒇(𝒙,𝑾hidden,𝒃hidden,𝑾out)=𝑾outReLU(𝑾hidden𝒙+𝒃hidden){\bm{f}}({\bm{x}};{\bm{W}}^{\text{hidden}},{\bm{b}}^{\text{hidden}},{\bm{W}}^{\text{out}})={\bm{W}}^{\text{out}}\operatorname{ReLU}({\bm{W}}^{\text{hidden}}{\bm{x}}+{\bm{b}}^{\text{hidden}}) (13)

where 𝒙{\bm{x}} is the input, 𝑾hidden{\bm{W}}^{\text{hidden}} and 𝒃hidden{\bm{b}}^{\text{hidden}} are the weights and biases for the hidden layer, respectively, and 𝑾out{\bm{W}}^{\text{out}} represents the weights for the output layer. The corresponding PJAX code for this MLP is shown in .

import jax
import pjax
from pjax import nn, optim
class MLP(nn.Module):
def __init__(self, in_features, hidden_features, num_classes):
super().__init__()
self.hidden = nn.Linear(in_features, hidden_features)
self.relu = nn.ReLU(hidden_features)
self.out = nn.Linear(hidden_features, num_classes)
def __call__(self, x):
x = self.hidden(x)
x = self.relu(x)
x = self.out(x)
return x
model = MLP(in_features=784, hidden_features=256, num_classes=10)
params = model.init(jax.random.key(0))
optimizer = optim.DouglasRachford(steps_per_update=50)
for (x, y) in dataloader:
def loss_fn(params):
logits = model.apply(params, x)
return nn.cross_entropy(logits, y)
params, loss = optimizer.update(loss_fn, params)
Listing 1: Python code for an MLP using the pjax API, including training loop

When this MLP model is instantiated and applied to an input batch (e.g., 32 MNIST vectors, each 784784-dimensional, with a hidden layer of 1616 features and 1010 output classes), PJAX traces the operations. The resulting computation graph, shown in Fig. 7, visualizes this trace.

In this graph, nodes represent PJAX components. Array nodes hold constant data like the input batch and target data for the cross_entropy loss. Learnable parameters, whose names are assigned by our pjax.nn API, are represented as Parameter nodes; for this MLP, these include hidden.weight (corresponding to 𝑾hidden{\bm{W}}^{\text{hidden}}), relu.bias (corresponding to 𝒃hidden{\bm{b}}^{\text{hidden}} and applied at the sum_relu stage), and out.weight (corresponding to 𝑾out{\bm{W}}^{\text{out}}). The primitive functions shown are dot (scalar dot product) and sum_relu. Shape transformation nodes, specifically reshape and repeat, prepare input tensors for the batched scalar operations. For instance, to implement the batched matrix multiplication in the first linear layer (𝑾hidden𝒙{\bm{W}}^{\text{hidden}}{\bm{x}}), the input Array (32,784) and the hidden.weight (784,16) parameter are reshaped and repeated to match dimensions for the dot operation.

This graph details the concrete sequence of operations as traced by PJAX. In contrast, a conceptual illustration (as in Fig. 2) would represent each neuron’s compound operations (dot product and activation) as distinct explicit nodes with edges fanning out to all neurons in the subsequent layer, rather than utilizing PJAX’s explicit shape transformations for vectorized scalar primitives. Another minor technical difference is that the conceptual graph does not include a node for the target data, rather, it’s implicitly represented in the loss function.

Figure 7: PJAX computation graph for the 1616-neuron hidden layer MLP (), processing a batch of 3232 MNIST samples. Node sublabels indicate tensor shapes.

Appendix C PROJECTION OPERATORS

Here we provide the mathematical details underpinning the projection steps central to our method (Section 3). These steps form the computational core of each iteration within the projection algorithms used for training (Algorithm 1). We begin by presenting the theorem that justifies how projections onto hidden function node constraints are computed by leveraging projections onto the graphs of the underlying primitive functions (Theorem 3). Subsequently, in Section C.1, we detail the specific orthogonal projection operators onto the graphs (Graph(f)\operatorname{Graph}(f)) for various primitive functions commonly used in neural networks, such as linear operations, activations, and pooling. Finally, Section C.2 describes the operators employed at the output nodes to enforce conditions derived from the learning objective.

Theorem 3 (Projection onto consensus sets).

Let 𝒞¯dx×dy\bar{{\mathcal{C}}}\subseteq\mathbb{R}^{d_{x}}\times\mathbb{R}^{d_{y}} be a non-empty closed set (e.g., the graph of a primitive function). The associated consensus set 𝒞dx×(dy)n{\mathcal{C}}\subseteq\mathbb{R}^{d_{x}}\times(\mathbb{R}^{d_{y}})^{n} is

𝒞={(𝒘,𝒖1,,𝒖n)(𝒘,𝒖i)𝒞¯i=1,,n}.{\mathcal{C}}=\left\{({\bm{w}},{\bm{u}}_{1},\dots,{\bm{u}}_{n})\mid({\bm{w}},{\bm{u}}_{i})\in\bar{{\mathcal{C}}}\forall i=1,\dots,n\right\}. (14)

Given a point 𝐳0=(𝐱0,𝐲0,1,,𝐲0,n){\bm{z}}_{0}=({\bm{x}}_{0},{\bm{y}}_{0,1},\dots,{\bm{y}}_{0,n}), a projection onto 𝒞{\mathcal{C}} can be computed as follows:

  1. 1.

    Compute the average 𝒚{\bm{y}} component: 𝒚¯0=1ni=1n𝒚0,i\bar{{\bm{y}}}_{0}=\frac{1}{n}\sum_{i=1}^{n}{\bm{y}}_{0,i}.

  2. 2.

    Choose a minimizer of the weighted projection problem for the pair (𝒙0,𝒚¯0)({\bm{x}}_{0},\bar{{\bm{y}}}_{0}) onto the base set 𝒞¯\bar{{\mathcal{C}}}:

    (𝒙,𝒚¯)argmin(𝐰,𝐮¯)𝒞¯(𝐰𝐱02+n𝐮¯𝐲¯02).({\bm{x}},\bar{{\bm{y}}})\in\argmin_{({\bm{w}},\bar{{\bm{u}}})\in\bar{{\mathcal{C}}}}\left(\left\|{\bm{w}}-{\bm{x}}_{0}\right\|^{2}+n\left\|\bar{{\bm{u}}}-\bar{{\bm{y}}}_{0}\right\|^{2}\right). (15)
  3. 3.

    A projection onto the consensus set 𝒞{\mathcal{C}} is formed by replicating the 𝒚¯\bar{{\bm{y}}} component:

    (𝒙,𝒚¯,,𝒚¯n times).({\bm{x}},\underbrace{\bar{{\bm{y}}},\dots,\bar{{\bm{y}}}}_{n\text{ times}}). (16)

This theorem justifies the projection procedure for function nodes described in Section 3. In that context, 𝒞¯=Graph(fv)\bar{{\mathcal{C}}}=\operatorname{Graph}(f_{v}), 𝐱0{\bm{x}}_{0} holds incoming edge values (zuv)(z_{uv}), 𝐲0,i{\bm{y}}_{0,i} hold outgoing values zvwz_{vw}, and n=|𝒩+(v)|n=|{\mathcal{N}}^{+}(v)|. Step 2 yields the updated incoming values 𝐱{\bm{x}} (new (zuv)(z_{uv})) and the single consensus outgoing value 𝐲¯\bar{{\bm{y}}} (new zoutz_{\text{out}}). Step 3 constructs the state update for 𝐳{\bm{z}}.

For simplicity, our implementation uses a standard projection onto 𝒞¯\bar{{\mathcal{C}}} in Step 2, rather than the theoretically derived weighted projection. While this alters the exact projection dynamics, any resulting fixed point still satisfies both the consensus requirement and the base constraint (𝐱,𝐲¯)𝒞¯({\bm{x}},\bar{{\bm{y}}})\in\bar{{\mathcal{C}}}.

Proof.

Let 𝒛0=(𝒙0,𝒚0,1,,𝒚0,n){\bm{z}}_{0}=({\bm{x}}_{0},{\bm{y}}_{0,1},\dots,{\bm{y}}_{0,n}). We seek a projection of 𝒛0{\bm{z}}_{0} onto 𝒞{\mathcal{C}}, i.e. a point (𝒙,𝒚1,,𝒚n)𝒞({\bm{x}},{\bm{y}}_{1},\dots,{\bm{y}}_{n})\in{\mathcal{C}} minimizing the squared Euclidean distance ff to 𝒛0{\bm{z}}_{0}. We use (𝒘,𝒖1,,𝒖n)({\bm{w}},{\bm{u}}_{1},\dots,{\bm{u}}_{n}) as dummy variables for points in 𝒞{\mathcal{C}}

min(𝒘,𝒖1,,𝒖n)𝒞(𝒘𝒙02+i=1n𝒖i𝒚0,i2).\min_{({\bm{w}},{\bm{u}}_{1},\dots,{\bm{u}}_{n})\in{\mathcal{C}}}\left(\left\|{\bm{w}}-{\bm{x}}_{0}\right\|^{2}+\sum_{i=1}^{n}\left\|{\bm{u}}_{i}-{\bm{y}}_{0,i}\right\|^{2}\right). (17)

The constraint (𝒘,𝒖i)𝒞¯({\bm{w}},{\bm{u}}_{i})\in\bar{{\mathcal{C}}} for all ii implies that any feasible point must satisfy 𝒖1==𝒖n=𝒖¯{\bm{u}}_{1}=\dots={\bm{u}}_{n}=\bar{{\bm{u}}} for some 𝒖¯\bar{{\bm{u}}} where (𝒘,𝒖¯)𝒞¯({\bm{w}},\bar{{\bm{u}}})\in\bar{{\mathcal{C}}}. The problem reduces to finding (𝒘,𝒖¯)𝒞¯({\bm{w}},\bar{{\bm{u}}})\in\bar{{\mathcal{C}}} that minimizes

f(𝒘,𝒖¯)=𝒘𝒙02+i=1n𝒖¯𝒚0,i2.f({\bm{w}},\bar{{\bm{u}}})=\left\|{\bm{w}}-{\bm{x}}_{0}\right\|^{2}+\sum_{i=1}^{n}\left\|\bar{{\bm{u}}}-{\bm{y}}_{0,i}\right\|^{2}. (18)

Let 𝒚¯0=1ni=1n𝒚0,i\bar{{\bm{y}}}_{0}=\frac{1}{n}\sum_{i=1}^{n}{\bm{y}}_{0,i}. Using the identity i=1nabi2=nab¯2+i=1nb¯bi2\sum_{i=1}^{n}\left\|a-b_{i}\right\|^{2}=n\left\|a-\bar{b}\right\|^{2}+\sum_{i=1}^{n}\left\|\bar{b}-b_{i}\right\|^{2}, the sum term becomes

i=1n𝒖¯𝒚0,i2=n𝒖¯𝒚¯02+i=1n𝒚¯0𝒚0,i2.\sum_{i=1}^{n}\left\|\bar{{\bm{u}}}-{\bm{y}}_{0,i}\right\|^{2}=n\left\|\bar{{\bm{u}}}-\bar{{\bm{y}}}_{0}\right\|^{2}+\sum_{i=1}^{n}\left\|\bar{{\bm{y}}}_{0}-{\bm{y}}_{0,i}\right\|^{2}. (19)

Substituting this into f(𝒘,𝒖¯)f({\bm{w}},\bar{{\bm{u}}}), the minimization problem is equivalent (since the last term is constant w.r.t. 𝒘,𝒖¯{\bm{w}},\bar{{\bm{u}}}) to

min(𝒘,𝒖¯)𝒞¯(𝒘𝒙02+n𝒖¯𝒚¯02).\min_{({\bm{w}},\bar{{\bm{u}}})\in\bar{{\mathcal{C}}}}\left(\left\|{\bm{w}}-{\bm{x}}_{0}\right\|^{2}+n\left\|\bar{{\bm{u}}}-\bar{{\bm{y}}}_{0}\right\|^{2}\right). (20)

Any minimizer (𝒙,𝒚¯)({\bm{x}},\bar{{\bm{y}}}) of Eq. 15 yields a projection onto 𝒞{\mathcal{C}}. Such a projection is constructed by replicating 𝒚¯\bar{{\bm{y}}}, yielding (𝒙,𝒚¯,,𝒚¯n times)({\bm{x}},\underbrace{\bar{{\bm{y}}},\dots,\bar{{\bm{y}}}}_{n\text{ times}}), as stated in step 3. ∎

C.1 Projection operators for primitive functions

Below, we detail and derive the projection operators onto the graphs of several primitive functions used within the PJAX framework. Recall that for a function f:nmf:\mathbb{R}^{n}\to\mathbb{R}^{m}, its graph is defined as Graph(f)={(𝒙,f(𝒙))𝒙n}\operatorname{Graph}(f)=\{({\bm{x}},f({\bm{x}}))\mid{\bm{x}}\in\mathbb{R}^{n}\}. The projection onto this graph, PGraph(f)(𝒙0,𝒚0)\mathrm{P}_{\operatorname{Graph}(f)}({\bm{x}}_{0},{\bm{y}}_{0}), finds the point on the graph closest to (𝒙0,𝒚0)({\bm{x}}_{0},{\bm{y}}_{0}).

Table 1: Summary of primitive functions presented.
Function Definition Theorem Reference
Identity f(x)=xf(x)=x Theorem 4
Sum f(𝒙)=𝟏𝒙f({\bm{x}})={\bm{1}}^{\top}{\bm{x}} Theorem 5
ReLU of summation f(𝒙)=max{0,𝟏𝒙}f({\bm{x}})=\max\{0,{\bm{1}}^{\top}{\bm{x}}\} Theorem 6
Dot Product f(𝒙,𝒚)=𝒙,𝒚f({\bm{x}},{\bm{y}})=\langle{\bm{x}},{\bm{y}}\rangle Theorem 7
Maximum f(𝒙)=maxi{xi}f({\bm{x}})=\max_{i}\{x_{i}\} Theorem 8
Quantization f(x)f(x) maps xx to nearest in ZZ Theorem 9
Theorem 4 (Identity).

The projection operator onto the graph of the identity function id(x)=x\operatorname{id}(x)=x (xx\in\mathbb{R}) is given by an average

PGraph(id)(x0,y0)=(x0+y02,x0+y02).\mathrm{P}_{\operatorname{Graph}(\operatorname{id})}(x_{0},y_{0})=\left(\frac{x_{0}+y_{0}}{2},\frac{x_{0}+y_{0}}{2}\right). (21)
Proof.

We seek the point (x,x)(x,x) on the line y=xy=x that is closest to (x0,y0)(x_{0},y_{0}). This involves minimizing the squared distance (xx0)2+(xy0)2(x-x_{0})^{2}+(x-y_{0})^{2}. Standard calculus techniques (setting the derivative with respect to xx to zero) or geometric reasoning show that the minimum occurs when x=(x0+y0)/2x=(x_{0}+y_{0})/2. Since the graph is a line (closed and convex), the projection is unique. ∎

Theorem 5 (Sum).

Let sum:n\operatorname{sum}:\mathbb{R}^{n}\to\mathbb{R} be the summation function sum(𝐱)=𝟏𝐱\operatorname{sum}({\bm{x}})={\bm{1}}^{\top}{\bm{x}}. The projection of (𝐱0,y0)n×({\bm{x}}_{0},y_{0})\in\mathbb{R}^{n}\times\mathbb{R} onto its graph is

PGraph(sum)(𝒙0,y0)=(𝒙0+λ𝟏,y0λ),whereλ=y0𝟏𝒙0n+1.\mathrm{P}_{\operatorname{Graph}(\operatorname{sum})}({\bm{x}}_{0},y_{0})=\left({\bm{x}}_{0}+\lambda{\bm{1}},y_{0}-\lambda\right),\quad\text{where}\quad\lambda=\frac{y_{0}-{\bm{1}}^{\top}{\bm{x}}_{0}}{n+1}. (22)
Proof.

We seek the point (𝒙,y)({\bm{x}},y) on the hyperplane y=𝟏𝒙y={\bm{1}}^{\top}{\bm{x}} that minimizes the squared distance 𝒙𝒙02+(yy0)2\left\|{\bm{x}}-{\bm{x}}_{0}\right\|^{2}+(y-y_{0})^{2}. Geometrically, the vector connecting (𝒙0,y0)({\bm{x}}_{0},y_{0}) to its projection (𝒙,y)({\bm{x}},y) must be orthogonal to the hyperplane. The normal vector to the hyperplane y𝟏𝒙=0y-{\bm{1}}^{\top}{\bm{x}}=0 is (𝟏,1)(-{\bm{1}},1). Thus, (𝒙𝒙0,yy0)({\bm{x}}-{\bm{x}}_{0},y-y_{0}) must be proportional to (𝟏,1)(-{\bm{1}},1). Setting (𝒙𝒙0,yy0)=λ(𝟏,1)({\bm{x}}-{\bm{x}}_{0},y-y_{0})=-\lambda(-{\bm{1}},1) gives 𝒙=𝒙0+λ𝟏{\bm{x}}={\bm{x}}_{0}+\lambda{\bm{1}} and y=y0λy=y_{0}-\lambda. Substituting into the hyperplane equation y=𝟏𝒙y={\bm{1}}^{\top}{\bm{x}} allows solving for λ=(y0𝟏𝒙0)/(n+1)\lambda=(y_{0}-{\bm{1}}^{\top}{\bm{x}}_{0})/(n+1). The graph is an affine subspace (closed and convex), guaranteeing a unique projection. ∎

Theorem 6 (ReLU of summation).

Define SumReLU(𝐱)=max{0,𝟏𝐱}\operatorname{SumReLU}({\bm{x}})=\max\{0,{\bm{1}}^{\top}{\bm{x}}\} for 𝐱n{\bm{x}}\in\mathbb{R}^{n}. The graph 𝒞=Graph(SumReLU){\mathcal{C}}=\operatorname{Graph}(\operatorname{SumReLU}) consists of two parts (𝒞=𝒞1𝒞2{\mathcal{C}}={\mathcal{C}}_{1}\cup{\mathcal{C}}_{2}):

  1. 1.

    The “flat” region 𝒞1={(𝒙,y)𝟏𝒙0,y=0}{\mathcal{C}}_{1}=\{({\bm{x}},y)\mid{\bm{1}}^{\top}{\bm{x}}\leq 0,y=0\}.

  2. 2.

    The “sloped” region 𝒞2={(𝒙,y)𝟏𝒙0,y=𝟏𝒙}{\mathcal{C}}_{2}=\{({\bm{x}},y)\mid{\bm{1}}^{\top}{\bm{x}}\geq 0,y={\bm{1}}^{\top}{\bm{x}}\}.

The projection of a point (𝐱0,y0)n×({\bm{x}}_{0},y_{0})\in\mathbb{R}^{n}\times\mathbb{R} onto the graph is found by projecting onto these two regions and selecting the candidate closest to (𝐱0,y0)({\bm{x}}_{0},y_{0}):

  1. 1.

    Candidate 1, (𝒙(1),y(1))=P𝒞1(𝒙0,y0)({\bm{x}}^{(1)},y^{(1)})=\mathrm{P}_{{\mathcal{C}}_{1}}({\bm{x}}_{0},y_{0}), is given by

    𝒙(1)=𝒙0max{0,𝟏𝒙0n}𝟏,y(1)=0.{\bm{x}}^{(1)}={\bm{x}}_{0}-\max\left\{0,\frac{{\bm{1}}^{\top}{\bm{x}}_{0}}{n}\right\}{\bm{1}},\qquad y^{(1)}=0. (23)
  2. 2.

    Candidate 2, (𝒙(2),y(2))=P𝒞2(𝒙0,y0)({\bm{x}}^{(2)},y^{(2)})=\mathrm{P}_{{\mathcal{C}}_{2}}({\bm{x}}_{0},y_{0}), is computed by first projecting onto the hyperplane y=𝟏𝒙y={\bm{1}}^{\top}{\bm{x}}:

    (𝒙^,y^)=(𝒙0+λ𝟏,y0λ),where λ=y0𝟏𝒙0n+1.(\hat{{\bm{x}}},\hat{y})=({\bm{x}}_{0}+\lambda{\bm{1}},y_{0}-\lambda),\quad\text{where }\lambda=\frac{y_{0}-{\bm{1}}^{\top}{\bm{x}}_{0}}{n+1}. (24)

    Then, the projection onto 𝒞2{\mathcal{C}}_{2} is determined by whether (𝒙^,y^)(\hat{{\bm{x}}},\hat{y}) satisfies the non-negativity constraint

    (𝒙(2),y(2))={(𝒙^,y^)if 𝟏𝒙^0(𝒙0𝟏𝒙0n𝟏,0)otherwise.({\bm{x}}^{(2)},y^{(2)})=\begin{cases}(\hat{{\bm{x}}},\hat{y})&\text{if }{\bm{1}}^{\top}\hat{{\bm{x}}}\geq 0\\ \left({\bm{x}}_{0}-\frac{{\bm{1}}^{\top}{\bm{x}}_{0}}{n}{\bm{1}},0\right)&\text{otherwise.}\end{cases} (25)

Finally, select

PGraph(SumReLU)(𝒙0,y0)=argmin(𝐱,y){(𝐱(1),y(1)),(𝐱(2),y(2))}(𝐱,y)(𝐱0,y0)2.\mathrm{P}_{\operatorname{Graph}(\operatorname{SumReLU})}({\bm{x}}_{0},y_{0})=\argmin_{({\bm{x}},y)\in\{({\bm{x}}^{(1)},y^{(1)}),({\bm{x}}^{(2)},y^{(2)})\}}\left\|({\bm{x}},y)-({\bm{x}}_{0},y_{0})\right\|^{2}. (26)
Proof.

The graph 𝒞=Graph(SumReLU)\mathcal{C}=\operatorname{Graph}(\operatorname{SumReLU}) is the union of two closed convex sets, 𝒞1\mathcal{C}_{1} and 𝒞2\mathcal{C}_{2}. The projection P𝒞(𝒙0,y0)\mathrm{P}_{{\mathcal{C}}}({\bm{x}}_{0},y_{0}) is therefore the point closer to (𝒙0,y0)({\bm{x}}_{0},y_{0}) among the projections onto 𝒞1{\mathcal{C}}_{1} and 𝒞2{\mathcal{C}}_{2}. These projections minimize the squared Euclidean distance from (𝐱0,y0)(\mathbf{x}_{0},y_{0}) subject to the constraints defining each set. Solving this minimization, for instance using the method of Lagrange multipliers, yields the formulas presented in the theorem. ∎

Theorem 7 (Dot product).

Let dot(𝐱,𝐲)=𝐱,𝐲\operatorname{dot}({\bm{x}},{\bm{y}})=\langle{\bm{x}},{\bm{y}}\rangle for 𝐱,𝐲n{\bm{x}},{\bm{y}}\in\mathbb{R}^{n}. For a point (𝐱0,𝐲0,z0)n×n×({\bm{x}}_{0},{\bm{y}}_{0},z_{0})\in\mathbb{R}^{n}\times\mathbb{R}^{n}\times\mathbb{R} with 𝐱0±𝐲0{\bm{x}}_{0}\neq\pm{\bm{y}}_{0}, the orthogonal projection onto the graph Graph(dot)\operatorname{Graph}(\operatorname{dot}) is unique and given by

PGraph(dot)(𝒙0,𝒚0,z0)=(𝒙(λ),𝒚(λ),z0λ),\mathrm{P}_{\operatorname{Graph}(\operatorname{dot})}({\bm{x}}_{0},{\bm{y}}_{0},z_{0})=\left({\bm{x}}(\lambda),{\bm{y}}(\lambda),z_{0}-\lambda\right), (27)

where

𝒙(λ)=𝒙0+λ𝒚01λ2,𝒚(λ)=𝒚0+λ𝒙01λ2.{\bm{x}}(\lambda)=\frac{{\bm{x}}_{0}+\lambda{\bm{y}}_{0}}{1-\lambda^{2}},\quad{\bm{y}}(\lambda)=\frac{{\bm{y}}_{0}+\lambda{\bm{x}}_{0}}{1-\lambda^{2}}. (28)

The scalar parameter λ\lambda is the unique root in ]1,1[]-1,1[ of the function

f(λ)=(1+λ2)p+λq(1λ2)2z0+λ=0,f(\lambda)=\frac{(1+\lambda^{2})p+\lambda q}{(1-\lambda^{2})^{2}}-z_{0}+\lambda=0, (29)

with p=𝐱0,𝐲0p=\langle{\bm{x}}_{0},{\bm{y}}_{0}\rangle and q=𝐱02+𝐲02q=\left\|{\bm{x}}_{0}\right\|^{2}+\left\|{\bm{y}}_{0}\right\|^{2}. This root can be efficiently found using Newton’s method. Practically, 5 to 10 iterations starting from λ=0\lambda=0 are sufficient to converge to a solution with high accuracy.

Proof.

We seek the point (𝒙,𝒚,z)({\bm{x}},{\bm{y}},z) on the graph z=𝒙,𝒚z=\langle{\bm{x}},{\bm{y}}\rangle that minimizes the squared Euclidean distance 𝒙𝒙02+𝒚𝒚02+(zz0)2\left\|{\bm{x}}-{\bm{x}}_{0}\right\|^{2}+\left\|{\bm{y}}-{\bm{y}}_{0}\right\|^{2}+(z-z_{0})^{2}. This is equivalent to minimizing the unconstrained function

g(𝒙,𝒚)=𝒙𝒙02+𝒚𝒚02+(𝒙,𝒚z0)2g({\bm{x}},{\bm{y}})=\left\|{\bm{x}}-{\bm{x}}_{0}\right\|^{2}+\left\|{\bm{y}}-{\bm{y}}_{0}\right\|^{2}+(\langle{\bm{x}},{\bm{y}}\rangle-z_{0})^{2} (30)

over (𝒙,𝒚)n×n({\bm{x}},{\bm{y}})\in\mathbb{R}^{n}\times\mathbb{R}^{n}. Existence of a minimum is guaranteed as gg is continuous and coercive. The first-order optimality conditions are 𝒙g=𝟎\nabla_{{\bm{x}}}g={\bm{0}} and 𝒚g=𝟎\nabla_{{\bm{y}}}g={\bm{0}}. Let λ=z0𝒙,𝒚\lambda=z_{0}-\langle{\bm{x}},{\bm{y}}\rangle. The conditions simplify to

𝒙=𝒙0+λ𝒚and𝒚=𝒚0+λ𝒙.{\bm{x}}={\bm{x}}_{0}+\lambda{\bm{y}}\quad\text{and}\quad{\bm{y}}={\bm{y}}_{0}+\lambda{\bm{x}}. (31)

Solving this linear system for 𝒙{\bm{x}} and 𝒚{\bm{y}} (assuming λ21\lambda^{2}\neq 1, which holds for the minimum when 𝒙0±𝒚0{\bm{x}}_{0}\neq\pm{\bm{y}}_{0}) yields

𝒙(λ)=𝒙0+λ𝒚01λ2,𝒚(λ)=𝒚0+λ𝒙01λ2.{\bm{x}}(\lambda)=\frac{{\bm{x}}_{0}+\lambda{\bm{y}}_{0}}{1-\lambda^{2}},\quad{\bm{y}}(\lambda)=\frac{{\bm{y}}_{0}+\lambda{\bm{x}}_{0}}{1-\lambda^{2}}. (32)

Substituting these back into the definition λ=z0𝒙(λ),𝒚(λ)\lambda=z_{0}-\langle{\bm{x}}(\lambda),{\bm{y}}(\lambda)\rangle and simplifying leads to the condition f(λ)=0f(\lambda)=0 as defined in Eq. 29, where p=𝒙0,𝒚0p=\langle{\bm{x}}_{0},{\bm{y}}_{0}\rangle and q=𝒙02+𝒚02q=\left\|{\bm{x}}_{0}\right\|^{2}+\left\|{\bm{y}}_{0}\right\|^{2}. Analogous to the analysis for projections onto hyperbolas, the function f(λ)f(\lambda) has a unique root in ]1,1[]-1,1[ when 𝒙0±𝒚0{\bm{x}}_{0}\neq\pm{\bm{y}}_{0}, ensuring a unique projection (Bauschke et al., 2022). The zz component of the projection is z=𝒙(λ),𝒚(λ)=z0λz=\langle{\bm{x}}(\lambda),{\bm{y}}(\lambda)\rangle=z_{0}-\lambda. ∎

Theorem 8 (Maximum).

Let max:n\operatorname{max}:\mathbb{R}^{n}\to\mathbb{R} be the maximum function max(𝐱)=maxi{xi}\operatorname{max}({\bm{x}})=\max_{i}\{x_{i}\}. To project (𝐱0,y0)({\bm{x}}_{0},y_{0}) onto the graph y=max(𝐱)y=\operatorname{max}({\bm{x}}), first sort 𝐱0{\bm{x}}_{0} such that x0,1x0,nx_{0,1}\leq\ldots\leq x_{0,n} (and note the permutation used). Then, for k=1,,nk=1,\ldots,n, generate candidate points (𝐱(k),y(k))({\bm{x}}^{(k)},y^{(k)}) based on the hypothesis that the maximum yy is achieved by components xk,,xnx_{k},\ldots,x_{n}:

y(k)=(i=knx0,i)+y0nk+2and𝒙i(k)={y(k),if ikx0,i,if i<ky^{(k)}=\frac{\left(\sum_{i=k}^{n}x_{0,i}\right)+y_{0}}{n-k+2}\qquad\text{and}\qquad{\bm{x}}^{(k)}_{i}=\begin{cases}y^{(k)},&\text{if }i\geq k\\ x_{0,i},&\text{if }i<k\end{cases} (33)

A candidate (𝐱(k),y(k))({\bm{x}}^{(k)},y^{(k)}) is valid if max(𝐱(k))=y(k)\max({\bm{x}}^{(k)})=y^{(k)}. Given the sorted input, this simplifies to checking x0,k1y(k)x_{0,k-1}\leq y^{(k)} (for k>1k>1; k=1k=1 is always valid). A projection is found by selecting a valid candidate (𝐱(k),y(k))({\bm{x}}^{(k)},y^{(k)}) that minimizes the distance (𝐱(k),y(k))(𝐱0,y0)2\left\|({\bm{x}}^{(k)},y^{(k)})-({\bm{x}}_{0},y_{0})\right\|^{2}. The final vector 𝐱{\bm{x}} must be permuted back to the original order.

Proof.

We minimize the squared distance f(𝒙,y)=𝒙𝒙02+(yy0)2f({\bm{x}},y)=\left\|{\bm{x}}-{\bm{x}}_{0}\right\|^{2}+(y-y_{0})^{2} subject to y=maxixiy=\max_{i}x_{i}. The graph of the maximum function is closed, so a projection exists. Let (𝒙,y)({\bm{x}},y) be a projection, and let I={ixi=y}I=\{i\mid x_{i}=y\} be the non-empty set of indices achieving the maximum. For iIi\notin I, optimality forces xi=x0,ix_{i}=x_{0,i}; otherwise one could move xix_{i} toward x0,ix_{0,i} while keeping xiyx_{i}\leq y and decrease ff. Hence x0,iyx_{0,i}\leq y for all iIi\notin I. After sorting 𝒙0{\bm{x}}_{0}, if there exist indices i<ji<j with iIi\in I and jIj\notin I, then replacing (xi,xj)=(y,x0,j)(x_{i},x_{j})=(y,x_{0,j}) by (x0,i,y)(x_{0,i},y) preserves feasibility and does not increase the objective, since x0,ix0,jyx_{0,i}\leq x_{0,j}\leq y. Repeating this exchange yields a projection whose active set is of the form I={k,,n}I=\{k,\dots,n\} for some k{1,,n}k\in\{1,\dots,n\}. For such a suffix active set, we have xi=yx_{i}=y for iki\geq k and xi=x0,ix_{i}=x_{0,i} for i<ki<k. The objective thus reduces to minimizing

g(y)=i=kn(x0,iy)2+(y0y)2g(y)=\sum_{i=k}^{n}(x_{0,i}-y)^{2}+(y_{0}-y)^{2} (34)

with respect to yy. Setting the derivative g(y)=0g^{\prime}(y)=0 gives the value y=y(k)y=y^{(k)} defined in the theorem, with corresponding candidate 𝒙(k){\bm{x}}^{(k)}. This candidate assumes the structure holds, which requires the validity check x0,k1y(k)x_{0,k-1}\leq y^{(k)} (for k>1k>1). These nn candidates cover all possible active sets of the form I={k,,n}I=\{k,\dots,n\} for a projection, so any valid candidate minimizing ff is a projection. The k=1k=1 candidate is always valid, ensuring the candidate list is non-empty. ∎

Theorem 9 (Quantization).

Let quant:\operatorname{quant}:\mathbb{R}\to\mathbb{R} be the quantization function that maps a real number xx to the nearest point in a set Z={z1,z2,,zk}Z=\{z_{1},z_{2},\ldots,z_{k}\} of k2k\geq 2 equidistant points within [α,α][-\alpha,\alpha], where α>0\alpha>0. Specifically, the points ziz_{i} are given by

zi=α+(i1)2αk1for i=1,,k.z_{i}=-\alpha+(i-1)\frac{2\alpha}{k-1}\quad\text{for }i=1,\dots,k. (35)

The function partitions the real line into intervals IiI_{i} such that quant(x)=zi\operatorname{quant}(x)=z_{i} for xIix\in I_{i}. These intervals are defined by the k1k-1 midpoints mi=(zi+zi+1)/2m_{i}=(z_{i}+z_{i+1})/2 for i=1,,k1i=1,\ldots,k-1:

I1=(,m1]I_{1}=(-\infty,m_{1}] (36)
Ii=(mi1,mi]for i=2,,k1I_{i}=(m_{i-1},m_{i}]\quad\text{for }i=2,\ldots,k-1 (37)
Ik=(mk1,)I_{k}=(m_{k-1},\infty) (38)

The graph of the quantization function is the union of horizontal line segments and rays

Graph(quant)=i=1k(Ii×{zi})\operatorname{Graph}(\operatorname{quant})=\bigcup_{i=1}^{k}(I_{i}\times\{z_{i}\}) (39)

This set is generally non-convex.

To project a point (x0,y0)×(x_{0},y_{0})\in\mathbb{R}\times\mathbb{R} onto this graph, first compute kk candidate points (x(i),y(i))(x^{(i)},y^{(i)}) by projecting x0x_{0} onto each interval IiI_{i} and keeping the corresponding yy value ziz_{i}:

(x(i),y(i))=(PIi(x0),zi)for i=1,,k.(x^{(i)},y^{(i)})=(\mathrm{P}_{I_{i}}(x_{0}),z_{i})\qquad\text{for }i=1,\ldots,k. (40)

The projection PGraph(quant)(x0,y0)\mathrm{P}_{\operatorname{Graph}(\operatorname{quant})}(x_{0},y_{0}) is then given by the candidate (x(i),y(i))(x^{(i)},y^{(i)}) that is closest to (x0,y0)(x_{0},y_{0}):

PGraph(quant)(x0,y0)=argmini{1,,k}(x(i),y(i))(x0,y0)2.\mathrm{P}_{\operatorname{Graph}(\operatorname{quant})}(x_{0},y_{0})=\argmin_{i\in\{1,\ldots,k\}}\left\|(x^{(i)},y^{(i)})-(x_{0},y_{0})\right\|^{2}. (41)

Note that since the graph is non-convex, the minimum distance might be achieved by multiple candidates; the argmin\argmin selects one such point (consistent with Eq. 1).

Proof.

We seek (x,y)Graph(quant)(x,y)\in\operatorname{Graph}(\operatorname{quant}) that minimizes the squared distance (x,y)(x0,y0)2\left\|(x,y)-(x_{0},y_{0})\right\|^{2}. The graph is the union of closed, non-convex pieces, hence a minimum distance exists, but the projection is not necessarily unique.

The minimizing point (x,y)(x,y) must belong to some piece 𝒞j=Ij×{zj}{\mathcal{C}}_{j}=I_{j}\times\{z_{j}\}. Consider the minimization restricted to an arbitrary but fixed piece 𝒞i=Ii×{zi}{\mathcal{C}}_{i}=I_{i}\times\{z_{i}\}. A point (x,zi)(x,z_{i}) on this piece minimizes (x,zi)(x0,y0)2\left\|(x,z_{i})-(x_{0},y_{0})\right\|^{2} subject to xIix\in I_{i}. This is equivalent to finding xIix\in I_{i} that minimizes (xx0)2(x-x_{0})^{2}, whose solution is x=PIi(x0)x=\mathrm{P}_{I_{i}}(x_{0}). This identifies the candidate (x(i),y(i))=(PIi(x0),zi)(x^{(i)},y^{(i)})=(\mathrm{P}_{I_{i}}(x_{0}),z_{i}) as the closest point on 𝒞i{\mathcal{C}}_{i} to (x0,y0)(x_{0},y_{0}).

The overall projection is the candidate (x(j),y(j))(x^{(j)},y^{(j)}) that yields the minimum squared distance (x(i),y(i))(x0,y0)2\left\|(x^{(i)},y^{(i)})-(x_{0},y_{0})\right\|^{2} among all i{1,,k}i\in\{1,\ldots,k\}, as stated in the theorem. ∎

C.2 Output operators

This subsection describes operators used at the output nodes (Section 3) to enforce conditions derived from the task’s loss function. We provide the projection operators for the margin loss constraint and the proximal operator for the cross-entropy loss function.

Theorem 10 (Margin loss constraint).

Consider a classification setting where the goal is to enforce a condition on a single logit output xx\in\mathbb{R} based on a label yy\in\mathbb{R}. The margin loss constraint requires the logit to be non-positive for negative labels and greater than or equal to a positive margin m>0m>0 for positive labels. Let the constraint set 𝒞y,m{\mathcal{C}}_{y,m} be defined as

𝒞y,m={(,0]if y0[m,)otherwise.{\mathcal{C}}_{y,m}=\begin{cases}(-\infty,0]&\text{if }y\leq 0\\ [m,\infty)&\text{otherwise.}\end{cases} (42)

The orthogonal projection of a point x0x_{0}\in\mathbb{R} onto this set is given by

P𝒞y,m(x0)={min(x0,0)if y0max(x0,m)otherwise.\mathrm{P}_{{\mathcal{C}}_{y,m}}(x_{0})=\begin{cases}\min(x_{0},0)&\text{if }y\leq 0\\ \max(x_{0},m)&\text{otherwise.}\end{cases} (43)
Proof.

We seek x𝒞y,mx\in{\mathcal{C}}_{y,m} that minimizes (xx0)2(x-x_{0})^{2}. Case 1: y0y\leq 0. We need x(,0]x\in(-\infty,0]. If x00x_{0}\leq 0, then x0x_{0} is already in the set, and the minimum distance (zero) is achieved at x=x0x=x_{0}. If x0>0x_{0}>0, the closest point in (,0](-\infty,0] is x=0x=0. Thus, the projection is min(x0,0)\min(x_{0},0). Case 2: y>0y>0. We need x[m,)x\in[m,\infty). If x0mx_{0}\geq m, then x0x_{0} is in the set, and the minimum distance is achieved at x=x0x=x_{0}. If x0<mx_{0}<m, the closest point in [m,)[m,\infty) is x=mx=m. Thus, the projection is max(x0,m)\max(x_{0},m). Combining both cases yields the stated formula. ∎

Theorem 11 (Proximal operator for cross-entropy loss).

Let CE:d×d\ell_{CE}:\mathbb{R}^{d}\times\mathbb{R}^{d}\to\mathbb{R} be the standard cross-entropy loss function for multi-class classification, defined for logits 𝐱d{\bm{x}}\in\mathbb{R}^{d} and a one-hot encoded target label vector 𝐲{0,1}d{\bm{y}}\in\{0,1\}^{d} (with 𝟏𝐲=1{\bm{1}}^{\top}{\bm{y}}=1) as

CE(𝒙,𝒚)=log(j=1dexj)𝒚,𝒙.\ell_{CE}({\bm{x}},{\bm{y}})=\log\left(\sum_{j=1}^{d}e^{x_{j}}\right)-\langle{\bm{y}},{\bm{x}}\rangle. (44)

The proximal operator of this loss function, scaled by λ>0\lambda>0, applied to a point 𝐱0d{\bm{x}}_{0}\in\mathbb{R}^{d} is defined as

proxλCE(,𝒚)(𝒙0)=argmin𝐱d(λCE(𝐱,𝐲)+12𝐱𝐱02).\operatorname{prox}_{\lambda\ell_{CE}(\cdot,{\bm{y}})}({\bm{x}}_{0})=\argmin_{{\bm{x}}\in\mathbb{R}^{d}}\left(\lambda\ell_{CE}({\bm{x}},{\bm{y}})+\frac{1}{2}\left\|{\bm{x}}-{\bm{x}}_{0}\right\|^{2}\right). (45)

The unique minimizer 𝐱=proxλCE(,𝐲)(𝐱0){\bm{x}}^{*}=\operatorname{prox}_{\lambda\ell_{CE}(\cdot,{\bm{y}})}({\bm{x}}_{0}) is characterized by the condition

𝒙=𝒙0+λ(𝒚softmax(𝒙)).{\bm{x}}^{*}={\bm{x}}_{0}+\lambda({\bm{y}}-\operatorname{softmax}({\bm{x}}^{*})). (46)

This point 𝐱{\bm{x}}^{*} can be found efficiently using iterative methods targeting this fixed-point equation, such as fixed-point iteration or Newton’s method applied to the equivalent root-finding problem 𝐱𝐱0λ(𝐲softmax(𝐱))=𝟎{\bm{x}}-{\bm{x}}_{0}-\lambda({\bm{y}}-\operatorname{softmax}({\bm{x}}))={\bm{0}}. Practically, we found that a fixed-point iteration with 10 iterations provides a stable and efficient solution.

Proof.

The function g(𝒙)=λCE(𝒙,𝒚)+12𝒙𝒙02g({\bm{x}})=\lambda\ell_{CE}({\bm{x}},{\bm{y}})+\frac{1}{2}\left\|{\bm{x}}-{\bm{x}}_{0}\right\|^{2} is strictly convex because CE(𝒙,𝒚)\ell_{CE}({\bm{x}},{\bm{y}}) is convex and 12𝒙𝒙02\frac{1}{2}\left\|{\bm{x}}-{\bm{x}}_{0}\right\|^{2} is strictly convex. Therefore, a unique minimizer 𝒙{\bm{x}}^{*} exists. The minimizer is characterized by the first-order optimality condition g(𝒙)=𝟎\nabla g({\bm{x}}^{*})={\bm{0}}. The gradient is

g(𝒙)=λ𝒙CE(𝒙,𝒚)+𝒙(12𝒙𝒙02).\nabla g({\bm{x}})=\lambda\nabla_{{\bm{x}}}\ell_{CE}({\bm{x}},{\bm{y}})+\nabla_{{\bm{x}}}\left(\frac{1}{2}\left\|{\bm{x}}-{\bm{x}}_{0}\right\|^{2}\right). (47)

The gradient of the cross-entropy loss is 𝒙CE(𝒙,𝒚)=softmax(𝒙)𝒚\nabla_{{\bm{x}}}\ell_{CE}({\bm{x}},{\bm{y}})=\operatorname{softmax}({\bm{x}})-{\bm{y}}. The gradient of the quadratic term is 𝒙𝒙0{\bm{x}}-{\bm{x}}_{0}. Setting the total gradient to zero at 𝒙{\bm{x}}^{*} gives

λ(softmax(𝒙)𝒚)+(𝒙𝒙0)=𝟎.\lambda(\operatorname{softmax}({\bm{x}}^{*})-{\bm{y}})+({\bm{x}}^{*}-{\bm{x}}_{0})={\bm{0}}. (48)

Rearranging this equation yields the characterization

𝒙=𝒙0λ(softmax(𝒙)𝒚)=𝒙0+λ(𝒚softmax(𝒙)).{\bm{x}}^{*}={\bm{x}}_{0}-\lambda(\operatorname{softmax}({\bm{x}}^{*})-{\bm{y}})={\bm{x}}_{0}+\lambda({\bm{y}}-\operatorname{softmax}({\bm{x}}^{*})). (49)

This confirms Eq. 46. ∎

Appendix D DETAILED EXPERIMENTAL RESULTS

This section provides the detailed numerical results from the experiments described in Section 5. We compare the performance of the projection-based methods (Douglas-Rachford (DR), Alternating Projections (AP), Cyclic Projections (CP)) against gradient-based baselines (Stochastic Gradient Descent (SGD), Adam) and gradient-free baselines (Feedback Alignment (FA) for MLPs and Forward–Forward (FF) for MLPs and CNNs). The results are presented in the tables below (Table 2 for MLPs, Table 3 for CNNs, and Table 4 for RNNs).

These results are obtained using default train/test splits (approximately 80% train, 20% test), with 10% of training data reserved for validation. Early stopping is applied based on validation accuracy, with a patience of 5 checks (5000 steps) if no improvement is observed. Metrics are averaged over 5 independent runs with different random seeds for initialization and data shuffling; standard deviations (±\pm) are reported where appropriate.

  • Test Accuracy (%): The final classification accuracy achieved by the best model (selected based on validation performance) on the held-out test set. For the Shakespeare dataset, this refers to the accuracy of predicting the next character.

  • Train Accuracy (%): The final classification accuracy on the training set, reported for comparison with test accuracy.

  • Steps (k): The number of training steps (parameter updates), reported in thousands (’k’), required to reach 99% of the maximum validation accuracy achieved during that run. This metric indicates convergence speed in terms of updates.

  • Time (s): The wall-clock time in seconds required to reach 99% of the maximum validation accuracy. This measurement excludes time spent on data loading, validation checks, and initial JIT compilation, focusing on the core training loop execution time.

  • Time/Step (ms): The average wall-clock time in milliseconds per single training step (parameter update step).

Table 2: MLP Performance Comparison.
Dataset Architecture Method Test Acc. (%) Train Acc. (%) Steps (k) Time (s) Time/Step (ms)
MNIST 1 x 128 SGD 96.8 ±\pm 0.1 97.6 ±\pm 0.1 58.6 ±\pm 7.2 171.4 ±\pm 21.4 2.92 ±\pm 0.01
Adam 98.1 ±\pm 0.1 100.0 ±\pm 0.0 1.6 ±\pm 0.5 4.7 ±\pm 1.4 2.95 ±\pm 0.01
FA 97.6 ±\pm 0.1 99.5 ±\pm 0.2 8.0 ±\pm 1.1 23.3 ±\pm 3.1 2.92 ±\pm 0.02
FF (SGD) 12.7 ±\pm 1.9 12.8 ±\pm 2.2 1.6 ±\pm 1.7 5.1 ±\pm 5.6 3.12 ±\pm 0.08
FF (Adam) 95.6 ±\pm 0.5 96.2 ±\pm 0.6 82.4 ±\pm 11.8 256.2 ±\pm 35.2 3.12 ±\pm 0.04
DR 95.8 ±\pm 0.6 96.9 ±\pm 0.7 16.6 ±\pm 3.3 3.7 ±\pm 0.7 0.22 ±\pm 0.00
AP 91.5 ±\pm 0.7 91.4 ±\pm 0.8 25.8 ±\pm 5.4 2.3 ±\pm 0.5 0.09 ±\pm 0.00
CP 92.4 ±\pm 0.6 92.5 ±\pm 0.7 41.6 ±\pm 11.4 8.6 ±\pm 2.3 0.21 ±\pm 0.00
4 x 128 SGD 96.9 ±\pm 0.2 98.8 ±\pm 0.2 32.4 ±\pm 2.3 96.2 ±\pm 7.2 2.97 ±\pm 0.03
Adam 98.1 ±\pm 0.1 99.9 ±\pm 0.1 1.8 ±\pm 0.7 5.7 ±\pm 2.3 3.09 ±\pm 0.05
FA 95.4 ±\pm 0.8 96.1 ±\pm 1.0 20.0 ±\pm 6.2 60.2 ±\pm 18.3 3.02 ±\pm 0.03
FF (SGD) 11.9 ±\pm 0.8 11.8 ±\pm 0.7 2.8 ±\pm 1.7 9.0 ±\pm 5.4 3.24 ±\pm 0.05
FF (Adam) 94.3 ±\pm 0.4 94.2 ±\pm 0.6 66.0 ±\pm 9.3 220.3 ±\pm 32.1 3.35 ±\pm 0.06
DR 85.5 ±\pm 0.6 86.2 ±\pm 0.9 29.6 ±\pm 7.3 10.6 ±\pm 2.6 0.36 ±\pm 0.00
AP 79.6 ±\pm 0.5 79.2 ±\pm 0.8 46.2 ±\pm 4.2 9.4 ±\pm 0.8 0.20 ±\pm 0.00
CP 79.9 ±\pm 0.6 79.3 ±\pm 0.8 47.8 ±\pm 9.5 17.1 ±\pm 3.5 0.36 ±\pm 0.00
4 x 128 + Skip SGD 96.6 ±\pm 0.3 98.1 ±\pm 0.6 28.2 ±\pm 7.2 84.9 ±\pm 21.9 3.01 ±\pm 0.01
Adam 98.1 ±\pm 0.2 100.0 ±\pm 0.1 1.4 ±\pm 0.5 4.3 ±\pm 1.6 3.08 ±\pm 0.01
DR 94.9 ±\pm 0.4 96.1 ±\pm 0.7 21.8 ±\pm 6.0 9.3 ±\pm 2.6 0.43 ±\pm 0.00
AP 90.3 ±\pm 0.8 90.3 ±\pm 0.8 32.6 ±\pm 9.3 6.9 ±\pm 2.0 0.21 ±\pm 0.00
CP 91.1 ±\pm 0.5 91.1 ±\pm 0.5 34.2 ±\pm 3.5 18.7 ±\pm 1.9 0.55 ±\pm 0.00
CIFAR-10 1 x 256 SGD 50.5 ±\pm 0.1 67.0 ±\pm 2.0 34.6 ±\pm 4.8 307.1 ±\pm 42.1 8.88 ±\pm 0.06
Adam 50.7 ±\pm 0.8 80.9 ±\pm 7.6 2.2 ±\pm 0.4 20.2 ±\pm 3.6 9.14 ±\pm 0.09
FA 49.9 ±\pm 0.9 73.4 ±\pm 2.9 5.8 ±\pm 1.2 52.3 ±\pm 10.6 9.08 ±\pm 0.12
FF (SGD) 9.9 ±\pm 0.2 10.2 ±\pm 0.4 2.6 ±\pm 2.7 24.5 ±\pm 25.3 9.29 ±\pm 0.10
FF (Adam) 45.4 ±\pm 0.7 50.7 ±\pm 1.3 100.0 ±\pm 8.9 919.3 ±\pm 83.5 9.19 ±\pm 0.03
DR 42.1 ±\pm 1.1 55.6 ±\pm 4.8 27.2 ±\pm 10.3 62.3 ±\pm 23.5 2.29 ±\pm 0.00
AP 38.5 ±\pm 0.5 40.3 ±\pm 0.5 11.0 ±\pm 3.7 4.8 ±\pm 1.6 0.43 ±\pm 0.00
CP 38.5 ±\pm 0.5 40.3 ±\pm 0.5 9.8 ±\pm 3.1 14.4 ±\pm 4.6 1.47 ±\pm 0.00
4 x 256 SGD 47.8 ±\pm 0.3 67.6 ±\pm 2.6 21.6 ±\pm 3.1 198.3 ±\pm 27.5 9.16 ±\pm 0.10
Adam 50.0 ±\pm 0.2 79.3 ±\pm 10.3 2.6 ±\pm 1.4 24.4 ±\pm 12.4 9.37 ±\pm 0.05
FA 29.3 ±\pm 3.6 29.5 ±\pm 3.4 9.0 ±\pm 2.3 84.6 ±\pm 21.1 9.34 ±\pm 0.09
FF (SGD) 11.0 ±\pm 0.6 11.2 ±\pm 0.6 1.2 ±\pm 1.0 11.7 ±\pm 9.2 9.48 ±\pm 0.18
FF (Adam) 43.6 ±\pm 1.0 48.0 ±\pm 2.5 92.6 ±\pm 16.6 870.8 ±\pm 155.3 9.40 ±\pm 0.03
DR 32.3 ±\pm 0.9 35.4 ±\pm 1.1 13.2 ±\pm 5.5 39.8 ±\pm 16.7 3.01 ±\pm 0.00
AP 32.5 ±\pm 0.6 33.7 ±\pm 0.9 13.6 ±\pm 7.4 9.4 ±\pm 5.1 0.69 ±\pm 0.00
CP 32.5 ±\pm 0.5 33.8 ±\pm 0.8 13.6 ±\pm 7.4 27.0 ±\pm 14.6 1.98 ±\pm 0.00
4 x 256 + Skip SGD 49.4 ±\pm 0.3 68.7 ±\pm 1.7 21.4 ±\pm 2.4 200.5 ±\pm 23.6 9.32 ±\pm 0.08
Adam 50.6 ±\pm 0.2 89.2 ±\pm 6.0 3.2 ±\pm 1.0 30.0 ±\pm 8.9 9.33 ±\pm 0.20
DR 39.2 ±\pm 0.8 45.3 ±\pm 1.9 20.8 ±\pm 6.5 61.2 ±\pm 19.1 2.94 ±\pm 0.00
AP 38.9 ±\pm 0.6 41.0 ±\pm 0.8 14.6 ±\pm 3.9 10.2 ±\pm 2.7 0.70 ±\pm 0.00
CP 38.9 ±\pm 0.7 41.0 ±\pm 0.7 14.6 ±\pm 3.9 42.4 ±\pm 11.3 2.91 ±\pm 0.00
Higgs 1 x 256 SGD 66.9 ±\pm 0.3 66.9 ±\pm 0.3 63.6 ±\pm 11.4 55.5 ±\pm 10.3 0.88 ±\pm 0.01
Adam 74.6 ±\pm 0.1 74.6 ±\pm 0.1 29.0 ±\pm 3.9 27.3 ±\pm 3.8 0.97 ±\pm 0.01
FA 71.3 ±\pm 0.5 71.3 ±\pm 0.5 59.0 ±\pm 18.9 52.1 ±\pm 17.1 0.89 ±\pm 0.01
FF (SGD) 57.6 ±\pm 5.8 57.7 ±\pm 5.7 152.8 ±\pm 191.6 168.1 ±\pm 210.9 1.07 ±\pm 0.03
FF (Adam) 71.1 ±\pm 0.3 71.0 ±\pm 0.4 55.6 ±\pm 12.6 66.0 ±\pm 15.5 1.18 ±\pm 0.03
DR 67.1 ±\pm 0.4 67.0 ±\pm 0.4 24.8 ±\pm 5.1 0.9 ±\pm 0.2 0.04 ±\pm 0.00
AP 65.4 ±\pm 0.3 65.3 ±\pm 0.3 27.4 ±\pm 13.5 0.6 ±\pm 0.3 0.02 ±\pm 0.00
CP 65.2 ±\pm 0.4 65.2 ±\pm 0.5 25.4 ±\pm 10.8 0.7 ±\pm 0.3 0.03 ±\pm 0.00
4 x 256 SGD 71.1 ±\pm 0.6 71.1 ±\pm 0.6 178.8 ±\pm 37.7 176.0 ±\pm 38.7 0.98 ±\pm 0.01
Adam 76.6 ±\pm 0.2 76.6 ±\pm 0.2 26.0 ±\pm 4.9 26.8 ±\pm 4.7 1.06 ±\pm 0.02
FA 62.4 ±\pm 3.1 62.4 ±\pm 3.2 6.6 ±\pm 2.0 6.1 ±\pm 1.8 0.92 ±\pm 0.02
FF (SGD) 57.3 ±\pm 2.3 57.3 ±\pm 2.2 35.4 ±\pm 19.6 41.4 ±\pm 23.2 1.16 ±\pm 0.02
FF (Adam) 69.4 ±\pm 0.3 69.4 ±\pm 0.3 33.6 ±\pm 5.1 44.3 ±\pm 7.5 1.33 ±\pm 0.01
DR 61.1 ±\pm 0.3 61.1 ±\pm 0.3 10.8 ±\pm 5.8 5.4 ±\pm 2.9 0.50 ±\pm 0.00
AP 51.7 ±\pm 5.4 51.7 ±\pm 5.4 3.4 ±\pm 6.8 1.0 ±\pm 2.0 0.29 ±\pm 0.00
CP 51.7 ±\pm 5.4 51.7 ±\pm 5.4 3.4 ±\pm 6.8 1.9 ±\pm 3.9 0.57 ±\pm 0.00
4 x 256 + Skip SGD 68.9 ±\pm 0.4 68.9 ±\pm 0.4 73.0 ±\pm 10.3 72.4 ±\pm 10.9 0.99 ±\pm 0.01
Adam 76.2 ±\pm 0.1 76.2 ±\pm 0.1 22.6 ±\pm 1.7 25.2 ±\pm 1.9 1.15 ±\pm 0.02
DR 62.9 ±\pm 0.6 62.9 ±\pm 0.5 10.0 ±\pm 3.6 6.4 ±\pm 2.3 0.64 ±\pm 0.00
AP 58.2 ±\pm 5.7 58.3 ±\pm 5.8 13.0 ±\pm 10.4 3.9 ±\pm 3.1 0.30 ±\pm 0.00
CP 58.4 ±\pm 5.8 58.4 ±\pm 5.8 14.0 ±\pm 10.4 6.7 ±\pm 5.0 0.48 ±\pm 0.00
Table 3: CNN Performance Comparison.
Dataset Architecture Method Test Acc. (%) Train Acc. (%) Steps (k) Time (s) Time/Step (ms)
MNIST 1 x 32 SGD 71.7 ±\pm 1.1 70.8 ±\pm 1.5 133.0 ±\pm 23.9 402.8 ±\pm 72.6 3.03 ±\pm 0.00
Adam 77.8 ±\pm 1.2 77.1 ±\pm 1.4 26.2 ±\pm 3.4 81.7 ±\pm 11.1 3.11 ±\pm 0.02
FF (SGD) 24.5 ±\pm 4.0 24.1 ±\pm 4.0 4.0 ±\pm 2.8 13.3 ±\pm 9.1 3.32 ±\pm 0.04
FF (Adam) 70.6 ±\pm 3.4 69.9 ±\pm 3.1 19.6 ±\pm 6.0 65.1 ±\pm 18.1 3.35 ±\pm 0.11
DR 51.7 ±\pm 1.2 51.3 ±\pm 1.5 12.4 ±\pm 5.0 31.7 ±\pm 12.8 2.55 ±\pm 0.00
AP 49.8 ±\pm 1.6 49.4 ±\pm 1.8 25.8 ±\pm 2.3 72.2 ±\pm 6.5 2.80 ±\pm 0.00
CP 49.9 ±\pm 1.6 49.4 ±\pm 1.8 25.6 ±\pm 2.0 72.1 ±\pm 5.6 2.82 ±\pm 0.00
4 x 16 SGD 96.0 ±\pm 0.2 96.3 ±\pm 0.2 50.4 ±\pm 8.0 161.0 ±\pm 25.6 3.20 ±\pm 0.03
Adam 97.4 ±\pm 0.3 99.0 ±\pm 0.4 5.4 ±\pm 1.0 18.4 ±\pm 3.5 3.41 ±\pm 0.02
FF (SGD) 20.0 ±\pm 3.0 19.5 ±\pm 2.8 2.2 ±\pm 1.9 8.1 ±\pm 7.3 3.58 ±\pm 0.10
FF (Adam) 88.3 ±\pm 1.2 87.7 ±\pm 1.1 29.0 ±\pm 6.0 108.3 ±\pm 22.1 3.73 ±\pm 0.03
DR 55.4 ±\pm 4.1 55.1 ±\pm 3.8 99.4 ±\pm 51.0 7713.7 ±\pm 3959.3 77.60 ±\pm 0.01
AP 46.4 ±\pm 4.8 46.0 ±\pm 4.5 20.8 ±\pm 3.3 1358.7 ±\pm 216.8 65.32 ±\pm 0.04
CP 46.4 ±\pm 4.8 46.1 ±\pm 4.5 20.6 ±\pm 3.0 1426.7 ±\pm 208.6 69.24 ±\pm 0.09
4 x 16 + Skip SGD 96.7 ±\pm 0.3 97.1 ±\pm 0.3 51.4 ±\pm 10.2 166.7 ±\pm 33.4 3.25 ±\pm 0.01
Adam 97.9 ±\pm 0.2 99.1 ±\pm 0.3 4.0 ±\pm 0.6 13.7 ±\pm 2.2 3.40 ±\pm 0.03
DR 71.3 ±\pm 1.6 70.8 ±\pm 1.4 16.0 ±\pm 6.4 1303.8 ±\pm 518.2 81.47 ±\pm 0.03
AP 69.4 ±\pm 1.4 68.8 ±\pm 1.4 46.2 ±\pm 15.2 3240.5 ±\pm 1068.3 70.14 ±\pm 0.02
CP 69.6 ±\pm 1.3 68.9 ±\pm 1.2 44.2 ±\pm 10.5 1609.5 ±\pm 383.7 36.42 ±\pm 0.03
CIFAR-10 1 x 32 SGD 39.6 ±\pm 1.1 40.0 ±\pm 1.4 91.0 ±\pm 19.2 821.3 ±\pm 172.9 9.03 ±\pm 0.03
Adam 45.4 ±\pm 0.6 45.9 ±\pm 0.6 22.8 ±\pm 6.3 210.7 ±\pm 57.8 9.23 ±\pm 0.03
FF (SGD) 10.1 ±\pm 0.0 10.0 ±\pm 0.0 1.0 ±\pm 0.0 9.7 ±\pm 0.4 9.48 ±\pm 0.13
FF (Adam) 26.9 ±\pm 2.1 27.0 ±\pm 2.5 8.8 ±\pm 4.0 84.3 ±\pm 38.2 9.56 ±\pm 0.05
DR 27.6 ±\pm 0.6 27.5 ±\pm 0.9 2.4 ±\pm 1.0 27.4 ±\pm 11.6 11.41 ±\pm 0.00
AP 29.1 ±\pm 0.9 29.1 ±\pm 0.8 19.0 ±\pm 5.4 110.6 ±\pm 31.5 5.82 ±\pm 0.00
CP 29.2 ±\pm 0.9 29.2 ±\pm 0.9 18.8 ±\pm 5.6 109.8 ±\pm 32.7 5.84 ±\pm 0.00
4 x 16 SGD 49.2 ±\pm 1.8 51.2 ±\pm 2.3 83.6 ±\pm 25.9 786.5 ±\pm 245.4 9.40 ±\pm 0.05
Adam 54.9 ±\pm 0.8 62.8 ±\pm 1.8 12.0 ±\pm 4.0 114.2 ±\pm 38.8 9.49 ±\pm 0.09
FF (SGD) 10.0 ±\pm 0.1 10.1 ±\pm 0.1 0.6 ±\pm 0.5 6.0 ±\pm 4.9 9.96 ±\pm 0.33
FF (Adam) 28.3 ±\pm 3.3 28.4 ±\pm 3.2 10.4 ±\pm 6.3 102.3 ±\pm 61.7 9.81 ±\pm 0.09
DR 20.3 ±\pm 0.9 20.2 ±\pm 0.6 2.8 ±\pm 2.2 301.7 ±\pm 240.1 107.78 ±\pm 0.07
AP 22.8 ±\pm 1.4 22.5 ±\pm 1.2 9.2 ±\pm 5.1 827.1 ±\pm 457.4 89.88 ±\pm 0.17
CP 22.6 ±\pm 1.3 22.4 ±\pm 1.2 9.0 ±\pm 4.8 847.5 ±\pm 448.7 94.44 ±\pm 0.14
4 x 16 + Skip SGD 54.1 ±\pm 1.8 57.0 ±\pm 2.1 106.8 ±\pm 22.4 1004.6 ±\pm 223.9 9.38 ±\pm 0.16
Adam 59.4 ±\pm 0.6 67.6 ±\pm 0.8 13.0 ±\pm 3.2 123.9 ±\pm 32.1 9.49 ±\pm 0.08
DR 31.4 ±\pm 1.2 31.8 ±\pm 1.6 3.2 ±\pm 0.4 365.3 ±\pm 45.5 114.13 ±\pm 0.18
AP 33.4 ±\pm 1.0 33.5 ±\pm 1.1 24.6 ±\pm 4.6 2352.5 ±\pm 439.3 95.68 ±\pm 0.06
CP 33.7 ±\pm 1.2 33.8 ±\pm 1.2 24.8 ±\pm 4.6 1433.4 ±\pm 266.9 57.82 ±\pm 0.02
Table 4: RNN Performance Comparison.
Dataset Architecture Method Test Acc. (%) Train Acc. (%) Steps (k) Time (s) Time/Step (ms)
Shakespeare 1 x 256 SGD 35.7 ±\pm 5.1 38.8 ±\pm 6.4 179.0 ±\pm 81.4 480.9 ±\pm 218.7 2.69 ±\pm 0.00
Adam 49.9 ±\pm 0.0 59.8 ±\pm 0.4 7.4 ±\pm 1.4 20.0 ±\pm 3.7 2.70 ±\pm 0.00
DR 32.4 ±\pm 0.5 34.0 ±\pm 0.7 16.6 ±\pm 5.5 849.0 ±\pm 283.4 51.14 ±\pm 0.02
AP 29.6 ±\pm 0.8 30.4 ±\pm 1.0 98.8 ±\pm 56.2 1646.0 ±\pm 935.6 16.66 ±\pm 0.00
4 x 128 SGD 35.1 ±\pm 4.1 37.1 ±\pm 5.3 63.0 ±\pm 34.7 255.3 ±\pm 140.8 4.05 ±\pm 0.00
Adam 49.8 ±\pm 0.1 57.9 ±\pm 0.3 28.6 ±\pm 8.3 118.4 ±\pm 34.3 4.14 ±\pm 0.00
DR 26.7 ±\pm 1.1 27.4 ±\pm 1.2 10.4 ±\pm 6.7 234.1 ±\pm 149.6 22.51 ±\pm 0.00
AP 26.5 ±\pm 1.1 27.1 ±\pm 1.2 182.4 ±\pm 84.0 1688.6 ±\pm 777.3 9.26 ±\pm 0.00
4 x 128 + Skip SGD 38.9 ±\pm 4.5 42.6 ±\pm 6.1 129.6 ±\pm 80.2 619.7 ±\pm 383.6 4.78 ±\pm 0.00
Adam 50.2 ±\pm 0.3 59.0 ±\pm 0.7 15.8 ±\pm 5.2 75.1 ±\pm 24.7 4.75 ±\pm 0.00
DR 32.2 ±\pm 0.8 33.9 ±\pm 0.9 32.8 ±\pm 8.4 1210.8 ±\pm 308.3 36.91 ±\pm 0.00
AP 30.2 ±\pm 0.5 31.1 ±\pm 0.7 205.2 ±\pm 78.3 2964.4 ±\pm 1131.2 14.44 ±\pm 0.01