RUS  ENG
Full version
JOURNALS // Doklady Rossijskoj Akademii Nauk. Mathematika, Informatika, Processy Upravlenia // Archive

Dokl. RAN. Math. Inf. Proc. Upr., 2023 Volume 514, Number 2, Pages 80–90 (Mi danma453)

This article is cited in 3 papers

SPECIAL ISSUE: ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING TECHNOLOGIES

A new computationally simple approach for implementing neural networks with output hard constraints

A. V. Konstantinov, L. V. Utkin

Higher School of Artificial Intelligence Technologies, Peter the Great St.Petersburg Polytechnic University, St. Petersburg, Russia

Abstract: A new computationally simple method of imposing hard convex constraints on the neural network output values is proposed. The key idea behind the method is to map a vector of hidden parameters of the network to a point that is guaranteed to be inside the feasible set defined by a set of constraints. The mapping is implemented by the additional neural network layer with constraints for output. The proposed method is simply extended to the case when constraints are imposed not only on the output vectors, but also on joint constraints depending on inputs. The projection approach to imposing constraints on outputs can simply be implemented in the framework of the proposed method. It is shown how to incorporate different types of constraints into the proposed method, including linear and quadratic constraints, equality constraints, and dynamic constraints, constraints in the form of boundaries. An important feature of the method is its computational simplicity. Complexities of the forward pass of the proposed neural network layer by linear and quadratic constraints are $O(nm)$ and $O(n^2m)$, respectively, where $n$ is the number of variables, $m$ is the number of constraints. Numerical experiments illustrate the method by solving optimization and classification problems. The code implementing the method is publicly available.

Keywords: neural network, hard constraints, convex set, projection model, optimization problem, classification.

UDC: 004.8

Presented: A. L. Semenov
Received: 09.08.2023
Revised: 25.09.2023
Accepted: 15.10.2023

DOI: 10.31857/S2686954323601094


 English version:
Doklady Mathematics, 2023, 108:suppl. 2, S233–S241

Bibliographic databases:


© Steklov Math. Inst. of RAS, 2026