Skip to main content
. 2026 Jul 10;13(7):794. doi: 10.3390/bioengineering13070794
Algorithm 1 Offline Confidence-Gated Iterative Refinement
  • Require: 

    Training partition Dtrain, validation partition Dval; initial primary system θP, verification system θV; high-confidence threshold τh=0.92; feedback scaling factor λ (empirically determined on Dval); maximum iterations T=4; early stopping tolerance ε=0.001

  • Ensure: 

    Refined parameters θP*, θV*

  •  1:

    Pre-train θP on Dtrain (Adam optimiser, cosine annealing, early stop on validation F1)

  •  2:

    Pre-train θV on Dtrain (stratified 5-fold cross-validation)

  •  3:

    for t=1 to T do

  •  4:

        Run fixed-weight inference with θP and θV over Dval; compute S(x) via Equation (19) for each x

  •  5:

        Construct refinement pool (curriculum gate):

  •  

            Rt←x∈Dval:S(x)>τh▹ Equivalent to dual-agreement; see Equation (19) with β=0.6

  •  6:

        All cases with S(x)≤τh excluded from Rt; disagreement cases routed for clinician review

  •  7:

        Compute TreeSHAP attributions over Rt; aggregate and ℓ1-normalise per feature to obtain Φt∈RF

  •  8:

        FSG modulation via Equation (20): Wg,t′←Wg⊙(1+λ1H⊤⊗Φt); row-wise ℓ2-normalise

  •  9:

       Freeze Mamba SSM and Bi-LSTM backbone; fine-tune FSG parameters (Wg,t′) and classification head of θP on Dtrain∪Rt (ground-truth labels)

  • 10:

        Retrain θV on Dtrain∪Rt (ground-truth labels)

  • 11:

        Evaluate AUCt of θP on Dval

  • 12:

        if t>1 and AUCt−AUCt−1<ε then

  • 13:

            break ▹ Early stopping: marginal AUC gain below convergence threshold

  • 14:

        end if

  • 15:

    end for

  • 16:

    return θP*←θP(t),θV*←θV(t)