Manuscript Offprint
arXiv:2610.11740Correlational Training of Morphological Neural Networks
ABSTRACT
Neural networks are typically trained using first-order methods and back-propagation. It is unclear whether this approach is optimal for morphological layers whose weight Jacobians are sparse and whose resulting parameter gradients can be poor. In this work, we propose a novel weight update method for morphological neural networks inspired from the Multiplicative Weights Update (MWU) scheme. We view each morphological perceptron as an instance of the learning from experts' advice problem in logarithmic space, and use a correlation-based reward that favors inputs aligned with the desired output change, regardless of whether a strong gradient signal has reached their weight. We empirically evaluate our approach by training fully connected layers both as standalone models and as parts of larger transformer networks. Across nine benchmarks, correlational training yields improvements on eight, by up to 32.84 percentage points, while substantially reducing run-to-run variability .
Index Terms— morphological networks, sparse gradients, multiplicative weights update, exponentiated gradient
1. INTRODUCTION
First-order optimization methods such as stochastic gradient descent and back-propagation have enabled efficient training of typical neural networks predominantly based on matrix multiplications combined with nonlinear activations [1]. It is, however, not obvious that this approach is optimal for alternative architectures with sparse or otherwise poorly informative parameter Jacobians. Among them, morphological networks [2, 3, 4, 5] are of particular interest due to their lack of multiplications — making them potentially more inference-efficient than their linear counterparts — and their rich supporting theoretical foundation [6, 7, 8, 9]. These networks are based on the morphological operations of dilation and erosion, replacing addition by maximum and multiplication by addition. Modern architectures include the Min-max-plus network of [10] and MPM networks of [11], which are based on the representation theory of mathematical morphology [8, 12] and come with theoretical guarantees.
Morphological networks [13, Chap.4] are notoriously difficult to train. As shown in [14, 15, 11], this difficulty stems from the sparsity of their gradient signals. In addition, [11] argues that the non-informativeness of the gradient is also a limiting factor. [11] tackles this by using depth to allow the gradient signal to disperse across all variables of the input. However, in many modern applications the feed-forward components comprise very shallow blocks of the network; see for instance the fully connected layers of transformer blocks. From the representation theorem of mathematical morphology [8, 12], expressed in its discrete form [10, Thm. 4.2], we know that shallow networks of suprema of erosions should be expressive, as they are zeroth-order universal approximators. Although such networks can approximate function values, their derivatives need not approximate those of the target function, inhibiting efficient training. This leaves open the question: Can we reliably train shallow Min-max-plus networks despite the sparsity and non-informativeness of their gradient signals?
Normalization techniques and/or dropout [10, 16, 11] have been used to mitigate the issue. Smoothing techniques [17] change the forward operator so that ordinary chain-rule gradients become denser. We also work with a softened morphological operator, but rather than relying solely on the denser chain-rule gradients produced by smoothing, we replace the morphological weight update itself using a surrogate reward. Alternative optimization methods include the use of the convex-concave procedure for training dilation-erosion perceptrons [18] and min-max classifiers [19], but are limited to smaller networks. Our contributions are as follows:
• We frame the training of the weights of a softened morphological perceptron as a learning from experts’ advice problem in logarithmic space.
• We propose the first, to the best of our knowledge, correlation-based, MWU-inspired update for morphological weights that bypasses their sparse local Jacobian. In particular, we put forward a weight update method that rewards inputs that correlate well with the desired change in the output,
Code available: https://github.com/kostfoto/Morph-MWU.git regardless of whether they see a strong gradient signal.
• We evaluate our method empirically by training fully connected layers both as stand-alone networks on simple classification tasks, and as components of larger transformers.
Combining these building blocks as perceptrons, we can construct more complex functions, guaranteed by the representation theory of mathematical morphology [8, 12]: if is a 1-Lipschitz function, we can write it as a supremum over a combined erosion and anti-dilation:
By discretizing the representation theorem, we obtain an approximation of in the form of a Min-max-plus network [10]:
Training such a network using gradient descent can be troublesome due to the sparsity of the gradient signal during backpropagation and the non-first-order universality of the network [14, 15, 11]. The solution of [11] makes use of depth, which we here aim to keep small, as is usual for fully connected components.
Finally, in the learning from experts’ advice problem, we seek a distribution minimizing the regret of mixed predictions over given experts’ opinions . The Multiplicative Weights Update (MWU) [21] method solves this problem by rewarding well-performing experts via a reward , updating expert’s weight and re-normalizing. One of our contributions lies in the construction of the reward model .
3. METHOD
Consider a dilation with inputs and weights , as in (1). Its subdifferential with respect to the weights is given by
is a Lipschitz continuous function, and thus differentiable almost everywhere, and precisely when the argmax in the equation of the subdifferential is a singleton. In this case, all but one weights receive a gradient of 0, and optimization using gradient descent becomes inefficient.
Notice that a dilation as in (1) is essentially a competition among the inputs, with some a priori bias given to each input in the form of a weight . Our method is motivated by the Maslov dequantization of this maximum operator. We consider functions of the form
with weights w such that . Here, function as experts' opinions in log-space. is a distribution over the inputs, with the experts' weights in log-space. c is a common output translation that restores the common additive degree of freedom removed by normalizing the expert weights. controls the softness. In particular, as , y reduces to a dilation with unconstrained weights :
Suppose we are given the inputs over a batch , and that we can obtain some desired change in the outputs over . This can be obtained, for instance, via back-propagation as , where is a loss that depends on the layer-output . We decompose the desired change as follows:
d_{y(\mathbf{x};\mathbf{w},c)}=\underbrace{\mathbb{E}_{\mathcal{B}}[d(\mathbf{x};\mathbf{w},c)]}_{\text{handled by }c}+\underbrace{(d_{y(\mathbf{x};\mathbf{w},c)}-\mathbb{E}_{\mathcal{B}}[d(\mathbf{x};\mathbf{w},c)])}_{\text{handled by experts^{\prime}w_{i}}} \tag{3}The first term is a uniform desired drift in the values that the output takes. Since , the common translation can realize the uniform drift exactly. Thus, we apply a preconditioning step by updating to follow the common drift, and the weights to follow the centered desired change . Hence, we update as
Setting , differentiating the loss with respect to the expert probability , using the chain-rule, and preconditioning by propagating the centered instead of gives the following signal of desired change in :
We apply a Taylor expansion to the exponential to get
Dropping the higher order term — which becomes increasingly accurate as decreases — and taking expectation yields a linear surrogate of the preconditioned signal of desired change in , which we use as the reward model of an exponentiated-gradient/MWU scheme:
The reward measures whether expert i's advice varies across the batch in the same direction as the desired change of the layer-output. In probability-space, the expert probability is updated according to the above reward via a canonical exponentiated-gradient/MWU update step as
Note that is constant among the experts, and MWU is invariant to adding an expert-independent constant to all rewards. Hence, because , the method is equivalent to using the reward
which justifies it being termed correlational training.
Returning back to log-space, (6) corresponds to the following update of the weight :
(7)
where we can absorb into the step-size .
For hard morphology ( ), we use the corresponding zero-temperature limit: the same surrogate rewards update the morphological weights additively, followed by max-normalization .
For complex networks, we can run back-propagation as normal, retaining the inputs, outputs, and gradients of all intermediate dilations. Note that erosions, anti-dilations and anti-erosions can be expressed via dilations with negations of inputs and/or outputs. Then, we can update all non-morphological parameters of the network as normal, and the morphological parameters based on our MWU scheme. In practice, we also apply acceleration methods such as momentum or Adam over our MWU updates. We summarize our training method in Algorithm 1.
4. EXPERIMENTS
Experimental setup. We evaluate our method on six PMLB classification benchmarks [22], MNIST and Fashion-MNIST [23], and CIFAR-10 [24]. On PMLB, we use single-block
Algorithm 1 MWU-adjusted morphological training.
1: Run back-propagation to obtain the intermediate desired changes over the batch of all dilations comprising the network. Also maintain their inputs and outputs across the batch .
2: For all non-morphological parameters of the network, set .
3: For common output translation parameters , set .
4: For morphological weights set the reward , where and .
5: For some step-size , update all weights of the network according to
.
6: For all morphological weights , re-normalize:
.

(a) Transformers, CIFAR-10
(b) Fully connected, MNIST
Fig. 1: Training curves (mean ± std) of linear models (blue), morphological models under vanilla Adam (orange), and morphological models under our proposed method (green). Our method improves training dynamics over vanilla Adam.
hard ( ) Min-max-plus networks of width 128; on (Fashion-)MNIST, we use two-block soft ( ) networks of width 256. All blocks are implemented in max-min order and operate on signed inputs with learnable coordinate multipliers following [10]. On CIFAR-10, we use a six-block ViT with patch size 4, embedding dimension 128, and feed-forward width 256; the morphological ViT replaces its feed-forward modules by corresponding soft min-max morphological modules while leaving the remaining transformer architecture unchanged. ReLU MLPs and the standard ViT serve as parameter-matched conventional baselines, while our primary controlled comparison is between identical morphological models trained with vanilla back-propagation and with the proposed correlational update.
All models use Adam with zero weight decay and cross-entropy loss as a black-box accelerator. We train for 100
Table 1: Test performance of linear models, morphological models trained using ordinary back-propagation (BP), and the proposed correlational update, both accelerated using Adam, across several benchmarks. The fourth column corresponds to percentage-point difference with respect to ordinary BP. For image datasets we report accuracy; for PMLB balanced accuracy.
| Dataset | MLP / ViT | Morph. + BP | Morph. + Corr. (ours) | Δ vs. BP (pp) |
|---|---|---|---|---|
| CIFAR-10 | 81.08 ± 0.33 | 63.96 ± 0.88 | 70.20 ± 0.62 | +6.24 |
| Fashion-MNIST | 88.94 ± 0.34 | 62.66 ± 8.18 | 86.03 ± 0.36 | +23.37 |
| MNIST | 98.19 ± 0.20 | 62.46 ± 8.90 | 95.30 ± 0.38 | +32.84 |
| Adult | 78.99 ± 1.15 | 59.14 ± 12.52 | 78.13 ± 1.08 | +18.99 |
| Chess | 98.96 ± 0.33 | 68.70 ± 8.29 | 87.89 ± 12.69 | +19.19 |
| Ionosphere | 90.48 ± 2.94 | 78.38 ± 16.03 | 83.65 ± 4.74 | +5.27 |
| Mushroom | 99.98 ± 0.05 | 73.01 ± 21.35 | 96.32 ± 2.57 | +23.31 |
| Phoneme | 84.21 ± 0.81 | 67.58 ± 11.61 | 78.45 ± 2.65 | +10.87 |
| Spambase | 92.98 ± 0.81 | 87.51 ± 2.53 | 87.36 ± 1.99 | -0.15 |
epochs on PMLB and 50 epochs on the image datasets, with batch sizes 32 and 64, respectively. Learning rates are selected for stable training: is used for all PMLB experiments, for CIFAR-10, and on (Fashion-)MNIST for correlational training and otherwise. We report accuracy on the image datasets and balanced accuracy on PMLB. Image training sets are split into training and validation sets while retaining the official test sets; PMLB uses stratified train/validation/test splits. PMLB features are standardized using training-set statistics, and CIFAR-10 uses standard random crop and horizontal-flip augmentation during training only. We select the checkpoint with the best validation metric and report test mean and standard deviation over five seeds (42-46); for PMLB, each seed determines a split shared by all compared methods.
Main results. Table 1 reports test performance across all benchmarks. Correlational training improves the morphological model over vanilla back-propagation on eight of the nine tasks, with gains ranging from 5.27 to 32.84 percentage points, while performance on Spambase remains essentially unchanged. The largest gains occur on MNIST (+32.84 pp), Fashion-MNIST (+23.37 pp), Mushroom (+23.31 pp), Chess (+19.19 pp), and Adult (+18.99 pp). On Adult, the proposed method nearly closes the gap to the MLP baseline (78.13% vs. 78.99%); similarly, on MNIST and Fashion-MNIST it recovers most of the performance lost when the same morphological architectures are trained with ordinary back-propagation. The proposed training rule substantially closes the gap to MLP/ViT, but does not generally eliminate it; the conventional MLP/ViT baselines remain stronger on most tasks, indicating that our contribution primarily addresses the trainability of morphological architectures, providing a promising first step toward closing this gap.
Training dynamics. Figure 1 illustrates the optimization behavior on MNIST and CIFAR-10. On MNIST, vanilla training of the Min-max-plus network converges slowly and showcases substantial dependence on the chosen seed, whereas correlational training rapidly reaches high accuracy and remains stable across runs. The same qualitative behavior persists when min-max-plus layers replace the feed-forward component of transformer blocks: on CIFAR-10, the morphological ViT improves from under vanilla training to under the proposed correlational update. The reduction in variance is also apparent across several PMLB datasets; for example, the standard deviation decreases from 12.52 to 1.08 percentage points on Adult and from 21.35 to 2.57 on Mushroom. These results suggest that the proposed update not only improves final performance, but also reduces the tendency of optimizing morphological layers to converge to poorly performing solutions.
Limitations. A remaining challenge is the hard limit , where morphology becomes increasingly sparse and harder to optimize. Our method is beneficial in this regime, as shown by the hard PMLB experiments, but on image classification the softened setting was more competitive. Thus, bridging soft and hard morphology remains an open optimization challenge rather than one specific our method.
5. CONCLUSION
We proposed a correlation-based weight update rule for morphological neural networks based on a learning-from-experts interpretation of softened morphological perceptrons. Instead of relying on the sparse local Jacobian of the morphological weights, our method uses a centered layer-output gradient and its correlation with the activations of each input to construct expert rewards, and updates normalized log-weights using an EG/MWU-inspired rule. Across stand-alone Min-max-plus networks and morphological transformer blocks, the method substantially improves both performance and training stability over ordinary back-propagation, with gains on eight of the nine tested benchmarks. While conventional MLP and ViT baselines remain stronger on most tasks, our results indicate that poor first-order trainability can substantially underestimate the practical capability of morphological architectures.
References
[1] I. Goodfellow, Deep learning, vol. 196, MIT press, 2016.
[2] J. L. Davidson and F. Hummer, “Morphology neural networks: An introduction with applications,” Circuits, Systems and Signal Processing, vol. 12, no. 2, pp. 177–210, 1993.
[3] P.-F. Yang and P. Maragos, “Min-max classifiers: Learnability, design and application,” Pattern Recognition, vol. 28, no. 6, pp. 879–899, 1995.
[4] G. X. Ritter and P. Sussner, “An introduction to morphological neural networks,” in Proceedings of 13th International Conference on Pattern Recognition, 1996.
[5] L. F. Pessoa and P. Maragos, “Neural networks with hybrid morphological/rank/linear nodes: a unifying framework with applications to handwritten character recognition,” Pattern Recognition, vol. 33, no. 6, pp. 945–960, 2000.
[6] R. M. Haralick, S. R. Sternberg, and X. Zhuang, “Image analysis using mathematical morphology,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. PAMI-9, no. 4, pp. 532–550, 1987.
[7] H. J. Heijmans, Morphological Image Operators, Academic Press, Boston, 1994.
[8] P. Maragos and R. Schafer, “Morphological filters—part i: Their set-theoretic analysis and relations to linear shift-invariant filters,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 35, no. 8, pp. 1153–1169, 1987.
[9] J. Serra, Image Analysis and Mathematical Morphology, Acad. Press, New York, 1982.
[10] Y. Luo and S. Fan, “Min-max-plus neural networks,” arXiv preprint arXiv:2102.06358, 2021.
[11] K. Fotopoulos and P. Maragos, “Training deep morphological neural networks as universal approximators,” arXiv preprint arXiv:2505.09710, 2025.
[12] G. J. F. Banon and J. Barrera, “Decomposition of mappings between complete lattices by mathematical morphology, part i. general lattices,” Signal Processing, vol. 30, no. 3, pp. 299–327, 1993.
[13] P. Maragos, Topics in Computer Vision and Machine Learning, Kallipos, Open Academic Editions, 2025, http://doi.org/10.57713/kallipos-1097.
[14] N. Dimitriadis and P. Maragos, “Advances in morphological neural networks: Training, pruning and enforcing shape constraints,” in Proc. ICASSP 2021, 2021.
[15] M. Dimitrova, S. Blusseau, and S. Velasco-Forero, "Learning morphological representations of image transformations: Influence of initialization and layer differentiability," in Discrete Geometry and Mathematical Morphology. 2026, vol. 16296 of LNCS, Springer.
[16] Y. Zhang, S. Blusseau, S. Velasco-Forero, I. Bloch, and J. Angulo, “Max-plus operators applied to filter selection and model pruning in neural networks,” in Mathematical Morphology and Its Applications to Signal and Image Processing. 2019, vol. 11564 of LNCS, Springer.
[17] J. Masci, J. Angulo, and J. Schmidhuber, “A learning framework for morphological operators using counter-harmonic mean,” in Mathematical Morphology and Its Applications to Signal and Image Processing. 2013, vol. 7883 of LNCS, Springer.
[18] V. Charisopoulos and P. Maragos, “Morphological perceptrons: Geometry and training algorithms,” in Mathematical Morphology and Its Applications to Signal and Image Processing. 2017, vol. 10225 of LNCS, Springer.
[19] M. E. Valle and I. Cunha, “Training morphological perceptron with competitive layer using convex-concave procedure,” Journal of Mathematical Imaging and Vision, vol. 68, no. 4, pp. 46, 2026.
[20] J. Serra, Ed., Image Analysis and Mathematical Morphology, vol. 2: Theoretical Advances, Acad. Press, New York, 1988.
[21] S. Arora, E. Hazan, and S. Kale, “The multiplicative weights update method: a meta-algorithm and applications,” Theory of Computing, vol. 8, no. 6, pp. 121–164, 2012.
[22] R. S. Olson, W. La Cava, P. Orzechowski, R. J. Urbanowicz, and J. H. Moore, “PMLB: a large benchmark suite for machine learning evaluation and comparison,” BioData Mining, vol. 10, no. 1, pp. 36, Dec 2017.
[23] L. Deng, “The MNIST database of handwritten digit images for machine learning research [best of the web],” IEEE Signal Processing Magazine, vol. 29, no. 6, pp. 141–142, 2012.
[24] A. Krizhevsky, G. Hinton, et al., “Learning multiple layers of features from tiny images,” 2009.