Skip to main content
. 2026 Sep 14;26(18):5833. doi: 10.3390/s26185833
Algorithm 1 LTA-Alignment with LLM Arbiter
Input: Candidate entity pair (ei,ej), Total linear length Ltotal, Semantic threshold [τlow,τhigh], Gaussian tolerance σ.
Output: Alignment decision D∈{Merge,Reject}
1: Phase 1: Gaussian Topological Penalty Computation
2: Extract semantic embeddings vi,vj for ei,ej
3: Simsem ← CosineSimilarity(vi,vj)
4: Extract absolute physical distances li,lj for ei,ej
5: Compute normalized manifold anchors: Φ(ei)←liLtotal,Φ(ej)←ljLtotal
6: Compute absolute spatial deviation: δ←|Φ(ei)−Φ(ej)|
7: Compute topological penalty multiplier: Simtop←exp(−δ22σ2)
8: Compute composite alignment score: S←Simsem×Simtop
9: Phase 2: Grey-Zone Arbitration Logic
10: if S < τlow then
11:      D←Reject (Short-circuit rejection)
12: else if S > τhigh then
13:      D←Merge (Direct unconditional merge)
14: else (Grey-Zone triggered)
15:      Cctx ← ExtractContext(ei,ej) (e.g., timestamps, worker logs)
16:      Pprompt ← ConstructPrompt(ei,ej,Cctx)
17:      decision_result ← LLM_Arbiter(Pprompt)
18:      if decision_result == “Yes” then
19:          D←Mege
20:      else
21:          D←Reject
22:          end if
23: end if
24: return: D