                     Ensemble Distribution Distillation via Flow Matching


                    Jonggeon Park * 1 Giung Nam * 1 Hyunsu Kim 1 Jongmin Yoon 1 Juho Lee 1


                         Abstract                                                                    EnDD    FED         EDFM
                                                                                0.85
      Neural network ensembles have proven effec-                               0.75
                                                                                0.65
      tive in improving performance across a range                              0.35
      of tasks; however, their high computational cost
                                                                                0.30




                                                                          NLL
      limits their applicability in resource-constrained
      environments or for large models. Ensemble dis-                           0.25
      tillation, the process of transferring knowledge
      from an ensemble teacher to a smaller student                             0.20
      model, offers a promising solution to this chal-                                   TRN      w/ mixup   w/ mixup and RA      AUX
                                                                                       (0.0018)   (0.0355)       (0.0948)       (0.1436)
      lenge. The key is to ensure that the student model
      is both cost-efficient and achieves performance                 Figure 1. How good is ensemble distribution distillation? It il-
      comparable to the ensemble teacher. With this in                lustrates how effectively different ensemble distribution distilla-
                                                                      tion methods learn the diversity of the ensemble teacher. The x-
      mind, we propose a novel ensemble distribution
                                                                      axis represents the teacher diversity under different diversification
      distillation method, which leverages flow match-                strategies (§ 5.1), while the y-axis shows the performance of the
      ing to effectively transfer the diversity from the              distilled student in each setting (NLL; lower is better). The size
      ensemble teacher to the student model. Our ex-                  of each circle marker indicates the level of diversity learned by
      tensive experiments demonstrate the effective-                  the student, demonstrating how well each distillation method ab-
      ness of our proposed method compared to exist-                  sorbs the teacher diversity and mimics the ensemble behavior of
      ing ensemble distillation approaches.                           producing diverse predictions (§ 5.2). Our proposed EDFM ap-
                                                                      proach effectively learns teacher diversity as it becomes more pro-
                                                                      nounced, continually absorbing it and outperforming baselines.

1. Introduction
The concept of ensembling neural networks has long been               Ensemble distillation is a specific form of knowledge distil-
a foundational approach in machine learning (Hansen and               lation (Hinton et al., 2014), where the teacher model is an
Salamon, 1990), based on the idea of constructing a strong            ensemble. Unlike the typical knowledge distillation setup,
hypothesis by combining multiple weaker ones (Kearns,                 in which a single teacher model provides one prediction per
1988). Interestingly, ensemble methods remain highly rel-             training instance, ensemble distillation incorporates predic-
evant in the era of deep learning, offering a simple but ef-          tions from multiple teacher models, introducing diversity.
fective way to improve the performance of deep neural net-            While this diversity is a key distinguishing feature, simply
works (Ciresan et al., 2012; Krizhevsky et al., 2012). How-           adopting the basic knowledge distillation objective (Ba and
ever, despite its benefits, a notable drawback of the ensem-          Caruana, 2014; Hinton et al., 2014), i.e., averaging the dis-
ble method becomes more pronounced with deep neural                   tillation losses or teacher predictions, overlooks the diver-
networks: “many ensembles are large and slow” (Buciluǎ               sity within the ensemble teacher. Consequently, the main
et al., 2006). To address this, the machine learning com-             goal in the ensemble distillation literature is to effectively
munity has naturally gravitated toward compressing the en-            leverage the multiple predictions, or the empirical predic-
sembles into a single, more efficient model (Buciluǎ et al.,         tive distribution, produced by the ensemble teacher (Cui et
2006; Ba and Caruana, 2014; Hinton et al., 2014).                     al., 2020; Malinin et al., 2020; Penso et al., 2022).
  *
   Equal contribution 1 Korea Advanced Institute of Science and       Despite recent advances, a significant performance gap re-
Technology, Republic of Korea. Correspondence to: Juho Lee            mains between ensemble teachers and their distilled stu-
<juholee@kaist.ac.kr>.                                                dents. This gap arises primarily from two key limitations:
Proceedings of the 42 nd International Conference on Machine          First, deep neural networks are typically trained to achieve
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025           near-zero training errors, causing ensemble models to pro-
by the author(s).                                                     duce highly correlated predictions on the training set. As a

                                                                  1
                                    Ensemble Distribution Distillation via Flow Matching

result, ensemble distillation methods operating on the same         categorical probabilities as p(x, θ) = softmax(z(x, θ)),
dataset struggle to transfer meaningful diversity to student        and their element-wise logarithm as log p(x, θ). For no-
models (Nam et al., 2021). Second, the capacity of student          tational simplicity, we will often omit the dependence of
models is inherently constrained. Since ensemble distilla-          logits and probabilties on inputs, e.g., p(x, θ) is written as
tion aims to approximate ensemble predictions efficiently,          pθ when x is clear from the context.
there exists a tradeoff between inference speed and pre-
                                                                    Ensembles. We view ensembles within a Bayesian frame-
dictive performance, e.g., embedding multiple subnetworks
                                                                    work, where the model parameters θ are treated as random
within a single model (Nam et al., 2021; Penso et al., 2022)
                                                                    variables. More precisely, the predictive categorical distri-
fundamentally limits the expressiveness, making it difficult
                                                                    bution is approximated by an ensemble of neural networks
to capture the full diversity of ensemble predictions.
                                                                    defined by the set of parameters {θ m }M
                                                                                                           m=1 :
Recently, Kim et al. (2024) reformulated ensemble distilla-
                                                                                                            M
tion as a distribution-matching problem, leveraging the dif-                                            1 X
fusion Schrödinger bridge (DSB) to map a single model’s              p(y|x) = Eθ∼q(θ) [p(y|x, θ)] ≈           p(y|x, θ m ), (1)
                                                                                                        M m=1
predictions to ensemble outputs. Unlike traditional meth-
ods, DSB enables flexible student modeling by iteratively           assuming the parameters are sampled from the approxi-
refining predictions through a lightweight score network.           mate posterior q(θ). In Bayesian literature, q(θ) is com-
However, their approach remains limited to approximating            monly modeled using a Gaussian or a mixture of Gaus-
the ensemble’s point estimates rather than modeling the full        sians to facilitate tractable sampling (Maddox et al., 2019;
distribution of teacher predictions.                                Shen et al., 2024). Focusing on the classification problem,
In this paper, we propose a novel ensemble distribution             p(y|x, θ) = Cat(y|pθ (x)) represents a K-way categorical
distillation algorithm based on flow matching (Lipman et            distribution with event probabilities pθ (x).
al., 2023). Our approach introduces a lightweight network           Ensemble distillation. The most straightforward way to
that learns the vector field mapping a single model’s pre-          distill the ensemble teacher, defined by q(θ), into the stu-
diction to the distribution of ensemble teacher predictions.        dent model, parameterized by ϕ, is to minimize
Crucially, we emphasize the role of teacher diversity in                                                  
distillation and show that existing methods fail to capture                           Eθ∼q(θ) H pθ , pϕ ,                    (2)
this diversity effectively, whereas ours succeeds (Fig. 2).
Furthermore, our method enables fast, parallelizable infer-         where H[·, ·] computes the cross-entropy between two cat-
ence, significantly reducing wall-clock time compared to            egorical probabilities, and pϕ is the categorical output from
prior approaches. We substantiate our claims through ex-            the student model. Eq. 2 is the average of standard distilla-
tensive experiments, covering a range of tasks including            tion losses (Hinton et al., 2014), and it is equivalent to
image classification and language modeling. Our contribu-                                                     
                                                                                      H Eθ∼q(θ) [pθ ] , pϕ ,                   (3)
tions are summarized as follows.
                                                                    which is the standard distillation loss with the mean of the
  • We present a comprehensive analysis of ensemble dis-            ensemble predictions. Unfortunately, this basic strategy en-
    tribution distillation with respect to both diversity and       tirely eliminates the diversity in ensemble predictions.
    fidelity. In particular, we investigate when ensemble
    teachers exhibit diversity (§ 5.1) and how effectively          Ensemble distribution distillation approaches make the stu-
    distillation methods can learn from it (§§ 5.2 and 5.3).        dent model capture the distribution of teacher predictions.
                                                                    Specifically, p : X × Θ → ∆K−1 can be interpreted as a
  • We propose a novel ensemble distribution distillation           parametric function that maps the input space to the class-
    algorithm, Ensemble Distillation via Flow Matching              probability simplex. The random variable π x := p(x, θ)
    (EDFM), which, as the name suggests, is based on                then represents the distribution of categorical probabilities
    the flow matching framework (§ 4). Our extensive ex-            for a given x under the posterior over parameters q(θ). By
    periments on image classification and language tasks            introducing the induced distribution q(π x |x), we obtain
    validate both the efficiency (§ 5.4) and effectiveness
                                                                                       Z
    (§§ 5.5 and 5.6) of the approach.
                                                                             p(y|x) =      Cat(y|p(x, θ))q(θ)dθ
                                                                                       ZΘ                                     (4)
2. Preliminaries                                                                     =         Cat(y|π x )q(π x |x)dπ x .
                                                                                        ∆K−1
Notation. We focus on a K-way classification problem,
where a neural network parameterized by θ ∈ Θ takes in-             Ultimately, the core idea of the ensemble distribution dis-
puts x ∈ X and produces predictions for the corresponding           tillation scheme is to use a single student model, parame-
labels y ∈ Y, with logits z(x, θ) ∈ RK . We also denote the         terized by ϕ, to model the induced distribution qϕ (π x |x).

                                                                2
                                       Ensemble Distribution Distillation via Flow Matching

For example, a Dirichlet Prior Network (DPN; Malinin and                importantly, “how to distill the ensemble teacher into a sin-
Gales, 2018) could serve as the student model if we assume              gle student model” (Cui et al., 2020; Malinin et al., 2020;
that q(π x |x) follows a Dirichlet distribution. While the              Du et al., 2020; Ryabinin et al., 2021; Nam et al., 2021;
Dirichlet distribution is a common choice for the induced               Nam et al., 2022; Penso et al., 2022). A central philosophy
distribution (Cui et al., 2020; Malinin et al., 2020), due to           shared by most of these studies is that “diversity matters
its conjugacy with the categorical distribution and its ability         when learning from ensembles” (Nam et al., 2021), high-
to facilitate tractable integration in Eq. 4, it is not necessar-       lighting the importance of effectively accounting for the di-
ily required. The induced distribution is defined indirectly            versity inherent in the ensemble teacher during the distilla-
through the observations {p(x, θ m )}M   m=1 , with no guaran-          tion process. To this end, 1) one-to-one ensemble distilla-
tee that they follow the Dirichlet distribution. It motivates           tion approaches design the student model to handle multi-
modeling the induced distribution as arbitrary, rather than             ple predictions, using methods such as multi-headed mod-
necessarily Dirichlet (Penso et al., 2022).                             eling (Tran et al., 2020) or weight-sharing techniques (Ma-
                                                                        riet et al., 2021; Nam et al., 2021), while 2) ensemble dis-
Flow matching. Flow Matching (FM; Lipman et al., 2023)
                                                                        tribution distillation methods model the distribution of the
is a framework for training simulation-free continuous nor-
                                                                        ensemble predictions (Cui et al., 2020; Malinin et al., 2020;
malizing flows (Chen et al., 2018) by learning vector fields
                                                                        Ryabinin et al., 2021; Penso et al., 2022).
that transport a base density p0 (x) to a target density p1 (x)
along a deterministic probability path whose density func-              Fast and efficient ensembling. There has been a per-
tion at time t is specified as pt (x). The probability path             sistent demand for more cost-efficient ensemble methods,
follows the neural ordinary differential equation (ODE)                 as ensembles of deep neural networks are typically asso-
                                                                        ciated with high computational costs during both train-
              dxt = ut (xt )dt,     x0 ∼ p0 (x0 )            (5)        ing and inference. Research under the terms fast or effi-
                                                                        cient ensembling has aimed to address this demand, includ-
where ut (x) represents the vector field that satisfies the
                                                                        ing: “how to reduce training costs for ensemble construc-
continuity equation for mass conservation. FM is trained to
                                                                        tion” (Huang et al., 2017; Garipov et al., 2018; Benton et
minimize the discrepancy between the learned vector field
                                                                        al., 2021), and “how to reduce inference costs for ensemble
ut and the ground-truth vt derived from data:
                                                                        behaviour” (Lee et al., 2015; Wen et al., 2020; Havasi et
                       h
                                                   2
                                                     i                  al., 2021; Yun et al., 2023). In particular, Yun et al. (2023)
      LFM (ϕ) = Et,xt λ(t) ∥ut (xt ; ϕ) − vt (xt )∥ , (6)
                                                                        emphasized the importance of reducing test-time costs for
                                                                        practical applications and proposed a framework that mim-
where t ∼ T defined over [0, 1], xt ∼ pt , and λ is a
                                                                        ics the output of one ensemble component based on the out-
time-dependent weighting function. However, such a for-
                                                                        put of another using a lightweight neural network. Kim et
mulation Eq. 6 is challenging in general as obtaining the
                                                                        al. (2024) further extended this approach by utilizing the
(marginal) ground-truth vt (x) is typically intractable. In-
                                                                        Schrödinger bridge algorithm (Liu et al., 2023a), mimick-
stead, we model FM in logit space conditioned on input x,
                                                                        ing the mean of the ensemble predictions. Our approach
requiring a Conditional Flow Matching (CFM) formulation
                                                                        is most closely related to these works, as it also leverages
conditioned by the base density p0 , where both the base and
                                                                        the outputs of a single ensemble component. However, the
target distributions depend on an auxiliary variable c:
                                                                        key difference is that we perform ensemble distribution dis-
 LCFM (ϕ)                                                               tillation via flow matching, sampling from the ensemble’s
             h                                             i (7)        predictive distribution rather than producing a single point
                                                         2
  = Et,xt ,x0 λ(t) ∥ut (xt |x0 , c; ϕ) − vt (xt |x0 , c)∥ ,             estimate, thereby better capturing the ensemble’s diversity.

where t ∼ T , x0 ∼ p0 (x0 |c), and xt ∼ pt (xt |x0 , c). FM             Flow matching and knowledge distillation. Meanwhile,
has been successfully applied to generative modeling due to             there have also been efforts (Shao et al., 2024; Huang et
improved training stability and computational efficiency.               al., 2023; Yao et al., 2024) to incorporate flow matching or
                                                                        diffusion models into knowledge distillation. These meth-
                                                                        ods, however, bear greater resemblance to DBN (Kim et
3. Related Work                                                         al., 2024) than to EDFM, as they primarily rely on one-
Ensemble distillation. In recent years, extensive research              to-one alignment of logits or intermediate features between
on ensemble distillation using deep neural networks has fo-             teacher and student models. Distilling the knowledge of
cused on three key design components: “how to construct                 the diffusion model itself, especially in terms of synthe-
the ensemble teacher” (Ba and Caruana, 2014; Korattikara                sis efficiency, has also been widely investigated (Salimans
et al., 2015; Bulò et al., 2016), “how to design the student            and Ho, 2022; Song et al., 2023; Yin et al., 2024a; Yin et
model” (Cui et al., 2020; Malinin et al., 2020; Tran et al.,            al., 2024b). We expect that these contributions might offer
2020; Mariet et al., 2021; Penso et al., 2022), and, most               meaningful insights for further improvements of EDFM.

                                                                    3
                                            Ensemble Distribution Distillation via Flow Matching

4. Approach                                                                  4.2. Student network
4.1. Flow matching in logit space                                            The student network uϕ is designed to condition on the in-
                                                                             put data by incorporating relevant information associated
For a given input x, we consider the logits z(x, θ) with                     with x. To this end, we utilize features extracted from the
θ ∼ q(θ), predicted by the ensemble teacher with the ap-                     penultimate layer of a pretrained teacher network—for ex-
proximate posterior q(θ). These logits are assumed to fol-                   ample, representations prior to the average pooling layer
low the distribution p1 :                                                    in the ResNet architecture (He et al., 2016)—as condition-
                          z x1 ∼ p1 (z x1 |x),                     (8)       ing inputs. Leveraging such pretrained features not only
                                                                             enhances the student network’s ability to discriminate be-
where the dependence on θ is omitted for simplicity, and                     tween different inputs but also transfers valuable knowl-
we denote z x1 ≡ z(x, θ). Our goal is to construct a prob-                   edge embedded in the teacher network, thereby facilitating
ability path whose density function at time t is specified                   faster convergence and improved performance. Since the
as pt for t ∈ (0, 1), starting from the source distribution                  pretrained teacher network serving as a feature extractor
p0 (·|x) := N (·; 0, σ 2 I) and transitioning to the target dis-             remains fixed during flow matching training, the compu-
tribution p1 (·|x). To achieve this, we introduce a condi-                   tational overhead incurred is substantially lower than that
tional vector field u : [0, 1] × RK × X → RK in the K-                       required for training the teacher network itself.
dimensional logit space:
                                                                             For the student network architecture, we employ a de-
                                     z x − z xt                              noising multilayer perceptron (MLP) structure as proposed
                    u(t, z xt , x) := 1         ,                  (9)       by Li et al. (2024). This lightweight architecture consists
                                       1−t
                                                                             of a limited number of residual MLP blocks. Within each
which induces a conditional probability path:                                block, the perturbed sample ztx is concatenated with the
          pt|1 (z xt |z x1 , x) = N (z xt |tz x1 , (1 − t)2 I),   (10)       conditioning input, followed by the integration of time-
                                                                             embedding information via an adaptive layer normaliza-
for 0 ≤ t ≤ 1. Conditioned on z x1 ∼ p1 (z x1 |x), the random                tion mechanism with zero initialization (Peebles and Xie,
variables z xt|1 conditioned on t ∈ [0, 1] are given by:                     2023). This processed representation then passes through
                                                                             an MLP layer with a skip connection. Despite being sim-
               z xt|1 = tz x1 + (1 − t)z x0 ∼ pt|1 ,              (11)       ple, this simple architecture proves sufficient to capture the
                                                                             target distribution, given the inherently low-dimensional
and the marginal random variable z xt ∼ pt is defined as a                   nature of the logit space. Additionally, due to the compu-
linear combination of z x0 ∼ p0 and z x1 ∼ p1 :                              tational efficiency of MLP layers on modern hardware ac-
                 z xt = tz x1 + (1 − t)z x0 ∼ pxt .               (12)       celerators such as GPUs, the MLP-based student network
                                                                             offers significant advantages in execution time, particularly
Building on these formulations, we model u using uϕ , a                      for parallel sampling, as will be shown in § 5.4. It should
neural network parameterized by ϕ. The network is trained                    be noted, however, that the denoising MLP is not the sole
by minimizing the conditional flow matching loss:                            practical option for EDFM. While the MLP architecture of-
                                                                             fers a favorable balance between computational efficiency
  L(ϕ) = Et,zx0 ,zx1 λ(t)∥uϕ (t, z xt , x) − (z x1 − z x0 )∥2 ,
                                                            
                                                                             and performance, alternative architectures, such as trans-
                                                             (13)            formers, may be more suitable in specific contexts, particu-
where t ∼ T , z x0 ∼ p0 , z x1 ∼ p1 , and λ denotes a time-                  larly when scalable student networks are required. Further
dependent weighting function (cf. § 4.3).                                    analysis of the impact of network architecture on EDFM
It is important to note that our formulation of flow matching                performance is provided in Appendix A.2.
represents one of the simplest instances, corresponding to
a rectified flow (Liu et al., 2023b) between Gaussian noise                  4.3. Training and inference
and the data distribution. More sophisticated approaches                     We identified the variance of the initial Gaussian noise
are conceivable, including 1) incorporating the geometric                    σ and the time distribution T as critical factors influenc-
structure of logits, such as flow matching constrained to                    ing the performance of EDFM. Through extensive ablation
the probability simplex, or 2) modifying the perturbation                    studies, we set σ = 4 and defined T as a distribution over
schedule, for example, adopting diffusion models instead                     [0, 1] that places exponentially greater weight near t = 1,
of flow matching. Nonetheless, empirical evaluation re-                      i.e., near the data. Additionally, we adopted the precondi-
vealed that many of these more complex formulations un-                      tioning technique proposed by Karras et al. (2022) for the
derperform relative to the simple approach presented here.                   student network, ensuring that the network input and loss
Further ablation studies examining various formulations                      function maintain comparable scales with unit variance,
are provided in Appendix A.1.

                                                                         4
                                     Ensemble Distribution Distillation via Flow Matching

Algorithm 1 Training EDFM                                             Algorithm 2 Sampling from EDFM
Require: Train dataset D = {(xi )}N       i=1 , noise distribu-       Require: Test dataset D = {(xi )}N    i=1 , noise distribution
    tion p0 := N (·; 0, σ 2 I), time distribution T , time-               p0 := N (·; 0, σ 2 I), number of sampling steps N , trun-
    dependent weighting function λ, empirical distribu-                   cation ϵ, sampling step schedule {1 = tN , . . . , t0 =
    tion of ensemble teacher logits conditioned on data x                 ϵ}, ODE solver, pretrained teacher network θ, and
    p1 (z1x |x), learning rate η, pretrained teacher network              trained student network ϕ
    θ, and student network ϕ                                           1: Sample x ∼ D
 1: repeat                                                             2: Sample z0x ∼ p0
 2:    Sample x ∼ D                                                    3: Extract feature x̄ of input x from teacher θ
 3:    Sample z0x ∼ p0 , z1x ∼ p1 (z1x |x), t ∼ T                      4: z ← z0x
 4:    Extract feature x̄ of input x from teacher θ                    5: for i = N to 2 in reverse do
 5:    Obtain perturbed sample ztx according to (12)                   6:    z ← ODE solver(z, ti , ti−1 , uϕ (ti , z, x̄))
 6:    Compute student network output uϕ (t, ztx , x̄)                 7: end for
 7:    Compute loss Lϕ according to (13)                               8: z ← z − (t1 − t0 )uϕ (t1 , z, x̄)
 8:    Update parameters: ϕ ← ϕ − η∇ϕ Lϕ                               9: Return z
 9: until ϕ is converged


                                                                      in Kim et al. (2024). For the commonsense reasoning ex-
while the variance of the network output is minimized. The            periments in § 5.6, we employ a pretrained LLaMA-2-7B
time-dependent weighting function λ was selected under                base model (Touvron et al., 2023). For details on ensemble
this principle. The training algorithm for EDFM is detailed           teacher construction, please see Appendices B.1 and B.2.
in Algorithm 1.                                                       Unless specified, ‘Mean±Std’ results are reported as the
For sampling, the choice of ODE solver, the scheduling of             mean and standard deviation calculated over three trials
sampling steps, and the total number of steps proved es-              across tables. The best and second-best values are high-
sential to performance. After thorough evaluation, we em-             lighted using bold-faced underline and underline, respec-
ployed the Heun solver (Karras et al., 2022) and sched-               tively. As baselines, we include KD (Hinton et al., 2014),
uled sampling steps to be exponentially concentrated near             EnDD (Ryabinin et al., 2021), FED (Penso et al., 2022),
the data. Because our flow matching formulation reduces               and DBN (Kim et al., 2024), and the ensemble teacher. We
to rectified flow, it generates relatively straight trajecto-         refer readers to Appendices B.3 and B.4 for details on eval-
ries toward the logits, facilitating efficient sampling with          uation metrics and baseline methods.
a reduced number of network function evaluations (NFEs).
Empirically, we observed that high-quality logits can be ob-          5.1. When do teacher predictions get diverse?
tained with as few as two steps (equivalent to five NFEs),
                                                                      The existing ensemble distillation literature emphasizes the
even in relatively high-dimensional spaces of up to 100 di-
                                                                      importance of ensuring sufficiently diverse teacher predic-
mensions. We emphasize here that the iterative nature of
                                                                      tions for effective distillation (Malinin et al., 2020; Nam et
flow matching sampling does not substantially increase the
                                                                      al., 2021). However, deep neural networks tend to produce
overall sampling time. This efficiency arises because the
                                                                      over-confident predictions on training data, making it diffi-
pretrained teacher network, which serves as a fixed feature
                                                                      cult to capture the ensemble diversity of the teachers when
extractor, is executed only once per input, as the condition-
                                                                      this data is reused during distillation. To address this, vari-
ing information remains constant throughout the sampling
                                                                      ous strategies have been employed to diversify teacher pre-
iterations. The algorithm for sampling from EDFM is pre-
                                                                      dictions. For instance, Malinin et al. (2020) employed aux-
sented in Algorithm 2. Please refer to Appendix A.3 for
                                                                      iliary datasets, Nam et al. (2021) and Nam et al. (2022) de-
further details on the design choices of EDFM.
                                                                      veloped diversifying perturbations, and Penso et al. (2022),
                                                                      Yun et al. (2023), and Kim et al. (2024) utilized mixup aug-
5. Experiments                                                        mentation applied to the training data.
We utilize Multi-SWAG (Wilson and Izmailov, 2020) and                 Building on these established conventions in the ensemble
Multi-IVON (Shen et al., 2024) as ensemble teachers for               distillation literature, we present a comprehensive analy-
image and language tasks, respectively, owing to their scal-          sis of teacher diversity across various diversification strate-
ability and proven effectiveness (Wilson et al., 2022). For           gies for image classification tasks, including: 1) RandAug-
the image classification experiments in § 5.5, we use a               ment (RA; Cubuk et al., 2020) and 2) mixup (Zhang et al.,
ResNet with a depth of 32, projection shortcuts, filter re-           2018), both of which are strong image augmentation tech-
sponse normalization, and Swish activation, as described              niques; 3) TDiv (Nam et al., 2022), a perturbation-based di-

                                                                  5
                                           Ensemble Distribution Distillation via Flow Matching

                                                                                and their corresponding teacher diversity during distillation
Table 1. Diversity analysis of teacher predictions. We analyze
                                                                                (VAR; higher values indicate greater diversity), while the y-
teacher diversity by computing ensemble variance decomposition,
which consists of EnsUnc, AvgUnc, and VAR. Higher VAR indi-                     axis shows the test performance and calibration of the dis-
cates greater diversity in ensemble predictions.                                tilled model (NLL and ECE; lower values indicate better
                                                                                performance and calibration). The size of the circle mark-
                       Diversification             Decomposition
                                                                                ers reflects the diversity of the distilled model on the test
 Dataset   Split   RA     mixup    TDiv   EnsUnc     AvgUnc    VAR (↑)          split (VAR; larger markers indicate greater diversity). The
           TRN                            0.0087      0.0069       0.0018       VAR values are computed by sampling 30 predictions for
           TRN              ✓             0.0705      0.0350       0.0355
           TRN              ✓        ✓    0.1212      0.0539       0.0673
                                                                                each, even for EnDD, which typically omits the sampling
           TRN     ✓                      0.1278      0.0638       0.0640       process when computing the mean prediction.
           TRN     ✓        ✓             0.1850      0.0902       0.0948
   C10                                                                          Fig. 1 conveys a key insight into ensemble distribution dis-
           TRN     ✓        ✓        ✓    0.1868      0.0853       0.1014
           VAL                            0.0845      0.0409       0.0436       tillation: to be where the diversity is. As ensemble dis-
           AUX                            0.2680      0.1244       0.1436       tribution distillation methods are applied to setups where
                                                                                teacher diversity becomes more prominent, they tend to
                                                                                more effectively mimic the ensemble behavior of generat-
versifying approach; and 4) AUX, which uses CINIC-10 as                         ing diverse predictions (as reflected by the increasing circle
an auxiliary dataset. To quantify diversity without relying                     marker sizes). However, while the student model’s ability
on ground-truth labels, we compute the ensemble variance                        to replicate the teacher’s diversity improves, this does not
(VAR), with higher VAR values indicating greater diversity.                     always lead to consistent performance gains for EnDD and
For detailed definitions of EnsUnc, AvgUnc, and VAR, we                         FED. For EnDD, the best performance occurs in the sec-
refer readers to Appendix B.3.                                                  ond setup, while for FED, the highest performance is ob-
                                                                                served in the third setup. Beyond these points, despite the
Table 1 presents the diversity of ensemble teacher predic-                      increased diversity, performance begins to decline.
tions across the training (TRN) and validation (VAL) splits
of CIFAR-10/100, as well as the auxiliary (AUX) CINIC-                          Notably, our proposed EDFM approach not only shows
10 dataset. The results clearly shows that, without ex-                         higher prediction diversity but also demonstrates a consis-
plicit diversification strategies, ensemble teachers produce                    tent improvement in performance. As we will discuss in
predictions with limited diversity on training images. We                       § 5.3, our method exhibits strong fidelity to the teacher;
hypothesize that this lack of teacher diversity can hinder                      that is, the student learns not merely to generate predictions
effective ensemble distribution distillation when these im-                     with high variance, but to genuinely replicate the ensemble
ages are reused. In § 5.2, we experimentally validate this                      teacher’s behavior, thereby producing diverse predictions
hypothesis, demonstrating that ensemble distribution dis-                       in a more meaningful way. To summarize, ensemble dis-
tillation improves as the teacher provides more diverse pre-                    tribution distillation only can be done effectively when the
dictions through diversification strategies. In other words,                    teacher exhibits a certain level of diversity. However, sim-
a good distillation method should capture and leverage as                       ply learning to generate high variance is insufficient; the
much diversity as possible from the ensemble teacher.                           student must genuinely mimic the ensemble teacher’s be-
                                                                                havior, and we will validate this in our method.
5.2. When do ensemble distillation methods work?
                                                                                5.3. How effective ensemble distillation methods are?
In our CIFAR-10 setup, we examine the following scenar-
ios for distilling the ensemble teacher, each capturing dif-                    We evaluate the effectiveness of ensemble distribution dis-
ferent levels of teacher diversity: 1) TRN, 2) TRN w/ mixup,                    tillation methods in three aspects: 1) diversity, which mea-
3) TRN w/ mixup and RA, and 4) AUX. As shown in Ta-                             sures how well the student exhibits prediction diversity, a
ble 1, the diversity of the ensemble teacher gradually in-                      key characteristic of the ensemble; 2) fidelity, which as-
creases, with VAR values of [.0018, .0355, .0948, .1436].                       sesses how closely the student mimics the teacher; and
In the AUX setup, CINIC-10 is used as an auxiliary dataset,                     3) generalization, which determines whether the student
with images from CIFAR-10 excluded (see Appendix B.1                            can achieve performance on par with the ensemble teacher
for details), introducing a slight distribution shift (De Silva                 across a range of tasks. The in-depth analysis of general-
et al., 2023). We also exclude TDiv from our analysis, as                       ization will be discussed in §§ 5.5 and 5.6, while here we
its computation requires a backward pass for perturbation,                      focus on the diversity and fidelity analyses.
which significantly increases training costs.                                   Diversity analysis. The operational principle of ensem-
Fig. 1 summarizes the results of ensemble distribution dis-                     ble methods is diversity; ensembles achieve better perfor-
tillation using EnDD, FED, and our proposed EDFM algo-                          mance when their individual members offer diverse predic-
rithms across four setups. The x-axis represents the setups                     tions (Krogh and Vedelsby, 1994; Dietterich, 2000), a prin-

                                                                            6
                                                       Ensemble Distribution Distillation via Flow Matching

    EnsNLL + AMB              Teacher        EnDD         FED         EDFM                                                             EnDD                       FED                       EDFM
                   0.4                                                                                                  DGR                                                                        DGR
                                                                                                                        0.131                                                                      0.131

                   0.2                                                                                                  0.087                                                                      0.087

                           TRN          w/ mixup w/ mixup and RA     AUX                  2                             0.044                               TVD    2                               0.044                               TVD




                                                                                              0.235




                                                                                                                                                    0.024




                                                                                                                                                                        0.235




                                                                                                                                                                                                                               0.024
                                                                                                      0.157




                                                                                                                                            0.016




                                                                                                                                                                                0.157




                                                                                                                                                                                                                       0.016
                         (0.0018)       (0.0355)     (0.0948)      (0.1436)




                                                                                                              0.078



                                                                                                                                 0.008




                                                                                                                                                                                        0.078



                                                                                                                                                                                                             0.008
                                                                                                                                0.3                                                                        0.3
Figure 2. Diversity analysis. We compute the ambiguity decom-                                                      24
                                                                                                                      0.0   46
                                                                                                                                      0.6
                                                                                                                                                                                              24
                                                                                                                                                                                                  0.0   46
                                                                                                                                                                                                                 0.6
                                                                                                              48                  92                                                    8     4              92
position to assess the diversity of the distilled model’s predictions                                   71
                                                                                                                0.0
                                                                                                                                        38
                                                                                                                                            1.0                                   71
                                                                                                                                                                                          0.0
                                                                                                                                                                                                                   38
                                                                                                                                                                                                                       1.0
                                                                                                          0.0                                                                       0.0
and its contribution to the ensemble gain, as shown in the shaded                                JSD                                          KLD                          JSD                                           KLD
portion of each bar (AMB).                                                                                           TRN                                                                    w/ mixup
                                                                                                                   (0.0018)                                                                 (0.0355)
                                                                                                                        DGR                                                                        DGR
                                                                                                                        0.131                                                                      0.131
ciple that holds true even in the deep learning era (Lakshmi-
                                                                                                                        0.087                                                                      0.087
narayanan et al., 2017; Wilson and Izmailov, 2020; Ortega                                 2                                                                 TVD    2                                                                   TVD
                                                                                                                        0.044                                                                      0.044




                                                                                              0.235




                                                                                                                                                    0.024




                                                                                                                                                                        0.235




                                                                                                                                                                                                                               0.024
et al., 2022). To this end, we compute the ensemble ambi-




                                                                                                      0.157




                                                                                                                                            0.016




                                                                                                                                                                                0.157




                                                                                                                                                                                                                       0.016
                                                                                                              0.078



                                                                                                                                 0.008




                                                                                                                                                                                        0.078



                                                                                                                                                                                                             0.008
guity (AMB) decomposition to assess how diverse the set                                                            24
                                                                                                                      0.0   46
                                                                                                                                0.3                                                           24
                                                                                                                                                                                                  0.0   46
                                                                                                                                                                                                           0.3

of predictions is and how much this diversity contributes                                                     48                      0.6                                               8     4                  0.6
                                                                                                                0.0               92                                                      0.0                92
                                                                                                        71                                  1.0                                   71                                   1.0
                                                                                                                                        38                                                                         38
to the ensemble gain. In particular, AMB provides insights                                                0.0                                                                       0.0
                                                                                                 JSD               KLD                                                     JSD                                           KLD
into the performance improvement of the ensemble over                                               w/ mixup and RA                                                                            AUX
                                                                                                        (0.0948)                                                                             (0.1436)
the average individual performance through ambiguity de-
composition, revealing the gain derived from diversity. For                         Figure 3. Fidelity analysis. We compute DGR, TVD, KLD, JSD,
more details, please refer to Appendix B.3.                                         and W2 to assess how closely the distilled model’s predictions
                                                                                    align with those of the teacher.
Fig. 2 illustrates the results of our diversity analysis on the
CIFAR-10 test split. The diversity of the distilled student
increase as the distillation setup more effectively captures                        tion distance (TVD), Kullback-Leibler divergence (KLD),
the teacher’s diversity; from (A) to (D), the shaded area,                          Jensen-Shannon divergence (JSD), and Wasserstein-2 dis-
representing AMB, expands. It again highlights that en-                             tance (W2 ). Lower values for these metrics indicate that
semble distribution distillation methods successfully learn                         the student’s ensemble predictions are more closely aligned
the ensemble behavior of generating diverse predictions,                            with those of the ensemble teacher. For detailed definitions
particularly when teacher diversity is evident; in the (A)                          of each metric, we refer readers to Appendix B.3.
setup, where no diversification strategies are applied, all
methods fall short of the ensemble teacher’s level of AMB,                          Fig. 3 illusrates the results of our fidelity analysis on the
resulting in limited performance improvements from AMB.                             CIFAR-10 test split. For all the metrics we measured, our
Notably, our EDFM not only consistently exhibits higher                             EDFM achieves higher fidelity compared to the baselines
diversity but also shows significant gains from that diver-                         across all setups. Notably, even when comparing distribu-
sity, as demonstrated by AMB. It clearly indicates that our                         tions (rather than just the mean of ensemble predictions),
method does not simply learn to generate high-variance                              as seen with W2 , EDFM demonstrates superior fidelity. It
predictions, but instead effectively harnesses diversity to                         clearly indicates that our approach effectively models the
drive performance improvements.                                                     induced distribution over categorical probabilities q(π x |x)
                                                                                    and closely approximates the ensemble teacher’s predictive
Fidelity analysis. Next, we analyze the effectiveness of en-                        distribution p(y|x) in Eq. 4.
semble distribution distillation methods from the perspec-
tive of fidelity, which quantifies how well a student model
                                                                                    5.4. How efficient ensemble distillation methods are?
replicates the teacher’s predictions. Since the core philoso-
phy of knowledge distillation is to encourage the student to                        To efficiently produce ensemble predictions, Nam et al.
mimic the teacher (Ba and Caruana, 2014; Hinton et al.,                             (2022) and Penso et al. (2022) use parallelized inference by
2014), measuring the degree to which the student repli-                             replicating a single test input to form a mini-batch. How-
cates the teacher is essential. While higher fidelity does                          ever, unless the neural network is extremely small, process-
not always guarantee better generalization—an example                               ing time increases significantly as the batch size grows. On
being the self-distillation setup of Furlanello et al. (2018),                      an RTX A6000, a ResNet processes a single input (batch
where a student that perfectly matches the teacher can-                             size of 1) in 1.404 ms, while batch sizes of [32, 64, 128,
not surpass it—fidelity analysis remains crucial for under-                         256] take [3.806, 6.993, 13.05, 24.68] ms, exhibiting a
standing the underlying mechanisms, as discussed by Stan-                           near-linear increase in our CIFAR-100 setup. It suggests
ton et al. (2021). To quantify teacher-student fidelity, we                         inherent limits in reducing runtime when batched inference
compute several metrics: disagreement (AGR), total varia-                           is required for ResNet, as in FED (Penso et al., 2022).

                                                                                7
                                              Ensemble Distribution Distillation via Flow Matching

                    MultiSWA           EnDD                FED                Table 2. Evaluation results for image classification tasks. We
                    EDFM (NFE=3)       EDFM (NFE=5)        EDFM (NFE=7)
                                                                              evaluate ACC, NLL, and ECE to assess how accurate and well-
      1.39                     1.12                                           calibrated the predictions are.
                                                                               Dataset   Method                           ACC (↑)       NLL (↓)       ECE (↓)
                               1.02
                                                                                         SWA baseline (w/o distill)       0.932±0.001   0.289±0.001   0.046±0.000
                               0.97
                               0.93                                                      Multi-SWAG teacher               0.946         0.167         0.007
NLL




      1.12                            1404          2106         2808           C10
                                                                                           KD (Hinton et al., 2014)
                                                                                           EnDD (Ryabinin et al., 2021)
                                                                                                                          0.931±0.004
                                                                                                                          0.937±0.001
                                                                                                                                        0.229±0.005
                                                                                                                                        0.228±0.004
                                                                                                                                                      0.020±0.007
                                                                                                                                                      0.023±0.001
                                                                                           DBN (Kim et al., 2024)         0.936±0.001   0.218±0.002   0.028±0.001
      1.02                                                                                 FED (Penso et al., 2022)       0.922±0.009   0.238±0.023   0.009±0.001
      0.97                                                                                 EDFM (ours)                    0.931±0.000   0.216±0.001   0.009±0.001
      0.93                                                                               SWA baseline (w/o distill)       0.735±0.004   1.369±0.019   0.173±0.004
             1404          2808            4211         5615       7019                  Multi-SWAG teacher               0.777         0.835         0.018
                             Wall-clock time (microseconds)                                KD (Hinton et al., 2014)       0.760±0.003   0.965±0.008   0.073±0.000
                                                                               C100        EnDD (Ryabinin et al., 2021)   0.761±0.003   1.031±0.002   0.084±0.003
                                                                                           DBN (Kim et al., 2024)         0.757±0.001   1.002±0.004   0.098±0.001
Figure 4. Runtime analysis on CIFAR-100 setup. Down and left                               FED (Penso et al., 2022)       0.721±0.022   1.026±0.095   0.028±0.003
                                                                                           EDFM (ours)                    0.761±0.001   0.932±0.003   0.056±0.000
indicate better performance and cost-efficiency, with the lower-
left corner being the most desirable.
                                                                              Table 3. Robustness to distribution shifts. We evaluate ACC,
In contrast, our method performs single inference for large                   NLL, and ECE to assess robustness to distribution shifts.
backbone networks (ResNet) and parallelized inference for                      Dataset   Method                           ACC (↑)       NLL (↓)       ECE (↓)
smaller student networks (MLP), where the benefits of                                    SWA baseline (w/o distill)       0.859±0.001   0.631±0.007   0.100±0.000
batch inference are more pronounced. In the same CIFAR-                                  Multi-SWAG teacher               0.875         0.386         0.020
                                                                                           KD (Hinton et al., 2014)       0.859±0.003   0.480±0.027   0.048±0.025
100 setup used for the previous analysis, processing a sin-                    C10.1       EnDD (Ryabinin et al., 2021)   0.869±0.009   0.482±0.004   0.064±0.004
gle input (mini-batch size of 1) with an MLP model takes                                   DBN (Kim et al., 2024)         0.865±0.003   0.481±0.008   0.071±0.002
                                                                                           FED (Penso et al., 2022)       0.839±0.013   0.481±0.047   0.028±0.008
0.053 ms, while processing batched inputs with mini-batch                                  EDFM (ours)                    0.858±0.000   0.455±0.000   0.034±0.002
sizes of [256, 384, 512, 640, 768, 1024] takes [0.101,                                   SWA baseline (w/o distill)       0.802±0.004   0.990±0.004   0.151±0.005
0.114, 0.128, 0.149, 0.182, 0.210] ms. Since the process-                                Multi-SWAG teacher               0.818         0.652         0.066
                                                                                           KD (Hinton et al., 2014)       0.804±0.001   0.715±0.048   0.093±0.032
ing time remains at a significantly lower cost compared to                     C10.2       EnDD (Ryabinin et al., 2021)   0.815±0.005   0.780±0.011   0.112±0.004
ResNet, EDFM demonstrates a strong advantage in scal-                                      DBN (Kim et al., 2024)         0.808±0.001   0.781±0.001   0.118±0.001
ing ensemble predictions through parallelized inference.                                   FED (Penso et al., 2022)       0.786±0.013   0.758±0.046   0.076±0.011
                                                                                           EDFM (ours)                    0.802±0.004   0.666±0.004   0.076±0.002
Building on this advantage, we investigated how the num-                                 SWA baseline (w/o distill)       0.789±0.002   1.005±0.008   0.159±0.002
ber of ensemble predictions in EDFM can scale within a                                   Multi-SWAG teacher               0.807         0.615         0.055
constrained execution time budget.                                                         KD (Hinton et al., 2014)       0.788±0.003   0.726±0.060   0.093±0.036
                                                                                STL        EnDD (Ryabinin et al., 2021)   0.797±0.001   0.770±0.003   0.111±0.002
                                                                                           DBN (Kim et al., 2024)         0.794±0.001   0.759±0.001   0.124±0.001
Runtime analysis. Fig. 4 illustrates the evolution of both                                 FED (Penso et al., 2022)       0.777±0.012   0.698±0.040   0.064±0.010
NLL and execution time as the number of student ensem-                                     EDFM (ours)                    0.787±0.001   0.691±0.006   0.074±0.006
bles increases. While the execution time of MultiSWA en-
sembles scales proportionally with the number of ensem-
bles, EDFM exhibits only a marginal increase in compu-                        to distribution shifts and out-of-distribution scenarios by
tational overhead. Although the execution time of FED                         effectively capturing predictive uncertainty (Ovadia et al.,
scales at a slower rate than MultiSWA, it introduces a non-                   2019), ensemble distribution distillation methods should
negligible overhead, and more importantly, its performance                    learn these strengths from the ensemble teacher. To assess
merely improves in proportion to the increased execution                      this, we evaluate our approach on CIFAR-10/100 test splits,
time. In contrast, with EDFM, the enhancement in en-                          as well as distribution shift datasets (CIFAR-10.1, CIFAR-
semble NLL closely mirrors that of the MultiSWA teacher.                      10.2, and STL) and the out-of-distribution dataset (SVHN).
This not only provides empirical evidence that EDFM ef-                       For more details, please refer to Appendix B.1.
fectively captures the diversity inherent in the teacher en-                  Results. Table 2 shows the evaluation results on CIFAR-
semble distribution, but also underscores its practical utility               10/100 test splits, clearly demonstrating the competitive
in enabling efficient fast ensembling.                                        performance of our proposed EDFM.
                                                                              Robustness to Distribution Shifts. Table 3 presents the
5.5. Image classification tasks
                                                                              evaluation results on datasets associated with CIFAR-10.
We validate our proposed EDFM approach in terms of gen-                       Since these datasets share the same 10-class labeling as
eralization through image classification experiments on CI-                   CIFAR-10, we evaluate ACC, NLL, and ECE in the same
FAR datasets. Since ensemble approach not only enhances                       manner as the standard test split. However, a distinguish-
in-distribution performance but also improves robustness                      ing feature from the original CIFAR-10 test split is that,

                                                                          8
                                                  Ensemble Distribution Distillation via Flow Matching


Table 4. Out-of-distribution detection. We evaluate AUROC,                                Table 5. Evaluation results for commonsense reasoning tasks.
TNR95, and TNR99 to assess out-of-distribution dection.                                   We evaluate ACC, NLL, and ECE to assess how accurate and
 Dataset   Method                           AUROC (↑)     TNR95 (↑)     TNR99 (↑)
                                                                                          well-calibrated the predictions are.
           SWA baseline (w/o distill)       0.893±0.002   0.706±0.019   0.515±0.063        Dataset   Method                        ACC (↑)       NLL (↓)       ECE (↓)
           Multi-SWAG teacher               0.935         0.786         0.679
             KD (Hinton et al., 2014)       0.912±0.017   0.731±0.060   0.572±0.043                  IVON baseline (w/o distill)   0.710±0.011   1.874±0.167   0.246±0.009
 SVHN        EnDD (Ryabinin et al., 2021)   0.895±0.002   0.668±0.022   0.450±0.030                  Multi-IVON teacher            0.675         0.891         0.091
                                                                                           ARC-C
             DBN (Kim et al., 2024)         0.907±0.003   0.740±0.011   0.605±0.009                    KD (Hinton et al., 2014)    0.662±0.032   1.126±0.080   0.218±0.015
             FED (Penso et al., 2022)       0.932±0.006   0.778±0.019   0.637±0.052                    EDFM (ours)                 0.715±0.014   1.113±0.036   0.142±0.011
             EDFM (ours)                    0.934±0.002   0.784±0.005   0.656±0.035
                                                                                                     IVON baseline (w/o distill)   0.888±0.006   0.645±0.032   0.094±0.003
                                                                                                     Multi-IVON teacher            0.868         0.357         0.026
                                                                                           ARC-E
                                                                                                       KD (Hinton et al., 2014)    0.850±0.004   0.570±0.019   0.057±0.002
                                                                                                       EDFM (ours)                 0.892±0.002   0.390±0.002   0.044±0.006
because these datasets exhibit distribution shifts, predic-                                          IVON baseline (w/o distill)   0.809±0.009   0.653±0.011   0.111±0.007
tions must not only be accurate but also well-calibrated.                                            Multi-IVON teacher            0.794         0.514         0.032
                                                                                           OBQA
Our EDFM approach clearly not only achieves competitive                                                KD (Hinton et al., 2014)    0.776±0.005   0.720±0.012   0.102±0.005
                                                                                                       EDFM (ours)                 0.818±0.010   0.537±0.005   0.046±0.004
ACC but also excels in NLL and ECE with wide margins,
demonstrating strong robustness to distribution shifts.
Out-of-distribution detection. Table 4 presents the evalu-
ation results for out-of-distribution detection, assessing the                            proves calibration (a slight drop in ACC is consistent with
model’s ability to distinguish between in-distribution and                                Cong et al. (2024), as we do not explicitly sharpen the
out-of-distribution inputs using receiver operating charac-                               posterior in our experiments). The results clearly demon-
teristic (ROC) metrics: area under the curve (AUROC)                                      strate that our EDFM improves upon the IVON baseline
and true negative rates at 95% and 99% true positive rate                                 by effectively distilling the Multi-IVON teacher, produc-
(TNR95 and TNR99). We employ 1,000 in-distribution                                        ing well-calibrated predictions that significantly outper-
images from the CIFAR-10 test split and 1,000 out-of-                                     form the KD baseline and closely match the teacher’s cal-
distribution images from the SVHN dataset, ensuring a bal-                                ibration quality. It is worth noting that our approach still
anced dataset to maintain the reliability of these metrics.                               leverages a lightweight MLP architecture for flow mod-
Our EDFM approach outperforms baselines by producing                                      eling in this large language model experiment; the model
higher entropy predictions for out-of-distribution inputs,                                consists of three blocks with a hidden dimension of 256,
reflecting greater uncertainty.                                                           totaling just 1.6 million parameters—significantly smaller
                                                                                          than the 6.7 billion parameters of the LLaMA-2 backbone
5.6. Commonsense reasoning tasks                                                          and even more compact than the 4.2 million parameters re-
                                                                                          quired for LoRA fine-tuning. Accordingly, our approach
We further validate the scalability of our approach through
                                                                                          achieves well-calibrated predictions comparable to those of
experiments with large language models. The challenges
                                                                                          the Multi-IVON teacher while incurring virtually no addi-
of large and slow ensemble methods are amplified in mod-
                                                                                          tional cost beyond a single LLaMA-2 forward pass—unlike
ern large-scale models, where the computational burden of
                                                                                          the teacher, which requires multiple passes.
performing multiple forward passes through models with
billions of parameters becomes particularly significant. In
this context, addressing the ensemble distribution distilla-                              6. Conclusion
tion problem is highly valuable; it would be more appro-
                                                                                          We present a novel ensemble distribution distillation ap-
priate for the ensemble model to remain in the develop-
                                                                                          proach using flow matching, where a lightweight neural
ment phase, serving as a teacher for distillation rather than
                                                                                          network learns the vector field that transforms a single
being directly deployed. Consequently, we assess whether
                                                                                          model’s prediction into the predictive distribution of the
our approach can effectively perform ensemble distribution
                                                                                          ensemble teacher. Extensive experiments demonstrate that
distillation from a Multi-IVON teacher, which exhibits im-
                                                                                          our flow matching approach effectively captures the di-
proved calibration (Shen et al., 2024; Cong et al., 2024).
                                                                                          versity of the ensemble teacher, unlike prior works that
For experimental details on the tasks and training specifics,
                                                                                          fail to do so, which leads to substantial improvements in
we refer readers to Appendix B.2.
                                                                                          both accuracy and uncertainty calibration. It also enables
Table 5 summarizes evaluation results on commonsense                                      fast, parallelizable inference, significantly reducing infer-
reasoning tasks, including ARC-C, ARC-E, and OBQA.                                        ence costs compared to existing distillation methods, and
The lower NLL and ECE of the Multi-IVON teacher com-                                      remains scalable even for language tasks involving modern
pared to the IVON baseline, as presented in the first two                                 large language models. An intriguing avenue for future re-
rows of each group, clearly demonstrate that ensembling                                   search is the development of more advanced flow matching
with samples from Multi-IVON’s posterior distribution im-                                 strategies specifically tailored for ensemble distillation.

                                                                                      9
                                    Ensemble Distribution Distillation via Flow Matching

Acknowledgement                                                      Chen, Tian Qi et al. (2018). “Neural Ordinary Differen-
                                                                       tial Equations”. In: Advances in Neural Information Pro-
We thank Byoungwoo Park for sharing his insights. This                 cessing Systems 31 (NeurIPS 2018) (cit. on p. 3).
work was partly supported by Institute of Information &
communications Technology Planning & Evaluation(IITP)                Cheng, Chaoran et al. (2024). “Categorical Flow Matching
grant funded by the Korea government(MSIT) (No.RS-                     on Statistical Manifolds”. In: Advances in Neural Infor-
2024-00509279, Global AI Frontier Lab; No.RS-2019-                     mation Processing Systems 37 (NeurIPS 2024) (cit. on
II190075, Artificial Intelligence Graduate School Pro-                 p. 14).
gram(KAIST); No.RS-2022-II220713, Meta-learning Ap-
plicable to Real-world Problems; No.RS-2022-II220184,                Ciresan, Dan et al. (2012). “Deep neural networks segment
Development and Study of AI Technologies to Inexpen-                   neuronal membranes in electron microscopy images”.
sively Conform to Evolving Policy on Ethics). This mate-               In: Advances in Neural Information Processing Systems
rial is based upon work supported by the Google Cloud Re-              25 (NIPS 2012) (cit. on p. 1).
search Credits program with the award GCP19980904 and
Cloud TPUs from Google’s TPU Research Cloud (TRC).                   Clark, Peter et al. (2018). “Think you have solved ques-
                                                                       tion answering? try arc, the ai2 reasoning challenge”. In:
                                                                       arXiv preprint arXiv:1803.05457 (cit. on p. 19).
Impact Statement
This paper focuses on enhancing ensemble distillation                Coates, Adam, Andrew Ng, and Honglak Lee (2011). “An
frameworks with generative modeling, such as flow match-               analysis of single-layer networks in unsupervised fea-
ing methods. By improving knowledge distillation through               ture learning”. In: Proceedings of the fourteenth interna-
these approaches, our method contributes to making model               tional conference on artificial intelligence and statistics.
compression and deployment more efficient, particularly in             JMLR Workshop and Conference Proceedings, pp. 215–
resource-constrained environments. Although our method                 223 (cit. on p. 18).
is broadly applicable across various downstream tasks, it
                                                                     Cong, Bai et al. (2024). “Variational Low-Rank Adapta-
does not inherently raise ethical concerns or pose direct so-
                                                                       tion Using IVON”. In: NeurIPS 2024 Workshop on Fine-
cietal impacts. Nonetheless, as with any advancement in AI
                                                                       Tuning in Modern Machine Learning: Principles and
model training, the broader implications of increased effi-
                                                                       Scalability (cit. on pp. 9, 19).
ciency and accessibility in real-world applications warrant
careful consideration in future discussions.                         Cubuk, Ekin Dogus et al. (2020). “RandAugment: Practical
                                                                       Automated Data Augmentation with a Reduced Search
References                                                             Space”. In: Advances in Neural Information Processing
                                                                       Systems 33 (NeurIPS 2020) (cit. on p. 5).
Abe, Taiga et al. (2022). “Deep ensembles work, but are
  they necessary?” In: Advances in Neural Information                Cui, Yufei et al. (2020). “Accelerating Monte Carlo
  Processing Systems 35 (NeurIPS 2022) (cit. on p. 20).                Bayesian prediction via approximating predictive uncer-
                                                                       tainty over the simplex”. In: IEEE transactions on neural
Ba, Jimmy and Rich Caruana (2014). “Do deep nets really                networks and learning systems 33.4, pp. 1492–1506 (cit.
  need to be deep?” In: Advances in Neural Information                 on pp. 1, 3).
  Processing Systems 27 (NIPS 2014) (cit. on pp. 1, 3, 7).
                                                                     Darlow, Luke N et al. (2018). “Cinic-10 is not imagenet or
Benton, Gregory et al. (2021). “Loss surface simplexes for             cifar-10”. In: arXiv preprint arXiv:1810.03505 (cit. on
  mode connecting volumes and fast ensembling”. In: Pro-               p. 18).
  ceedings of The 38th International Conference on Ma-
  chine Learning (ICML 2021) (cit. on p. 3).                         De Silva, Ashwin et al. (2023). “The value of out-of-
                                                                       distribution data”. In: Proceedings of The 40th Interna-
Buciluǎ, Cristian, Rich Caruana, and Alexandru Niculescu-             tional Conference on Machine Learning (ICML 2023)
  Mizil (2006). “Model compression”. In: Proceedings                   (cit. on p. 6).
  of the 12th ACM SIGKDD international conference on
  Knowledge discovery and data mining (cit. on p. 1).                Dietterich, Thomas G (2000). “Ensemble methods in ma-
                                                                       chine learning”. In: International workshop on multiple
Bulò, Samuel Rota, Lorenzo Porzi, and Peter Kontschieder               classifier systems. Springer, pp. 1–15 (cit. on p. 6).
  (2016). “Dropout distillation”. In: Proceedings of The
  33th International Conference on Machine Learning                  Du, Shangchen et al. (2020). “Agree to disagree: Adaptive
  (ICML 2016) (cit. on p. 3).                                          ensemble knowledge distillation in gradient space”. In:

                                                                10
                                   Ensemble Distribution Distillation via Flow Matching

  Advances in Neural Information Processing Systems 33             Huang, Tao et al. (2023). “Knowledge Diffusion for Distil-
  (NeurIPS 2020) (cit. on p. 3).                                     lation”. In: Advances in Neural Information Processing
                                                                     Systems 36 (NeurIPS 2023) (cit. on p. 3).
Duvenaud, David et al. (2020). “Your classifier is secretly
  an energy based model and you should treat it like one”.         Karras, Tero et al. (2022). “Elucidating the Design Space
  In: Proceedings of The 8th International Conference on             of Diffusion-Based Generative Models”. In: Advances
  Learning Representations (ICLR 2020) (cit. on p. 14).              in Neural Information Processing Systems 35 (NeurIPS
                                                                     2022) (cit. on pp. 4, 5, 14–17).
Eijkelboom, Floor et al. (2024). “Variational Flow Match-
  ing for Graph Generation”. In: Advances in Neural In-            Kearns, Michael (1988). “Thoughts on hypothesis boost-
  formation Processing Systems 37 (NeurIPS 2024) (cit.               ing”. In: Unpublished manuscript (cit. on p. 1).
  on p. 14).
                                                                   Kim, Beomsu et al. (2025). “Simple ReFlow: Improved
Furlanello, Tommaso et al. (2018). “Born again neural net-           Techniques for Fast Flow Models”. In: Proceedings of
  works”. In: Proceedings of The 35th International Con-             The 13th International Conference on Learning Repre-
  ference on Machine Learning (ICML 2018) (cit. on p. 7).            sentations (ICLR 2025) (cit. on p. 15).

Garipov, Timur et al. (2018). “Loss surfaces, mode connec-         Kim, Hyunsu, Jongmin Yoon, and Juho Lee (2024). “Fast
  tivity, and fast ensembling of dnns”. In: Proceedings of           Ensembling with Diffusion Schrödinger Bridge”. In:
  The 6th International Conference on Learning Represen-             Proceedings of The 12th International Conference on
  tations (ICLR 2018) (cit. on p. 3).                                Learning Representations (ICLR 2024) (cit. on pp. 2, 3,
                                                                     5, 8, 9, 15, 18, 22).
Guo, Chuan et al. (2017). “On calibration of modern neu-
  ral networks”. In: Proceedings of The 34th International         Korattikara, Anoop et al. (2015). “Bayesian dark knowl-
  Conference on Machine Learning (ICML 2017) (cit. on                edge”. In: Advances in Neural Information Processing
  p. 20).                                                            Systems 28 (NIPS 2015) (cit. on p. 3).

Hansen, Lars Kai and Peter Salamon (1990). “Neural net-            Krizhevsky, Alex and Geoffrey Hinton (2009). “Learning
  work ensembles”. In: IEEE transactions on pattern anal-            multiple layers of features from tiny images”. In: Mas-
  ysis and machine intelligence 12.10, pp. 993–1001 (cit.            ter’s thesis, Department of Computer Science, University
  on p. 1).                                                          of Toronto (cit. on p. 18).

Havasi, Marton et al. (2021). “Training independent sub-           Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E Hinton
  networks for robust prediction”. In: Proceedings of The            (2012). “Imagenet classification with deep convolutional
  9th International Conference on Learning Representa-               neural networks”. In: Advances in Neural Information
  tions (ICLR 2021) (cit. on p. 3).                                  Processing Systems 25 (NIPS 2012) (cit. on p. 1).

He, Kaiming et al. (2016). “Deep residual learning for             Krogh, Anders and Jesper Vedelsby (1994). “Neural net-
  image recognition”. In: Proceedings of the IEEE Con-               work ensembles, cross validation, and active learning”.
  ference on Computer Vision and Pattern Recognition                 In: Advances in Neural Information Processing Systems
  (CVPR 2016) (cit. on p. 4).                                        7 (NIPS 1994) (cit. on p. 6).

Heusel, Martin et al. (2017). “GANs Trained by a Two               Lakshminarayanan, Balaji, Alexander Pritzel, and Charles
  Time-Scale Update Rule Converge to a Local Nash Equi-              Blundell (2017). “Simple and scalable predictive uncer-
  librium”. In: Advances in Neural Information Processing            tainty estimation using deep ensembles”. In: Advances in
  Systems 30 (NIPS 2017) (cit. on p. 21).                            Neural Information Processing Systems 30 (NIPS 2017)
                                                                     (cit. on p. 7).
Hinton, Geoffrey, Oriol Vinyals, and Jeffrey Dean (2014).
  “Distilling the Knowledge in a Neural Network”. In:              Lee, Sangyun, Zinan Lin, and Giulia Fanti (2024). “Im-
  Deep Learning and Representation Learning Workshop,                proving the Training of Rectified Flows”. In: Advances
  NIPS 2014 (cit. on pp. 1, 2, 5, 7–9, 19, 21).                      in Neural Information Processing Systems 37 (NeurIPS
                                                                     2024) (cit. on p. 15).
Huang, Gao et al. (2017). “Snapshot Ensembles: Train 1,
  Get M for Free”. In: Proceedings of The 5th Interna-             Lee, Stefan et al. (2015). “Why m heads are better than one:
  tional Conference on Learning Representations (ICLR                Training a diverse ensemble of deep networks”. In: arXiv
  2017) (cit. on p. 3).                                              preprint arXiv:1511.06314 (cit. on p. 3).

                                                              11
                                   Ensemble Distribution Distillation via Flow Matching

Li, Tianhong et al. (2024). “Autoregressive Image Genera-          Nam, Giung et al. (2021). “Diversity matters when learning
  tion without Vector Quantization”. In: Advances in Neu-            from ensembles”. In: Advances in Neural Information
  ral Information Processing Systems 37 (NeurIPS 2024)               Processing Systems 34 (NeurIPS 2021) (cit. on pp. 2, 3,
  (cit. on pp. 4, 15).                                               5).

Lipman, Yaron et al. (2023). “Flow Matching for Gener-             Nam, Giung et al. (2022). “Improving Ensemble Distilla-
  ative Modeling”. In: Proceedings of The 11th Interna-              tion With Weight Averaging and Diversifying Perturba-
  tional Conference on Learning Representations (ICLR                tion”. In: Proceedings of The 39th International Confer-
  2023) (cit. on pp. 2, 3).                                          ence on Machine Learning (ICML 2022) (cit. on pp. 3,
                                                                     5, 7).
Liu, Guan-Horng et al. (2023a). “I2SB: Image-to-Image
  Schrödinger Bridge”. In: Proceedings of The 40th Inter-          Netzer, Yuval et al. (2011). “Reading digits in natural im-
  national Conference on Machine Learning (ICML 2023)                ages with unsupervised feature learning”. In: NIPS work-
  (cit. on p. 3).                                                    shop on deep learning and unsupervised feature learning
                                                                     (cit. on p. 18).
Liu, Xingchao, Chengyue Gong, and Qiang. Liu (2023b).
  “Flow Straight and Fast: Learning to Generate and                Ortega, Luis A, Rafael Cabañas, and Andres Masegosa
  Transfer Data with Rectified Flow”. In: Proceedings of             (2022). “Diversity and generalization in neural network
  The 11th International Conference on Learning Repre-               ensembles”. In: Proceedings of The 25th International
  sentations (ICLR 2023) (cit. on p. 4).                             Conference on Artificial Intelligence and Statistics (AIS-
                                                                     TATS 2022) (cit. on p. 7).
Lu, Shangyun et al. (2020). “Harder or Different? A Closer
  Look at Distribution Shift in Dataset Reproduction”. In:         Ovadia, Yaniv et al. (2019). “Can you trust your model’s
  ICML 2020 Workshop on Uncertainty and Robustness in                uncertainty? evaluating predictive uncertainty under
  Deep Learning (cit. on p. 18).                                     dataset shift”. In: Advances in Neural Information Pro-
                                                                     cessing Systems 32 (NeurIPS 2019) (cit. on p. 8).
Maddox, Wesley J et al. (2019). “A simple baseline for
 bayesian uncertainty in deep learning”. In: Advances              Pakdaman Naeini, Mahdi, Gregory Cooper, and Milos
 in Neural Information Processing Systems 32 (NeurIPS                Hauskrecht (2015). “Obtaining Well Calibrated Proba-
 2019) (cit. on p. 2).                                               bilities Using Bayesian Binning”. In: AAAI Conference
                                                                     on Artificial Intelligence (AAAI) (cit. on p. 20).
Malinin, Andrey and Mark Gales (2018). “Predictive un-
 certainty estimation via prior networks”. In: Advances            Peebles, William and Saining Xie (2023). “Scalable Dif-
 in Neural Information Processing Systems 31 (NeurIPS                fusion Models with Transformers”. In: Proceedings of
 2018) (cit. on pp. 3, 21).                                          the IEEE/CVF International Conference on Computer
                                                                     Vision (ICCV) (cit. on p. 4).
Malinin, Andrey, Bruno Mlodozeniec, and Mark Gales
 (2020). “Ensemble Distribution Distillation”. In: Pro-            Penso, Coby, Idan Achituve, and Ethan Fetaya (2022).
 ceedings of The 8th International Conference on Learn-              “Functional ensemble distillation”. In: Advances in Neu-
 ing Representations (ICLR 2020) (cit. on pp. 1, 3, 5, 21).          ral Information Processing Systems 34 (NeurIPS 2021)
                                                                     (cit. on pp. 1–3, 5, 7–9, 18, 22).
Mariet, Zelda E et al. (2021). “Distilling ensembles im-
 proves uncertainty estimates”. In: Third symposium on             Recht, Benjamin et al. (2018). “Do cifar-10 classifiers gen-
 advances in approximate bayesian inference (cit. on                 eralize to cifar-10?” In: arXiv preprint arXiv:1806.00451
 p. 3).                                                              (cit. on p. 18).

Mihaylov, Todor et al. (2018). “Can a Suit of Armor Con-           Ronneberger, Olaf, Philipp Fischer, and Thomas Brox
 duct Electricity? A New Dataset for Open Book Ques-                 (2015). “U-Net: Convolutional Networks for Biomedi-
 tion Answering”. In: Proceedings of the 2018 Confer-                cal Image Segmentation”. In: Medical Image Comput-
 ence on Empirical Methods in Natural Language Pro-                  ing and Computer-Assisted Intervention (MICCAI 2015)
 cessing (cit. on p. 19).                                            (cit. on p. 15).

Minka, Thomas (2000). Estimating a Dirichlet distribution          Ryabinin, Max, Andrey Malinin, and Mark Gales (2021).
 (cit. on p. 21).                                                    “Scaling ensemble distribution distillation to many
                                                                     classes with proxy targets”. In: Advances in Neural In-


                                                              12
                                   Ensemble Distribution Distillation via Flow Matching

  formation Processing Systems 34 (NeurIPS 2021) (cit.               2021 Competitions and Demonstrations Track (cit. on
  on pp. 3, 5, 8, 9, 21, 22).                                        p. 5).

Salimans, Tim and Jonathan Ho (2022). “Progressive Dis-            Wood, Danny et al. (2023). “A unified theory of diversity
  tillation for Fast Sampling of Diffusion Models”. In:             in ensemble learning”. In: Journal of Machine Learning
  Proceedings of The 10th International Conference on               Research (JMLR) 24.359, pp. 1–49 (cit. on p. 20).
  Learning Representations (ICLR 2022) (cit. on p. 3).
                                                                   Yao, Xufeng et al. (2024). “Progressively Knowledge Dis-
Shao, Shitong et al. (2024). “Precise Knowledge                      tillation via Re-parameterizing Diffusion Reverse Pro-
  Transfer via Flow Matching”. In: arXiv preprint                    cess”. In: AAAI Conference on Artificial Intelligence
  arXiv:2402.02012 (cit. on p. 3).                                   (AAAI) (cit. on p. 3).

Shen, Yuesong et al. (2024). “Variational learning is ef-          Yin, Tianwei et al. (2024a). “Improved Distribution Match-
  fective for large deep networks”. In: Proceedings of The           ing Distillation for Fast Image Synthesis”. In: Advances
  12th International Conference on Learning Representa-              in Neural Information Processing Systems 37 (NeurIPS
  tions (ICLR 2024) (cit. on pp. 2, 5, 9, 19).                       2024) (cit. on p. 3).

Song, Y. et al. (2023). “Consistency Models”. In: Proceed-         Yin, Tianwei et al. (2024b). “One-step Diffusion with Dis-
  ings of The 40th International Conference on Machine               tribution Matching Distillation”. In: Proceedings of the
  Learning (ICML 2023) (cit. on p. 3).                               IEEE/CVF Conference on Computer Vision and Pattern
                                                                     Recognition (CVPR 2024) (cit. on p. 3).
Stanton, Samuel et al. (2021). “Does knowledge distilla-
  tion really work?” In: Advances in Neural Information            Yun, EungGu et al. (2023). “Traversing between modes in
  Processing Systems 34 (NeurIPS 2021) (cit. on p. 7).               function space for fast ensembling”. In: Proceedings of
                                                                     The 40th International Conference on Machine Learning
Stark, Hannes et al. (2024). “Dirichlet flow matching with           (ICML 2023) (cit. on pp. 3, 5).
  applications to DNA sequence design”. In: Proceedings
  of The 41th International Conference on Machine Learn-           Zhang, Hongyi et al. (2018). “mixup: Beyond Empirical
  ing (ICML 2024) (cit. on p. 14).                                   Risk Minimization”. In: Proceedings of The 6th Inter-
                                                                     national Conference on Learning Representations (ICLR
Touvron, Hugo et al. (2023). “Llama 2: Open founda-                  2018) (cit. on p. 5).
  tion and fine-tuned chat models”. In: arXiv preprint
  arXiv:2307.09288 (cit. on p. 5).

Tran, Linh et al. (2020). “Hydra: Preserving ensemble
  diversity for model distillation”. In: arXiv preprint
  arXiv:2001.04694 (cit. on p. 3).

Vaswani, Ashish et al. (2017). “Attention is all you need”.
  In: Advances in Neural Information Processing Systems
  30 (NIPS 2017) (cit. on p. 15).

Wen, Yeming, Dustin Tran, and Jimmy Ba (2020).
 “BatchEnsemble: an Alternative Approach to Efficient
 Ensemble and Lifelong Learning”. In: Proceedings of
 The 8th International Conference on Learning Represen-
 tations (ICLR 2020) (cit. on p. 3).

Wilson, Andrew Gordon and Pavel Izmailov (2020).
 “Bayesian deep learning and a probabilistic perspective
 of generalization”. In: Advances in Neural Information
 Processing Systems 33 (NeurIPS 2020) (cit. on pp. 5, 7).

Wilson, Andrew Gordon et al. (2022). “Evaluating approx-
 imate inference in Bayesian deep learning”. In: NeurIPS



                                                              13
                                    Ensemble Distribution Distillation via Flow Matching

A. Ablation Study
A.1. Flow matching formulation
Mapping Gaussian noise directly to teacher logits may initially appear overly simplistic, given that logits possess a specific
geometric structure. Notably, teacher logits are invariant under scalar shifts, producing identical outputs after the softmax
transformation. Flow matching formulations can be adapted to respect this geometry. Alternatively, since logits can be
converted into probability vectors via the softmax operation, flow matching could be performed on the probability simplex
instead of the logit space. This section explores several such approaches.



                           Table 6. Performance of various flow matching formulations on CIFAR-10.

          Space                  Formulation                                       ACC (↑)     NLL (↓)     ECE (↓)
                                 Statistical flow matching (Cheng et al., 2024)      0.929      0.244       0.019
          Probability simplex
                                 Flow matching on the probability simplex            0.929      0.243       0.015
                                 Flow matching with ILR                              0.931      0.218       0.011
          Logit space            EDM (Karras et al., 2022)                           0.931      0.224       0.009
                                 EDFM (Ours)                                         0.931      0.216       0.009



Flow matching on the probability simplex. Various formulations of flow matching on the probability simplex exist, such
as CatFlow (Eijkelboom et al., 2024) and Dirichlet flow matching (Stark et al., 2024). However, most of these methods
are inapplicable in our context as they require categorical (discrete) data, whereas we consider a continuous distribution
of teacher logits defined either in logit space or equivalently on the probability simplex. Statistical flow matching (Cheng
et al., 2024) is the most relevant method here, as it enables mapping from a uniform distribution to an arbitrary distribution
defined on the probability simplex. Another straightforward approach is to perform basic flow matching directly on the
probability simplex to transform a uniform distribution into the teacher logit distribution. This is feasible because the
probability simplex is a Euclidean space where interpolations between points remain within the simplex.
Despite the theoretical appeal, empirical results shown in Table 6 demonstrate that flow matching on the simplex yields
inferior performance. We attribute this to the requirement that the student network match the teacher distribution with high
precision on the simplex, whereas in logit space, minor mismatches are attenuated by the subsequent softmax operation.
Isometric log-ratio (ILR) transform. Given the shortcomings of operating directly on the probability simplex, one may
consider improvements in the logit space. Since teacher logits are invariant under scalar shifts (e.g., logits {−1.5, −2, 2}
are equivalent to {−0.5, −1, 3} post-softmax), enforcing exact matching of logits may be overly restrictive. The isometric
log-ratio (ILR) transformation from compositional data analysis offers a principled way to address this issue: it maps the
D-dimensional probability simplex to a (D − 1)-dimensional Euclidean space. By applying ILR to teacher logits, flow
matching can be trained in RD−1 . Nonetheless, empirical results (Table 6) indicate negligible differences compared to the
baseline, likely because the dimensionality reduction by one does not substantially affect the model’s expressiveness in
relatively high-dimensional settings.
Diffusion models. Aside from flow matching, diffusion models present an alternative framework to model the teacher
logit distribution. Exploring such generative approaches for ensemble distribution distillation constitutes a promising
future direction. We implemented the EDM model (Karras et al., 2022) to train the student network and compared it to
our EDFM method. On the CIFAR-10 dataset, EDM achieved an NLL of 0.224 using 35 NFEs, whereas EDFM attained
a better NLL of 0.216 with only 5 NFEs (Table 6). Notably, EDM’s performance deteriorated significantly with 5 NFEs,
achieving an NLL of 0.370, underscoring the superior efficiency and effectiveness of EDFM.
In summary, applying flow matching directly to pre-softmax logits yields superior results compared to modeling on post-
softmax categorical probabilities. This improvement may be explained by the distortion introduced by the softmax transfor-
mation, which can obscure important scale information intrinsic to the logits. For example, the unnormalized density, given
by the log-sum-exp of logits (Duvenaud et al., 2020), may be lost after softmax, thereby negatively impacting ensemble
distribution distillation.

                                                             14
                                     Ensemble Distribution Distillation via Flow Matching

A.2. Network architecture of student model
We performed an ablation study to evaluate the impact of network architectures of varying scales on performance. The
architectures considered include 1) the denoising MLP (Li et al., 2024) already employed in EDFM, 2) the U-Net (Ron-
neberger et al., 2015), which is commonly used in flow matching for image synthesis and was also previously adopted in
DBN (Kim et al., 2024), and 3) Transformer (Vaswani et al., 2017) models.



                 Table 7. Performance and efficiency of EDFM with various network architectures on CIFAR-10.

                      Architecture         # of Param.    Time (µs)      ACC (↑)   NLL (↓)     ECE (↓)
                      MLP                       0.14M               39    0.929     0.229       0.013
                      MLP (main text)           0.33M               68    0.931     0.216       0.009
                      MLP                       0.70M              132    0.930     0.218       0.011
                      Transformer               0.36M              204    0.930     0.218       0.011
                      Transformer               1.31M              724    0.931     0.213       0.007
                      U-Net                     0.44M              653    0.929     0.222       0.012


The results, summarized in Table 7, reveal that larger Transformers (with 1.31 million parameters) achieve improvements
in NLL and ECE metrics but are not cost-effective, as reflected by the number of parameters and wall-clock time, where
the latter denotes the time required to generate 256 ensemble predictions via batched inference. In contrast, the U-Net
architecture underperforms relative to both the MLP and Transformer, which is likely attributable to its two-dimensional
spatial processing being ill-suited for modeling logits. These findings suggest that the MLP architecture strikes a favorable
balance, delivering sufficient accuracy for ensemble distribution distillation while offering a significant latency advantage.

A.3. Design choice of EDFM
In this section, we elaborate on specific design choices of EDFM presented in Algorithms 1 and 2.
Time distribution T . We swept over uniform, beta, and exponential distributions to find the most suitable T , where the
probability density functions are given in Table 8. The support of T is set to [ϵ, 1] instead of [0, 1] to avoid numerical
instability.



                                                Table 8. PDFs of distributions.

                           Distribution    PDF fT (t)
                            Uniform        fT (t) = 1
                              Beta         fT (t; α, β) = Γ(α + β)/(Γ(α)Γ(β))tα−1 (1 − t)β−1
                           Exponential     fT (t; α) = αt log α/(α1−ϵ − 1)


The PDF of the exponential distribution is slightly modified from the conventional one to account for the support [ϵ, 1] and
an arbitrary base. The choice of beta and exponential distributions was inspired by the well-known lesson in the field of
diffusion models (Karras et al., 2022) that the network should learn more near the data. Specifically, the exponential dis-
tribution allocates exponentially more samples as t grows, while the beta distribution achieves a peak somewhere between
t = 0 and t = 1. We assigned the peak to be near the data by setting α = 5 and β = 2. For the exponential distribution,
we set α = 3. The truncation ϵ was set to 0.001.
Experiment results shown in Table 9 indicate that the beta distribution achieved better results in terms of ECE, while
performing on par with the exponential distribution on other metrics. This motivates further explorations for even better
options, possibly inspired by recent progress in flow matching (Lee et al., 2024; Kim et al., 2025). We leave this as future
work.

                                                              15
                                            Ensemble Distribution Distillation via Flow Matching


                                                  Table 9. Ablation study on time distribution.
                                     Dataset     Time distribution        ACC (↑)        NLL (↓)         ECE (↓)
                                     C10         Uniform                      0.931       0.219           0.011
                                                 Beta                         0.931       0.216           0.008
                                                 Exp. (Ours)                  0.931       0.216           0.009
                                     C100        Uniform                      0.761       0.966           0.066
                                                 Beta                         0.760       0.932           0.039
                                                 Exp. (Ours)                  0.761       0.932           0.056



Time-dependent weighting function λ. The time-dependent weighting function λ was determined according to the
preconditioning technique introduced in EDM (Karras et al., 2022). Specifically, in EDM, the authors first let the neural
network predict the denoiser h(xt , t), namely x-prediction, and controlled the scale of the network input, output, and the
weighting function of the loss so that the network input and the loss function maintain unit variance, and the variance of
the network output is minimized.


                                        Table 10. Comparing between x and v predictions for EDFM.
                                      Dataset     Prediction type        ACC (↑)       NLL (↓)       ECE (↓)
                                      C10         x-pred                   0.931         0.234           0.024
                                                  v-pred (Ours)            0.931         0.216           0.009
                                      C100        x-pred                   0.760         1.031           0.090
                                                  v-pred (Ours)            0.761         0.932           0.056


However, as shown in Table 10, we found that directly predicting the velocity, namely v-prediction, performs better than x-
prediction for EDFM. Thus, although we followed the principles suggested in EDM, our preconditioning slightly deviates
from the original.
For completeness, we present the derivation for our preconditioning. The student network accepts three inputs: perturbed
sample z xt , time t, and embedding from the teacher network Emb(x). Two of these three inputs are rescaled to cin (t)z xt ,
ctime (t) before being fed into the network. The embedding Emb(x) is left invariant as it already maintains stable variance,
after being processed by the teacher network.
We set ctime (t) = log (1000(1 − t) + ϵ)/4, where ϵ is a small number 10−12 to avoid numerical instability. This was
inspired by the original formulation of log t/4, and the transformation t → 1000(1 − t) was introduced to match the scales.
Then we added a skip connection to the output of the student network Fϕ :

                                                Dϕ (z xt ) = cskip (t)z xt + cout (t)Fϕ (cin (t)z xt )                      (14)

which is then used to compute the loss function

                                                 Et,zx0 ,zx1 λ(t)∥Dϕ (ztx ) − (z x1 − z x0 )∥2 .
                                                                                             
                                                                                                                            (15)

Rearranging the terms results in
                                                                                                                     
                                       λ(t)                       x                            x                 x 2
                   Et,zx0 ,zx1                 ∥(tcskip (t) − 1)z 1 + ((1 − t)c skip (t) + 1)z 0 + Fϕ (c in (t)z t )∥   .   (16)
                                     cout (t)2

We want the network input, and loss function to maintain unit variance across different time t, while the variance of the

                                                                         16
                                         Ensemble Distribution Distillation via Flow Matching

network output is minimized. This means that

                            Varzx0 ,zx1 [cin (t)z xt ] = Varzx0 ,zx1 [cin (t)(tz x1 + (1 − t)z x0 )] = 1                                    (17)
                            cskip (t) = arg min Varzx0 ,zx1 [(tcskip (t) − 1)z x1 + ((1 − t)cskip (t) + 1)z x0 ]                            (18)
                                         cskip (t)

                            cout (t) = Varzx0 ,zx1 [(tcskip (t) − 1)z x1 + ((1 − t)cskip (t) + 1)z x0 ]                                     (19)
                                          2
                            λ(t)/cout (t) = 1                                                                                               (20)
                                                                                   2
Note that as z x0 ∼ N (·; 0, σ 2 I), Var[z x0 ] = σ 2 . Also, we let Var[z x1 ] = σdata . Evaluating for cin (t), cout (t), cskip (t), λ(t)
under this principle yields
                                                                                1
                                                     cin (t) = p        2 + (1 − t)2 σ 2
                                                                                                                                            (21)
                                                                    t2 σdata
                                                                            σσdata
                                                    cout (t) = p        2 + (1 − t)2 σ 2
                                                                                                                                            (22)
                                                                    t2 σdata
                                                                 2
                                                               tσdata − (1 − t)σ 2
                                                    cskip (t) =  2                                                                          (23)
                                                               2
                                                              t σdata + (1 − t)2 σ 2
                                                                           2
                                                                      σ 2 σdata
                                                       λ(t) = 2 2                                                                           (24)
                                                              t σdata + (1 − t)2 σ 2

ODE solver and sampling step scheduling For ODE solver and sampling step scheduling, we ablated between Euler,
Heun solvers (Karras et al., 2022) and uniform, exponential scheduling. For N steps of sampling, the sampling steps are
{i/N }N                                       i        N N
       i=0 for uniform scheduling and {(1 − α )/(1 − α )}i=0 for exponential scheduling. For exponential scheduling,
we set α = 0.7 for CIFAR-10 and α = 0.5 for CIFAR-100. As Fig. 5 indicate, Heun solvers with exponential scheduling
achieved the best NLL at 5 sampling steps, which amounts to 7 NFEs for Heun solver. All experiment results presented in
the main paper were obtained under this configuration.

                          Euler (Uniform)             Heun (Uniform)                  Euler (Exponential)          Heun (Exponential)
                                         C10                                                                 C100
            0.26                                                               1.00

            0.25
                                                                               0.98
            0.24
      NLL




                                                                         NLL




                                                                               0.96
            0.23

            0.22                                                               0.94

                   2          3           4             5            6                  2           3           4          5            6
                                      # of steps                                                            # of steps

                                  Figure 5. Ablation study on ODE solver and sampling step scheduling.




                                                                         17
                                    Ensemble Distribution Distillation via Flow Matching

B. Experimental details
B.1. Image classification tasks
Datasets. Our experiments on image classification tasks utilize the following datasets:

  • CIFAR-10/100 (Krizhevsky and Hinton, 2009): It consists of 40,960 training images, 9,040 validation images, and
    10,000 test images, each with a resolution of 32 × 32 × 3 across 10/100 classes. As there is no officially predefined
    validation split, we manually partitioned the 50,000 training examples into 40,960 for training and 9,040 for validation.
    The datasets are publicly available at http://www.cs.toronto.edu/~kriz/cifar.html under unspecified license.
  • CINIC-10 (Darlow et al., 2018): It serves as an auxilairy train split consisting of 210,000 images with a resolution
    of 32 × 32 × 3. The dataset is publicly available at https://github.com/BayesWatch/cinic-10 under MIT license. The
    original dataset contains of a total of 270,000 images, from which we dropped 60,000 CIFAR-originated images to
    avoid dataset leakge in our CIFAR-10/100 experiments.
  • CIFAR-10.1 (Recht et al., 2018): It serves as a test split consisting of 2,000 images with a resolution of 32 × 32 × 3.
    The dataset is publicly available at https://github.com/modestyachts/CIFAR-10.1 under MIT license.
  • CIFAR-10.2 (Lu et al., 2020): It serves as a test split consisting of 2,000 images with a resolution of 32 × 32 × 3.
    The dataset is publicly available at https://github.com/modestyachts/cifar-10.2 under unspecified license.
  • STL (Coates et al., 2011): It serves as a test split consisting of 7,200 images with a resolution of 32 × 32 × 3. The
    dataset is publicly available at https://cs.stanford.edu/~acoates/stl10/ under unspecified license. The original test split
    consists of 8,000 images with a resolution of 96 × 96 × 3, which we resized to 32 × 32 × 3. We excluded the ‘monkey’
    class, as it is not present in CIFAR, removing 800 images in the process. Furthermore, the ‘car’ class was mapped to
    the ‘automobile’ class to match CIFAR’s class definitions.
  • SVHN (Netzer et al., 2011): It serves as an out-of-distribution split consisting of 73, 257 training and 26, 032
    test images with colored number digit (0-9) with a resolution of 32 × 32 × 3 The dataset is publicly available at
    http://ufldl.stanford.edu/housenumbers/ under unspecified license.

Optimization details. We provide details on the construction of the ensemble teacher and the training procedure for
distilled students in the image classification experiments.

  • Multi-SWAG teacher: Multi-SWAG teachers were obtained by adding diagonal covariances to each of 10 different
    SWA models. Each SWA model was pretrained for 800 epochs, followed by 200 epochs of SWA training with
    frequency 1. Using SGD optimizer with momentum 0.9, cosine decay schedule was applied for pretraining, in which
    the learning rate evolves from 0.1 to 0.01 and remains constant of 0.01 whilst SWA training. Batch size is 256.
  • KD: KD was trained using SGD optimizer with momentum 0.9, learning rate 0.1 with cosine decay schedule, 1000
    epochs, batch size 256. Unlike CIFAR-10, for models trained with CIFAR-100, learning rate was warmed up from 0
    to 0.1 for the first 5 steps. Number of teachers to produce the target prediction is 30.
  • EnDD: EnDD was trained with almost identical configuration with that of KD, except that the learning rate is de-
    creased to 0.05.
  • FED: For FED, we strictly followed the configurations provided in the original paper (Penso et al., 2022), except that
    we increased the number of epochs from 200 to 250 for coherence with other methods. Training further than 250
    epochs showed no improvements in performance.
  • DBN: Like FED, we strictly followed the configurations provided in the original paper (Kim et al., 2024), except that
    we increased the number of epochs from 800 to 1000 for coherence with other methods.
  • EDFM: We used the denoising MLP architecture with four blocks and a hidden dimension of 256 for CIFAR-10 and
    512 for CIFAR-100. The model employs a student network distilled with KD using the MultiSWAG teachers as its
    backbone and takes its output embedding as input. Evaluation was conducted with seven NFEs, and training was
    performed using the SGD optimizer with a batch size of 256, momentum of 0.9, weight decay of 5e-04, learning rates
    of 1e-04 for CIFAR-10 and 3e-04 for CIFAR-100, and a cosine decay learning rate schedule over 1,000 epochs.

                                                             18
                                            Ensemble Distribution Distillation via Flow Matching

B.2. Commonsense reasoning tasks
Datasets. Our experiments on commonsense reasoning tasks build upon the work of Cong et al. (2024). Following their
training and evaluation recipes, all datasets are composed exclusively of multiple-choice questions with four options:

  • ARC-Challenge (ARC-C; Clark et al., 2018): It consists of 1,117 questions for training and 295 questions for
    evaluation, publicly available at https://huggingface.co/datasets/allenai/ai2_arc under CC-BY-SA-4.0 license.
  • ARC-Easy (ARC-E; Clark et al., 2018): It consists of 2,241 questions for training and 567 questions for evaluation,
    publicly available at https://huggingface.co/datasets/allenai/ai2_arc under CC-BY-SA-4.0 license.
  • OpenBookQA (OBQA; Mihaylov et al., 2018): It consists of 4,957 questions for training and 500 questions for
    evaluation, publicly available at https://huggingface.co/datasets/allenai/openbookqa under unspecified license.

Optimization details. We provide details on the construction of the ensemble teacher and the training procedure for
distilled students in the commonsense reasoning experiments.

  • Multi-IVON teacher: We obtained the Multi-IVON teacher using the official codebase from Cong et al. (2024),
    which is available at https://github.com/team-approx-bayes/ivon-lora under unspecified license. More specifically,
    it involves performing LoRA fine-tuning on the pretrained LLaMA-2-7B model, which is publicly available at
    https://huggingface.co/meta-llama/Llama-2-7b under the Meta license1 , using the IVON optimizer (Shen et al., 2024).
    Using their configurations, we trained 10 IVON models with different random seeds and constructed the Multi-IVON
    teacher, which generates a total of 100 logits by extracting 10 logits from each individual model.
  • KD: We fine-tuned the pretrained LLaMA-2-7B weights using the KD objective, as defined in Eq. 37, with the Multi-
    IVON teacher. After several attempts, we found that effective distillation requires not only applying LoRA to the
    query and value weights of the attention layers but also training the classification head. As a result, the number of
    trainable parameters is 4,194,304, which is 0.062% of the total 6,742,609,920 parameters. Moreover, the KD objective
    alone was insufficient for stable learning in our commonsense reasoning experiments. Therefore, as in Hinton et al.
    (2014), we combined the KD objective with a cross-entropy loss using ground-truth labels, weighted at 0.5. The
    fine-tuning was carried out using the Adam optimizer with a batch size of 4, a maximum sequence length of 320, a
    learning rate of 3e-05, and a linear decay learning rate schedule over 50,000 steps.
  • EDFM: For flow modeling, we used the denoising MLP architecture with three blocks and a hidden dimension of
    256, totaling 1,639,056 parameters. The model employs one ensemble component of the Multi-IVON teacher as its
    backbone and takes its output embedding as input. Evaluation was conducted with three NFEs, and training was
    performed using the SGD optimizer with a batch size of 256, momentum of 0.9, a learning rate of 1e-04, and a cosine
    decay learning rate schedule over 50,000 steps.

B.3. Evaluation metrics
Classification accuracy (ACC), is a metric used to evaluate the performance of a classification model by computing the
                                                              (k)
proportion of correct predictions. Let yn be the true label, pn the predicted probability for class k for the nth sample, and
N the total number of samples to be evaluated. We then compute ACC as follows, where [·] denotes the Iverson bracket:
                                                        N                     
                                                    1 X
                                          ACC =              yn = arg max p(k)
                                                                            n    .                                       (25)
                                                    N n=1             k


Negative log-likelihood (NLL), also known as cross-entropy loss in classification tasks, is another important metric used
for both training and evaluating classification models. It measures how well the predicted probability distribution matches
                                            (k)
the true labels. Let yn be the true label, pn the predicted probability for class k for the nth sample, and N the total number
of samples to be evaluated. We then compute NLL as follows:
                                                                      N
                                                                  1 X
                                                        NLL = −         log p(y
                                                                             n
                                                                                n)
                                                                                   .                                     (26)
                                                                  N n=1
   1
       https://ai.meta.com/llama/license/

                                                                    19
                                     Ensemble Distribution Distillation via Flow Matching

Expected calibration error (ECE; Pakdaman Naeini et al., 2015), is a metric that evaluates how well a predicted
probabilities correspond to the true likelihood of correct predictions; a well-calibrated model outputs probabilities that
                                                                                      (k)
closely align with the observed frequency of correctness. Let yn be the true label, pn the predicted probability for class
           th
k for the n sample, and N the total number of samples to be evaluated. The samples are partitioned into B bins based on
                                               (k)
the maximum predicted probability, maxk pn , where Bb and |Bb | denote the indices and count of samples in the bth bin,
respectively. For b = 1, ..., B, the observed accuracy accb and the average confidence conf b are computed as follows:
                                                                
                                    1 X                      (k)                 1 X
                        accb =               yn = arg max pn       and conf b =           max p(k)
                                                                                                n .                    (27)
                                  |Bb |               k                         |Bb |      k
                                       n∈Bb                                                            n∈Bb

We then compute ECE as follows:
                                                            B
                                                            X |Bb |
                                                   ECE =                · |accb − conf b |.                                (28)
                                                                   N
                                                            b=1


Ensemble ambiguity (AMB), is a metric used to measure the diversity of ensemble predictions. Let yn be the true label,
  (k)      (k)
z m,n and pm,n the logit and categorical probability for class k predicted by the mth ensemble member for the nth sample,
M the ensemble size, and N the total number of samples to be evaluated. We then compute AMB as follows:

                                                               N       M    K                 (k)
                                                           1 X X X (k)        p̄n
                                           AMB =                      p̄n log (k) ,                                        (29)
                                                          N M n=1 m=1        pm,n
                                                                            k=1

where p̄ denotes a normalized geometric mean of categorical probability here,

                                           (k)                         M           1/M
                                  q̄ n                                 Y
                           p̄(k)
                             n = PK                (j)
                                                       with q̄ (k)
                                                               n =           p(k)
                                                                              m,n           , for k = 1, ..., K.           (30)
                                        j=1 q̄ n                     m=1

We also have the following generalized ambiguity decomposition (Wood et al., 2023), which suggests that to minimize
ensemble loss, ensemble ambiguity should increase while average loss decreases:

                  N                                  M
                                                             !            M     N
              1 X                            1 X                       1 X 1 X
            −       log softmax(yn )               z m,n          =−               log softmax(yn ) (z m,n ) −AMB.
              N n=1                          M m=1                     M m=1 N n=1                                         (31)
            |                 {z                              }      |               {z                   }
                         ensemble loss (EnsLoss)                                     average loss (AvgLoss)


In Fig. 2, we compute the ambiguity decomposition after applying temperature scaling (Guo et al., 2017), using the op-
timal temperature obtained by minimizing EnsNLL. This approach offers a more accurate comparison, as EnsNLL uses
ensembled logits instead of ensembled probabilities. When a logit shift occurs for each ensemble member, the probability
ensemble remains unchanged, while the logit ensemble can vary.
                                                                                                                     (k)
Ensemble variance (VAR), is another metric used to measure the diversity of ensemble predictions. Let pm,n be the
categorical probability for class k predicted by the mth ensemble member for the nth sample, M the ensemble size, and N
the total number of samples to be evaluated. We then compute VAR as follows:

                                                              N K
                                                           1 XX             h     i
                                               VAR =              Variance p(k)
                                                                              m,n                                          (32)
                                                           N n=1  m=1,...,M
                                                                   k=1

We also have the following uncertainty decomposition (Abe et al., 2022), which suggests that the variance quantifies the
extent to which predictive uncertainty increases after ensembling:

                          N
                             "    K 
                                              #        N   M
                                                              "     K 
                                                                                #
                        1 X      X         2      1 XX            X         2
                                       (k)                               (k)
                              1−     p̄n        =               1−      pm,n      +VAR.
                       N n=1                      N M n=1 m=1                                                              (33)
                                 k=1                               k=1
                       |        {z            } |               {z              }
                          ensemble uncertainty (EnsUnc)                 average uncertainty (AvgUnc)


                                                                       20
                                     Ensemble Distribution Distillation via Flow Matching

Agreement (AGR), is a commonly used metric in classification tasks to measure how often two predictions match each
            (k)      (k)
other. Let pn and q n be the two categorical probabilities for class k predicted for the nth sample, and N the total number
of samples to be evaluated. We then compute AGR as follows:
                                                     N                              
                                                  1 X
                                       AGR =            arg max p(k)
                                                                 n   = arg max q (k)
                                                                                 n                                           (34)
                                                  N n=1     k              k



Total variation distance (TVD), is a metric that measures the difference between two probability distributions. It quan-
                                                                      (k)       (k)
tifies the maximum discrepancy in probability mass between them. pn and q n be the two categorical probabilities for
class k predicted for the nth sample, and N the total number of samples to be evaluated. We then compute TVD as follows:
                                                                 N    K
                                                           1 X X (k)
                                                TVD =            pn − q (k)
                                                                        n                                                    (35)
                                                          2N n=1
                                                                      k=1


Wasserstein-2 distance (W2 ), measures the distance between two probability distributions by quantifying the optimal
cost of transporting one distribution to another. Fréchet Inception Distance (FID) (Heusel et al., 2017), a widely used
metric in generative models literature, is also a specific instance of W2 . Inspired by this, we also evaluated the fidelity
of generated logits to teacher logits by measuring Wasserstein-2 distance between the two distributions. Let PPand Q be
                                                                                                                        n
two discrete
           Pmprobability distributions with support {x1 , . . . , xn } and {y1 , . . . , ym } respectively, so that P = i=1 pi δxi
and Q = j=1 qj δyj where pi , qj are probability masses and δx Dirac delta function. We then compute Wasserstein-2
distance between two discrete distributions as:
                                                                     n X
                                                                       m
                                                                                                  ! 21
                                                                     X
                                     W2 (P, Q) =           inf                 γi,j ∥xi − yj ∥2                              (36)
                                                        γ∈Γ(P,Q)
                                                                     i=1 i=1

where γi,j is the transport plan meaningP  how much massP from pi to qj , Γ(P, Q) is the set of all possible valid transport
plans that satisfy the marginal constraint j γi,j = pi , i γi,j = qi . Evaluating this involves linear programming, and can
efficiently be solved using Hungarian algorithm. Note that W2 distance differs from TVD, in that it measures the similarity
between the whole predictive distributions, where as TVD only compares their means.

B.4. Ensemble distillation methods
Knowledge distillation (KD; Hinton et al., 2014) is considered the simplest method for transferring knowledge from a
large and complex teacher model to a smaller student model. The training objective for knowledge distillation is given as
follows:
                                                                  M
                                                            1 X
                                    LKD (ϕ) = H p̄, q ϕ =             H(pm , q ϕ ),                                  (37)
                                                             M m=1

which simply is the cross-entropy loss widely used in classification tasks. One thing that differs is, that it is typical to
soften (or harden) the teacher logits by dividing them with a temperature T , for better performance.
Ensemble distribution distillation (EnDD; Malinin et al., 2020; Ryabinin et al., 2021) assumes that the categorical
predictions from the ensemble teacher follow a Dirichlet distribution. In other words, the induced distribution in Eq. 4
is assumed to be Dirichlet, i.e., p1 , ..., pM ∼ q(π x |x) = Dir(β), where the concentration parameter β is estimated in
closed-form using the approximate maximum likelihood procedure (Minka, 2000):

                                           K −1                   1
                         β (k) ≈ p̄(k) ·        ·P                                     for k = 1, ..., K,                    (38)
                                             2    K
                                                      p̄ (j) · (log p̄(j) − log p(j) )
                                                  j=1

             1
               PM                      1
                                         PM
where p̄ = M      m=1 pm and log p = M      m=1 log pm are computed over M observations p1 , ..., pM . Then, a student
Drichlet Prior Network (DPN; Malinin and Gales, 2018), which models qϕ (π x |x) = Dir(αϕ ), can be trained by minimiz-
ing the KL divergence between two Dirichlet distributions Dir(β) and Dir(αϕ ). While the seminal work of Malinin et al.
(2020) originally minimized the forward KL divergence, DKL (Dir(β) || Dir(αϕ )), subsequent research by Ryabinin et al.

                                                                     21
                                   Ensemble Distribution Distillation via Flow Matching

(2021) showed that minimizing the reverse KL divergence, DKL (Dir(αϕ ) || Dir(β)), improves training stability. They
also constrained the concentration parameters to be greater than one by α̂ϕ ← αϕ + 1 and β̂ ← β + 1, to further enhance
stability. Accordingly, we adopted the loss function proposed by Ryabinin et al. (2021) to train the EnDD baseline:
                                                                        1
                      LEnD2 (ϕ) = Eq∼Dir(α̂ϕ ) [H (p̄, q)] + P               (k)
                                                                                   · DKL (Dir(α̂ϕ ) || Dir(1)) .
                                                                      K
                                                                      k=1 β̂
                                                                                                                       (39)
                                   |          {z             }   |                       {z                  }
                                       reconstruction term                            prior term

During test time, we compute the categorical probabilities as the mean of the student Dirichlet distribution, which is given
                        (k) PK       (j)
by Eq∼Dir(α̂ϕ ) q (k) = α̂ϕ / j=1 α̂ϕ for k = 1, ..., K. Notably, this is equivalent to applying the softmax operation
to the DPN output, making the inference procedure identical to standard softmax-based classification neural networks.
Functional ensemble distillation (FED; Penso et al., 2022) aims to distill the whole distribution of predictions from
the ensemble teacher, unlike previous approaches that are capable only of predicting the mean of the teacher predictions.
Specifically, it proposed to minimize the maximum mean discrepancy between the predictions produced by the teachers and
predictions produced by student. Enabling the student network to be a generative model that approximates the ensemble
teacher distribution, FED has advantages over tasks that require covariance between predictions. As EDFM also proposes
to distill ensemble teacher distribution via flow matching, FED is the most alike approach to ours among other baselines.
Diffusion bridge network (DBN; Kim et al., 2024) adopted I2 SB, an image reconstruction algorithm based on Diffusion
Schrödinger Bridge to map predictions of a single teacher model to the mean of predictions of ensemble teachers. Although
DBN proposed a fast ensembling algorithm based on a concurrent generative model, it fundamentally deviates from EDFM
in that it does not distill the whole ensemble distribution.




                                                                 22
