Manuscript Offprint
arXiv:2611.12668Controlled Binary Assignment Flows
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Paul Fröhling¹, Christoph Schnörr¹,²
¹ Institute for Mathematics, Image and Pattern Analysis Group, Heidelberg University, Germany
² Research Station Geometry and Dynamics, Heidelberg University
Abstract. This paper introduces a geometric approach to the representation and learning of time-variant parametrizations of deep assignment flows, for binary data labelings on graphs. Each edge carries an optimally controlled parameter flow in a 2-dimensional totally geodesic submanifold, based on objectives derived from a non-local linear scale space representation of the input data. The aggregation of triplets of such flows in 5-dimensional totally geodesic submanifolds is learned from data. The fusion of these flows determines the trajectory in the high-dimensional symmetric parameter space and by geometric integration the layers of binary deep assignment flows. Numerical results demonstrate the expressivity and the limitation of our highly parallel geometric local synthesis approach to high-dimensional deep assignment flow parametrizations.
Keywords: image labeling, foreground-background separation, positive definite parameter manifold, totally geodesic submanifolds, discrete optimal control, deep assignment flows, geometric deep learning
1 Introduction
Geometric deep learning [4] constitutes an active and promising research direction. The fast growing literature includes works with a focus on manifold-valued data [5,9], on the equivariance properties of mappings realized by deep networks [6,14,8] or on the application-specific sensitivity to spatial structure in terms of geometric control through sub-Riemannian geometry [15,3]. Apparently, less work has been devoted to studying the geometric role of the network parameters themselves for particular classes of deep networks.
This paper takes a step along this direction for the specific problem class of binary data labeling on arbitrary graphs. The basis are assignment flows [2,13] of the form
(row index)
(1.1f)
with time-variant symmetric positive-definite parameter matrix
Paul Fröhling, Christoph Schnörr
The latter constraint satisfies a sufficient condition that the flow (1.1a) converges to integral labelings [20].

Fig. 1.1: Illustration of our geometric local-to-global synthesis approach of high-dimensional parameter trajectories (1.1g) for deep binary assignment flows, via the optimal control of trajectories and their aggregation in totally-geodesic submanifolds .
Figure 1.1 illustrates the first two stages of our 3-stage approach for representing and learning from data the parameter trajectory (1.1g) in the high-dimensional symmetric space : (1) each edge of the underlying graph indexes a control parameter trajectory in the 2-dimensional totally geodesic submanifold of positive-definite symmetric matrices with determinant 1, which are globally optimized in parallel on all edges through discrete optimal control. (2) Triplets of such flows indexed by triangular subgraphs are aggregated via machine learning to form time-variant parameter matrices in the 5-dimensional totally geodesic submanifold . (3) The third ingredient (not shown in Fig. 1.1) is a small finite subset of the nonlocal linear scale space representation of the input data, used to define the objectives of discrete optimal control processes at stage (1).
Altogether, vertices and edges of the underlying graph determine a map and by geometric integration [19] of (1.1a) the resulting deep assignment flow network.
Section 2 specializes the general set-up (1.1) to binary labelings. The ingredients (1), (2), (3) of our approach sketched above are introduced in Section 3. Numerical results illustrate in Section 4 both the expressivity and the limitation of our geometric approach to the parametrization of high-dimensional binary labeling via assignment flows. Our work paves the way for future research indicated in Section 5.
Proposition 1 (binary assignment flow equation).
Let and define the map
Then the assignment flow equation (1.1) is equivalent to the system
where is the logistic sigmoid function and solves
As a consequence of Proposition 1, it suffices to solve the nonlinear system of ODEs (2.2c) in order to determine the binary label assignment by substitution into (2.2a) followed by trivial rounding.
The binary assignment flow network corresponding to (2.2) is derived by basic geometric integration. Following [19] and using a discrete layer index also denoted by , the application of the explicit geometric Euler scheme with step sizes yields the
(binary assignment flow network)
(2.3a)
where the step sizes absorb the factor from (2.2c). The network input is , the network output is . Inspecting (2.3) reveals the basic network structure:
-
each network layer comprises a tanh activation function and a manifold-valued parameter matrix corresponding to (1.1g);
-
each layer outputs the state , including the initial layer with output equal to the input encoded by input vector .
We point out that this structure is a consequence of the information geometry underlying the assignment flow equation (1.1), rather than set up beforehand in an ad-hoc manner. In Section 3, we study the problem to learn the parameters , of the network (2.3).
3 Approach
This section details our approach illustrated by Figure 1.1. Each of the three stages is described below in a corresponding subsection.
3.1 Optimal Parameter Trajectories on Edges
We consider the restriction of the discrete-time flow (2.3) to the edges as minimal basic components of assignment flow networks and call them systems. Each
Paul Fröhling, Christoph Schnörr
systems couples two discrete binary probability distributions. For each and edge , we impose the constraint
in terms of the totally geodesic submanifold of the positive definite manifold (1.1g) for . We take this constraint into account by the tangent space parametrization, utilizing the matrix exponential as global diffeomorphism
Using the shorthands
we call optimal a sequence if it minimizes the objective function
given in terms of loss functions to be specified.
local binary assignment flow
parametrization


Fig. 3.1: Left: Illustration of the layer mapping and its parametrization of the local binary assignment network (2.3b), for an arbitrary edge of the underlying graph (dropped above from the notation) and the corresponding pairs of input feature vectors and output assignment vectors. The control parameters (3.2) which determine the parameter matrix, determine in turn the flow. We learn local binary assignment flows by determining optimal trajectories of these parameters by discrete optimal control. Right: The feasible set for vectors of the sequences (3.3b). Regions near the origin corresponding to a large uncertainty of local label assignments and hence are discretized more finely, whereas regions farther from the origin are discretized more coarsely.
Determining optimal parameter sequences (3.3a) is accomplished by dynamic programming [11]. Consider the minimization problem (3.4) for any given initial vector
and a target vector corresponding to a prescribed target state. Let the cost-to-go functions , be defined recursively backward for by
and the Bellman equation
on the finite feasible set depicted by Fig. 3.1 for each vector , , and on a finite regular grid of feasible control parameter vectors of the sequence (3.3a). The function in (3.5b), defined by
maps to the feasible set by rounding. For our implementation, we have chosen the weighted loss functions
where the weights increase with t in order to assign more importance to states closer to the terminal target.
Dynamic Programming solves the optimization problem (3.4) by working recursively backward, starting at the target. This leads to the policy mapping
returning an optimal for a current state and a given target . If, for each , the optimality of is achieved in (3.5), then the entire sequence given by (3.8) is optimal. Using the resulting policy , optimal trajectories emanating from any feasible point can be determined for a given target .
3.2 Learning Flow Aggregation on Triangular Subgraphs
In this section, as sketched by Figure 3.2, we describe the aggregation of flows on triangular subgraphs based on three local flows on the corresponding edges, each determined via dynamic programming as described in Section 3.1.
Geometric Ansatz. We consider any triangle and denote the vertices by , for simplicity. For the edges , and , we denote the optimal parameter sequences by
The control parameters of the edge flows are embedded into parameter matrices via the map ,
Paul Fröhling, Christoph Schnörr

Fig. 3.2: Left: A triangle (minimally complete) subgraph. Each edge indexes an optimally controlled binary assignment flow network (2.3b). Fusing these minimal networks into a larger network creates conflicts because each controlled variable participates in two local systems, as indicated by the above right-most panel and the application of the injection map (3.10) to the three sequences (3.9). This problem is resolved by a machine learning component (center panel) with learnable parameters .
The image of the parameter space under the composition of this embedding and the exponential map,
forms a totally geodesic submanifold in the manifold , since the linear subspace forms a Lie triple system [10,16]: evaluating the double-commutator on matrices parametrized by arbitrary parameter vectors yields again a matrix in the submanifold,
i.e. there is a vector depending on such that the double-commutator evaluates to .

Fig. 3.3: Performance of locally labeled triangular subgraphs, based on local geometric averaging (3.13) of three flows indexed by the edges. Each point indicates an initial point around 0, mapped to a small sphere for visualization. Its color displays if the trajectory (2.3b) reaches the target octant () (green) or makes a single (blue), two (black) or three (red) labeling errors at the vertices. Errors occur when the starting and target octants differ by binary labels.
As a consequence and in view of the optimality of the parameter sequences (3.9), it appears natural to define the sequence for the triangular subgraph by averaging the tangent matrices corresponding to the three edges and subsequent exponentiation [1],
For a numerical evaluation of this Ansatz, the starting points were selected and every vector in the orthant was considered as admissible target. For each pair , three optimal edge flows were constructed that achieve the mappings , , corresponding to the restrictions of the desired flow. Empirically, it turned out that for the resulting set of 1728 test flows, the aggregation approach (3.13) by plain geometric averaging only achieved correct flows, caused by local conflicts illustrated by Figure 3.2, right panel.
Additional learning component. We refine the Ansatz (3.13) by replacing each vector by the vectors
each adjusted by a planar time-variant rotations with learnable parameter . These parameters are learned by a neural network which realizes the mapping
This mapping is used not only to align local edge flows in order to avoid to labeling errors displayed by Figure 3.3, but also to reorient flows, provided the non-local context (cf. Section 3.3) suggests to change the target labeling at some point of time .
The architecture of the neural network consists of two branches (Fig. 3.2, center panel): one for static features and one for time-dependent features. The static branch is a three-layer neural network. The temporal branch consists of an LSTM [18] for processing the u and v- trajectories of the three edge flows of a triangular subgraph.
As input of the network (3.15), we use
– static features: initial pixel positions and values per incident triangular subgraph;
– temporal features: v-trajectories, u-trajectories for every edge, current time (layer index) t, current state in (starting point or latest prediction for t > 1).
Minimizing the loss function (m: margin, : set of triangles)
with margin parameter and dependency given by (2.3b), (3.14) and (3.15), enforces that each aggregated flow for a triangle reaches the prescribed octant. After training, repeating the local labeling of triangular subgraphs (Fig. 3.3) achieves 100% performance.
Paul Fröhling, Christoph Schnörr
3.3 Context Representation via a Linear Scale Space
We supply the triangular subgraphs with a sequence of initial data corresponding to convolutions with the Gaussian kernel
and an increasing sequence of parameter values corresponding to a coarse-to-fine transition of spatial scale and structure; see Figure 3.4 for an illustration. The approach from Section 3.2 is applied to each transition . The changing target labels induced by the linear scale space provide information about the spatial context at varying scales, which facilitates both learning and inference.

Fig. 3.4: Image labeling via a linear scale space, exemplified for a corrupted handwritten digit “8”. Top row: Scale-space representations , , of the input data. Bottom row: In the training phase, analogous representations of the target labeling are provided as well. Center rows, inference: The learned sequence of parameter matrices enables the binary assignment flow network (2.3) to infer the uncorrupted labelings (3rd row; green arrows) from the corrupted labelings (2nd row; yellow arrows) across the scale space.
Thus, this process is structured by two nested parameter sequences: The assignment flow time (network layer index) for each transition and the linear scale space parameters . Accordingly, the loss (3.16) is extended to .
4 Experiments and Discussion
4.1 Data Sets
We used the following data sets illustrated by Figure 4.1.
Rotated MNIST: a publicly available well-known data set [12] which generalizes the original MNIST data set. Data points were additionally corrupted (i) by selecting randomly two rows containing foreground pixels and changing all pixels in these rows to foreground; (ii) by interchanging fore- and background pixels afterwards. Thus the task is to simultaneously invert fore- and background and to correct false labelings.
Dino scene: Images of computer-generated 3D scenes, turned into binary input labelings by thresholding. The task is to infer the foreground regions just from the irregular black-/white regions and the spatial context provided by the entire graph and local-to-global information aggregation, without using explicit shape information as provided e.g. by the silhouettes. This experiment mimics the famous psychophysical Dalmation dog experiment [7, pp.20] which demonstrates the ability of the human visual system to infer object shapes from seemingly unorganized binary spatial patterns.

Fig. 4.1: Left: Examples of input images (top) corrupted initial labelings (mid) and target labelings (bottom) from the Rotated MNIST data base. Right: Examples of generating images, initial labelings and target labelings for the Dino scene.
4.2 Implementation Details
Network architecture. The network architecture comprises 186.995 trainable parameters. The temporal branch processes the time-dependent features via an LSTM cell with 56 hidden units, followed by a linear projection to 56 dimensions. The static branch computes a 56-dimensional embedding of the input through a multilayer perceptron with hidden dimensions 256 and 512 and SiLU activations. The two embeddings are added elementwise and passed through a 56-dimensional fusion layer and a final linear layer predicting the three rotation angles in (3.15). Since inference is done across the linear scale space (Section 3.3), the corresponding scale index was used as additional input datum.
Graph structure. The set of edges added to the underlying grid graph in order to form triangular subgraphs, was manually determined for each data set in an ad-hoc way in view of the inference task, as specified by Figure 4.2. Ideally, a suitable structure for the problem class at hand should be a variable and adaptively inferred as well, which is beyond the scope of this paper and an attractive perspective for future work.
Paul Fröhling, Christoph Schnörr

Fig. 4.2: Triangular subgraphs. Rotated MNIST (leftmost 2 panels): Vertices associated with a center vertex (marked red, left panel), used to define triangular subgraphs (right panel, different vertex embedding for visualization). Dino scene (rightmost 2 panels): Vertices associated with a center vertex (marked red, left panel), used to define triangular subgraphs (right panel, different vertex embedding for visualization). For both scenes, every vertex becomes a center vertex (red) and thus defines a local collection of triangular subgraphs.
Training. The model for Rotated MNIST was trained on 500 images (50 per digit class) of size , with 2.240 triangles complementing the corresponding grid graph (cf. Fig. 4.2). We used three diffusion steps. As for the Dino scene, 140 images downsampled to were used for training, with 61.752 triangles complementing the underlying grid graph. We used four diffusion steps. The computation was done on a desktop computer with a NVIDIA GeForce RTX 5070 Ti offering 16GB of VRAM.
The training time for the Rotated MNIST model was 8:58min for 45 epochs (all images are processed within one epoch). Training the model on the Dino dataset took 29:30min for 70 epochs. Applying the Rotated MNIST model to a test image takes 0.02 sec, whereas the model trained for the Dino scene needs 0.1 sec for inference.
| Rotated MNIST | ||
|---|---|---|
| Diff. Stage | Foreground Acc. | Background Acc. |
| 0 | 97.26 % | 98.83 % |
| 1 | 96.67 % | 98.62 % |
| 2 | 92.83 % | 98.34 % |
| Cow/Dino | ||
|---|---|---|
| Diff. Stage | Foreground Acc. | Background Acc. |
| 0 | 97.35 % | 99.90 % |
| 1 | 97.32 % | 99.93 % |
| 2 | 94.02 % | 99.80 % |
| 3 | 91.32 % | 99.59 % |
Table 1: Prediction performance for independent test data for Rotated MNIST (left) and the Dino scene (right). Recall from Fig. 3.4 that during inference, the sequence of diffusion stages is . The accuracy measurements have been averaged over the entire test data set.
Testing. We computed the minimum Hamming distance between each predicted test labeling and both the ground truth test labeling and the closest labeling in the training set . For Rotated MNIST, the predicted test labelings differ from the closest training labelings on average at 10.25% of the vertices, and by 2.74% for the Dino data set. This shows that the model generalizes to previously unseen data rather than merely reproducing labelings from the training set. Table 1 reports the prediction performance for the independent test sets.

Fig. 4.3: Predicted labelings for independent test data for Rotated MNIST (left) and the Dino scene (right). Pink pixels indicate vertices with wrong label assignments.
5 Conclusion and Outlook
We introduced controlled binary assignment flows based on geometrically fusing optimal parameter trajectories in low-dimensional totally geodesic submanifolds. Our strategy of using cyclic subgraphs for representing high-dimensional point in the symmetric space (1.1g) complements established strategies using acyclic subgraphs, or chordal subgraphs with low tree-width [17], which may be of independent interest.
Regarding future work, the following topics are of particular interest.
-
Adaptive triangular subgraphs. Ideally, the two subgraphical structures depicted by Figure 4.2 should be learned from data, to enhance the adaptivity to different scenarios and to further improve prediction performance.
-
Adaptive scale space representation. Providing non-local contextual information eases both learning and inference and enables to reduce the number of parameters. Using adaptive scale selection and possibly non-linear scale spaces might be beneficial in this respect.
-
Using symmetry. The scenario ‘binary labeling’ and our approach to using a symmetric space entails symmetries of the parameter representation (cf. Figure 3.3), which have not yet been fully explored. Corresponding reductions might enable to consider large-scale scenarios efficiently regarding memory requirements and computation time.
-
Non-binary labelings. The non-binary case requires various generalizations. Yet, a better understanding of the preceding points should pave the way for tackling arbitrary labeling scenarios in a similar way.
Paul Fröhling, Christoph Schnörr
Acknowledgements. This work is funded by the Deutsche Forschungsgemeinschaft (DFG) under Germany's Excellence Strategy EXC-2181/1 - 390900948 (the Heidelberg STRUCTURES Excellence Cluster). This work is funded by the Deutsche Forschungsgemeinschaft (DFG), grant SCHN 457/17-2, within the priority programme SPP 2298: Theoretical Foundations of Deep Learning.
References
-
Arsigny, V., Fillard, P., Pennec, X., Ayache, N.: Geometric means in a novel vector space structure on symmetric positive-definite matrices. SIAM Journal on Matrix Analysis and Applications 29(1), 328–347 (2007)
-
Åström, F., Petra, S., Schmitzer, B., Schnörr, C.: Image Labeling by Assignment. Journal of Mathematical Imaging and Vision 58(2), 211–238 (2017)
-
Bellard, G., Bon, D.L.J., Pai, G., Smets, B.M.N., Duits, R.: Analysis of (sub-)Riemannian PDE-G-CNNs. J. Math. Imaging Vision 65, 819–843 (2023)
-
Bronstein, M.M., Bruna, J., Cohen, T., Veličković, P.: Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges. arXiv 2104.13478 (2021)
-
Bronstein, M.M., Bruna, J., LeCun, Y., Szlam, A., Vandergheynst, P.: Geometric Deep Learning: Going beyond Euclidean data. IEEE Signal Processing Magazine 34(4), 18–42 (2017)
-
Cohen, T., Welling, M.: Group Equivariant Convolutional Networks. In: ICML (2016)
-
Frisby, J.: Seeing: Illusion, Brain and Mind. Oxford University Press (1980)
-
Gerken, J.E., Aronsson, J., Carlsson, O., Linander, H., Ohlsson, F., Petersson, C., Persson, D.: Geometric Deep Learning and Equivariant Neural Networks. Artificial Intelligence Review 56, 14605–14662 (2023)
-
Hanik, M., Steidl, G., von Tycowicz, C.: Manifold GCN: Diffusion-based Convolutional Neural Network for Manifold-valued Graphs. International Journal of Computer Vision 134(315) (2026)
-
Helgason, S.: Differential Geometry, Lie Groups, and Symmetric Spaces. Academic Press (1978)
-
Hernández-Lerma, O., Laura-Guarachi, L., Mendoza-Palacios, S., González-Sánchez, D.: An Introduction to Optimal Control Theory: The Dynamic Programming Approach, Texts in Applied Mathematics, vol. 76. Springer, Cham (2023)
-
Larochelle, H., Erhan, D., Courville, A., Bergstra, J., Bengio, Y.: An empirical evaluation of deep architectures on problems with many factors of variation. In: ICML (2007)
-
Savarino, F., Schnörr, C.: Continuous-Domain Assignment Flows. Europ. J. Appl. Math. 32(3), 570–597 (2021)
-
Smets, B.M.N., Portegies, J., Bekkers, E.J., Duits, R.: PDE-Based Group Equivariant Convolutional Neural Networks. J. Math. Imaging Vision 65, 209–239 (2023)
-
Sommer, S., Svane, A.: Modelling anisotropic covariance using stochastic development and sub-Riemannian frame bundle geometry. J. Geom. Mechanics 9(3), 391–410 (2017)
-
Tumpach, A.B., Larotonda, G.: Totally Geodesic Submanifolds in the Manifold SPD of Symmetric Positive-Definite Real Matrices. Information Geometry 7, 913–942 (2024)
-
Vandenberghe, L., Andersen, M.S.: Chordal Graphs and Semidefinite Optimization. Found. Trends Optimiz. 1(4), 241–433 (2014)
-
Yu, Y., Si, X., Hu, C., Zhang, J.: A Review of Recurrent Neural Networks: LSTM Cells and Network Architectures. Neural Computation 31, 1235–1270 (2019)
-
Zeilmann, A., Savarino, F., Petra, S., Schnörr, C.: Geometric Numerical Integration of the Assignment Flow. Inverse Problems 36(3), 034004 (33pp) (2020)
-
Zern, A., Zeilmann, A., Schnörr, C.: Assignment Flows for Data Labeling on Graphs: Convergence and Stability. Information Geometry 5, 355–404 (2022)