View full-text article in PMC Sensors (Basel). 2026 Jul 25;26(15):4728. doi: 10.3390/s26154728 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. PMC Copyright notice Algorithm 5 Token-Level Multimodal Fusion for Skin Cancer Classification 1:procedure Train/Infer(I,m,ed) 2: fimg←EfficientNet(I) 3: himgtokens←reshape(fimg,7×7patches) ▹ 49 tokens, 128-dim each 4: hmeta←MLPmeta(encodeMetadata(m)) ▹ 1 token, 32-dim 5: hkgtokens←MLPkg(ed) ▹ 5 tokens, 32-dim each 6: hfused←CrossAttn(Qimg,K[meta,kg],V[meta,kg]) ▹ Token-level fusion 7: z←ReLU(Wh1hfused+bh1) 8: y^←softmax(Wcz+bc) 9: return y^ 10:end procedure