PromptPath: Prompt-Adaptive Computational Pathways for In-Context Learning

2026-08-03Computer Vision and Pattern Recognition

Computer Vision and Pattern Recognition
AI summary

The authors explain that current in-context learning methods mainly use example prompts just to clue the model in on what task to do but don’t change how the model actually processes data. They propose PromptPath, which lets the model adjust its internal computation steps based on the prompt, creating task-specific processing paths. This approach helps the model specialize better and makes it easier to understand how decisions are made. Their tests on visual recognition tasks showed that PromptPath performs better and works well across different types of tasks and data.

in-context learningpromptingdynamic routinglow-rank expertstask adaptationfeature representationmodel interpretability3D point cloud recognition2D visual recognition
Authors
Hangrui Zhang, Feifei Shao, Yawei Luo, Ping Liu, Jiaxiang Liu, Zuoqi Tang, Zhao Wang, Hongwei Wang, Jun Xiao
Abstract
In-context learning (ICL) has attracted increasing attention for enabling models to perform new tasks using only a few ``input--output'' prompt examples. However, existing approaches suffer from \textbf{shallow task adaptation}, where prompts are primarily used as contextual cues to implicitly infer task intent through semantic representations, while the underlying computational process remains unchanged. This limitation restricts task-specific adaptation and compromises inference interpretability. We argue that prompts should not only condition feature representations but also dynamically regulate the model's computation pathways. To this end, we propose \textbf{PromptPath}, an adaptive ICL framework that enables computation-level adaptation through prompt-conditioned dynamic pathways. Specifically, PromptPath introduces a prompt-driven routing mechanism to selectively activate and compose lightweight low-rank experts, forming task-specific computational pathways tailored to different prompts. By integrating prompt information directly into the inference process, PromptPath dynamically reconfigures model computation to enhance task specialization and interpretability. Extensive experiments on 3D point cloud and 2D visual recognition benchmarks demonstrate that PromptPath consistently outperforms state-of-the-art ICL baselines while exhibiting strong cross-domain and cross-task generalization.