Visual classification under domain and category shifts requires identifying which image regions provide transferable evidence. Domain alignment alone can retain context that is stable across source domains yet redundant for prediction, while new categories may require different local distinctions. We propose PatchGen to learn image-conditioned soft patch weights and regularize their contributions to the task representation. Low-score suppression acts directly on the weights, while selected-confidence and class-conditional compactness objectives shape the aggregated features using available labels or host-generated pseudo-labels. An oracle predictive-subset analysis characterizes information preservation, complexity upper bounds, and sensitivity to selection error under explicit assumptions. Experiments on natural and histopathological image benchmarks across all three shift settings show that PatchGen improves average performance over matched-backbone baselines in most evaluated configurations, enhances generalization to unknown classes, and remains competitive with vision-language methods without text supervision.
翻译:暂无翻译