# Zero-Shot Detection of Visual Food Safety Hazards via Knowledge-Enhanced Feature Synthesis
## 4 Experimental Evaluation
### Feature Visualization and Qualitative Results  
To provide qualitative insights into our method's effectiveness, we visualized the feature distributions of synthesized unseen hazard classes using t-SNE [59]. Figure 4 shows the t-SNE visualization of synthesized features for selected unseen hazard classes, comparing our method with the baseline RRFS approach. Our method generates more distinct clusters for different hazard classes, indicating better separation in the feature space. This improved separation can be attributed to the knowledge-enhanced feature synthesis approach, which leverages structured domain knowledge to create more discriminative features for unseen hazard classes. \begin{table}
\begin{tabular}{l c c c c} \hline \hline \multirow{2}{*}{**Model Configuration**} & \multirow{2}{*}{**ZSD**} & \multicolumn{3}{c}{**GZSD**} \\  & & **S** & **U** & **HM** \\ \hline Baseline (RRFS [29]) & 56.8 & 68.3 & 52.7 & 59.5 \\ +Food Safety Attributes & 58.4 & 68.5 & 53.1 & 59.8 \\ +Knowledge Graph (w/o MSGF) & 60.3 & 68.6 & 53.8 & 60.3 \\ +MSGF (w/o RFDM) & 62.1 & 68.7 & 53.4 & 60.1 \\ +RFDM (Full ZSFDet) & **63.7** & **68.9** & **53.5** & **60.2** \\ \hline ZSFDet w/GAN instead of RFDM & 61.8 & 68.6 & 53.0 & 59.8 \\ ZSFDet w/Only Word Vectors & 59.5 & 68.4 & 52.9 & 59.6 \\ ZSFDet w/Only Hyperclass Graph & 60.8 & 68.5 & 53.1 & 59.8 \\ ZSFDet w/Only Co-occurrence Graph & 61.2 & 68.6 & 53.2 & 59.9 \\ ZSFDet w/Only Food Safety Knowledge Graph & 62.5 & 68.7 & 53.3 & 60.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Ablation studies on the FSVH dataset. We report mAP@50 (%) for ZSD and GZSD settings. Note: Each row shows incremental additions to the baseline. MSGF: Multi-Source Graph Fusion, RFDM: Region Feature Diffusion Model, GAN: Generative Adversarial Network. The last four rows show ablations using only single knowledge sources. Figure 5 presents qualitative detection results using sample images from the FSVH dataset. Our method successfully detects various food safety hazards, including mold growth, foreign objects, and texture anomalies, across different food categories. The ability to detect unseen hazard classes demonstrates the effectiveness of our zero-shot approach in real-world food safety inspection scenarios. **Analysis of Detection Performance According to Visual Complexity:** To better understand our method's strengths and limitations, we stratified the detection performance by visual attribute complexity. Hazards with distinct visual signatures (complexity score \(>0.7\)), such as large foreign objects and advanced mold growth, achieve 78.3% mAP, while subtle hazards (complexity score \(<0.3\)) like early bacterial colonies and light chemical residues achieve only 42.7% mAP. This 35.6% performance gap highlights the challenge of detecting visually subtle contamination. **Comparative Failure Mode Analysis:** Our method shows three primary failure modes: (1) confusion between visually similar hazards, particularly distinguishing between different mold species with similar growth patterns (23% of false positives), (2) missed detections for hazards manifesting as slight discoloration against heterogeneous food surfaces (31% of false negatives), and (3) over-sensitivity to normal food variations like natural browning in fresh produce (18% of false positives). In contrast, baseline methods exhibit different failure patterns: RRFS struggles with fine-grained discrimination between hazard subtypes (42% confusion rate between mold species), while SB shows higher false positive rates on  
Figure 4: t-SNE visualization of synthesized features for unseen hazard classes. (**a**) Features synthesized by RRFS. (**b**) Features synthesized by our ZSFDet. Different colors represent different unseen hazard classes. Figure 5: Qualitative detection results for the FSVH dataset. Red boxes indicate seen hazard classes.