Mixture-of-Dirichlet-Multinomials (MoDM) extends standard Dirichlet partitioning by modeling client distributions as a mixture of Dirichlet components. This enables multimodal non-IID structures where clients cluster into distinct distribution patterns.
Each client is assigned to a mixture component:
\[z_k \sim \text{Categorical}(\pi)\]where $\pi = (\pi_1, \ldots, \pi_M)$ are mixture weights.
Given component assignment $z_k = m$, sample label proportions:
\[p_k | z_k = m \sim \text{Dirichlet}(\alpha_m)\]where $\alpha_m \in \mathbb{R}^C_{>0}$ is the concentration vector for component $m$.
The implementation is located at src/unbitrium/partitioning/modm.py.
Mixture weights form a probability distribution:
\[\sum_{m=1}^M \pi_m = 1, \quad \pi_m \geq 0\]Verification: Weights validated to sum to unity.
Each client assigned to exactly one component:
\[z_k \in \{1, \ldots, M\} \text{ for all } k\]Verification: Assignment is deterministic given seed.
With $M = 1$, reduces to standard Dirichlet:
\[M = 1 \implies \text{MoDM} \equiv \text{Dirichlet}(\alpha_1)\]Verification: Single component produces Dirichlet results.
Fixed seed produces identical partitions.
Configuration:
Expected Behavior:
Configuration:
Expected Behavior:
Configuration:
Expected Behavior:
| Scenario | $M$ | $\pi$ Distribution | $\alpha$ Pattern |
|---|---|---|---|
| Bimodal | 2 | Uniform | Complementary |
| Geographic | 3-5 | By region size | Regional priors |
| Device type | 3 | By market share | Usage patterns |
| Temporal | 2-4 | By time period | Trend shifts |
| Metric | Range | Notes |
|---|---|---|
num_components |
$[1, K]$ | Number of mixture components |
component_sizes |
Varies | Clients per component |
inter_component_emd |
$[0, 1]$ | Distance between components |
intra_component_variance |
$[0, \infty)$ | Variance within component |
Input: $M = 1$
Expected Behavior:
Input: $M = K$ (one component per client)
Expected Behavior:
Input: $\pi_m = 0$ for some $m$
Expected Behavior:
Input: $\alpha_m = (10^6, 0, \ldots, 0)$
Expected Behavior:
from unbitrium.partitioning import MoDM
partitioner = MoDM(
num_components=3,
mixture_weights=[0.3, 0.4, 0.3],
component_alphas=[
[1.0] * 10, # Uniform
[0.1, 0.1, 10.0, 10.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1],
[10.0, 10.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1],
],
num_clients=100,
seed=42,
)
Mixture structure may reveal:
Breakdown:
Yurochkin, M., et al. (2019). Bayesian nonparametric federated learning of neural networks. In ICML.
Marfoq, O., et al. (2021). Federated multi-task learning under a mixture of distributions. In NeurIPS.
Ghosh, A., et al. (2020). An efficient framework for clustered federated learning. In NeurIPS.
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-01-04 | Initial validation report |
Copyright 2026 Olaf Yunus Laitinen Imanov and Contributors. Released under EUPL 1.2.