Abstract
We formulate the training of a fully connected feed-forward neural network with two hidden layers as a nonlinear programming framework with integer-parameterized architectures. The upper level selects an L2 regularization coefficient , a learning rate , and admissible hidden widths to minimize the compactness-augmented objective , where is the deterministic output of N Adam iterations on . The continuous relaxation is solved with projected L-BFGS-B and feasible finite-difference gradients; integer architectures are handled by exhaustive enumeration over a finite set . We establish: (i) coercivity and attainment of the inner objective for under full-parameter L2 regularization; (ii) attainment of the upper-level problem under lower semi-continuity on the compact hyperparameter box; (iii) conditional KKT accumulation of projected L-BFGS-B under idealized smoothness and vanishing finite-difference assumptions. The framework is validated on five synthetic two-dimensional binary classification benchmarks using the fixed architecture to isolate the continuous optimization level. Across the five datasets, the optimized network reaches a Frobenius weight norm – smaller than the baseline while the classification accuracy gap stays within to percentage points. A three-dimensional visualization of the upper-level objective in reveals a smooth small- basin and a steep ridge of trivial near-zero weight solutions near the upper regularization bound.
1. Introduction
Two-hidden-layer fully connected neural networks remain canonical models for low-dimensional binary classification, yet their behavior depends sensitively on the L2 regularization coefficient and the learning rate [1,2]. In compact-deployment settings, the user also faces discrete architectural choices: selecting hidden widths from a finite admissible set and selecting continuous hyperparameters that control accuracy and weight magnitude. We use the term compact-weight training rather than memory-efficient training: with a fixed architecture, the number of stored parameters is unchanged, and the reported compactness is a reduction in the Frobenius norm of the trained weights; structural memory reduction would require the integer level to select a smaller architecture.
Hyperparameter optimization is often treated by black-box methods such as Bayesian optimization and random search [3,4], whereas L-BFGS-B and related quasi-Newton methods provide structured tools for smooth box-constrained nonlinear programs [5,6,7]. This paper connects these viewpoints for a small feed-forward network whose weights are produced by a finite Adam recursion [8]. The continuous relaxation is solved by projected L-BFGS-B with feasible finite-difference gradients, and integer widths are handled by outer enumeration over a finite architectural set . The implementation is available as a single Python 3.13 module [9].
The contributions are: (i) an explicit mixed-integer nonlinear formulation with an algorithmic inner map , rather than an ambiguous nonconvex argmin; (ii) structural results on inner coercivity, upper-level attainment under lower semi-continuity, and conditional KKT accumulation of projected L-BFGS-B; (iii) a fixed-architecture validation on five synthetic datasets showing 6.4–43.7% Frobenius norm reduction with an accuracy gap in percentage points; (iv) a surface analysis explaining the role of the upper bound in avoiding trivial near-zero-weight solutions.
Section 2, Section 3 and Section 4 give the formulation and mathematical analysis, with the algorithmic two-level structure summarized in Figure 1; Section 5 reports the experiments; Section 6 concludes.
Figure 1.
Two-level structure of the continuous relaxation : L-BFGS-B searches over , while each upper-level objective evaluation calls a finite N-step Adam recursion that returns , the network parameters obtained after N Adam iterations from the deterministic initialization .
2. Problem Formulation
2.1. Network and Admissible Architectures
Let be a feature matrix of m samples and let be the associated binary labels. The classifier is a two-hidden-layer feed-forward network of the form
where is the logistic function and is a configurable activation, taken as ReLU in all the experiments. The weight matrices are , , , with bias vectors , (where ). The full parameter is
For the purpose of regularization we write for the vector that stacks all weight and bias entries of W. The full Euclidean norm of is then
We will explicitly distinguish between the full-parameter norm (3), used for regularization and coercivity arguments, and the weight-only Frobenius norm
used as the compactness diagnostic in the upper-level objective and reported in the experimental tables.
The integer hidden widths are constrained to a finite architectural admissible set
which encodes the discrete decision component of the program. The theoretical formulation and Algorithm 1 apply to any finite admissible set . In the computational validation, we use the singleton set
so that the experiments isolate the continuous optimization level in without introducing additional variability from architectural search. A larger architectural set, such as , can be handled by the same outer enumeration in Algorithm 1 but is not used to generate the numerical results reported here.
| Algorithm 1 Solver for : outer enumeration plus inner L-BFGS-B |
| Require: Data ; admissible set ; box ; weight ; inner length . Ensure: Tuple approximately solving .
|
2.2. Loss, Regularization and the Compactness Diagnostic
For a fixed architecture , define the binary cross-entropy loss as
where is the output in (1); for the theoretical bounds and the numerical implementation, the sigmoid output is clipped to with a fixed before evaluating the logarithms. The inner (lower-level) objective combines BCE and L2 regularization on the full parameter :
Regularizing the full parameter vector (weights and biases) is the convention required for the coercivity argument of Theorem 1 below; it differs marginally from the bias-free L2 convention of textbook references [1,2], with no practical impact in our experiments since the trained biases remain small relative to the weights.
The upper-level objective penalizes the weight-only Frobenius norm as a compactness diagnostic:
where denotes the deterministic output of N Adam iterations on the inner objective (defined precisely in Section 3). Because the weight-only norm is the quantity that practitioners customarily monitor for weight compactness, we keep rather than in the upper-level penalty; the two coincide up to a small bias contribution in all our experiments.
2.3. The Mixed-Integer Nonlinear Program
The full problem is
where denotes N iterations of the Adam recursion applied to starting from a deterministic Xavier initialization that depends on the architecture but not on the hyperparameters. The decision variables enter both through (an integer constraint) and through the dimension of the weight space; the variables are continuous and box-constrained. The problem is therefore mixed-integer, nonlinear and bilevel. The choice small (we use ) keeps classification dominant in (9); the role of is discussed below.
Remark 1
(Algorithmic vs. variational inner solution). A variational definition is unsuitable here because is nonconvex and the argmin set need not be single-valued. We therefore define as the deterministic N-step Adam output. This makes the upper objective single-valued, explicitly incorporates the learning rate α, and matches the implementation.
Definition 1
(Continuous relaxation). Fix . The continuous relaxation of is obtained by holding the integer pair fixed and minimizing over the rectangle .
3. Lower-Level Nonconvex Problem and Adam Map
3.1. The Adam Recursion
For fixed hyperparameters and fixed architecture, the lower level is a continuous, piecewise differentiable nonconvex unconstrained problem; under ReLU, gradients are understood in the usual implementation sense, with an arbitrary admissible subgradient selected at kink points. The algorithmic choice in the code is the Adam optimizer [8]. With , , and bias-corrected first and second moments , one iteration reads
where , , ⊙ is the Hadamard product and ⊘ is element-wise division. The recursion is initialized with Xavier weights and zero biases, with a fixed random seed so that the initial point depends on but not on . We denote the resulting deterministic map of length N by
which is the precise object that enters the upper-level objective (9).
3.2. Existence of Lower-Level Minimizers
Theorem 1
(Inner coercivity and attainment). For every fixed and every architecture , the inner objective defined in (8) is continuous, bounded below, and coercive, namely
Consequently attains its infimum on , and the argmin set is nonempty.
Lemma 1
(BCE is bounded and continuous under output clipping). Let be the clipped sigmoid output with . Then, the BCE map in (7) is continuous on and satisfies
Proof.
The composition is the composition of finitely many affine maps with the continuous activations (ReLU) and , projected to by the clip; hence, it is continuous in W. For each sample, , and, since , both and lie in , so each summand is at most . Averaging over m samples gives (14). □
Proof of Theorem 1.
By Lemma 1, is continuous on and bounded in . The map is continuous, non-negative, and quadratic in the full parameter; in particular, it tends to as whenever . Since is the identity reshape of the parameter, we have , so the regularizer penalizes every entry of W. Adding the two terms reveals that is continuous on , bounded below by 0, and satisfies
which is exactly (13). By the Weierstrass theorem [10], the sublevel set is nonempty (it contains 0) and bounded (otherwise, we could extract a sequence with , contradicting coercivity), hence becoming compact since it is closed. The continuous function attains its infimum on , and since any minimizer must satisfy , this minimizer is global on . Therefore, . □
Remark 2
(Why full-parameter L2 is needed). A bias-free L2 penalty would not be coercive on the full-parameter space: one may set all weight matrices to zero and let a bias vector diverge while the BCE remains bounded by Lemma 1. The full-parameter penalty (8) removes this gap. Numerically, this adjustment is negligible in the reported runs because the trained biases remain small relative to the weights.
Remark 3.
Theorem 1 guarantees the existence but not the uniqueness of a lower-level minimizer: is nonconvex in W due to the composition with the activation ϕ, and multiple local minima are routine. The Adam map in (12) is a deterministic surrogate that returns one specific point in the parameter space after N iterations; this surrogate is what enters the upper-level objective, by the convention adopted in Remark 1 and Equation (10b). Throughout we use in the L-BFGS-B inner evaluations and (with early stopping) for the final retraining at the optimized hyperparameters.
3.3. Empirical Lower-Level Convergence
Figure 2 reports the training loss, classification accuracy, and Frobenius norm of on the Spiral dataset for two distinct choices of : the unstructured baseline and the L-BFGS-B-tuned pair obtained on the same problem. The baseline converges faster in accuracy but reaches a much larger weight norm; the L-BFGS-B-tuned pair drives to a significantly smaller value at the price of a slower-accuracy ramp-up. Both trajectories use early stopping with patience 80 and two learning-rate decays of factor , exactly as in the implementation.
Figure 2.
Adam trajectory on Spiral for the baseline and L-BFGS-B-tuned hyperparameters. Here, denotes the hyperparameter pair returned by the upper-level L-BFGS-B optimization. (left) Training loss ; (centre) accuracy; (right) Frobenius weight norm.
4. Upper-Level Mixed-Integer Nonlinear Program
4.1. Attainment of the Upper-Level Infimum
We now switch to in (9). Throughout, the inner map is the deterministic Adam recursion of length defined in (12), starting from the deterministic Xavier initialization .
Theorem 2
(Upper-level attainment under lower semi-continuity). Fix and the inner recursion parameters . Assume that the finite-step upper-level objective defined in (9) is lower semi-continuous on the compact rectangle . Then, the continuous relaxation is feasible, f is bounded below by 0, and its infimum is attained on . If is finite and the same lower semi-continuity assumption holds for every , then the full problem in (10) admits an optimal .
Proof.
The rectangle is nonempty and compact. The point is feasible, so is feasible. Since and , the upper-level objective satisfies on . By assumption, f is lower semi-continuous on the compact set ; therefore, by the Weierstrass extreme-value theorem for lower semi-continuous functions on compact sets [10], f attains its infimum on . If is finite, the collection of architecture-wise minima is finite and nonempty. Thus, its minimum is attained by enumeration. This gives an optimal tuple for . □
Remark 4
(Regularity of the finite-step objective). The lower semi-continuity assumption in Theorem 2 is deliberately stated explicitly. It is automatic if the activation used in the inner recursion is smooth, such as softplus, and if the training schedule is fixed for exactly steps. In the implementation reported here, the activation is ReLU, the sigmoid output is clipped, and the L-BFGS-B objective evaluation uses a fixed finite Adam budget. This produces a piecewise smooth objective in practice, but it is safer mathematically to state upper-level attainment as a conditional structural result rather than to claim unconditional smoothness for a ReLU-trained bilevel map.
Remark 5
(Boundedness below). A more quantitative lower bound is available: since everywhere and , we have on . The infimum is therefore in .
4.2. Projected L-BFGS-B with Finite-Difference Gradient
The upper-level relaxation (10a)–(10d) is solved with the projected quasi-Newton L-BFGS-B method [5,6]. At iterate , the algorithm produces a search direction
where is the L-BFGS limited-memory inverse-Hessian approximation built from the last pairs of curvature information , and is computed with feasible one-sided finite differences inside the box:
where . For sufficiently small (and, in particular, for the value used in the computations), the perturbed point remains feasible for all . The direction is projected onto to maintain feasibility, the step length is chosen by Armijo–Wolfe line search, and the iteration is terminated when with or after 40 outer iterations.
4.3. Conditional KKT Accumulation Statement
For the box-constrained relaxation the Karush–Kuhn–Tucker conditions at a point read
where is the Euclidean projection onto the rectangle . Equation (18) is the standard fixed-point characterization of a stationary point of a continuously differentiable function over a closed convex set [10].
Because the bilevel objective f defined in (9) arises from a -step Adam recursion through a ReLU network—and is therefore at best Lipschitz continuous on , with a measure-zero set of nondifferentiability inherited from the ReLU breakpoints—we phrase the convergence statement of projected L-BFGS-B as a conditional proposition under explicit idealized hypotheses, rather than as an unconditional theorem.
Proposition 1
(Conditional KKT accumulation of projected L-BFGS-B). Assume that:
- (H1)
- The bilevel objective f admits a continuously differentiable extension on the closed rectangle , i.e., ;
- (H2)
- (H3)
- The Armijo–Wolfe line search is well-defined at every iterate and satisfies sufficient decrease;
- (H4)
- The L-BFGS curvature pairs satisfy the positive-curvature condition .
Proof sketch.
Under (H1)–(H4), the claim is a particularization of the convergence theorem of Byrd–Lu–Nocedal–Zhu for L-BFGS-B [5] (Theorem 6.3), [6] (Section 3). The cited result assumes continuous differentiability of the objective on the feasible box (provided by (H1)), the positive-curvature condition (provided by (H4)), and a step length chosen by Armijo–Wolfe to enforce sufficient decrease (provided by (H3)). The only additional ingredient here is the use of a finite-difference gradient (17) instead of an analytic gradient. By the mean value theorem applied component-wise, for some on the feasible segment joining p and ; under (H1), the partial derivatives are continuous on the compact and hence uniformly continuous, so (H2) yields uniformly on as , and the conclusion of the cited theorem applies on the limit. Compactness of guarantees the existence of accumulation points. □
Remark 6
(Gap between theory and implementation). The implementation does not satisfy all idealized hypotheses of Proposition 1: ReLU makes f piecewise smooth rather than globally , and SciPy uses a fixed finite-difference step rather than [11]. Early stopping and learning-rate decay are used only for final post-optimization training curves, not inside the finite-step objective evaluated by L-BFGS-B. Thus, the proposition is a structural justification of the pipeline, while the computed iterate should be interpreted as an approximate KKT point affected by finite-difference and non-smoothness residuals.
4.4. Integer Enumeration over Architectures
The integer pair is handled by an outer enumeration: for every , the continuous relaxation is solved by Algorithm 1 and the best value is reported. Since is finite, the enumeration is exhaustive and finite-time. In the numerical study below we set , so the enumeration contains one architecture and the reported empirical effect comes from the continuous L-BFGS-B level. This conservative choice avoids claiming architecture-search results that were not generated, while preserving the mixed-integer formulation and the exact algorithm needed for larger finite architectural sets.
The inner cost of evaluating is one Adam recursion of length , which is floating-point operations. The total cost of Algorithm 1 is therefore , where is the number of inner evaluations of f that L-BFGS-B performs.
5. Experimental Results
5.1. Experimental Setup
We instantiate Algorithm 1 on the five synthetic two-dimensional balanced binary classification datasets shown in Figure 3: Spiral, Moons, Circles, XOR and Gaussians. Each dataset contains samples, is standardized component-wise, and is generated with a fixed random seed for reproducibility. The reported experiments use the fixed architectural admissible set , so both the baseline and optimized networks have the same structural parameter count . We set in (9), for the inner Adam pre-training, a full training horizon of 1200 epochs with early stopping patience 80, and use the ReLU activation. All computations were carried out with the script accompanying this paper [9].
Figure 3.
Five synthetic two-dimensional balanced binary classification benchmarks used in the experiments; each dataset contains 400 standardized points. Blue and red points represent the two binary classes.
For each dataset we compare two trained networks:
- The baseline, trained at the canonical unstructured hyperparameters on the fixed architecture ;
- The optimized network, trained at the pair returned by Algorithm 1 for the same fixed architecture .
Both networks share the architecture, seed, training horizon and early stopping policy; they differ only in the continuous hyperparameters .
5.1.1. Determinism of the Training Pipeline
The entire pipeline is fully deterministic. Gradients are evaluated in full-batch mode over all samples, with no mini-batch sampling, no inter-epoch data shuffling, and no stochastic augmentation; the Adam recursion (11) is a deterministic map; the Xavier initialization and the dataset generator are each driven by a fixed random seed; and all computations are carried out on CPU in double precision with NumPy/SciPy [11], without nondeterministic GPU kernels. Consequently, for a fixed and architecture, the trained weights are reproduced bit-for-bit across independent executions, so every quantity in Table 1 is an exact value rather than a sample mean. We verified this explicitly: repeating each run yielded differences of exactly 0 (machine-zero) in both classification accuracy and Frobenius norm, so reporting the mean and standard deviation over independent runs would give a degenerate zero standard deviation. Run-to-run variability therefore does not affect the single-point values reported in Table 1.
Table 1.
Quantitative comparison of the baseline network and the network trained at the L-BFGS-B-optimized hyperparameters across the five synthetic benchmarks. Architecture , parameter count , , and inner Adam steps for L-BFGS-B evaluation .
5.1.2. Choice of the Baseline Hyperparameters
The pair is a conventional default operating point rather than a value tuned in our favor. The learning rate is of the order of the canonical Adam default [8], and is a standard weak L2 regularization strength for feed-forward classifiers [1,2]. To confirm that this point is representative rather than a deliberately weak reference, we evaluated a coarse grid of values around it on the Spiral dataset under the identical training protocol: the baseline attains and lies inside a broad high-accuracy plateau (accuracy for all and ). The reductions in Table 1 therefore cannot be attributed to an artificially poor baseline, since the comparison point is itself accuracy-competitive.
5.2. Quantitative Results: Accuracy and Weight Norm
The principal quantitative results are collected in Table 1. The optimized network achieves a Frobenius weight norm that is between and smaller than that of the unstructured baseline. Because the architecture is fixed at in both conditions, this reduction should be interpreted as compact-weight training rather than as a reduction in structural memory footprint. The classification accuracy is preserved exactly on Moons and Circles, remains within percentage points on Gaussians, drops by percentage point on XOR, and degrades by percentage points on the harder Spiral dataset. These results jointly confirm the intuition behind the formulation: the L-BFGS-B level systematically discovers a regularization–learning rate pair that compresses the weight vector at a moderate or null accuracy cost.
A complementary view of the same results is given in Figure 4: the absolute Frobenius norm of the weight vector drops for every dataset, with the largest gains on the well-separated Moons and Circles (43– reduction) and the smallest on the already-easy Gaussians (, on which the baseline norm is already moderate).
Figure 4.
Frobenius weight norm before and after L-BFGS-B-based hyperparameter optimization. Annotations report relative reduction.
5.3. Scope of the Integer Level in the Present Experiments
The formulation in (10) and Algorithm 1 are mixed-integer because may be selected from any finite architectural admissible set . The numerical study in this proceeding paper deliberately uses the singleton set , so the empirical results in Table 1 validate the continuous L-BFGS-B level rather than a full multi-architecture search. This distinction is important: the reduction reported in Table 1 is a reduction in the Frobenius norm of the trained weights, not a reduction in the number of stored parameters. A genuine structural memory comparison would require running Algorithm 1 on a larger set such as and reporting the selected architecture and parameter count for each dataset; this is retained as a direct extension of the present framework.
5.4. Convergence of the Upper-Level Optimizer
Figure 5 shows the cumulative best-so-far value of the L-BFGS-B iteration on each dataset. The Moons and Circles benchmarks exhibit fast monotone descent reaching a numerical plateau within the first ∼20 evaluations; the Spiral, XOR and Gaussians benchmarks reach the plateau more slowly, with the descent profile reflecting the geometry of f on each dataset (cf. Figure 6). The number of inner evaluations ranges from 93 (XOR) to 309 (Circles), well within the maximum budget of 40 outer iterations.
Figure 5.
Cumulative best-so-far value of the upper-level L-BFGS-B optimizer. Each function evaluation costs one Adam recursion of length .
Figure 6.
Upper-level objective surface on Spiral at . (Left) 3D view with L-BFGS-B path and optimum. (Right) Level sets and projected path; the small- basin contrasts with the sharp near-zero weight ridge close to .
5.5. Three-Dimensional Structure of the Upper-Level Objective
To understand the geometric reason for the success of the L-BFGS-B step, we evaluate on a regular logarithmic grid over for the Spiral dataset at the fixed architecture , with ranging over and over . Each grid point costs one Adam recursion of length . Figure 6 renders the resulting surface and level sets with the L-BFGS-B path. The surface exhibits: a smooth small- basin () where L-BFGS-B settles; a steep near-zero weight ridge close to , where the classifier approaches chance performance () and the objective is driven mainly by the compactness term; and a descent path that remains in the useful basin instead of entering the trivial ridge. Thus, the upper bound is not cosmetic: it prevents the search from being dominated by excessively regularized near-zero weight solutions.
The shape of f in Figure 6 explains a structural calibration choice that motivated the bounds in (10c) and (10d): the lower bound prevents the formulation from degenerating into the unregularized case where becomes admissible, and the upper bound keeps this near-zero-weight ridge from expanding into increasingly over-regularized regimes. Similarly, excludes both pathologically slow inner trajectories () and Adam-divergent regimes ( too large). Together, the four box constraints define a compact closed convex region in which Algorithm 1 is well-posed; under the lower-semicontinuity hypothesis of Theorem 2, an optimum is attained inside this region.
5.6. Decision-Boundary Inspection
A qualitative confirmation that the weight-norm reduction does not destroy the classification structure is provided in Figure 7, which plots the decision boundary of both networks on the Spiral dataset. Both classifiers separate the two intertwined arms of the spiral correctly on most of the support of the data; the L-BFGS-B-tuned classifier produces a slightly smoother boundary, consistent with a smaller weight norm and the standard intuition that stronger L2 regularization yields more regular decision frontiers [2].
Figure 7.
Decision boundary of the baseline (left) and L-BFGS-B-tuned (right) network on Spiral; the contour separates the classes.
5.7. Sensitivity to the Compactness Weight
The argument above relies on being small enough that classification, rather than compactness, dominates the upper-level objective (9). To make this dependence explicit and quantitative, we sweep over more than two decades and, for each value, locate the global minimizer of on the same logarithmic grid over used in Figure 6 (Spiral, , ). Reading the minimizer off the grid isolates the effect of on the objective landscape itself, independently of the local behavior of the finite-difference L-BFGS-B iteration. Table 2 reports the minimizing pair together with the binary cross-entropy and the classification accuracy attained there.
Table 2.
Sensitivity of the upper-level objective to the compactness weight (Spiral, architecture , ). For each , the row reports the global minimizer of f over the logarithmic grid of Figure 6, with the BCE and classification accuracy attained at that minimizer. Only keeps the minimizer inside the useful small- basin.
The trend is sharp. At , the global minimizer remains inside the small- basin () and yields a usable classifier ( accuracy, ). For every larger value the minimizer migrates onto the near-zero weight ridge: climbs to, and then saturates at, ; the accuracy collapses to chance (); and the BCE locks at , exactly the chance reference identified in the surface analysis of Figure 6. Beyond this threshold, the compactness term dominates and the formulation degenerates into the trivial near-zero weight solution. The chosen value is thus the stable operating point used throughout Table 1: it is the largest tested weight that still leaves the objective minimizer in the operationally meaningful region.
5.8. Discussion
The norm reductions in Table 1 are larger than on four out of five datasets, beyond the few-percent variability observed for fixed hyperparameters, and the same pattern is visible in Figure 4. The largest accuracy degradation (4 percentage points) occurs on Spiral, the hardest dataset; the optimized network reaches with a much smaller norm, and a longer inner training horizon could reduce this gap at greater computational cost. Finally, the bounds in (10c) and (10d) are essential: as quantified in the -sensitivity analysis of Section 5.7 (Table 2), increasing beyond drives the upper-level minimizer to and collapses accuracy to chance, confirming that a small together with a finite upper regularization bound is necessary for a usable formulation [3,4].
6. Conclusions
We presented a nonlinear programming framework with integer-parameterized architectures for compact-weight training of a two-hidden-layer feed-forward classifier. The upper level minimizes a weight norm-augmented BCE over a compact box of values, the lower level returns the deterministic Adam output , and finite architectural sets can be handled by outer enumeration. Theorem 1 proves lower-level coercivity and attainment under full-parameter L2 regularization; Theorem 2 gives upper-level attainment under lower semi-continuity; and Proposition 1 states conditional KKT accumulation for projected L-BFGS-B with finite differences, with the implementation gap made explicit in Remark 6. On five synthetic datasets and the fixed architecture , the method reduces the Frobenius weight norm by 6.4–43.7%, with no accuracy loss on two datasets and at most a 4 percentage-point loss on Spiral.
The surface analysis in Figure 6 shows why the upper bound is structurally important: it limits the influence of the trivial near-zero weight ridge and keeps the search inside a compact, operationally meaningful region. Future work should activate the integer level on larger architectural sets, replace finite differences with analytic or implicit gradients of the Adam recursion, and extend the formulation to multi-class classification through softmax and categorical cross-entropy.
Author Contributions
Conceptualization, K.L.O.C.; methodology, K.L.O.C.; formal analysis, Y.F.F.; investigation, K.L.O.C.; software, Y.F.F.; writing—original draft preparation, K.L.O.C.; writing—review and editing, K.L.O.C. and Y.F.F. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Acknowledgments
The authors acknowledge the academic context of the Universidad Politécnica Estatal del Carchi (UPEC) that supported the elaboration of this article.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016. [Google Scholar]
- Bishop, C.M. Pattern Recognition and Machine Learning; Springer: New York, NY, USA, 2006. [Google Scholar]
- Snoek, J.; Larochelle, H.; Adams, R.P. Practical Bayesian optimization of machine learning algorithms. Adv. Neural Inf. Process. Syst. 2012, 25, 2951–2959. [Google Scholar]
- Bergstra, J.; Bengio, Y. Random search for hyper-parameter optimization. J. Mach. Learn. Res. 2012, 13, 281–305. [Google Scholar]
- Byrd, R.H.; Lu, P.; Nocedal, J.; Zhu, C. A limited memory algorithm for bound constrained optimization. SIAM J. Sci. Comput. 1995, 16, 1190–1208. [Google Scholar] [CrossRef] [Scilit]
- Zhu, C.; Byrd, R.H.; Lu, P.; Nocedal, J. Algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound-constrained optimization. ACM Trans. Math. Softw. 1997, 23, 550–560. [Google Scholar]
- Nocedal, J.; Wright, S.J. Numerical Optimization, 2nd ed.; Springer: New York, NY, USA, 2006. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Ortega-Chávez, K.L.; Fernández-Fernández, Y. Entrenamiento Eficiente en Memoria de Redes Neuronales Mediante Programación No Lineal, v1.0.0; Zenodo: Geneva, Switzerland, 2026. [CrossRef]
- Bertsekas, D.P. Nonlinear Programming, 2nd ed.; Athena Scientific: Belmont, MA, USA, 1999. [Google Scholar]
- Virtanen, P.; Gommers, R.; Oliphant, T.E.; Haberland, M.; Reddy, T.; Cournapeau, D.; Burovski, E.; Peterson, P.; Weckesser, W.; Bright, J.; et al. SciPy 1.0: Fundamental algorithms for scientific computing in Python. Nat. Methods 2020, 17, 261–272. [Google Scholar] [CrossRef] [Scilit] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






