MaTUFedGenAI @ IJCAI · 2025

Many-Task Federated Fine-Tuning via Unified Task Vectors

Many local tasks. One shared task vector.

Vasileios Tsouvalas Tanir Ozcelebi Nirvana Meratnia

At a glance

Clients with several tasks produce updates that can interfere. MaTU sends one unified task vector plus per-task masks and scalars, preserving task differences while enabling server aggregation within tasks and transfer between related tasks.

Shared updates · Task-specific models
Client 1Tasks A + B
Client 2Tasks A + C
Shared serverTask vectors
CLIENT 1 · LOCAL TRAINING

Two tasks · one origin

Pretrained θpOne shared origin
Task A
τA= θA − θp
+2−1+4+1
Task B
τB= θB − θp
+1−3−2+2
Train each taskKeep a common coordinate system
Separate local training · Task vector = fine-tuned − pretrained
Client 1Tasks A + B
Client 2Tasks A + C
Shared serverTask vectors
CLIENT 1 · TASK UNIFICATION

Elect direction · retain magnitude

Task A
+2−1+4+1
Task B
+1−3−2+2
Sum
+3−4+2+3
Elect sign
+−++
Unified τ
+2−3+4+2
Sign of sumLargest aligned magnitude
Sign of summed updates · Largest magnitude aligned with that sign
Client 1Tasks A + B
Client 2Tasks A + C
Shared serverTask vectors
CLIENT 1 → SERVER

One vector · distinct task updates

Unified τ
+2−3+4+2
Task A
Mask
1111
λA = 8/11Magnitude rescaler
Task B
Mask
1101
λB = 8/7Magnitude rescaler
One vector + task modulators→ server
Binary sign masks + magnitude scales · Compact client upload
Client 1Tasks A + B
Client 2Tasks A + C
Shared serverTask vectors
SERVER · SAME-TASK AGGREGATION

Combine clients sharing a task

Client 1Task A
+−++
Client 2Task A
+−−0
Task agreement
Data-size weights · γn
Task Aτ̂ASame-task update
Signs
+−0+
Clients sharing Task ARepeat per task
Task agreement mask · Data-size weights · Same-task aggregation
Client 1Tasks A + B
Client 2Tasks A + C
Shared serverTask vectors
SERVER · RELATED-TASK TRANSFER

Transfer along shared directions

Target A
+−0+
Task B
+−0+
3 aligned
1 neutral
0.875Use
Task C
000−
1 opposed
3 neutral
0.375Skip
S > 0.5Top-κ related tasks
Task BTarget A maskTask A
Weight by similarityCombine same-task + cross-task updates
Sign similarity → threshold → top-κ · Receiving-task mask
Client 1Tasks A + B
Client 2Tasks A + C
Shared serverTask vectors
SERVER → CLIENT 1

Reunify → return → recover

Updated unified τ′New masks + scales
+−0+
Client 1
Task A
mA × λA⊙ τ′
Pretrained + task updateθp + τ̇A
Update signs
+−0+
Task B
mB × λB⊙ τ′
Pretrained + task updateθp + τ̇B
Update signs
+−0+
Next local roundTask A · Task B
Updated vector + modulators → task-specific weights → next local round
Method diagram

Swipe across the diagram

What this adds

  • 01

    Compact task representation: elect a shared vector and retain lightweight task-specific modulators.

  • 02

    Selective transfer: combine same-task updates with sign-aligned related tasks.

  • 03

    No retained client weights: the server computes task-level updates without storing client-specific models across rounds.

Abstract

Federated Learning (FL) traditionally assumes homogeneous client tasks; however, in real-world scenarios, clients often specialize in diverse tasks, introducing task heterogeneity. To address this challenge, Many-Task FL (MaT-FL) has emerged, enabling clients to collaborate effectively despite task diversity. Existing MaT-FL approaches rely on client grouping or personalized layers, requiring the server to manage individual models and failing to account for clients handling multiple tasks. We propose MaTU, a MaT-FL approach that enables joint learning of task vectors across clients, eliminating the need for clustering or client-specific weight storage at the server. MaTU constructs a single “unified” task vector per client and leverages lightweight task-specific modulators — binary masks and scalar rescalers — to disentangle and adapt per-task behavior. This design ensures stateless server aggregation and naturally scales to large task sets with minimal communication overhead. Evaluated across 30 datasets, MaTU achieves superior performance over state-of-the-art MaT-FL approaches, with results comparable to per-task fine-tuning, while delivering significant communication savings.

Read more ↗
How it works

MaTU

01

Train from a shared reference

Each client fine-tunes its assigned tasks separately. A task vector is the change from the common pretrained weights. The experiments use ViT-B/32 with rank-16 LoRA on vision classification tasks.

τt=θt*−θp

Section 3.1 · p. 2. θt* denotes fine-tuned task weights and θp the shared pretrained origin.

02

Elect the unified vector

At each coordinate, take the sign of the sum of local task vectors. Among entries agreeing with that sign, retain the largest magnitude. This election preserves a common direction without averaging away its amplitude.

τ=σ⊙μ

Equation (2) · p. 3. σ is the elected sign, μ the largest aligned magnitude; ⊙ denotes elementwise multiplication.

03

Retain task-specific modulation

Each task keeps a binary mask for entries aligned with its own signs and a scalar matching its original total absolute magnitude. These modulators produce approximate task updates from the unified vector.

τ˙t=λtmt⊙τ,θt=θp+τ˙t

Section 3.2, “Forming clients updates” · p. 4. Client and round indices are omitted consistently; mt is a task mask and λt its scalar.

04

Aggregate and return updates

The server uses task agreement masks to combine same-task clients, then transfers sign-aligned updates from up to κ related tasks with similarity above 0.5. It reunifies the updated vectors for each client and returns new masks and scalars for the next local-training round.

Equations (3)–(7) · p. 4. “Stateless” means no client-specific weights retained across rounds; task-level aggregation still occurs. Cross-task transfer is not uniformly beneficial in the ablations.

Method details in the paper ↗

Original paper figures & sources
MaTU pipeline showing a client combining three task vectors into one unified vector and task modulators, then a server aggregating masks and estimating task similarity before producing updated vectors.Enlarge
Clients communicate one unified vector plus a binary mask and scalar for each task. The server combines same-task updates and transfers information between tasks whose update directions agree. Figure 1 in the public preprint
Evaluation

Results

Several tasks per client

8 vision tasks · 30 clients · 100 rounds (MaT-FL: 300)

Average accuracy (%) ↑ Higher is better

FedAvg
Average accuracy (%): 51.63
NTK-FedAvg
Average accuracy (%): 56.06
FedProx
Average accuracy (%): 56.32
FedPer
Average accuracy (%): 48.37
MaT-FL
Average accuracy (%): 67.60
MaTU
Average accuracy (%): 79.47

Traffic (M bits/task/round) ↓ Lower is better

FedAvg
Bitrate (M bits/task/round): 20.43
NTK-FedAvg
Bitrate (M bits/task/round): 20.43
FedProx
Bitrate (M bits/task/round): 20.43
FedPer
Bitrate (M bits/task/round): 17.16
MaT-FL
Bitrate (M bits/task/round): 20.43
MaTU
Bitrate (M bits/task/round): 8.04

+11.87 accuracy points and 60.6% lower traffic per task/round than MaT-FL in this multi-task setting.

Paper ↗

One task per client

8 vision tasks · 30 clients · 100 rounds (MaT-FL: 300) · selected references

One task per client. Eight vision tasks, ImageNet-21k-pretrained ViT-B/32 with rank-16 LoRA, 30 clients, 20% participation, one local epoch. Mean task accuracy (%), higher is better; reported bitrate in millions of bits per task per round, lower is better.
MethodAccuracy (%)M bits/task/round
Individual (centralized)90.21—
FedPer82.115.36
MaT-FL76.666.32
MaTU84.326.32

With one task per client, MaTU reaches 84.32%; FedPer uses fewer bits.

Paper ↗
Reference

Cite this work

BibTeX
@inproceedings{tsouvalas2025matu,
  title = {Many-Task Federated Fine-Tuning via Unified Task Vectors},
  author = {Vasileios Tsouvalas and Tanir Ozcelebi and Nirvana Meratnia},
  booktitle = {FedGenAI Workshop at IJCAI 2025},
  year = {2025},
  url = {https://arxiv.org/abs/2502.06376},
  eprint = {2502.06376},
  archivePrefix = {arXiv}
}

Keep exploring

FedLN

Learning together when labels cannot be trusted

FiBA

Understanding invisible backdoors in collaborative learning

Figure preview

Open full-size image