| 
Algorithm 3 Bayesian Multi-Hypothesis Detection Framework | 
Require: text, LLM_models = [GPT, LLaMA, PaLM, Claude], watermark_params, usage_priors Ensure: most_likely_source, confidence_score, is_ai_generated
 
- 
  1:
// Stage 1: Curvature-Based Screening 
 
- 
  2:
      ▹ Algorithm 2 
 
- 
  3:
 
 
- 
  4:
// Stage 2: Multi-Model Watermark Testing 
 
- 
  5:
 
 
- 
  6:
      ▹ From curvature classifier 
 
- 
  7:
for each  in LLM_models do 
 
- 
  8:
    for each  in watermark_params do 
 
- 
  9:
           
 
- 
  10:
         
 
- 
  11:
              ▹ Equation (8) 
 
- 
  12:
         
 
- 
  13:
        hypotheses.append() 
 
- 
  14:
        likelihoods.append() 
 
- 
  15:
    end for 
 
- 
  16:
end for 
 
- 
  17:
// Stage 3: Bayesian Model Selection 
 
- 
  18:
 
 
- 
  19:
for each hypothesis  in hypotheses do 
 
- 
  20:
          ▹ Bayes’ theorem 
 
- 
  21:
    posteriors.append() 
 
- 
  22:
end for 
 
- 
  23:
 
 
- 
  24:
 
 
- 
  25:
 
 
- 
  26:
 
 
- 
  27:
return most_likely_source, confidence_score, is_ai_generated 
 
 
 |