Abstract
This paper presents Neural-Spline Optimization (NSO), a structured learning framework for document image binarization in which a compact tensor-product B-spline surface replaces a fixed analytic fusion function within an explicit thresholding rule. Instead of learning a dense pixel-to-label mapping from scratch, NSO learns a low-dimensional decision surface over page-level intensity descriptors while preserving the analytical structure of the underlying binarization operator. The paper is focused on the computational and methodological aspects of learning this surface, and on the manner in which controlled adaptivity should be introduced around it. Three closely related variants are considered within a common formulation: direct global spline optimization, spline-guided pixel-domain refinement, and bounded residual learning in control-point space. The main new contribution is the residual control-point variant, which introduces data-driven updates directly in the spline parameter space while preserving a single global and exportable decision surface. The mathematical formulation includes spline construction, differentiable relaxation of the hard decision rule, structural objective design, and deployment-oriented regularization. The experimental analysis is concentrated on optimization behaviour, interpretability, and structural changes under a fixed public protocol. The resulting framework provides an interpretable and computationally compact alternative to purely pixel-based deep binarization models, with a balanced trade-off between accuracy, robustness, and deployment simplicity rather than uniform maximization of all evaluation measures.
Keywords
Introduction
Document image binarization converts a grayscale document into a foreground–background representation suitable for optical character recognition, layout analysis, archival restoration, and subsequent document understanding. The task remains challenging when documents contain non-uniform illumination, bleed-through, stains, faded ink, textured paper, or scanning artefacts. Classical global thresholding methods are often too rigid for such degradations, whereas local adaptive methods rely on assumptions that need not be valid uniformly across the page.1,2 Recent deep-learning systems, including convolutional, adversarial, and gated architectures, achieve strong benchmark performance on degraded document images.3–9 However, these systems typically depend on dense pixel-level prediction, high-capacity neural architectures, and only limited interpretability.
A useful observation is that many successful binarization rules are not arbitrary pixel mappings. They are explicit decision operators that compare local statistics with thresholds modulated by page-level characteristics. Such rules have interpretable parameters, deterministic behaviour, and low deployment cost. Nevertheless, when supervised data are available, structured rules are often replaced by end-to-end convolutional predictors. This paper follows the opposite direction: the decision rule is retained explicitly, and only a compact decision manifold that parameterizes it is learned.
The starting point is a prior public statistical-fusion formulation for document binarization, 10 in which a fixed analytic logistic-type function combines page-level text and background intensity descriptors and modulates a thresholding rule. That prior work also introduced the MCHAM metric and reported external benchmarking on public DIBCO datasets. The present manuscript does not claim those contributions as new. Its original contribution is computational and methodological: the fixed analytic fusion function is replaced by a learnable tensor-product B-spline surface, and the learning process is arranged so that the final decision logic remains explicit, auditable, and exportable.
Within this framework, three closely related NSO variants are studied. Model I optimizes the spline control-point heights directly and does not use a neural network. Model II retains the spline as a global prior but introduces a spline-guided U-Net for pixel-domain refinement. Model III, which is the main new contribution of this paper, predicts bounded residual updates directly in control-point space. This residual strategy preserves a single global decision surface while enabling controlled adaptation and faster convergence. The central scientific question is therefore not whether a larger network can improve binarization, but where adaptivity should be introduced when the objective is to preserve structured decision semantics.
The contribution of this paper can be summarized as follows.
A structured learning formulation for document image binarization in which the core decision rule remains explicit and only the fusion surface is learned as a low-dimensional tensor-product B-spline manifold. A unified mathematical treatment of surface construction, differentiable relaxation of the hard binarization operator, structural objective design, and deployment-oriented regularization. A systematic comparison of three model families that differ only in the point at which adaptivity is introduced: direct spline optimization, spline-guided pixel-domain refinement, and bounded residual learning in control-point space. A residual control-point strategy that performs neural adaptation directly in spline parameter space while preserving one global, interpretable, and exportable decision surface. A self-contained explanation of how the present contribution extends the earlier public statistical-fusion baseline and how the same public benchmark protocol is reused to isolate the incremental effect of learnable spline-surface optimization.
Accordingly, the purpose of the proposed framework is to study how explicit decision surfaces can be optimized while preserving interpretability and deployment simplicity.
The remainder of the paper is organized as follows. Section 2 positions the work in relation to document binarization, structured learning, and spline-based modeling. Section 3 states explicitly how this manuscript differs from the earlier public statistical-fusion work. Section 4 defines the problem and the page-level descriptors. Sections 5 and 6 introduce the spline decision surface and the corresponding binarization operator. Section 7 summarizes the evaluation criteria and the training-time relaxations. Section 8 presents the three NSO variants, and Section 9 gives the associated training and inference procedures. Optimization dynamics and interpretability are discussed in Section 10. Section 11 describes the public benchmark protocol, implementation details, and sensitivity analysis. Section 12 analyzes the results through pixel-level structural changes and qualitative comparisons. Section 13 discusses strengths, limitations, and practical implications, and Section 14 concludes the paper.
Related work
Document image binarization has progressed from global thresholding through local adaptive methods to hybrid and deep-learning formulations. In global approaches, one threshold is estimated from the full image histogram, as in Otsu-type methods. Such techniques are attractive because they are simple and deterministic, but they are highly sensitive to background variability. Local adaptive methods such as Sauvola-style, Niblack-style, Nick-style, Su-style, and regression-based variants estimate a threshold from neighborhood statistics and therefore better tolerate illumination changes, yet they often depend on window size, heuristic parameters, and assumptions about local stationarity.1,2,11,12 Recent reviews emphasize that strong degradations, bleed-through, and cross-domain generalization remain unresolved challenges despite decades of progress. 13 A large body of work on document image binarization has been developed and evaluated within the ICDAR and IJDAR research community, particularly through the DIBCO and H-DIBCO competitions.14–23 These benchmarks have driven the development of both classical and learning-based methods, including adaptive thresholding techniques, hybrid statistical models, and more recently fully convolutional and gated architectures that achieve state-of-the-art performance on degraded documents. For example, fully convolutional approaches have demonstrated performance exceeding competition-winning methods on multiple DIBCO datasets, highlighting the effectiveness of dense pixel-wise learning for binarization tasks.
Learning-based binarization methods treat the task as image restoration or segmentation. Convolutional and adversarial models such as DeepOtsu, CT-Net, DE-GAN, and GDB have shown strong benchmark performance, especially on degraded historical documents.3,4,6,8 Earlier convolutional formulations also demonstrated the usefulness of learned document-specific features and restoration-oriented training. 5 Additional hybrid directions combine classical preprocessing cues with learned refinement, for example through multichannel inputs or restoration-oriented pipelines.7,24,25 The prior statistical-fusion study 10 belongs to the structured, non-end-to-end side of this landscape: it retained an explicit analytical rule, introduced the MCHAM metric, and benchmarked the fixed logistic fusion formulation on public DIBCO data.
A second line of relevant work concerns structured and interpretable learning. In this literature, the goal is not only to improve predictive quality but also to preserve explicit constraints, meaningful parameters, and auditable behaviour. Hybrid analytical–learning systems, constrained optimization strategies, and rule-guided visual models have been explored in integrated engineering contexts. 26 Early work by Hung 26 demonstrated that neural learning can be coupled with structured optimization rather than treated as pure unconstrained backpropagation. Related studies investigated geometric and local-decision mechanisms in probabilistic neural models, 27 as well as fuzzy and logic-oriented interpretable neural systems. 28 These studies motivate the idea that learning can improve a system without fully replacing its explicit decision structure.
Spline-based models are relevant because B-splines provide smoothness, compact support, and low-dimensional parameterization. Spline representations have long been used in geometric modelling, approximation, and parameter fitting, including low-dimensional geometric reconstruction and point-set fitting. 29 In neural and hybrid settings, splines have been used as compact learnable function classes and smooth activation or representation mechanisms.30–32 In control and system identification, spline-based neural models have been combined with optimization and dynamic structures, including non-uniform rational B-splines (NURBS)-based Hammerstein identification,33,34 B-spline neural identification for linear-dynamic systems, 35 B-spline controllers in power electronics, 36 and adaptive B-spline neural networks for robust control. 37 In geometric deep learning, spline kernels define continuous convolutions on irregular domains, 38 while physics-informed spline parameterizations have been used for continuous-field approximation under partial differential equation (PDE) constraints.39,40 Most of that work uses splines to represent signals, fields, or latent transformations. Our use of splines is different: the spline does not synthesize the output document image. Instead, it parameterizes a low-dimensional decision surface that modulates a classical binarization rule.
This distinction is important. In NSO, the primary optimization target is not a dense output map but a global decision manifold over page-level descriptors. Neural modules, when present, are subordinate to this explicit manifold. They either refine the pixel output under spline guidance or predict bounded residuals directly in control-point space. Architecturally, our pixel-domain refinement model is related to U-Net-style segmentation backbones 41 and lightweight U-Net variants, 42 while the control-point residual model is conceptually aligned with context-prior residual aggregation strategies such as CP-Net. 43 It is also noted that attention and multiscale fusion mechanisms are widely used in dense image models, including document-oriented enhancement pipelines, 44 whereas older image-analysis work also explored structured local-context representations and region interactions. 45 In contrast, the final artefact in NSO Models I and III remains a single global decision surface rather than a collection of image-specific neural responses.
Recent work has emphasized the importance of hybrid analytical–learning systems and structured decision models. For example, combining rule-based reasoning with deep learning has been successfully applied to visual detection tasks, 46 while segmentation networks have been used in industrial inspection contexts. 47 Explainable machine learning frameworks 48 highlight the importance of interpretability in engineering applications, while compact and structured image representations 49 demonstrate the benefits of low-dimensional modeling. Learning under explicit constraints 50 and structured optimization under limited supervision 51 further support the use of constrained learning formulations. Fusion-based learning architectures 52 and hybrid explainable AI frameworks 53 illustrate the trend toward combining analytical structure with data-driven adaptation. In contrast, the proposed NSO framework parameterizes the decision process as a compact spline surface, preserving interpretability while enabling controlled adaptivity. These works collectively support the relevance of hybrid analytical–learning systems within engineering applications, providing context for the structured decision-surface learning approach proposed in this paper.
Relation to prior public work
Because the manuscript is closely related to the earlier public statistical-fusion study, the distinction is stated explicitly. The earlier public work introduced three elements that are not new in the present paper:
the fixed analytic logistic-type fusion function that combines page-level text and background descriptors; the MCHAM metric for structural, human-aligned assessment of binarization quality; the public external benchmark protocol based on DIBCO datasets and comparisons against classical and deep baselines.
The present paper contributes a different methodological layer. It replaces the fixed analytic fusion function with a learnable tensor-product B-spline decision surface and studies the optimization of that surface under the constraint that explicit decision semantics are preserved. The new methodological questions are: How should the decision surface be parameterized? How can the hard thresholding rule be relaxed for gradient-based learning? Should adaptivity be introduced directly in the spline parameter space or indirectly in the pixel domain? What is gained, and what is lost, when neural flexibility is restricted to bounded residual updates in control-point space?
Accordingly, the paper should be read as a structured-optimization extension of the earlier public statistical-fusion baseline, and not as a replacement for that baseline. The public benchmark protocol is reused here precisely to isolate the incremental effect of learnable spline-surface optimization under a fixed evaluation setting. This design allows a controlled methodological study while avoiding confounding changes in datasets, metrics, or preprocessing. In particular, the present work does not aim to replace the earlier formulation, but to investigate how learnable spline-surface optimization alters optimization dynamics, interpretability, and deployment properties under the same experimental protocol. The residual control-point formulation is the primary new element enabling controlled data-driven updates within the same low-dimensional parameter space.
Problem formulation
Let a grayscale document image be
The binarization output is
As in the earlier public statistical-fusion baseline, we assume per-page estimates of representative text and background intensities
These quantities are treated as fixed page-level descriptors. The page-level descriptors
In this paper, they are not learned jointly with the decision surface, because such a procedure would entangle descriptor estimation with optimization of the explicit decision rule and would make interpretation less transparent. The descriptor estimation strategy is therefore regarded as part of the fixed protocol inherited from the public baseline. Sensitivity of the method to descriptor estimation is discussed as a limitation in Section 13.
Local statistics are computed on a neighbourhood
In the earlier public baseline, the descriptors
The present paper keeps the surrounding decision rule but replaces the fixed analytic surface
For deployment transparency, only the control-point heights are learned. Spline degree, knot vectors, and control-point locations remain fixed. This preserves the physical meaning of the descriptor domain

Initialization of the NSO decision surface. The fixed descriptor domain is preserved, while the control-point heights are optimized during training. (a) Initial 3D decision surface over
Tensor-product B-spline surface
A decision surface is defined
Let
The surface is continuous on
For degree
The hard decision rule follows the earlier statistical-fusion baseline and remains unchanged at inference time. The only change introduced by NSO lies in how the modulation factor is obtained.
Hard decision rule
For a page with descriptors
The hard binarization rule is
This rule preserves the semantics of the earlier public baseline: local median and local mean still define two adaptive thresholds, and the page-level descriptors still influence the decision through one scalar modulation factor. NSO changes the source of that factor from a fixed analytic surface to a learned spline surface.
The hard operator in Eq. (15) is not differentiable because it contains both the minimum operator and a binary threshold. During training only, smooth surrogates are used that preserve the same logical structure. The resulting soft output is denoted
Metrics and training objectives
Evaluation metrics
As in the earlier public baseline, performance is evaluated by hard binarization outputs using three complementary measures:
F-measure (FM), balancing precision and recall for text pixels; Negative Rate Metric (NRM), penalizing false positives and false negatives symmetrically; Mean Chamfer-like Distance (MCHAM), a structural discrepancy measure that captures stroke continuity and global text geometry more directly than pixel counting.
The present paper does not introduce MCHAM; it adopts the measure from the prior public work because MCHAM is the most natural structural objective for learning a compact decision surface. What is new here is the use of differentiable MCHAM-driven optimization inside the NSO framework.
Training-time surrogates
FM, NRM, and MCHAM are not directly differentiable. During training, NSO therefore uses soft surrogates derived from the soft output
Three NSO model families
All three model families share the same hard decision operator and the same spline parameterization. They differ only in the location at which learnable adaptivity is introduced. This common structure enables a controlled methodological comparison rather than a loose comparison of unrelated models.
Figure 2 summarizes the information flow and optimization target of the three NSO variants.

Overview of the three NSO model families. All variants share the same explicit spline-driven decision rule and differ only in where adaptive learning is introduced.
A minibatch consists of
Model I updates only the spline control-point heights
This model is the simplest expression of the central NSO idea: a compact global decision manifold is learned directly from task-level structural feedback.
Model II keeps the global spline surface as a structured prior but adds a pixel-domain U-Net, following the general encoder–decoder design introduced in U-Net
41
and later lightweight variants for document-oriented image processing.
42
The patch input is
Model II is included for methodological completeness. It indicates the effect of combining spline guidance with dense pixel-domain correction. The model is more flexible than Models I and III, but that flexibility also weakens direct interpretability of the final deployed system. It is therefore used as a methodological control for assessing what is gained and lost when adaptivity is moved from the spline parameter space to the pixel domain.
Model III preserves a single global spline surface while introducing controlled adaptivity through residual updates in control-point space. A base surface
The loss is again purely structural:
The three variants are intentionally closely related and are not intended as independent models, but as controlled configurations for studying where adaptivity should be introduced within the same decision-surface framework.
This model is the principal new contribution of the paper. Unlike pixel-domain refinement, it introduces adaptation directly in the same low-dimensional parameter space that defines the deployed decision surface. As a result, the final artefact remains a single coherent global rule.
Model I learns only the spline control points. Model II learns a U-Net and the spline jointly. Model III learns a base spline surface together with a residual predictor that operates in control-point space. In Models I and III, deployment requires only the learned spline surface; no image-specific parameters or neural outputs are needed at inference time.
Algorithms
The following algorithms summarize the training procedures for the three NSO variants. At inference time, the trained surface is evaluated once to obtain
Optimization dynamics and interpretability
Unless otherwise stated, all results in this section correspond to the baseline spline configuration with a
The optimization behaviour of the three model families can be understood by inspecting the action of gradients on the spline control grid and, when present, on the neural parameters. The main advantage of Models I and III is that the decision surface is explicit at every stage. Training therefore modifies a compact global object rather than a hidden collection of dense pixel filters.
Low-dimensional optimization in Models I and III
In Model I, the mapping
Model III preserves the same geometry but augments it with bounded residual updates. Each patch proposes a residual grid in the same control-point space, and those proposals are merged into one global update. This accelerates adaptation while preventing uncontrolled drift into dense pixel-specific corrections. In other words, Model III aims to improve convergence without giving up the core interpretability of Model I.
Interaction of structural and pixelwise supervision in Model II
Model II is intentionally different. The spline provides only one conditioning signal among four input channels, while the U-Net supplies the main representational power. The binary cross-entropy term acts at every pixel and can therefore dominate the structural term during early training. As a result, local corrections may appear that are helpful for pixelwise accuracy but not directly reflected by a smooth global decision surface. This tension is the main reason Model II needs explicit spline smoothness regularization.
Interpretability
Interpretability in NSO is not claimed in a generic or purely rhetorical sense. In Models I and III, the final deployed object is the discretized spline surface
Based on the behaviour in Figure 3, the remainder of the parameterization study focuses on Model III, which constitutes the primary methodological contribution of this paper and provides the most relevant compromise between adaptive capacity and a single deployable global surface.

Optimization dynamics of the three NSO model families under the baseline spline configuration (
The following analysis focuses on Model III in order to isolate the effect of spline parameterization from differences among model families. We vary only the control-grid resolution and spline degree while keeping the remaining training protocol fixed. This analysis addresses the question of how much capacity the spline decision manifold requires before the representation becomes either too rigid or unnecessarily flexible.
Figure 4 visualizes the final learned control-point update

Final control-point updates
Sensitivity to spline parameterization.
Boldface indicates the best result in the corresponding metric column.
Public benchmark protocol and relation to the earlier baseline
The experiments follow a standard public benchmark protocol in order to isolate the effect of learnable spline-surface optimization under controlled conditions. The evaluation corpus consists of the DIBCO and H-DIBCO benchmark editions from 2009 to 2019,14–23 which include degraded handwritten and printed document images with publicly available ground truth and are widely used for comparative evaluation in the ICDAR/IJDAR community.
The DIBCO corpus has been widely used to report external comparisons against classical thresholding methods and recent deep-learning baselines such as DE-GAN and GDB, together with FM, NRM, and MCHAM evaluation.6,8,10 In the present paper, representative external methods are recomputed under the same fixed benchmark protocol in order to provide a consistent reference for the NSO variants. The objective is not to perform an exhaustive state-of-the-art comparison, but to isolate the methodological effect of replacing the fixed analytic fusion surface with a learnable spline surface under identical experimental conditions. All datasets, preprocessing assumptions, and evaluation criteria therefore remain unchanged, ensuring that differences in performance can be attributed solely to the proposed spline-based optimization framework.
All reported results are computed from hard outputs
External benchmark comparison
To provide external context for the internal NSO comparison, Table 2 summarizes representative results for classical, hybrid, and learning-based binarization methods evaluated on the same DIBCO benchmark series.
Comparison with representative classical and state-of-the-art document binarization methods on the DIBCO 2009–2019 datasets.
Comparison with representative classical and state-of-the-art document binarization methods on the DIBCO 2009–2019 datasets.
All results are computed under the same evaluation protocol as the NSO models.
The table provides an external reference for the NSO variants under the same benchmark protocol, including direct comparison with widely used state-of-the-art methods such as GDB and DE-GAN. Although the primary focus of this paper is the internal comparison of spline-learning strategies, this summary enables positioning of the proposed approach relative to both classical thresholding techniques and modern deep-learning-based binarization systems.
Classical methods achieve moderate performance but remain sensitive to degradations, whereas deep models such as GDB and DE-GAN provide strong pixel-level accuracy. The initial NSO surface yields competitive results across all three metrics, indicating that the structured decision formulation captures essential characteristics of document binarization.
The objective of this work is not to uniformly outperform existing methods, but to investigate how a compact, interpretable decision rule can be optimized through a learnable spline surface while preserving deployment simplicity.
Table 3 summarizes the benchmark composition and patch statistics used throughout the experiments.
Benchmark datasets and patch extraction statistics.
Benchmark datasets and patch extraction statistics.
Per-page descriptors
The reference implementation uses tensor-product B-splines with degree
Optimization uses AdamW with cosine warm restarts and gradient clipping. Model I optimizes a global control-point grid, Model II jointly optimizes the spline surface and a 4-channel U-Net, and Model III optimizes a base spline surface together with a lightweight residual predictor operating in control-point space.
Unless stated otherwise, all experiments use this reference configuration.
Aggregate comparison among NSO variants
The results in Table 4 indicate that the three NSO variants exhibit different trade-offs between structural consistency and pixel-level accuracy. Model I provides a stable global solution with minimal model complexity, while Model II improves NRM through pixel-domain refinement at the cost of increased model complexity and reduced interpretability. Model III achieves comparable structural performance to Model I while enabling faster adaptation through residual updates in control-point space.
Importantly, the optimization does not uniformly improve all metrics relative to the initial surface. This reflects the nature of the structural objective, which prioritizes geometric consistency over direct pixel-level accuracy. The results should therefore be interpreted as demonstrating controlled adaptation within a constrained decision model rather than uniform metric maximization.
Aggregate comparison among NSO variants.
Aggregate comparison among NSO variants.
Model III is evaluated under different spline degrees and control-grid resolutions while keeping the training protocol fixed.
The
Model III aggregation analysis
To evaluate the role of patch aggregation in Model III, we compare three weighting strategies under the same training protocol. The first strategy uses uniform averaging, where all patches contribute equally to the global control-point update. The second strategy introduces an image-based proxy, referred to as the ink-density proxy, which assigns higher importance to patches with higher foreground likelihood. The third strategy weights patches according to ground-truth text fraction and is included as a reference.
The results in Table 5 show that all aggregation strategies produce very similar performance. Uniform averaging provides a simple and stable baseline, while the ink-density proxy offers a lightweight data-driven alternative. The ground-truth-based weighting serves only as a reference and does not lead to consistent improvements.
Effect of aggregation strategy in model III.
Effect of aggregation strategy in model III.
Table 6 summarizes the runtime characteristics and deployment footprint of the three NSO variants.
Runtime and deployment footprint.
Runtime and deployment footprint.
Inference time is measured per full image on a representative DIBCO sample. Boldface indicates the lowest inference time among the compared models.
For Model III, the trainable-parameter count includes the residual predictor used during training, whereas the stored deployment artefact consists only of the final control-point grid. Model III achieves the lowest inference time despite using a learning-based training procedure, confirming that its deployment reduces to a lightweight spline evaluation without any neural network overhead. The runtime results in Table 6 show that Model III achieves the lowest deployment cost among the investigated variants while preserving the explicit spline decision structure.
Because the present manuscript focuses on the internal behaviour of the three NSO variants, representative samples are analysed by comparing the binary initial result, the model output, and the ground truth at pixel level. Four mutually exclusive change categories are counted: correct removals of background artefacts (CR), incorrect removals of true text (IR), correct recovery of missing text (RT), and incorrect foreground additions (IA). These counts complement FM/NRM/MCHAM by making the nature of structural changes directly interpretable.
Table 7 reports the corresponding pixel-level change categories for the representative Model III parameterization example.
Pixel-level structural changes for model III under different spline parameterizations relative to the initial binarization (figure 5).
Pixel-level structural changes for model III under different spline parameterizations relative to the initial binarization (figure 5).
CR = correct removals, IR = incorrect removals, RT = recovered text, IA = incorrect additions.
The structural-change analysis reveals a clear dependency on spline parameterization for the considered sample. Coarse grids (
Figure 5 complements the quantitative sensitivity analysis by showing how the same document responds to different spline parameterizations within Model III. Coarser grids tend to enforce broader global corrections, whereas finer grids offer more local flexibility. The visual comparison also helps assess how spline degree influences the smoothness and spatial distribution of corrections.

Qualitative comparison of binarization outputs under six spline parameterizations in Model III. The example corresponds to a patch extracted from a handwritten document in the DIBCO 2017 dataset. The first row shows the original patch, ground truth, and initial binarization. The second and third rows correspond to spline degrees
Metric values for representative qualitative examples.
The first block reports results on a full handwritten document from the DIBCO 2017 dataset, from which the patch in fig. 5 is extracted. The second block shows the effect of spline parameterization in model III evaluated on that patch.
Table 8 complements the visual comparison of Figure 5 by reporting quantitative metric values for the same representative examples. For the full handwritten document, all three models achieve comparable FM scores, while Model III provides the lowest MCHAM value, indicating consistent structural reconstruction of text components. Model II shows slightly lower FM but achieves improved NRM, reflecting stronger suppression of background noise at the cost of minor text degradation.
For the parameterization sample, the results illustrate that spline resolution influences the behaviour of Model III. Coarser grids (
The qualitative analysis confirms that spline parameterization directly influences the type of structural correction performed by Model III. Coarse grids tend to remove background noise at the expense of text loss, whereas finer grids enable text recovery but introduce additional artifacts. Intermediate configurations provide the most balanced behaviour, consistent with the quantitative evaluation.
Figure 6 illustrates a qualitative stress test on a manually degraded printed document. Because no ground-truth mask is available, the example is not used for FM, NRM, MCHAM, or CR/IR/RT/IA computation. Its purpose is to illustrate visible differences between global structure preservation and local pixel-level adaptivity under severe degradation.

Challenging printed-document stress example with manually introduced degradations intended to mimic severe real-world acquisition and preservation artefacts. The first row shows the clean printed text sample and the corresponding degraded input affected by stains, ink marks, wrinkles, burn-like damage, shadows, and uneven illumination. The second row shows the binarization outputs obtained by Model I, Model II, and Model III. Since no ground-truth mask is available for this manually degraded example, it is used only as a qualitative stress test and is not included in the quantitative benchmark evaluation. (a) Clean printed text sample, (b) Degraded input with stains, ink marks, wrinkles, burn damage, shadows, and uneven illumination, (c) Model I output, (d) Model II output and (e) Model III output.
What the present paper establishes
The primary objective of the experimental analysis is methodological rather than exhaustive benchmarking, namely to compare alternative mechanisms for introducing adaptivity within the same spline decision-surface framework.
The present results should be interpreted as demonstrating controlled adaptation within a constrained decision model rather than establishing a new state-of-the-art binarization method. The observed gains are moderate, which is expected because the study isolates one methodological change within an otherwise fixed framework: replacing a fixed analytic fusion surface with a learnable spline surface.
The three model variants illustrate how the position of adaptivity affects the final behaviour. Direct spline optimization enforces global consistency, pixel-domain refinement increases local flexibility, and residual control-point learning provides a compromise between these two extremes. From an engineering perspective, the main observation is that useful adaptation can be introduced in a low-dimensional parameter space while preserving an explicit decision rule.
The page-level descriptors
Positioning of the approach
The proposed framework should be viewed as a structured optimization extension of an explicit binarization rule, not as a replacement for high-capacity deep-learning methods. Its purpose is to study how a compact and interpretable decision surface can be optimized while maintaining deterministic inference and deployment simplicity.
This positioning is important because the strongest deep models are designed primarily for maximum pixel-level accuracy, whereas NSO emphasizes transparency, compactness, and controlled adaptation. The approach is therefore most relevant in settings where the deployed artefact should remain inspectable, lightweight, and reproducible.
Computational complexity and deployment
NSO is attractive from a deployment perspective because the learned object in Models I and III reduces to a small control grid or, equivalently, a precomputed lookup table
Model II does not share this advantage, because it requires deployment of a U-Net in addition to the spline surface. Consequently, in engineering settings where auditability, runtime predictability, and compactness of the deployed artefact are important, Models I and III are the more practical variants. This distinction is reflected in Table 6, where Model III achieves the lowest inference time while requiring only the learned control-point grid at deployment.
In practical document-processing pipelines, the proposed method can be used as a preprocessing stage for OCR or document analysis systems. Since Models I and III rely only on a compact lookup table at inference time, they are suitable for large-scale digitization workflows and resource-constrained environments where neural-network deployment may be impractical.
Limitations
Several limitations should be acknowledged. First, the page-level descriptors
Third, the manuscript focuses on grayscale document binarization and does not explicitly address several challenging real-world scenarios, including colour manuscripts, severely warped documents, or highly heterogeneous multi-script layouts. In such cases, the global descriptor formulation or the spline decision surface may require additional adaptation or preprocessing.
Fourth, although the study is evaluated on standard public benchmarks and includes representative external comparisons, the emphasis remains on internal comparison of spline-learning strategies rather than exhaustive benchmarking against all recent binarization systems. Finally, OCR-level downstream evaluation is outside the scope of this work and remains an important direction for future research.
A further practical limitation concerns the patch-aggregation strategy in Model III. Uniform aggregation is adopted as the primary configuration, while the additional aggregation experiments illustrate that alternative weighting schemes may influence convergence and final behaviour. An explicit ablation study of alternative descriptor-estimation strategies was beyond the scope of the present work. Evaluating the robustness of the learned decision surface under different foreground/background estimation procedures remains an important direction for future research.
Future directions
Natural extensions of this work include descriptor-robust training, broader exploration of spline parameterizations, and OCR-level evaluation of the deployed decision surfaces.
In addition to the gradient-based optimization used in this study, nature-inspired metaheuristic approaches represent an interesting alternative for future extensions of the framework. In particular, algorithms such as harmony search and simulated annealing have been successfully applied to complex non-convex optimization problems in engineering contexts.54,55 These methods do not rely on differentiability and may therefore offer advantages in exploring the global structure of the objective landscape, potentially reducing sensitivity to initialization and local minima. Within the NSO framework, such approaches could be applied directly to the optimization of spline control-point parameters or integrated into hybrid schemes that combine global metaheuristic search with local gradient-based refinement.
Another important direction is to replace the current patch-aggregation mechanism in Model III with a fully learned or unsupervised weighting strategy. Future work may also explore explainable AI perspectives by treating the learned spline control grid and its optimization trajectory as explicit explanation objects, for example through control-point sensitivity analysis, descriptor-space saliency, and visualization of residual updates.
Conclusion
This paper has introduced Neural-Spline Optimization (NSO) as a structured learning framework for document image binarization, in which a fixed analytic fusion function is replaced by a learnable tensor-product B-spline surface while preserving the explicit decision rule. In this way, the learning process is shifted from dense pixel-level prediction toward a compact and interpretable representation of the decision mechanism.
Three closely related model variants have been studied within a unified formulation. Model I performs direct optimization of the global spline surface, Model II combines spline guidance with pixel-domain U-Net refinement, and Model III introduces bounded residual learning in control-point space. Among these, the residual control-point formulation constitutes the primary methodological contribution, as it enables data-driven adaptation directly within the parameter space that defines the deployed model.
The results indicate that structured decision-surface learning can provide a practical alternative to purely pixel-based approaches, particularly in scenarios where interpretability, stability, and deployment simplicity are of primary importance. The proposed framework is not intended to compete with high-capacity deep models in terms of absolute performance; rather, it provides insight into how structured and interpretable decision rules can be optimized using modern learning techniques.
Overall, the NSO framework demonstrates that meaningful adaptation can be achieved within a low-dimensional parameter space while preserving an explicit and analyzable decision structure. This perspective may extend beyond document binarization to other application domains in which the objective is not only predictive accuracy but also model traceability and controlled behaviour.
Footnotes
Acknowledgments
This work was supported by the Croatian Science Foundation under Grant HRZZ-IP-2022-10-8856. The authors also acknowledge the support of the Institutional Research Project ATASYS (IP-UNIST-06).
Funding
The author(s) received no financial support for the research, authorship and/or publication of this article.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
