arXiv:2608.29790cs.CLAug 2026

Manuscript Offprint

arXiv:2608.29790

HiVe: Beyond Static Prompts for Multitask Learning via Hierarchy-based Vertical Mixture-of-Experts

HyeonJik Bae, Minyeol Kim, Susik Yoon

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

As large language models (LLMs) continue to scale, parameter-efficient fine-tuning (PEFT) has become a practical alternative to full-parameter adaptation. Prompt tuning is effective, but existing approaches either use flat prompt structures or hierarchical structures with fixed prompt composition, limiting adaptive prompt specialization. To address this limitation, we propose HiVe, a prompt tuning framework that models prompts at multiple levels and enables input-dependent specialization. HiVe constructs a prompt hierarchy by leveraging inter-task relationships during training, and employs a vertical mixture-of-experts (V-MoE) mechanism at inference time to compose prompts up to the level of specialization required for each input. Experiments show that HiVe consistently outperforms strong prompt tuning baselines across diverse tasks.

1 Introduction

The prohibitive cost of full fine-tuning large language models (LLMs) has motivated the development of parameter-efficient fine-tuning (PEFT) that updates a small subset of parameters (Wang et al., 2025). Specifically, prompt tuning (PT) learns soft prompts while keeping the backbone model frozen (Lester et al., 2021). The single shared prompt used in early PT approaches has proven ineffective in multi-task and multi-domain scenarios, thereby failing to capture diverse data distributions (Kim et al., 2024; Dun et al., 2025). Recent mixture-of-experts (MoE)-based PT approaches employ input-dependent prompt selection. For example, SMoP (Choi et al., 2023) sparsely routes inputs to short prompts, while PT-MoE (Li et al., 2025) decomposes prompts into low-rank components and combines them through routing.

However, the fundamental limitations of existing approaches lie in their flat prompt space, treating all prompts as experts at the same level. As illustrated

Figure

(a) Fixed Specialization.

(b) Adaptive Specialization.

Figure 1: Fixed vs. adaptive prompt specialization. Unlike flat MoE approaches (left), HiVe dynamically constructs and uses the appropriate level of prompts (right).

in Figure 1, each input requires a diverse set of specializations to produce the correct output; some inputs benefit from general shared knowledge, while others require more task-specific information. Existing flat MoE-based approaches jointly encode both general and specialized knowledge in a few prompts within the same parameter space, making them inadequate for handling varying levels of prompt specialization across inputs.

Prior work has explored multi-level or hierarchical prompting for organizing shared and task-specific knowledge (Wang et al., 2022b; Chen et al., 2023; Liu et al., 2023), but typically applies a fixed task-dependent path or prompt composition, rather than selecting the hierarchy depth for each input. We identify that the core challenges of realizing adaptive specialization within a hierarchical prompt space are twofold: (i) automatically constructing the prompt hierarchy from learned task relationships at training time, and (ii) dynamically utilizing these disentangled prompts based on input characteristics at inference time. To our knowledge, no existing PT method explicitly addresses both requirements simultaneously.

To this end, we propose HiVe (Hierarchy-based Vertical Mixture-of-Experts)¹, a framework that treats a learned prompt hierarchy as a routing space for dynamically selecting the level of specialization required by each input. HiVe organizes prompts into a hierarchy of progressively specialized representations and employs an input-dependent, key-based prompt routing mechanism.

Specifically, at training time, HiVe constructs a three-level hierarchy consisting of base, group, and task prompts. However, constructing this hierarchy effectively is challenging, as incorrect grouping can introduce interference between tasks and degrade performance. To mitigate this, we induce a group-level hierarchy based on the stability of learned prompt relationships, allowing semantically related tasks to form stable groups during training. Furthermore, we adopt a residual prompt decomposition strategy that extracts shared information into higher-level prompts while preserving task-specific information at lower levels, thereby reducing both intra- and inter-level redundancy and interference.

At inference time, HiVe employs a key-based vertical MoE (V-MoE) mechanism that adaptively routes inputs across hierarchical specialization levels. Unlike conventional MoE approaches that route among parallel experts at the same abstraction level, V-MoE determines how deeply to traverse the prompt hierarchy for each input and progressively composes prompts down to the selected level. This enables the model to balance shared and task-specific knowledge according to the specialization required by each input.

We evaluate HiVe on Machine Reading for Question Answering (MRQA) and summarization benchmarks under both in-domain and out-of-domain settings. Experimental results demonstrate that our hierarchical, adaptive prompt specialization consistently improves both in-domain performance and out-of-domain generalization across diverse tasks over PT baselines. Remarkably, HiVe with a limited prompt parameter budget performs competitively with resource-heavy alternatives like full fine-tuning (∼13,000× params) and low-rank adaptation (∼3.2× params).

In brief, the primary highlights of HiVe are:

  • Emergent prompt hierarchy: A data-driven prompt hierarchy is induced through stability-aware clustering, while residual decomposition separates shared and task-specific representations across hierarchy levels, reducing redundancy and interference.

  • Vertical MoE routing: A key-based hierarchical routing mechanism that dynamically determines the appropriate level of prompt specialization for each input by composing prompts down to the selected level.

  • Domain-robust generalization: HiVe achieves the best results among PT methods, outperforming existing baselines in F1 on 12 MRQA datasets and ROUGE-L on 11 summarization datasets under both in- and out-of-domain settings, while maintaining performance parity with resource-heavy alternatives.