The framework begins by preparing synchronized climatic and groundwater datasets at a uniform monthly time resolution. Following data collection, quality control, and normalization, the processed inputs are prepared for fuzzy inference by ensuring numerical consistency across variables with different units and scales. These preparatory steps establish a reliable empirical basis for subsequent fuzzy modeling while preserving the essential temporal variability of climatic forcing and groundwater responses. Climatic variables, including monthly precipitation and mean temperature, constitute the primary external forcing inputs controlling groundwater recharge and depletion processes in the semi-arid study area. In selected modeling strategies, additional inputs derived from groundwater observations, such as lagged groundwater level changes and seasonal indices, are incorporated to capture temporal persistence and seasonal modulation of aquifer responses. These inputs are subsequently transformed into fuzzy linguistic variables, allowing gradual transitions between qualitative states and explicit representation of uncertainty inherent in climate–groundwater interactions. Expert-defined fuzzy rule bases are then applied to represent qualitative relationships between input conditions and groundwater level change responses. The fuzzy inference process evaluates the activated rules and aggregates their outputs to generate fuzzy representations of potential groundwater level change states. Defuzzification then converts aggregated fuzzy outputs into crisp estimates of monthly groundwater level change (ΔGWL), enabling direct comparison with observed data during model evaluation.
The pronounced hydrogeological heterogeneity of the Al-Hsain Basin, combined with the limited availability of long-term hydrogeological data, makes it particularly suitable for evaluating alternative fuzzy modeling strategies under realistic semi-arid conditions. Accordingly, the framework supports the implementation of multiple modeling strategies while maintaining a common inference structure and evaluation procedure.
All fuzzy modeling strategies implemented in this study share this identical general framework. Their strategies arise from preprocessing decisions on well grouping and the complexity of input variable sets used to generate fuzzy rule bases. By maintaining a consistent modeling approach across all strategies, the framework enables an objective comparison of predictive performance. It determines the influence of grouping logic and input selection on groundwater-level forecasting accuracy.
3.4.1. Fuzzy System Architecture
The fuzzy inference system implemented in this study follows a standard Mamdani-type architecture consisting of five sequential steps: (i) fuzzification of crisp climatic and groundwater inputs using triangular membership functions; (ii) evaluation of expert-defined IF–THEN rules linking input linguistic variables to groundwater response states; (iii) aggregation of activated rule outputs using the max–min inference mechanism; (iv) construction of aggregated fuzzy output sets representing possible groundwater level change states; and (v) defuzzification using the centroid method to obtain a crisp estimate of monthly groundwater level change (ΔGWL). This unified architecture is applied consistently across all three modeling strategies, ensuring that performance differences arise solely from grouping logic and input structure rather than inference mechanics.
A Mamdani-type fuzzy inference system provides the fuzzy modeling framework implemented in this study. Its advantage lies in its interpretability and suitability for expert-driven groundwater modeling under uncertainty. The architecture follows a structured sequence of fuzzification, rule evaluation, aggregation, and defuzzification, enabling transparent representation of nonlinear climate–groundwater relationships while accommodating imprecision inherent in hydrogeological processes.
Input variables, including monthly precipitation and mean temperature, constitute the primary climatic forcing factors driving groundwater recharge and depletion in the study area. In selected modeling strategies, additional inputs derived from groundwater observations—specifically lagged groundwater level change and a monthly seasonal index—are incorporated to capture temporal persistence and seasonal modulation of aquifer responses. The system output variable is the monthly groundwater level change (ΔGWL), which represents the aquifer’s directional response to climatic forcing.
During the fuzzification stage, predefined membership functions transform crisp input variables into fuzzy linguistic variables. This process allows individual observations to possess partial membership across multiple linguistic states, enabling smooth transitions between categories and avoiding sharp threshold effects. Such representation is particularly appropriate for semi-arid groundwater systems, where recharge and depletion processes exhibit gradual responses rather than abrupt changes.
The inference engine evaluates a set of expert-defined IF–THEN rules that link combinations of input linguistic states to corresponding groundwater response categories. Activated rules are aggregated to form fuzzy output sets representing potential groundwater level change states. Defuzzification is subsequently applied using the centroid method to convert aggregated fuzzy outputs into crisp ΔGWL estimates suitable for quantitative evaluation and comparison with observed data.
The Mamdani architecture ensures that each stage of the inference process—from input transformation to final prediction—remains transparent and interpretable. This feature distinguishes the proposed framework from black-box data-driven models and facilitates integration of expert knowledge, systematic comparison of modeling strategies, and practical application in groundwater management contexts.
3.4.2. Membership Functions and Fuzzification
Fuzzification is the process by which crisp input variables transform into fuzzy linguistic variables. In this study, triangular membership functions represented all input and output variables due to their simplicity, computational efficiency, and suitability for data-limited conditions. The membership functions were defined based on empirical percentiles of the observed data and expert knowledge of hydroclimatic conditions in semi-arid environments. Three linguistic categories divided rainfall and temperature inputs: Low, Medium, and High. Similarly, the groundwater level change (ΔGWL) output variable could Decline, remain Stable, or Rise. The parameters of the triangular membership functions, including lower bounds, peak values, and upper bounds, are summarized in
Table 1, while
Figure 6 shows their graphical representations.
The membership functions were designed with overlapping ranges to allow gradual transitions between linguistic categories and to avoid abrupt threshold effects. The degree of overlap—approximately 50% for rainfall and temperature, and 75% for ΔGWL—was selected empirically to balance sensitivity to input variations against excessive rule activation that could dilute inference precision [
30]. This overlap ensures that input values close to category boundaries activate multiple linguistic terms simultaneously, rather than being assigned to a single class. As a result, multiple fuzzy rules may partially activate for a given input condition, which improves the system’s ability to represent uncertainty and smooth nonlinear relationships between climatic forcing and groundwater response.
Overlapping membership functions are particularly important in semi-arid groundwater systems, where recharge and depletion processes do not change abruptly but respond gradually to rainfall and temperature variations. By allowing partial membership across adjacent categories, the fuzzification process reduces sensitivity to small input variations and measurement uncertainty. This design improves the numerical stability of the inference process and enhances the robustness of model predictions.
Balancing interpretability, computational simplicity, and robustness under data-limited conditions guided the selection of triangular membership functions and the parameter ranges adopted. No alternative fuzzy partitions demonstrated consistent advantages over the selected setup.
All membership functions and defuzzification procedures are identical across the three modeling strategies to ensure methodological consistency and fair comparison.
3.4.3. Three Modeling Strategies
Three fuzzy modeling strategies demonstrated how different assumptions regarding groundwater system organization influence forecasting performance: localized hydrogeographical models, a unified basin-wide model, and behavioral clustering-based models. All strategies employ the same Mamdani-type fuzzy inference system architecture, membership functions, and defuzzification procedure described in the previous sections. The strategies differ in (i) the grouping method for monitoring wells, and (ii) the structure and complexity of the fuzzy rule bases used to represent climate–groundwater relationships.
Hydrogeographical grouping was defined based on a combination of spatial proximity to the main river, elevation, dominant geological formation, and inferred recharge conditions. Well groups reflected shared hydrogeological settings, including river-adjacent alluvial zones, inland Quaternary deposits, and older consolidated formations. Alternative classification schemes based solely on spatial distance or lithological units did not provide additional explanatory value beyond the adopted hydrogeographical grouping.
In the localized modeling strategy, monitoring wells were grouped based on hydrogeological characteristics, including spatial proximity and dominant geological formations. Based on the geological framework of the Al-Hsain Basin and the spatial distribution of wells (
Figure 1 and
Figure 2), the 35 observation wells were divided into five hydrogeographical groups. For each hydrogeographical group, a separate fuzzy inference system was developed. A representative well was selected from each group based on data completeness and temporal stability. Fuzzy rule bases were derived from time series of representative wells and from expert interpretation of the relationships among rainfall, temperature, and observed groundwater level changes.
The localized rule bases employ precipitation and temperature as input variables and groundwater level change (ΔGWL) as the output variable. Rules are formulated using standard IF–THEN structures, such as “IF rainfall is Low AND temperature is High THEN ΔGWL is Decline,” reflecting physically reasonable groundwater responses under semi-arid conditions. The complete set of rules translates different combinations of climatic conditions into groundwater response categories.
Table 2 presents an example of a localized fuzzy rule base.
Once defined, the group-specific rule bases were applied uniformly to all wells within the same hydrogeographical group without further modification. This approach assumes that a shared rule structure can represent wells within a group that exhibits similar responses to climatic forcing. The localized strategy allows flexibility in capturing spatial variations in aquifer properties and recharge mechanisms and may achieve higher accuracy at the local scale, although at the expense of reduced transferability across the basin [
35].
The unified modeling strategy develops a single fuzzy inference system for basin-wide application across all monitoring wells, regardless of spatial or geological differences [
38]. This approach combines observations from all wells into a single modeling framework to identify generalized climate–groundwater relationships applicable across diverse hydrogeological conditions. A representative well exhibiting stable behavior, strong correlation with basin-wide trends, and complete data records provided the basis for rule extraction. The unified fuzzy rule base employs the same input variables as the localized models—monthly precipitation and temperature—but derives rules from patterns observed across the entire monitoring network rather than from individual hydrogeographical groups. The resulting rule structure, summarized in
Table 3, represents fundamental climate–groundwater relationships assumed to operate consistently at the basin scale. The similarity between the unified and localized rule structures (
Table 2) indicates that core climate–groundwater interactions remain broadly consistent despite geological heterogeneity. However, differences in rule activation may arise from local conditions and parameterization of the membership functions.
The unified rule base is applied uniformly to all monitoring wells to evaluate whether a simplified, generalized fuzzy system can achieve acceptable prediction accuracy in a heterogeneous semi-arid aquifer system. This approach offers practical advantages, including simplified implementation, reduced data requirements per location, and straightforward transferability to ungauged sites within the basin [
31]. However, the assumption of basin-wide homogeneity may reduce prediction accuracy for wells exhibiting atypical behavior or influenced by localized geological or anthropogenic factors [
21]. Evaluation of the unified model, therefore, provides insight into the trade-offs between generalization and accuracy in regional groundwater forecasting.
The behavioral clustering strategy groups monitoring wells based on observed hydrological response patterns rather than on spatial proximity or geological characteristics [
37]. This approach presumes that shared fuzzy rule systems effectively model wells with similar temporal groundwater dynamics, even when geographically separated. By organizing wells according to functional similarity, the strategy aims to balance the specificity of localized models with the efficiency and scalability of unified approaches [
42]. Implementation begins with extracting descriptive hydrological features from each well’s monthly groundwater level change (ΔGWL) time series. These features include statistical measures such as mean change, standard deviation, and temporal autocorrelation, as well as indicators of climatic sensitivity derived from correlations with rainfall and temperature variables [
43,
44,
45]. Additional behavioral characteristics, including the frequency and persistence of rising or declining groundwater trends, were also considered. The resulting multidimensional feature sets served as input to an unsupervised K-means clustering algorithm, which partitioned the 35 monitoring wells into behaviorally coherent clusters. Three clusters were defined to ensure representation of dominant groundwater response behaviors while maintaining sufficient wells within each cluster for robust rule transfer and validation.
Objective cluster validation metrics provided the optimal number of behavioral clusters. They included the Elbow Method (within-cluster sum of squares), the Silhouette Coefficient, and the Davies–Bouldin Index, supported by principal component analysis (PCA) for visualization. In addition, sensitivity analysis revealed the influence of different lag orders (1–3 months) and alternative seasonal representations (calendar-based index, SPI-1, and SPI-3).
Section 4.1 presents the results of the clustering validation and sensitivity analysis.
For each identified cluster, a representative well exhibiting typical response characteristics was selected to develop a cluster-specific fuzzy rule base. Unlike the localized and unified strategies, which rely solely on rainfall and temperature inputs, the behavioral clustering models incorporate an expanded input structure that includes lagged ΔGWL values and a monthly seasonal index. These additional variables allow the fuzzy system to account explicitly for temporal persistence and seasonal effects that temperature alone may not fully capture [
12].
The behavioral rule bases encode complex temporal groundwater dynamics by linking current climatic conditions, antecedent groundwater states, and seasonal context to responses in groundwater levels. This structure reflects the memory effects inherent in groundwater systems, where current responses depend on both recent forcing and prior aquifer conditions [
10].
Table 4 presents an example of a cluster-specific fuzzy rule base developed for Cluster 2. The inclusion of seasonal indicators accounts for variations in recharge efficiency and evapotranspiration that may differ between seasons with similar temperatures, such as spring and autumn [
45].
A two-stage workflow allows coupling between behavioral clustering and fuzzy modeling. The first stage groups monitoring wells into behaviorally coherent clusters based on similarity in groundwater response features derived from observed ΔGWL time series. The second stage selects a representative well within each behavioral cluster that exhibits typical response characteristics to construct a cluster-specific fuzzy rule base. This rule base is then applied uniformly to all remaining wells within the same cluster, without further tuning, to evaluate intra-cluster transferability and predictive consistency. In this way, clustering defines the functional grouping of wells, while fuzzy inference provides the predictive mechanism within each behavioral group.
The cluster-specific rule bases are transferred to all wells within the corresponding behavioral cluster without site-specific calibration. Once defined, the cluster-specific rule bases were applied uniformly to all remaining wells within the corresponding behavioral cluster to evaluate intra-cluster prediction performance. This strategy provides an intermediate modeling approach that offers enhanced specificity through behavior-based grouping while maintaining reasonable generalization and transferability across functionally similar wells [
39]. It is particularly effective in settings where spatial or geological classifications fail to capture dominant groundwater controls, which may instead arise from complex interactions between climatic forcing, aquifer heterogeneity, and anthropogenic influences [
27].
Table 5 provides a systematic comparison of all three strategies, emphasizing their contrasting philosophies regarding spatial versus functional organization, input complexity, and the fundamental trade-off between local precision and general applicability. The localized approach assumes that physical proximity and geological similarity indicate hydrological similarity. The unified model assumes universal climate-groundwater relationships, while behavioral clustering empirically identifies functional similarities through observed response patterns, regardless of spatial or geological context [
30,
38].
3.4.5. Model Validation
The predictive performance of each fuzzy modeling strategy was evaluated by systematically comparing model predictions with observed groundwater level changes across the monitoring network. Model validation employed classification accuracy as the primary performance metric, defined as the proportion of monthly predictions that correctly identified the direction of groundwater level change (rise, stable, or decline) relative to observations [
20,
23]. This categorical evaluation is consistent with the fuzzy system architecture, which produces qualitative classifications rather than precise numerical estimates, and provides an intuitive metric suitable for groundwater management applications.
To ensure independent validation and a realistic assessment of generalization capability, model testing was conducted using wells not involved in rule-based construction. For the localized strategy, rule bases derived from representative wells were applied to remaining wells within the same hydrogeographical group, thereby evaluating the assumption of hydrological similarity within spatial classifications. The unified strategy applied a single basin-wide rule base uniformly to all wells, testing the robustness of generalized climate–groundwater relationships under heterogeneous conditions [
22,
46]. Behavioral clustering models were validated through intra-cluster application, assessing whether wells grouped by similar response behavior exhibit consistent performance when modeled using cluster-specific fuzzy rules. Classification accuracy was computed as the percentage of correct directional predictions relative to total predictions, following the standard equation:
Unlike conventional machine learning approaches, fuzzy expert systems do not require explicit training or testing data splits, as they are rule-based and expert-driven [
27]. Instead, model robustness was assessed by evaluating rule transferability across multiple independent wells, providing a realistic evaluation of operational performance in data-limited environments where site-specific calibration may not be feasible [
28]. The comparative validation framework enables systematic assessment of the relative strengths and limitations of localized, unified, and behavioral clustering strategies. By applying consistent validation protocols and performance metrics, the analysis identifies trade-offs between model specificity and generalizability. It supports informed selection of appropriate fuzzy modeling strategies for groundwater level forecasting in semi-arid regions [
17,
34]. Based on the consistent implementation and validation framework described above, the three fuzzy modeling strategies can be directly compared in terms of predictive performance. The following section presents a comparative analysis of localized, unified, and behavioral clustering approaches.