July 06, 2026
Wound monitoring is a critical yet underserved clinical challenge, where timely identification of severe adverse events (SAEs) such as infection, tissue deterioration, and delayed healing can significantly impact patient outcomes. While recent vision-language models (VLMs) have demonstrated strong multimodal reasoning capabilities, they often lack the domain-specific grounding required to effectively integrate wound imagery with heterogeneous clinical information and provide limited mechanisms for detecting clinically significant cases that differ from the training distribution. In this work, we present a multimodal framework for automated wound monitoring and SAE detection. Our approach leverages paired clinical notes and detailed wound descriptions capturing visual characteristics such as wound appearance, surrounding skin condition, color changes, and signs of inflammation or healing progression, which are encoded through a dual-stream Low-Rank Adaptation (LoRA) framework built upon a frozen BiomedCLIP backbone. We introduce a cross-contextual LoRA fusion mechanism that enables information exchange between clinical semantics and visual wound descriptors, producing context-aware multimodal representations without requiring full model fine-tuning. To identify personalized SAEs, we propose a wound-specific out-of-distribution (OOD) detection framework that combines semantic matching, visual typicality, caption-text alignment, and caption-visual alignment signals into a unified SAE (OOD) detection score. To further capture healing dynamics, we incorporate covariate consistency and temporal drift penalty that leverage changes in wound characteristics across patient visits. Preliminary experiments on a longitudinal wound dataset collected through clinical visits demonstrate promising performance on both wound healing assessment and SAE detection. These findings highlight the potential of semantically enriched, temporally aware vision-language systems for clinical wound monitoring and early risk identification.
Wound complications such as infection and tissue necrosis can rapidly progress to limb loss, yet current care relies on periodic visits that may miss critical changes between assessments [1]. Automated wound monitoring therefore requires not only accurate visual representation learning but also reliable detection of clinically significant complications and atypical healing trajectories. Because these events are personalized, rare, heterogeneous, and inconsistently annotated, supervised classification alone is often insufficient. Early complication detection can instead be framed, in part, as an out-of-distribution (OOD) detection problem, identifying wound presentations that deviate from expected healing patterns. Vision-language models (VLMs) provide a promising framework by integrating wound images, clinical notes, and structured visual descriptors, enabling multimodal reasoning that remains underexplored in existing wound analysis systems [2]–[6].
Pretrained VLMs have been adapted to specialized medical domains through full fine-tuning [3], prompt learning [7], [8], and parameter-efficient methods such as Low-Rank Adaptation (LoRA) [9], which offers an effective balance between adaptation performance and computational cost. However, temporal modeling of longitudinal wound progression—a key cue for distinguishing normal healing from clinically significant deterioration—remains largely unexplored in multimodal OOD frameworks [10]. As illustrated in Figure 1, wounds with similar visual appearance can follow markedly different clinical trajectories, making image-based assessment alone insufficient. Integrating structured clinical information and free-text wound descriptions is therefore essential for identifying clinically significant complications, motivating a framework that jointly reasons across all modalities.
We propose a multimodal wound monitoring framework with three key contributions. First, we introduce a dual-stream cross-contextual LoRA fusion module built on a frozen BiomedCLIP backbone [3], which encodes clinical notes and structured wound descriptions through separate LoRA pathways with bidirectional cross-attention to produce enriched multimodal representations without full fine-tuning. Second, we develop a wound-specific OOD detector that combines semantic matching, visual typicality, caption-text alignment, and caption-visual alignment into a unified SAE score for identifying adverse wound presentations at inference. Third, we incorporate covariate consistency and temporal drift regularization to enforce cross-visit representation consistency and model longitudinal wound progression. We evaluate the framework on the longitudinal SmartBoot DFU dataset (NCT04460573), collected with the eKare inSight 3D imaging system. Our approach outperforms single-stream baselines and consistently improves detection of rare wound presentations over unimodal OOD methods. Results show that cross-contextual LoRA fusion outperforms single-stream baselines, and our multi-signal OOD score consistently surpasses unimodal detectors on rare wound presentations.
To the best of our knowledge, we are the first to address OOD detection in clinical wound monitoring with real data. Our contributions are as follows:
We propose a novel personalized multimodal wound monitoring framework that jointly leverages wound images, clinical notes, and structured wound descriptions for comprehensive wound assessment.
We develop a dual-stream LoRA architecture with cross-contextual fusion on a frozen BiomedCLIP backbone, enabling efficient adaptation and enhanced interaction between visual characteristics and clinical semantics.
We introduce a wound-specific OOD-based SAE detection strategy that identifies clinically significant complications without requiring SAE labels during training.
We incorporate longitudinal wound dynamics through covariate consistency and temporal drift regularization, improving robustness for real-world wound monitoring across multiple visits.
Diabetic foot ulcers (DFUs) carry a high risk of amputation when healing stalls [1], [11], yet existing automated wound-monitoring systems remain largely discriminative and cannot detect distributional anomalies associated with severe adverse events (SAEs). Prior work has focused on wound segmentation [6], [12], tissue classification [13], DFU benchmarks [14], and multimodal fusion of wound images with clinical metadata [15], [16], but none explicitly addresses unsupervised detection of abnormal healing trajectories.
Our approach builds on BiomedCLIP [3], extending its multimodal representations with insights from BioViL-T [17], MedCLIP [18], and continual VLM adaptation [5]. We adapt BiomedCLIP using dual-stream Low-Rank Adaptation (LoRA) [9], with separate adapters for clinical context and wound descriptions fused through cross-adapter composition, while prompt tuning [7], [8] serves as a parameter-efficient baseline.
Classical OOD detection relies on confidence scores [19]–[21], auxiliary supervision [22], activation shaping [23], [24], or feature-space methods [25]–[27]. More recent vision-language approaches exploit image-text alignment for multimodal OOD detection [28]–[33]. Our framework extends T-QPM [10] to longitudinal wound monitoring by replacing handcrafted prompts with LoRA-derived prototypes and introducing wound-area-aware temporal regularization. Additional related work is provided in the Supplementary Materials.
Problem Statement: The data model \(\mathcal{D}=\{{\boldsymbol{x}}_t,y_i\}_{i=1}^n\) from wound environment \(\mathcal{E}\) is given. In environment \(\mathcal{E}\), each data consist of triple stream input modality: RGB image (vision) and dual-text (language modality) samples including clinical context and visual grounded wound description, \(\mathcal{D}=\{\mathcal{I},\mathcal{T}\}\), where \(\mathcal{I}=\{I_{i},y_{i}\}_{i=1}^{n}\) and \(\mathcal{T}=\{(T^c_{i}, T^d_i)\}_{i=1}^{n}\). This means that each image \(I_i\) is accompanied with a pair of texts: clinical text \(T^c_{i}\) and image description \(T^d_{i}\). At each time step \(t\), our model receives a fused of in-distribution (ID) \(\mathcal{D}^{id}\), covariate shifted \(\mathcal{D}^{cov}\), and SAE (OOD) \(\mathcal{D}^{ood}\) inputs: \(\mathcal{D}^{id}=\{\mathcal{I}^{id},\mathcal{T}^{id}\}\), \(\mathcal{D}^{cov}=\{\mathcal{I}^{cov},\mathcal{T}^{id}\}\), and \(\mathcal{D}^{ood}=\{\mathcal{I}^{ood},\mathcal{T}^{ood}\}\). Note that \(\mathcal{T}^{id}=(\mathcal{T}^{id,c},\mathcal{T}^{id,d})\) and \(\mathcal{T}^{ood}=(\mathcal{T}^{ood,c},\mathcal{T}^{ood,d})\), where \((\mathcal{T}^{id,c},\mathcal{T}^{id,d})\) are clinical and wound image description of ID images and \((\mathcal{T}^{ood,c},\mathcal{T}^{ood,d})\) are clinical and wound image description of OOD images. The covariate-shifted data refers to wound images that belong to the same label space as the training data but differ due to changes in the input distribution such as noise, blur, and rotated images. At inference step, new data (\(\mathcal{D}_{test}\)) is received. Our goal is to leverage the cross-contextual information of clinical context and wound image description and predict \(\mathcal{D}_{test}\)’s label if it is ID or flag \(\mathcal{D}_{test}\) as SAE if it is OOD.
Dual-Stream Text Encoding. Each text modality is encoded independently using a shared pre-trained text encoder \(\mathcal{F}\) with frozen weights \(W_0 \in \mathbb{R}^{d \times d}\). For sample \(i\), we obtain two separate embedding vectors \(\mathbf{x}^c_i = \mathcal{F}(T^c_i) \in \mathbb{R}^{d}\) and \(\mathbf{x}^d_i = \mathcal{F}(T^d_i) \in \mathbb{R}^{d}\), where \(\mathbf{x}^c_i\) captures the clinical context (patient history, risk factors, medical terminology) and \(\mathbf{x}^d_i\) captures the visual-grounded wound description (tissue type, wound geometry, exudate). Encoding the two streams separately preserves their individual semantics and gives us explicit control over cross-stream fusion in the sequel.
LoRA Adapters for Domain-Specific Text Streams. Standard full fine-tuning of \(\mathcal{F}\) on each text stream would require updating all \(d^2\) parameters of every weight matrix. Instead, we employ Low-Rank Adaptation (LoRA) [9] to introduce lightweight, task-specific corrections while keeping \(W_0\) frozen. For a weight matrix \(W_0 \in \mathbb{R}^{d \times k}\) inside \(\mathcal{F}\), LoRA re-parameterization updates the weights as \(W = W_0 + \gamma \cdot \Delta W\), where \(\Delta W = B A\), \(A \in \mathbb{R}^{r \times k}\) and \(B \in \mathbb{R}^{d \times r}\) are trainable low-rank matrices with rank \(r \ll \min(d, k)\), and \(\gamma = \alpha / r\) is a scaling factor controlled by hyperparameter \(\alpha\). \(A\) is initialized with a random Gaussian and \(B\) is initialized to zero, so \(\Delta W = 0\) at the start of training, preserving the pretrained behavior. We train two separate LoRA adapters on the text streams: \[\text{Clinical adapter:} \Delta W^c = B_c A_c, \; A_c \in \mathbb{R}^{r \times k},\; B_c \in \mathbb{R}^{d \times r},\] \[\text{Wound adapter:} \Delta W^d = B_d A_d, \; A_d \in \mathbb{R}^{r \times k},\; B_d \in \mathbb{R}^{d \times r}.\]
Intuitively, \(A_c\) learns to detect clinically relevant directions in the input (e.g.severity signals, medication references), while \(B_c\) maps those signals to clinical-style output corrections. Symmetrically, \(A_d\) detects descriptive grounded directions (e.g.necrosis, wound geometry) and \(B_d\) maps them to descriptive corrections.
The adapted encoder outputs for sample \(i\) are: \[\mathbf{h}^c_i = W_0\,\mathbf{x}^c_i + \gamma\, B_c A_c\,\mathbf{x}^c_i, \;\; \mathbf{h}^d_i = W_0\,\mathbf{x}^d_i + \gamma\, B_d A_d\,\mathbf{x}^d_i.\]
Cross-Contextual LoRA Fusion. The representations \(\mathbf{h}^c_i\) and \(\mathbf{h}^d_i\) capture each modality independently, but do not yet encode the cross-contextual relationship between clinical context and wound description. We therefore propose a cross-adapter fusion that explicitly couples the two streams through their LoRA components. The matrix \(A_c\) has been trained to project inputs into a subspace that is maximally informative for clinical reasoning. The matrix \(B_d\) has been trained to produce wound-description-style output corrections. Composing them as \(B_d A_c\) yields an adapter that perceives the input through clinical eyes but responds in descriptive language and vice versa for \(B_c A_d\). This cross-composition is well-defined because both \(A_\cdot \in \mathbb{R}^{r \times k}\) and \(B_\cdot \in \mathbb{R}^{d \times r}\) share the same bottleneck dimension \(r\).
Merged adapter and fused representation. Given the two independently encoded vectors, we form the concatenated representation \(\mathbf{x}_i = \bigl[\mathbf{x}^c_i \;;\; \mathbf{x}^d_i\bigr] \in \mathbb{R}^{2d}\). Next, we define the full cross-contextual merged adapter as \[\boxed{ \Delta W_{\mathrm{merged}}= \alpha\, B_c A_c +\beta\, B_d A_d + \lambda\, B_c A_d + \mu\, B_d A_c, } \label{eq:merged95adapter}\tag{1}\]
where \(\alpha, \beta \in \mathbb{R}_{+}\) control the strength of the same-task terms and \(\lambda, \mu \in \mathbb{R}_{+}\) control the cross-task terms. The four components have distinct semantic roles (Table 1).
| Term | Detects (via \(A\)) | Corrects (via \(B\)) | Semantic role |
|---|---|---|---|
| \(\alpha\, B_c A_c\) | Clinical signals | Clinical style | Pure clinical understanding |
| \(\beta\, B_d A_d\) | Wound descriptors | Wound style | Pure wound description |
| \(\lambda\, B_c A_d\) | Wound descriptors | Clinical style | Wound features \(\to\) clinical framing |
| \(\mu\, B_d A_c\) | Clinical signals | Wound style | Clinical context \(\to\) visual grounding |
4pt
The merged output for sample \(i\) is \[\begin{align} \label{eq:fused95expanded} \mathbf{h}_i \;=\; W_0\,\mathbf{x}_i \;+\; \gamma\,\Delta W_{\mathrm{merged}}\,\mathbf{x}_i. \end{align}\tag{2}\]
The vector \(\mathbf{h}_i \in \mathbb{R}^{2d}\) is the cross-contextually enriched text representation that will be passed alongside the image \(I_i\) to the VLM in the downstream module.
We now describe how the cross-contextual representation \(\mathbf{h}_i \in \mathbb{R}^{2d}\) in (2 ) produced by the personalized LoRA fusion (Section 3.1) is used as a semantically enriched multimodal caption in a wound-adapted instantiation of the Temporal Quadruple-Pattern Matching (T-QPM) framework [10].
Our setting differs from standard T-QPM because:
Personalized approach. Through LoRA adaptation mechanism, we develop a personalized technique.
Pre-defined class prompts. Instead of constructing the ID text bank from hand-crafted templates, we build it directly from the fused representations of ID training samples, making the bank fully data-driven.
SAE identification. The label space is \(\mathcal{Y}=\{0,1\}\) (normal and moderate healing, both in-distribution), while class 2 (SAE) is the OOD target — the detector must flag class-2 samples at inference without ever receiving their labels during training.
Temporal component. the temporal component is derived by wound area measurements, which provide a direct physiological signal of healing trajectory: a healing wound contracts over time, so unexpected area growth between consecutive timesteps constitutes a temporal anomaly that amplifies the temporal penalty.
Projection of Fused Representation. Because \(\mathbf{h}_i \in \mathbb{R}^{2d}\) lives in the concatenated embedding space whereas CLIP’s shared vision-language space is \(\mathbb{R}^{d}\), we introduce a lightweight linear projection head \(P_\phi \in \mathbb{R}^{d \times 2d}\) with trainable parameters \(\phi\), followed by \(\ell_2\)-normalization, to map \(\mathbf{h}_i\) back into the CLIP embedding space: \[\begin{align} \mathbf{q}_i \;=\; \mathrm{Normalize}\!\bigl(P_\phi\,\mathbf{h}_i\bigr) \;\in\; \mathbb{R}^{d}. \label{eq:proj} \end{align}\tag{3}\] \(\mathbf{q}_i\) is the wound-adapted caption embedding for sample \(i\), serving as a drop-in replacement for the caption query \(\mathbf{q}_c\) in all four OOD detector scoring functions defined in sequel. It encodes the joint semantics of both the clinical record \(T^c_i\) and the wound image description \(T^d_i\) through the cross-contextual LoRA fusion, providing a richer and more medically grounded signal. The projection head \(P_\phi\) is optimized jointly with the two fusion scalars; all other parameters remain frozen.
Data-Driven ID Text Bank Construction. We construct the ID text bank directly from the fused representations of ID training samples. For each ID class \(k \in \{0,1\}\), we compute the class prototype as the \(\ell_2\)-normalised mean of the projected caption embeddings of all training samples belonging to that class: \[\begin{align} \mathbf{t}_k \;&=\; \mathrm{Normalize}\!\!\left( \frac{1}{|\mathcal{S}_k|} \sum_{i \in \mathcal{S}_k} \mathbf{q}_i \right) \in \mathbb{R}^{d},\;where\noindent\\ \mathcal{S}_k & = \bigl\{i : y_i = k,\; (I_i, T^c_i, T^d_i) \in \mathcal{D}^{\mathrm{id}}\bigr\}, \label{eq:text95bank} \end{align}\tag{4}\]
where \(\mathbf{q}_i\) is computed via Eq. 3 using the frozen LoRA-adapted encoder and projection head. Stacking the two prototypes yields the ID text bank \(\mathbf{T}^{{id}} = [\mathbf{t}_0, \mathbf{t}_1]^\top \in \mathbb{R}^{2 \times d}\).
This construction is more principled than prompt engineering for two reasons. First, \(\mathbf{t}_k\) aggregates the actual clinical and visual semantics of class-\(k\) wound samples rather than relying on generic textual descriptions. Second, because \(\mathbf{q}_i\) is itself the output of the cross-contextual LoRA fusion, the text bank inherits the personalised domain adaptation from Stage III, ensuring that the ID prototypes and the test caption embeddings live in the same adapted subspace and are therefore directly comparable.\(\mathbf{T}^{{id}}\) is computed once after the LoRA adapters and projection head are trained, and kept fixed across all post-operative timesteps.
Temporal Visual Prototype Construction. Wound appearance evolves systematically over time, inducing a temporal distribution shift in the visual domain. To handle this, we compute timestep-specific visual prototypes from the frozen CLIP-ViT encoder \(\phi^V\). For each wound image \(I\) at post-operative timestep \(t\), the encoder produces patch embeddings \(\mathbf{F}(I) = \phi^V(I) \in \mathbb{R}^{(N+1)\times d}\), decomposed into a global CLS token \(\mathbf{F}_v(I) \in \mathbb{R}^d\) and spatial patch features \(\mathbf{F}_s(I) \in \mathbb{R}^{N \times d}\).
For each ID class \(k \in \{0,1\}\), class-specific spatial attention weights are computed as: \[\mathbf{A}_k(I) = \mathrm{Softmax}\!\!\left( \frac{\mathbf{F}_s(I)\,\mathbf{t}_k}{\|\mathbf{F}_s(I)\|\,\|\mathbf{t}_k\|} \right) \in \mathbb{R}^N, \label{eq:spatial95attn}\tag{5}\] yielding a class-attended spatial feature \(\tilde{\mathbf{f}}_k(I) = \mathbf{A}_k(I)^\top \mathbf{F}_s(I)\). The class-specific image representation combines global and attended spatial features as \(\mathbf{f}_k(I) = \gamma_s\,\tilde{\mathbf{f}}_k(I) + \mathbf{F}_v(I)\). The ID logit vector and class probability vector follow as: \[\begin{align} \mathbf{z}_{id}(I) &= \bigl[\mathbf{f}_0(I)^\top\mathbf{t}_0,\; \mathbf{f}_1(I)^\top\mathbf{t}_1\bigr]^\top \in \mathbb{R}^2,\nonumber\\ \qquad \mathbf{p}(I) &= \mathrm{Softmax}\!\left(\frac{\mathbf{z}_{id}(I)}{\tau}\right), \label{eq:id95logits} \end{align}\tag{6}\]
and the timestep-specific class-conditional visual prototype for class \(k\) at day \(t\) is \(\boldsymbol{\mu}_{k,t} = \mathbb{E}\bigl[\mathbf{p}(I) \mid (I,y) \in \mathcal{D}_t^{\mathrm{train}},\; y = k\bigr] \in \mathbb{R}^2\). The set \(\{\boldsymbol{\mu}_{k,t}\}_{k=0}^{1}\) defines the expected ID probability pattern at day \(t\), allowing the notion of “normal” wound healing behaviour to adapt to the gradual visual changes inherent in post-surgical recovery.
Wound-Adapted Quadruple Cross-Modal Scoring. For a test wound image \(I_i\) with its wound-adapted caption embedding \(\mathbf{q}_i\) (Eq. 3 ) observed at timestep \(t\), we construct four complementary OOD scores: \(S_{\mathrm{ID}}\), a semantic matching score (image \(\leftrightarrow\) ID text bank), \(S_{\mathrm{VIS}}\) a wound-based score (image \(\leftrightarrow\) ID visual prototypes), \(S_{\mathrm{CAP\text{-}T}}\) a caption-text alignment score (fused caption \(\leftrightarrow\) ID text bank), and \(S_{\mathrm{CAP\text{-}V}}\) a caption-visual alignment score (fused caption \(\leftrightarrow\) ID visual prototypes). Details on scores computation are provided in the Supplementary Materials.
Fused OOD Score. The four scores are combined with learnable positive weights \(\beta, \eta > 0\) as: \[\begin{align} S_{\mathrm{FUSED}}(I_i,t) = S_{\mathrm{ID}}(I_i) + \beta\cdot S_{\mathrm{VIS}}(I_i,t)\nonumber\\ - \gamma_{\mathrm{cap}}\cdot S_{\mathrm{CAP\text{-}T}}(I_i) - \eta\cdot S_{\mathrm{CAP\text{-}V}}(I_i,t), \end{align}\] where \(\gamma_{\mathrm{cap}} > 0\) is a fixed hyperparameter and \(\beta = \log(1+e^{\tilde{\beta}})\), \(\eta = \log(1+e^{\tilde{\eta}})\) are softplus-reparameterised to enforce strict positivity. The caption-based terms are subtracted because high caption-to-ID-bank alignment, when not matched by visual typicality, is the hallmark of a SAE: the fused clinical-visual description superficially resembles known healing language, yet the wound image itself departs from the expected healing trajectory.
At the initial timestep \(t=0\), a global decision threshold \(\delta\) is calibrated as the \(\delta_q\)-th percentile of fused scores on the ID training data with \(y\in\{0,1\}\): \[\delta = \mathrm{quantile}_{\delta_q}\!\bigl( \{S_{\mathrm{FUSED}}(I,0) \mid (I,y) \in \mathcal{D}_0^{\mathrm{train}}\} \bigr), \label{eq:threshold}\tag{7}\]
and kept fixed across all timesteps (clinical visits).
Balanced ID classification loss. Cross-entropy is computed symmetrically on both clean and covariate-shifted wound views over the two ID classes: \[\begin{align} \mathcal{L}_{\mathrm{ID}} = \frac{1}{2}\Bigl( \mathbb{E}_{(I,y)\sim\mathcal{D}_t^{\mathrm{id}}} \bigl[\mathcal{L}_{\mathrm{CE}}(\mathbf{z}_{id}(I),\,y)\bigr]\nonumber\\ + \mathbb{E}_{(\tilde{I},y)\sim\mathcal{D}_t^{\mathrm{id}}} \bigl[\mathcal{L}_{\mathrm{CE}}(\mathbf{z}_{id}(\tilde{I}),\,y)\bigr] \Bigr), \label{eq:l95id} \end{align}\tag{8}\] where \(\tilde{I}\) is a covariate-shifted view of \(I\) (e.g., lighting perturbation, image compression), and the expectation is taken only over ID samples \(y \in \{0,1\}\).
Covariate consistency loss. Enforces that OOD detection scores remain stable under covariate shift: \[\mathcal{L}_{\mathrm{COV}} = \mathbb{E}_{I\sim\mathcal{D}_t^{\mathrm{id}}}\Bigl[ \bigl|S_{\mathrm{FUSED}}(I,t) - S_{\mathrm{FUSED}}(\tilde{I},t)\bigr| \Bigr]. \label{eq:l95cov}\tag{9}\] Area-reweighted temporal drift penalty. Wound area should decrease monotonically under normal recovery. We exploit this domain knowledge to define a temporally-aware penalty that is reweighted by the observed wound area change between consecutive days. For sample \(i\) at timestep \(t\), let \(a_i^t \in \mathbb{R}_{+}\) denote the measured wound area (e.g., in cm\(^2\)). The signed area change is: \[\Delta a_i^t = a_i^t - a_i^{t-1}, \label{eq:delta95area}\tag{10}\] where \(\Delta a_i^t < 0\) indicates contraction (expected healing) and \(\Delta a_i^t > 0\) indicates expansion (physiological anomaly). We normalize the area change across the training batch at each timestep to obtain a unit-scale reweighting signal: \[w_i^t = \sigma\!\left( \frac{\Delta a_i^t - \mu_{\Delta}}{\sigma_{\Delta}} \right), \label{eq:area95weight}\tag{11}\] where \(\mu_{\Delta}\) and \(\sigma_{\Delta}\) are the batch mean and standard deviation of \(\{\Delta a_i^t\}\), and \(\sigma(\cdot)\) is the sigmoid function. \(w_i^t \in (0,1)\) is close to 1 when the wound is expanding (anomalous) and close to 0 when it is contracting (expected). Samples with unexpected area growth thus receive a higher temporal penalty weight. The area-reweighted temporal drift penalty penalizes inconsistency in the fused OOD score between consecutive timesteps, scaled by the physiological anomaly weight: \[\begin{align} & \mathcal{L}_{\mathrm{TEMP}} = \mathbb{E}_{I\sim\mathcal{D}_t^{\mathrm{id}}}\!\Bigl[ w_i^t \cdot \bigl|S_{\mathrm{FUSED}}(I,t) - S_{\mathrm{FUSED}}(I,t-1)\bigr| \Bigr]\nonumber\\ & + \mathbb{E}_{\tilde{I}\sim\mathcal{D}_t^{\mathrm{id}}}\!\Bigl[ w_i^t \cdot \bigl|S_{\mathrm{FUSED}}(\tilde{I},t) - S_{\mathrm{FUSED}}(\tilde{I},t-1)\bigr| \Bigr], \label{eq:l95temp} \end{align}\tag{12}\]
This formulation encodes the prior that a wound whose area is growing should produce a more dramatically shifted OOD score — and thus be penalised more heavily if its score remains unchanged — while a wound whose area is shrinking normally incurs little temporal penalty.
United loss functions. The combined objective with Lagrangian multipliers \(\lambda_{\mathrm{cov}}, \lambda_{\mathrm{temp}} > 0\) is: \[\boxed{ \mathcal{L}_{\mathrm{TOTAL}} = \mathcal{L}_{\mathrm{ID}} + \lambda_{\mathrm{cov}}\,\mathcal{L}_{\mathrm{COV}} + \lambda_{\mathrm{temp}}\,\mathcal{L}_{\mathrm{TEMP}}. } \label{eq:l95total}\tag{13}\] At each timestep \(t\), only three parameter sets are updated: the projection head \(P_\phi\) and the two fusion scalars \(\tilde{\beta}, \tilde{\eta}\). All CLIP backbone weights and LoRA adapter weights remain frozen, ensuring that the pretrained vision-language representations are preserved throughout.
OOD decision. Given a test wound image \(I_i\) with fused caption embedding \(\mathbf{q}_i\) at post-operative visits \(t\): \[\mathcal{D}(I_i,t) = \begin{cases} \texttt{ID, class }k^* & \text{if}\; S_{\mathrm{FUSED}}(I_i,t) \leq \delta, \\ \texttt{OOD (SAE flagged)} & \text{otherwise,} \end{cases} \label{eq:decision}\tag{14}\] where \(k^* = \arg\max_{k \in \{0,1\}}\,\mathbf{z}_{\mathrm{ID}}(I_i)[k]\) is the predicted healing class for ID samples. Class-2 samples (SAE) are never seen during training; the model learns to flag them purely from the mismatch between their fused score and the ID-calibrated threshold \(\delta\).
The wound image dataset is from the SmartBoot DFU offloading study (NCT04460573), a 12-week randomized trial enrolling adults (\(\geq\)18 yr) with active, non-infected, non-ischemic DFUs. Digital wound images and wound-size measurements were collected at scheduled visits using the eKare inSight 3D system; structured clinical variables (ulcer area, duration, location, University of Texas classification, HbA1c) were linked at the participant and visit level. A preprocessing pipeline converted longitudinal records into a temporal OOD benchmark. Full details on temporal organization, outcome labeling, multimodal representation, and patient-level partitioning are in the supplementary material.
We compare against DPM, TQPM, and LoCoOP baselines with the same patient-level train/val/test splits. As shown in Table 2, our method achieves AUROC 0.729 and the lowest FPR95 (0.490), reducing false positives by 22% vs.DPM and 44% vs.TQPM, while attaining the highest ID accuracy (0.937). Training dynamics are visualized in Figure 3.
| Method | AUROC \(\uparrow\) | FPR95 \(\downarrow\) | ID Accuracy \(\uparrow\) |
|---|---|---|---|
| DPM [29] | 0.721 | 0.625 | 0.844 |
| LoCoOp [32] | 0.662 | 0.783 | 0.839 |
| TQPM [10] | 0.519 | 0.875 | 0.824 |
| Ours | 0.729 | 0.490 | 0.937 |
Figure 3: Comparison of the proposed framework against DPM and TQPM on the SmartBoot wound benchmark. (a) AUROC (higher is better), (b) FPR95 (lower is better), and (c) ID Accuracy (higher is better). While DPM achieves a marginally higher AUROC, the proposed multimodal framework substantially reduces FPR95 and achieves the highest ID classification accuracy.. a — AUROC, b — FPR95, c — ID Accuracy
Figure 4 shows the three loss components over 10 epochs. \(\mathcal{L}_{\mathrm{ID}}\) falls rapidly in early epochs, confirming stable classification adaptation. \(\mathcal{L}_{\mathrm{COV}}\) remains low throughout, verifying covariate-shift invariance, and \(\mathcal{L}_{\mathrm{TEMP}}\) decreases steadily, stabilizing the longitudinal representation. Validation AUROC rises from 0.43 (epoch 1) to a peak of 0.75–0.76 (epochs 8–9), FPR95 drops from 0.93 to below 0.50, and ID accuracy reaches \(\approx\)97% by the final epoch.
Figure 4: Loss curves over training. (a) \(L_{\mathrm{ID}}\) decreases rapidly. (b) \(L_{\mathrm{COV}}\) remains low under visual perturbations. (c) \(L_{\mathrm{TEMP}}\) decreases steadily, stabilizing longitudinal OOD scores.. a — \(L_{\mathrm{ID}}\), b — \(L_{\mathrm{COV}}\), c — \(L_{\mathrm{TEMP}}\)
The decision threshold \(\delta\) is calibrated as the \(\delta_q\)-th percentile of the training ID score distribution and can be adjusted at inference without retraining, providing a flexible sensitivity–specificity trade-off for different clinical workflows. Table 3 sweeps \(\delta_q\) from the 50th to the 99th percentile. Lowering the threshold increases AE/SAE recall at the cost of higher FPR, while raising it reduces false alarms but sacrifices sensitivity. The default 95th-percentile operating point (recall 0.25, FPR 0.057) is conservative. Relaxing to the 90th percentile doubles recall to 0.50 while keeping FPR below 0.10, offering an attractive trade-off for screening-oriented deployment.
| Threshold (%) | Recall \(\uparrow\) | FPR \(\downarrow\) |
|---|---|---|
| 50 | 0.75 | 0.426 |
| 60 | 0.50 | 0.312 |
| 70 | 0.50 | 0.255 |
| 75 | 0.50 | 0.206 |
| 80 | 0.50 | 0.191 |
| 85 | 0.50 | 0.149 |
| 90 | 0.50 | 0.099 |
| 95 | 0.25 | 0.057 |
| 98 | 0.00 | 0.021 |
| 99 | 0.00 | 0.014 |
To evaluate robustness under realistic acquisition variations, we apply seven image-level perturbations to the SmartBoot benchmark without altering clinical labels. As shown in Table 4, the framework maintains stable AUROC (0.504–0.640) and low FPR (0.064–0.128) across all perturbation types, demonstrating that even when visual appearance is degraded, the complementary textual modalities \(T_c\) and \(T_d\) preserve anomaly detection by supplying context that is immune to image-domain perturbations.
| Covariate Shift | AUROC \(\uparrow\) | FPR \(\downarrow\) | ID Accuracy \(\uparrow\) |
|---|---|---|---|
| Gaussian Blur | 0.640 | 0.071 | 0.929 |
| Brightness | 0.626 | 0.106 | 0.894 |
| Contrast | 0.617 | 0.064 | 0.936 |
| Gaussian Noise | 0.608 | 0.078 | 0.922 |
| Rotation | 0.606 | 0.113 | 0.887 |
| Translation | 0.514 | 0.113 | 0.887 |
| Crop + Resize | 0.504 | 0.128 | 0.872 |
Modality contribution. Table 5 shows progressive modality ablation. Image-only performs worst (AUROC 0.411), confirming visual appearance alone is insufficient. Adding \(T_c\) lifts AUROC to 0.651, substituting \(T_d\) instead raises it to 0.674 with a larger FPR95 reduction, as wound descriptions directly encode tissue composition and periwound appearance. The full trimodal model achieves the strongest results, demonstrating that \(T_c\) and \(T_d\) provide complementary information.
| Configuration | AUROC \(\uparrow\) | FPR95 \(\downarrow\) | ID Acc \(\uparrow\) |
|---|---|---|---|
| Image Only | 0.411 | 0.709 | 0.857 |
| Image + \(T_c\) | 0.651 | 0.695 | 0.859 |
| Image + \(T_d\) | 0.674 | 0.651 | 0.915 |
| Image + \(T_c\) + \(T_d\) (Ours) | 0.729 | 0.490 | 0.937 |
Cross-contextual fusion. Table 6 isolates each adapter pathway. Removing either cross-stream term (\(\lambda B_c A_d\) or \(\mu B_d A_c\)) causes the largest AUROC drops (0.548 and 0.524 respectively), confirming bidirectional cross-modal interaction is the primary driver of SAE detection gains. Ablating all cross fusion reduces AUROC to 0.445.
| Configuration | AUROC \(\uparrow\) | FPR95 \(\downarrow\) | ID Acc \(\uparrow\) |
|---|---|---|---|
| Full Model | 0.729 | 0.490 | 0.937 |
| w/o \(\alpha B_cA_c\) | 0.654 | 0.837 | 0.628 |
| w/o \(\beta B_dA_d\) | 0.435 | 0.925 | 0.598 |
| w/o \(\lambda B_cA_d\) | 0.548 | 0.864 | 0.598 |
| w/o \(\mu B_dA_c\) | 0.524 | 0.846 | 0.608 |
| w/o Cross Fusion | 0.445 | 0.902 | 0.589 |
Loss function contribution. Table 7 evaluates each objective. \(\mathcal{L}_{\mathrm{COV}}\) reduces the false-positive rate under appearance shifts, and \(\mathcal{L}_{\mathrm{TEMP}}\) provides the largest AUROC gain (+0.041 over \(\mathcal{L}_{\mathrm{ID}}\) alone) by enforcing cross-visit consistency. The full \(\mathcal{L}_{\mathrm{TOTAL}}\) achieves the best results on all metrics.
| Loss Setting | AUROC \(\uparrow\) | FPR95 \(\downarrow\) | ID Acc \(\uparrow\) |
|---|---|---|---|
| \(\mathcal{L}_{\mathrm{ID}}\) only | 0.663 | 0.627 | 0.891 |
| \(\mathcal{L}_{\mathrm{ID}}+\mathcal{L}_{\mathrm{COV}}\) | 0.695 | 0.621 | 0.895 |
| \(\mathcal{L}_{\mathrm{ID}}+\mathcal{L}_{\mathrm{TEMP}}\) | 0.704 | 0.572 | 0.902 |
| \(\mathcal{L}_{\mathrm{TOTAL}}\) | 0.729 | 0.490 | 0.937 |
In this paper, we presented a multimodal framework for automated wound monitoring and personalized SAE detection, framing the problem as time-aware OOD detection. Our approach introduces three contributions: a dual-stream cross-contextual LoRA fusion mechanism built on a frozen BiomedCLIP backbone; a wound-specific quadruple cross-modal OOD scoring framework; and an area-reweighted temporal drift penalty that encodes the physiological prior that wound contraction signals recovery. Experiments on the SmartBoot diabetic foot ulcer dataset demonstrate that the proposed framework outperforms existing OOD detection baselines across all evaluated metrics. The ablation studies surface two broader insights. First, visual appearance alone is a poor basis for SAE detection, confirming that wound images are insufficient without the semantic context clinicians routinely consult. Second, the cross-contextual fusion terms contribute more to OOD performance than the same-stream terms, suggesting that the interaction between clinical context and visual wound descriptors carries diagnostic signal that neither modality encodes independently. Several limitations remain, including the single-trial dataset and the fixed ID text bank, which may limit adaptability as wound descriptions evolve across visits. Future work will explore patient-level online adaptation, generalization across diverse wound cohorts, and extension of the temporal OOD formulation to broader post-operative monitoring paradigms. To the best of our knowledge, this is the first framework to address OOD-based SAE detection in clinical wound monitoring.
Aditi Naiknaware and Salimeh Sekeh have been partially supported by NSF CAREER CCF-2451457. The findings are those of the authors only and do not represent any position of these funding bodies.
Wound Image Analysis and DFU Monitoring
Chronic wound management imposes a substantial global burden: DFUs affect 15–25% of diabetic patients over their lifetime with 25–44% one-year recurrence rates following healing [1], [11]. A systematic review of image-based AI for wound assessment [34] identifies segmentation, tissue classification, and healing-trajectory prediction as the three central tasks. Early automated approaches formulated wound care as image segmentation. Wang et al. [12] proposed a lightweight MobileNetV2 framework achieving competitive pixel-level wound delineation. Scebba et al. [6] introduced a detect-then-segment pipeline whose use of the eKare inSight 3D platform, the same system as in the SmartBoot trial, yields objective wound-area measurements that feed our temporal drift penalty directly. Beyond segmentation, tissue-type classification (granulation, slough, eschar, necrosis) has been addressed by ensemble CNN classifiers [13]. A line of DFUC grand challenges [14] has provided standardised benchmarks for DFU detection and segmentation, driving year-on-year algorithmic progress. Multimodal systems fusing wound photographs with structured clinical metadata (ulcer grade, HbA1c, offloading adherence) consistently outperform unimodal classifiers [15]. The closest prior system, DM-WAT [16], fuses DeiT image features with DeBERTa clinical note embeddings via intermediate feature fusion, achieving 77% referral-decision accuracy. Our framework differs in three key ways: (i) we use the domain-specific BiomedCLIP backbone, (ii) we generate structured wound descriptions \(T^d\) from a clinical VLM, and (iii) we target unsupervised SAE detection, which no prior wound system addresses.
Biomedical Language Models and VLP Backbones
BiomedCLIP’s text encoder is PubMedBERT [35], a BERT model pre-trained from scratch on PubMed abstracts and PMC full-text, which substantially outperforms mixed-domain models on biomedical NLP benchmarks. CLIP [2] established contrastive image-text pre-training as the paradigm for zero-shot visual recognition via an InfoNCE objective over large web corpora. Medical adaptations proliferated: MedCLIP [18] decouples contrastive pairs on chest X-rays with a semantic matching loss to handle false negatives; BioViL-T [17] trains a CNN-Transformer hybrid on prior–current image-report pairs achieving state-of-the-art disease-progression classification. BiomedCLIP [3] scales this to 15M PMC figure-caption pairs. Large multimodal models extend this further: BLIP-2 [4] bridges frozen image encoders to frozen language models via a lightweight Q-Former, LLaVA-Med [36] instruction-tunes a large VLM for biomedical VQA in a single training day, Med-Flamingo [37] achieves few-shot medical reasoning with a frozen vision backbone.
Parameter-Efficient Fine-Tuning
Adapter modules [38] were the first parameter-efficient approach, inserting small bottleneck layers into frozen Transformer blocks. Prefix-tuning [39] prepends learnable continuous vectors to the input and has been shown to match full fine-tuning on generation tasks. Prompt tuning (CoOp [7], CoCoOp [8]) optimises discrete or continuous context tokens for vision-language transfer. LoRA [9] parameterises weight updates as \(\Delta W\!=\!BA\) with \(r\!\ll\!\min(d,k)\), reducing trainable parameters to below 1% while preserving pre-trained behaviour through zero initialisation of \(B\). AdaLoRA [40] extends LoRA by dynamically allocating the rank budget across weight matrices via singular value decomposition, improving parameter efficiency on tasks where different layers warrant different adaptation capacity. In medical imaging, LoRA has been applied to radiology report generation (Med-Flamingo [37]), clinical dialogue summarisation, VQA (LLaVA-Med [36]), and zero-shot BiomedCLIP transfer. Contrastive self-supervised anomaly pre-training (CSI [41]) provides a complementary direction, showing that distributionally shifted augmentations yield OOD-sensitive representations without labels. Our contribution extends LoRA to a dual-stream, cross-contextual design: separate adapters for clinical context \(T^c\) and wound-image descriptions \(T^d\) are composed cross-stream as \(B_d A_c\) and \(B_c A_d\), grounded in [5], and, to our knowledge, is the first LoRA formulation coupling two semantically distinct text streams.
OOD Detection: Classical and Generative Methods
Classical unimodal OOD detection defines ID membership through confidence. MSP [19] uses the maximum softmax probability, ODIN [20] improves separation via temperature scaling and input perturbations, Energy [21] replaces softmax with a theoretically grounded free-energy score, Outlier Exposure [22] trains on auxiliary negatives to push OOD posterior distributions toward uniform. Activation-shaping approaches, such as ReAct [23] and ASH [24], rectify or ablate penultimate-layer activations to suppress OOD overconfidence. ViM [27] projects residual feature magnitudes into the null space of the classifier to produce an energy-free OOD score. Distance-based methods, like Mahalanobis [25] and deep kNN [26], score inputs by proximity to class-conditional feature-space prototypes or neighbourhoods. Generative approaches have complemented these: autoencoders for brain MRI anomaly detection [42] and, more recently, denoising diffusion models for unsupervised OOD detection [43] demonstrate that reconstruction error from generative models serves as a reliable anomaly signal across diverse imaging modalities. The OpenOOD benchmark [44] and the accompanying generalized survey [45] provide unified evaluation protocols that encompass anomaly detection, open-set recognition, and distributional shift under a common framework.
OOD Detection with Vision-Language Models
Vision-language models introduced a multi-modal OOD detection paradigm. MCM [46] was the first to leverage CLIP’s aligned embeddings for zero-shot detection, scoring images by maximum temperature-scaled cosine similarity to ID class-name text embeddings, outperforming Mahalanobis by \(>\)13% AUROC on semantically hard tasks. GL-MCM [30] extends MCM with local patch scores for multi-object scenes, CLIPN [31] adds learned “no” prompts for threshold-free inference, LoCoOp [32] combines few-shot prompt tuning with local OOD awareness, and NegLabel [33] selects discriminative negative class names from large vocabularies as an explicit OOD reference. WinCLIP [47] adapts CLIP for zero- and few-shot anomaly detection in industrial images via compositional prompt ensembles and multi-scale window-based feature matching, a design related to our data-driven ID text bank construction from fused LoRA embeddings. For medical imaging specifically, Hong et al. [48] identify unsupervised label-free scenarios (our SAE setting) as the key open problem. T-QPM [10] unifies four cross-modal score signals with a temporal drift penalty. We adapt it to wound care by deriving ID prototypes from cross-contextual LoRA embeddings and reweighting the temporal penalty by sigmoid-normalised wound-area change (grounded theoretically by [5]).
Temporal Modeling in Clinical AI
Temporal dynamics are a defining characteristic of wound care: area contraction signals healing, while stagnation or growth signals adverse risk. Self-attention mechanisms [49] have become the dominant architecture for modeling long-range temporal dependencies in sequential data, with extensive adoption in clinical time-series. BioViL-T [17] demonstrated that incorporating prior visit images and reports into temporal contrastive objectives substantially improves disease-progression classification in radiology. Autoencoders [42] have been applied to longitudinal brain MRI anomaly detection, learning expected morphological trajectories and flagging deviations. Contrastive methods (CSI [41]) learn representations that remain stable under in-distribution covariate shift yet are sensitive to out-of-distribution novelty, properties directly exploited in our covariate consistency loss. The generalized OOD survey [45] and the medical OOD review [48] both highlight that models deployed under temporal data drift degrade silently, motivating explicit drift-aware regularisation. Our area-reweighted penalty \(\mathcal{L}_\text{TEMP}\) operationalises this insight for wound physiology: sigmoid-normalised wound-area change between visits reweights the temporal consistency penalty, penalising score inconsistency proportionally to the magnitude of the physiological anomaly signal. The OpenOOD benchmark [44] also serves as a reference for evaluating temporal robustness under covariate shift, and we use its FPR@TPR95 and AUROC metrics throughout our evaluation.
\(S_{\mathrm{ID}}\): Semantic Matching Score (image \(\leftrightarrow\) ID text bank). \[S_{\mathrm{ID}}(I_i) = \max_{k \in \{0,1\}} \frac{\mathbf{z}_{\mathrm{ID}}(I_i)[k]}{\tau}. \label{eq:s95id}\tag{15}\] A high value indicates that the wound image is visually consistent with a known ID healing class; a low value suggests the visual appearance departs from both normal and moderate healing which could be a potential SAE.
\(S_{\mathrm{VIS}}\): Wound-based Score (image \(\leftrightarrow\) ID visual prototypes). \[\begin{align} \mathrm{KL}_k(I_i,t) &= \sum_{j=0}^{1} p_j(I_i)\log\frac{p_j(I_i)}{\mu_{k,t}[j]},\nonumber\\ S_{\mathrm{VIS}}(I_i,t) &= -\min_{k \in \{0,1\}}\;\mathrm{KL}_k(I_i,t). \label{eq:s95vis} \end{align}\tag{16}\] A higher \(S_{\mathrm{VIS}}\) indicates the wound’s visual probability pattern conforms to expected ID behaviour at post-operative day \(t\).
\(S_{\mathrm{CAP\text{-}T}}\): Caption-Text Alignment Score (fused caption \(\leftrightarrow\) ID text bank): \(S_{\mathrm{CAP\text{-}T}}(I_i) = \max_{k \in \{0,1\}}\; \langle \mathbf{q}_i,\, \mathbf{t}_k \rangle.\)
Because \(\mathbf{q}_i\) and \(\mathbf{t}_k\) both originate from the same LoRA-adapted encoder and projection head, this score measures how closely the test sample’s joint clinical-visual semantics align with the aggregated semantics of known ID classes, a comparison that is both domain-adapted and directly meaningful.
\(S_{\mathrm{CAP\text{-}V}}\): Caption-Visual Alignment Score (fused caption \(\leftrightarrow\) ID visual prototypes). This score is computed by \[S_{\mathrm{CAP\text{-}V}}(I_i,t) = -\min_{k \in \{0,1\}}\;\mathrm{KL}\!\left( \mathbf{p}_{\mathrm{CAP}}(I_i)\;\Big\|\;\boldsymbol{\mu}_{k,t} \right),\;where, \label{eq:s95capv}\tag{17}\] \[\begin{align} \mathbf{z}_{\mathrm{CAP}}(I_i) &= \bigl[\mathbf{q}_i^\top\mathbf{t}_0,\; \mathbf{q}_i^\top\mathbf{t}_1\bigr]^\top,\\ \mathbf{p}_{\mathrm{CAP}}(I_i) &= \mathrm{Softmax}\!\!\left(\frac{\mathbf{z}_{\mathrm{CAP}}(I_i)}{\tau}\right), \label{eq:p95cap} \end{align}\tag{18}\]
All experiments were implemented in PyTorch and conducted on a single NVIDIA L40 GPU. The proposed framework utilizes BiomedCLIP as the multimodal vision-language backbone, where wound images are encoded using the pretrained visual encoder and clinical text is processed through the pretrained text encoder. To efficiently adapt the foundation model to the wound OOD detection task, Low-Rank Adaptation (LoRA) was employed while keeping the original BiomedCLIP parameters frozen.
All wound images were resized to \(224\times224\) pixels and normalized using the standard BiomedCLIP preprocessing pipeline. Structured clinical information (\(T_c\)) and automatically generated wound descriptions (\(T_d\)) were tokenized using the BiomedCLIP tokenizer with a maximum context length of 77 tokens.
LoRA adapters were inserted into the text encoder using a rank of \(r=4\), scaling factor \(\alpha=8\), and dropout rate of \(0.1\). During training, only the LoRA parameters together with the proposed multimodal OOD scoring module were optimized, resulting in a parameter-efficient fine-tuning strategy.
Models were trained for 10 epochs using the AdamW optimizer with a learning rate of \(3\times10^{-4}\) and a batch size of 16. The temperature parameter used in the multimodal similarity computation was fixed to \(\tau=0.07\), while the spatial attention mixing weight was set to \(\gamma_s=0.5\). The covariate consistency and temporal consistency objectives were weighted by \(\lambda_{cov}=0.1\) and \(\lambda_{temp}=0.05\), respectively.
OOD decisions were obtained using the proposed fused anomaly score, which combines image similarity, multimodal text consistency, and temporal representations. The decision threshold was estimated from the training ID score distribution using percentile-based calibration.
Temporal wound organization. For each participant, wound images were chronologically ordered according to the clinical visit sequence extracted from image filenames and study metadata. Baseline images were assigned to week 0, while subsequent visits were indexed by their corresponding clinical follow-up week. Images with incomplete metadata, duplicated administrative screenshots, or corrupted acquisitions were removed during preprocessing.
Clinical outcome labeling. Patients were categorized into healed, non-healed, and adverse event/severe adverse event (AE/SAE) groups using the final clinical outcome recorded in the SmartBoot database. All images from healed and non-healed patients were treated as in-distribution (ID) samples. For patients who experienced an AE or SAE, the terminal wound image was assigned the OOD label, while earlier observations were retained as ID samples. This formulation allows the model to learn normal wound evolution from longitudinal observations while reserving the clinically abnormal terminal state as the OOD target.
Multimodal representation. Each wound image was paired with two complementary textual modalities. The first modality (\(T_c\)) consists of structured clinical information extracted from the SmartBoot database, including demographic information, wound characteristics, ulcer duration and location, glycemic status, and additional structured clinical descriptors available at the corresponding visit. The second modality (\(T_d\)) is an automatically generated wound description produced by a large vision-language model. To avoid leakage of quantitative wound measurements, the prompting strategy explicitly instructed the model to describe only localized wound appearance, tissue appearance, periwound characteristics, visible inflammation, granulation tissue, slough, and necrotic tissue, while ignoring overlaid measurements, interface elements, timestamps, and other non-clinical annotations present in the eKare images.
Patient-level data partitioning. To prevent patient-specific information leakage across splits, all experiments used patient-level partitioning rather than image-level partitioning. Entire patient trajectories were assigned exclusively to training, validation, or testing. AE/SAE patients were excluded from training and distributed only between validation and testing, ensuring the framework learns exclusively from in-distribution wound trajectories during optimization and is evaluated on previously unseen abnormal wound progressions during inference.
Figure 3 in the main paper shows the three individual loss components over 10 epochs. \(\mathcal{L}_{\mathrm{ID}}\) decreases rapidly in early epochs, reflecting stable adaptation to in-distribution wound categories. \(\mathcal{L}_{\mathrm{COV}}\) remains consistently low throughout, confirming invariant OOD anomaly scoring under visual perturbations. \(\mathcal{L}_{\mathrm{TEMP}}\) decreases steadily, stabilizing longitudinal score representations across successive clinical visits. The simultaneous minimization across all three objectives demonstrates robust multimodal optimization using parameter-efficient LoRA adapters, with no noticeable oscillations or divergence across the 10 training epochs.
Validation AUROC begins at \(\approx\)0.43 (epoch 1), rises to a peak of 0.75–0.76 (epochs 8–9), then settles at \(\approx\)0.69 at the final epoch. Despite minor mid-training fluctuations, which is expected given the small-sample OOD setting, the stable convergence region confirms the model does not overfit severely despite the limited number of AE/SAE patients. FPR95 falls from \(\approx\)0.93 (epoch 1) to \(\approx\)0.41 (epoch 9), a reduction exceeding 50%, before rising slightly to 0.49 at the final epoch. The overall downward trend demonstrates that the fused anomaly score progressively reduces false alarms while maintaining detection capability. ID accuracy improves from \(\approx\)63% (epoch 1) to \(\approx\)97% by the final epoch, with only a minor temporary dip around epoch 8 before recovering. The simultaneous improvement across all OOD and ID metrics confirms that the three objectives provide complementary, non-conflicting supervision signals: \(\mathcal{L}_{\mathrm{COV}}\) and \(\mathcal{L}_{\mathrm{TEMP}}\) improve anomaly detection without sacrificing in-distribution classification.
As a continuation of Fig. 5 in the main paper, Fig. 5 presents additional representative longitudinal wound trajectories from four more patients spanning normal healing, non-healing, and AE/SAE cases. For each clinical visit, we present the wound image together with the structured clinical context (\(T_c\)), including age, HbA1c, and UT grade, the corresponding wound description (\(T_d\)), and the fused OOD score produced by our multimodal framework. The examples illustrate how integrating visual appearance, clinical semantics, and temporal progression enables personalized wound assessment. Healing wounds exhibit progressive improvement in tissue appearance accompanied by consistently low OOD scores, whereas wounds with delayed healing or adverse events are expected to maintain elevated or increasing OOD scores, indicating greater deviation from the learned in-distribution healing patterns and an increased likelihood of clinically significant deterioration.