UniCon: Unified Framework for Efficient Contrastive Alignment via Kernels
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: We're looking at the paper: "UniCon: Unified Framework for Efficient Contrastive Alignment via Kernels".
Title and authors: Tom: The paper, UniCon: Unified Framework for Efficient Contrastive Alignment via Kernels, comes from Hangke Sui and Yuqing Wang at UIUC. It’s trying to solve that slow training issue by unifying how they handle linear and nonlinear encoders, as well as different kinds of alignments like one-to-one or many-to-many.
Jane: So when you look at the title, it sounds very technical with all those terms—Unified Framework, Kernels—but what does that actually mean for the person just trying to get a model to work?
Lu: It means they are using Reproducing Kernel Hilbert Spaces or RKHS as a bridge. That’s the mathematical tool that lets them unify the approach, connecting linear and nonlinear models under one theoretical umbrella.
Meng: I don't see an immediate practical application for the authors themselves, but if this framework can genuinely speed up training by replacing iterative optimization with a direct update, that changes how we budget compute on our end.
Lalam: The key idea is using this similarity weight matrix S gamma to get a direct solution instead of doing those long stochastic steps. It's about finding the best representation in one shot rather than slowly nudging it around.
The paper's summary: Tom: Basically, UniCon takes the contrastive loss and looks at it through this kernelized lens to show that minimizing that loss is equivalent to solving a spectral update. In the linear case, they get an optimal encoder matrix in closed form, which is huge for speed.
Jane: So if we think about the naive question here, why does connecting it to spectral methods make such a difference for alignment? Is it just a clever mathematical trick?
Lu: It’s more than a trick; it provides the theoretical foundation that unifies linear and nonlinear encoders. They show that the kernel formulation is essential because it lets them implicitly map feature representations into these high-dimensional spaces, which is necessary for nonlinear contrastive alignment.
Meng: Implicit mapping sounds nice on paper, but from an engineering standpoint, if you can't actually see or compute the resulting matrix easily in a practical setting, it’s just theoretical fluff. What about the many-to-many alignments they discuss?
Lalam: They cover both one-to-one and many-to-many alignments. The framework is general enough to handle both, which broadens how you can use this technique beyond just simple matching pairs.
The paper's improvements: Tom: The main improvement they highlight is that in the linear setting, UniCon yields a closed-form spectral update that gives you the optimal encoder matrices right away. That’s a massive speedup over what we do now with gradient descent on those models.
Jane: So, if someone is running a model and they can get these optimal matrices instantly instead of training for hundreds of epochs, how much time are we talking about?
Lu: The paper shows this leads to very fast alignment via implicit representation inference in the nonlinear setting. It means you can align features quickly without having to rely on slow iterative updates across many batches.
Meng: I need numbers here; how fast is "fast alignment" compared to what we are currently using? If it’s just a few seconds instead of hours, that’s worth deploying.
Lalam: They actually show empirical results where UniCon achieves up to four hundred sixty-one times speed-up over minimizing CLIP loss using standard stochastic gradient descent in multimodal tasks. That number is what really makes the paper interesting for performance gains.
Conclusion: Tom: So to wrap up, UniCon proposes a unified framework that replaces slow stochastic optimization with a closed-form spectral update driven by the contrastive similarity weight matrix S gamma. It shows that minimizing contrastive loss is equivalent to finding the best rank r approximation in an RKHS.
Jane: That sounds like they’ve given us a very clear lens on how to think about contrastive learning, interpreting alignment as discovering an r-rank structure within high-dimensional feature spaces. That’s a concrete way to visualize it for us.
Lu: It advances the understanding of contrastive learning not just for unimodal tasks, but also for multimodal alignment and beyond by providing this unified kernelized approach.
Meng: I'm still thinking about the practical deployment, though. They mention stabilizing the closed-form spectral step using things like Tikhonov regularization and randomized SVD with power iterations to keep things numerically stable. That’s a necessary piece of the puzzle for any real system.
Lalam: And they show that this framework is pretty robust too, because performance metrics stayed nearly identical across different batch size variations for both unimodal and multimodal alignment tasks.
Tom: So, UniCon gives us a theoretical backbone that promises much faster training with provably better convergence in the linear case and substantial speed-up in the nonlinear case. That's what they’re showing us with this Unified Framework for Efficient Contrastive Alignment via Kernels.
Department of Electrical & Computer Engineering, The Grainger College of Engineering, University of Illinois Urbana-Champaign · Siebel School of Computing and Data Science, The Grainger College of Engineering, University of Illinois Urbana-Champaign · Coordinated Science Laboratory, University of Illinois Urbana-Champaign · VinUni-Illinois Smart Health Center
cs.LG, cs.CV
Submitted: 2026-04-17
Updated: 2026-04-17
Comments: 33 pages, 8 figures, 8 tables. Accepted by The Fourteenth International Conference on Learning Representations (ICLR) 2026
Code: https://github.com/suihangke/UniCon
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 100/100
The gist: Contrastive objectives power state-of-the-art multimodal models, but their training remains slow, relying on long stochastic optimization.<ref:2604.16678#pg15>.
Key concepts
- Contrastive Similarity Weight Matrix S(γ)
- This matrix is the core innovation of UniCon. It allows the framework to derive a closed-form solution for contrastive alignment, replacing iterative backpropagation with exact updates. It acts as a structured way to define similarity across different feature spaces, driving the entire optimization process.
- Kernelization and RKHS
- The framework uses kernels to map feature representations into Reproducing Kernel Hilbert Spaces (RKHS). This allows UniCon to handle both linear and nonlinear encoders simultaneously. The kernel formulation is essential for implicitly mapping features, enabling fast alignment in complex, non-linear contrastive tasks.
- Spectral Update
- Instead of relying on gradient descent steps, UniCon solves the contrastive loss through a spectral update derived from S(γ). In the linear case, this yields optimal encoder matrices directly. This method allows the model to jump quickly to a global maximizer, resulting in extremely fast convergence.
Terminology
Summary
Contrastive objectives power state-of-the-art multimodal models, but their training remains slow, relying on long stochastic optimization. p. 0 1 Department of Electrical & Computer Engineering, The Grainger College of Engineering, UIUC
2 Siebel School of Computing and Data Science, The Grainger College of Engineering, UIUC
3 Coordinated Science Laboratory, University of Illinois Urbana-Champaign (UIUC)
4 VinUni-Illinois Smart Health Center
{hangkes2, yuqing14, minhdo}@illinois. edu
ABSTRACT
Contrastive objectives power state-of-the-art multimodal models, but their training
remains slow, relying on long stochastic optimization. We propose a Unified
Framework for Efficient Contrastive Alignment via Kernels (UniCon), which spans
linear and nonlinear encoders as well as one-to-one and many-to-many alignments. At its core, UniCon introduces the contrastive similarity weight matrix S(γ),
which enables closed-form global solutions that provably replace minibatch backpropagation with exact updates. We propose a Unified
Framework for Efficient Contrastive Alignment via Kernels (UniCon), which spans
linear and nonlinear encoders as well as one-to-one and many-to-many alignments. At its core, UniCon introduces the contrastive similarity weight matrix S(γ),
which enables closed-form global solutions that provably replace minibatch backpropagation with exact updates.Where the paper says it
Where the paper says it
Where the paper says it
Theoretical Foundation and Kernelization
The framework provides a kernelized perspective that unifies contrastive alignment and reveals its connection to spectral methods.<ref:2604.16678#pg15>. Theoretically, minimizing contrastive loss is equivalent to a spectral update. p. 1 , 2023), solves a single spectral decomposition yielding optimal encoder matrices
in closed form (ii) in a general nonlinear setting, provides a unified kernelized framework that enables
fast alignment via implicit representation inference. Our key contributions are as follows:
• Theoretically, we provide a kernel-based perspective that unifies linear and nonlinear encoders, showing that minimizing contrastive loss is equivalent to a spectral update. Our key contributions are as follows:
• Theoretically, we provide a kernel-based perspective that unifies linear and nonlinear encoders, showing that minimizing contrastive loss is equivalent to a spectral update. This
leads to a provably optimal solution in closed form and connects contrastive learning to
spectral methods. At its core, UniCon introduces the contrastive similarity weight matrix S(γ),
which enables closed-form global solutions that provably replace minibatch backpropagation with exact updates. Through the lens of reproducing kernel Hilbert
spaces (RKHS), UniCon provides a kernelized perspective that unifies contrastive
alignment and reveals its connection to spectral methods. At its core, UniCon introduces the contrastive similarity weight matrix S(γ),
which enables closed-form global solutions that provably replace minibatch backpropagation with exact updates. Through the lens of reproducing kernel Hilbert
spaces (RKHS), UniCon provides a kernelized perspective that unifies contrastive
alignment and reveals its connection to spectral methods.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Closed-Form Spectral Updates
UniCon departs from gradient-based training and instead solves the objective via a structured contrastive similarity weight matrix S(γ).<ref:2604.16678#pg2, "As illustrated in Figure 1, UniCon departs from gradient-based training and instead">. p. 1 We introduce UniCon, a Unified Framework for Efficient Contrastive Alignment via Kernels, which
leverages a structured contrastive similarity weight matrix S(γ) to directly solve contrastive objectives. As illustrated in Figure 1, UniCon departs from gradient-based training and instead: (i) in the linear
setting(Nakada et al. , 2023), solves a single spectral decomposition yielding optimal encoder matrices
in closed form (ii) in a general nonlinear setting, provides a unified kernelized framework that enables
fast alignment via implicit representation inference. Our key contributions are as follows:
• Theoretically, we provide a kernel-based perspective that unifies linear and nonlinear encoders, showing that minimizing contrastive loss is equivalent to a spectral update. As illustrated in Figure 1, UniCon departs from gradient-based training and instead: (i) in the linear
setting(Nakada et al. , 2023), solves a single spectral decomposition yielding optimal encoder matrices
in closed form (ii) in a general nonlinear setting, provides a unified kernelized framework that enables
fast alignment via implicit representation inference. Under the linear setting, the Lemma 4 is specialized as
∂L
∂Fk
= −
∂ tr F1C(γ)F
⊤
2
∂Fk
γ=γ(F1,F2)
+
∂R (F1, F2)
∂Fk
, k ∈ {1, 2} (10)
To solve the optimization problem induced by our reformulated objective, we characterize its maximizer in the linear setting. We arrive at the following theorem, which establishes that the convergence
of the contrastive loss can be replaced by a closed-form spectral update.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Empirical Performance and Efficiency Gains
UniCon demonstrates that it converges fast and achieves competitive or superior performance across synthetic, unimodal (CIFAR-10), and multimodal (Flickr30k,MSCOCO) and zero-shot transfer tasks.<ref:2604.16678#pg5>. It offers up to 461× speed-up over minimizing CLIP loss by stochastic gradient descent. p. 1 • Beyond one-to-one matching, our framework generalizes to many-to-many alignment,
broadening the applicability of contrastive alignment. • Empirically, we demonstrate that UniCon converges fast and achieves competitive
or superior performance across synthetic, unimodal (CIFAR-10), and multimodal
(Flickr30k,MSCOCO) and zero-shot transfer (image-text retrieval), offering up to 461×
speed-up over minimizing CLIP loss by stochastic gradient descent. We compare our method UniCon, which
performs a spectral update using the closed-form SVD of the weighted covariance C(γ), against
a standard baseline trained via stochastic gradient descent (SGD) on the CLIP loss with AdamW
optimizer (lr = 2 × 10−3
). As shown in Figure 2, UniCon achieves 100% matching accuracy after
just 0. 02 seconds. CLIP-SGD requires 400 epochs (0. As shown in Figure 2, UniCon achieves 100% matching accuracy after
just 0. 02 seconds. Our
training follows the standard retrieval protocol on MSCOCO with each image paired with 5 captions,
and report test retrieval accuracy on 5,000 held-out pairs. UniCon achieves higher accuracy than
SGD–CLIP on MSCOCO while being 96–461× faster.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Scalability and Robustness
The framework is designed for scalability through batch aggregation, where the similarity weight matrix S(γ) is aggregated by its closed-form solution.<ref:2604.16678#pg31>. Numerical stability is addressed by techniques such as Tikhonov regularization and randomized SVD with power iterations to stabilize the closed–form spectral step. p. 5 Numerical stability. If KX or KY is ill-conditioned or singular, form square roots with a Tikhonov
regularization when needed, replacing K by K + λI with λ > 0 in K±1/2
. If KX or KY is ill-conditioned or singular, form square roots with a Tikhonov
regularization when needed, replacing K by K + λI with λ > 0 in K±1/2
. This enhances robustness
to near-singular Gram matrices and stabilizes the closed-form update. Published as a conference paper at ICLR 2026
(2024) interpret the CLIP loss through the lens of optimal transport; while Tian (2022); Nakada
et al. (2023) analyze multimodal contrastive learning using SVD- and PCA-based formulations,
showing that, under linear encoders, contrastive loss minimization reduces to calculating a weighted
covariance matrix. To validate the theory,
we conduct experiments on synthetic, unimodal, multimodal, and zero-shot tasks,
demonstrating that UniCon achieves substantial efficiency gains while preserving
generality and strong empirical performance. 1 INTRODUCTION
Learning semantically aligned representations across different modalities, such as vision and language,
has long been a central goal in machine learning (Ngiam et al.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
General Applicability
The generalized contrastive loss formulation in Equation (34) extends from one-to-one alignment to many-to-many alignment scenarios.<ref:2604.16678#pg15>. The kernel selection study shows that kernels with stronger geometric expressivity, such as Angular and Arc-Cosine, yield superior alignment performance. p. 1 • Empirically, we demonstrate that UniCon converges fast and achieves competitive
or superior performance across synthetic, unimodal (CIFAR-10), and multimodal
(Flickr30k,MSCOCO) and zero-shot transfer (image-text retrieval), offering up to 461×
speed-up over minimizing CLIP loss by stochastic gradient descent. Figure 1: Unified Framework for Efficient Contrastive Alignment via Kernels (UniCon). • Empirically, we demonstrate that UniCon converges fast and achieves competitive
or superior performance across synthetic, unimodal (CIFAR-10), and multimodal
(Flickr30k,MSCOCO) and zero-shot transfer (image-text retrieval), offering up to 461×
speed-up over minimizing CLIP loss by stochastic gradient descent. Figure 1: Unified Framework for Efficient Contrastive Alignment via Kernels (UniCon). • Beyond one-to-one matching, our framework generalizes to many-to-many alignment,
broadening the applicability of contrastive alignment. • Empirically, we demonstrate that UniCon converges fast and achieves competitive
or superior performance across synthetic, unimodal (CIFAR-10), and multimodal
(Flickr30k,MSCOCO) and zero-shot transfer (image-text retrieval), offering up to 461×
speed-up over minimizing CLIP loss by stochastic gradient descent. , 2023), solves a single spectral decomposition yielding optimal encoder matrices
in closed form (ii) in a general nonlinear setting, provides a unified kernelized framework that enables
fast alignment via implicit representation inference. Our key contributions are as follows:
• Theoretically, we provide a kernel-based perspective that unifies linear and nonlinear encoders, showing that minimizing contrastive loss is equivalent to a spectral update. Published as a conference paper at ICLR 2026
Theorem 8 (Spectral characterization (Nakada et al. Consider minimizing the contrastive
loss function L(F1, F2), with R(F1, F2) = ρ
2
||F
T
1 F2||2
F
. true class
accuracy. The near-identity structure and visual similarity of both matrices indicate that UniCon and
SGD-CLIP achieve comparable discriminative performance in unimodal contrastive alignment. Through the lens of reproducing kernel Hilbert
spaces (RKHS), UniCon provides a kernelized perspective that unifies contrastive
alignment and reveals its connection to spectral methods. To validate the theory,
we conduct experiments on synthetic, unimodal, multimodal, and zero-shot tasks,
demonstrating that UniCon achieves substantial efficiency gains while preserving
generality and strong empirical performance. When X or Y is rank-deficient (or for general kernels where KX, KY may
be singular), all statements hold on the effective subspace using Moore–Penrose square roots. Thus the kernel SVD of M is the exact RKHS analogue of the linear SVD of C(γ), and the linear
setting is recovered as the special case of the linear kernel. Unified consequence. Theorem9 provides a unified spectral view for understanding contrastive
alignment:
contrastive loss minimization ⇐⇒ best rank–r approximation with RKHS. , 2020; Radford et al. Its versatility has made it a core component across diverse domains,
including NLP (Gao et al. , 2020; Radford et al. Its versatility has made it a core component across diverse domains,
including NLP (Gao et al.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Conclusion
UniCon proposes a theoretically grounded and computationally efficient framework for contrastive alignment that unifies linear and nonlinear encoders through kernels.<ref:2604.16678#pg33>. It shows that minimizing contrastive loss is equivalent to maximizing a kernelized trace objective, which in turn reduces to a best rank-r spectral approximation in an RKHS. p. 9 6 CONCLUSION
We propose UniCon, a theoretically grounded and computationally efficient framework for contrastive
alignment that unifies linear and nonlinear encoders through kernels. We show that minimizing
contrastive loss is equivalent to maximizing a kernelized trace objective, which in turn reduces to
a best rank-r spectral approximation in an RKHS. We show that minimizing
contrastive loss is equivalent to maximizing a kernelized trace objective, which in turn reduces to
a best rank-r spectral approximation in an RKHS. The closed form update is driven by explicitly
constructing a contrastive similarity weight matrix S(γ). In the linear reduction, UniCon recovers a
projection onto the top-r singular directions of the weighted contrastive cross-covariance. This yields
a clear spectral lens on contrastive learning, interpreting alignment as r-rank structure discovery in
high-dimensional feature spaces. With the theoretical grounding and competitive empirical results, UniCon advances understanding of
contrastive learning for unimodal representation learning, multimodal alignment and beyond. ACKNOWLEDGMENT
This work was supported in part by the Advanced Research Projects Agency for Health (ARPA-H)
and the IBM–Illinois Discovery Accelerator Institute. With the theoretical grounding and competitive empirical results, UniCon advances understanding of
contrastive learning for unimodal representation learning, multimodal alignment and beyond. ACKNOWLEDGMENT
This work was supported in part by the Advanced Research Projects Agency for Health (ARPA-H)
and the IBM–Illinois Discovery Accelerator Institute. finetuning for domain adaptation); (iii) mini-batch aggregation and streaming
variants that balance analytical fidelity with scalability, including distribution-shift-aware weighting,
online updates of the aggregated operator, and robust selection of batches to maintain stable global
estimates. With the theoretical grounding and competitive empirical results, UniCon advances understanding of
contrastive learning for unimodal representation learning, multimodal alignment and beyond. finetuning for domain adaptation); (iii) mini-batch aggregation and streaming
variants that balance analytical fidelity with scalability, including distribution-shift-aware weighting,
online updates of the aggregated operator, and robust selection of batches to maintain stable global
estimates. With the theoretical grounding and competitive empirical results, UniCon advances understanding of
contrastive learning for unimodal representation learning, multimodal alignment and beyond.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Future Directions
Three concrete future directions are proposed: (i) structure-exploiting kernels, for example random features, to reduce K’s rank and cost.<ref:2604.16678#pg33>. (ii) hybrid spectral–SGD strategy or warm-start strategy when the input space is non-static (e. p. 9 This yields
a clear spectral lens on contrastive learning, interpreting alignment as r-rank structure discovery in
high-dimensional feature spaces. We see three concrete future directions: (i) structure-exploiting kernels, for example random features,
to reduce K’s rank and cost; (ii) hybrid spectral–SGD strategy or warm-start strategy when the input
space is non-static (e. We see three concrete future directions: (i) structure-exploiting kernels, for example random features,
to reduce K’s rank and cost; (ii) hybrid spectral–SGD strategy or warm-start strategy when the input
space is non-static (e. finetuning for domain adaptation); (iii) mini-batch aggregation and streaming
variants that balance analytical fidelity with scalability, including distribution-shift-aware weighting,
online updates of the aggregated operator, and robust selection of batches to maintain stable global
estimates. We see three concrete future directions: (i) structure-exploiting kernels, for example random features,
to reduce K’s rank and cost; (ii) hybrid spectral–SGD strategy or warm-start strategy when the input
space is non-static (e. finetuning for domain adaptation); (iii) mini-batch aggregation and streaming
variants that balance analytical fidelity with scalability, including distribution-shift-aware weighting,
online updates of the aggregated operator, and robust selection of batches to maintain stable global
estimates. When X or Y is rank-deficient (or for general kernels where KX, KY may
be singular), all statements hold on the effective subspace using Moore–Penrose square roots. Thus the kernel SVD of M is the exact RKHS analogue of the linear SVD of C(γ), and the linear
setting is recovered as the special case of the linear kernel.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Contrastive alignment can be performed in closed form rather than relying on long stochastic optimization by introducing a contrastive similarity weight matrix S(gamma), which enables
closed-form global solutions that provably replace minibatch backpropagation with exact updates.
-
The system can achieve substantial speed-up over standard methods, offering
up to 461x speed-up over minimizing CLIP loss by stochastic gradient descent
in multimodal tasks. -
The framework supports generalized alignment beyond one-to-one matching, allowing for complex scenarios like
many-to-many alignment, broadening the applicability of contrastive alignment.
-
The model can be trained efficiently using a spectral update that
directly jumps to the global maximizer of the surrogate objective,
which is observed to converge in very few steps. -
The system can handle both linear and nonlinear encoders by providing a
unified kernelized framework
that leverages Reproducing Kernel Hilbert Spaces (RKHS) for alignment, capturing complex cross-modal relationships. -
For out-of-sample inference on new pairs, the model can compute similarity using an optimal choice of parameters from Theorem 9 to find embeddings f theta1(x star) and f theta2(y star).
-
The system is robust to batch size variations in practical scenarios, as
performance metrics remained nearly identical across [various] batch size variations,
implying high data efficiency.
Abstract
Contrastive objectives power state-of-the-art multimodal models, but their training remains slow, relying on long stochastic optimization. We propose a Unified Framework for Efficient Contrastive Alignment via Kernels (UniCon), which spans linear and nonlinear encoders as well as one-to-one and many-to-many alignments. At its core, UniCon introduces the contrastive similarity weight matrix S(γ), which enables closed-form global solutions that provably replace minibatch back-propagation with exact updates. Through the lens of reproducing kernel Hilbert spaces (RKHS), UniCon provides a kernelized perspective that unifies contrastive alignment and reveals its connection to spectral methods. To validate the theory, we conduct experiments on synthetic, unimodal, multimodal, and zero-shot tasks, demonstrating that UniCon achieves substantial efficiency gains while preserving generality and strong empirical performance.
Sources
- Clotho: An Audio Captioning Dataset
- SimCSE: Simple Contrastive Learning of Sentence Embeddings
- Kernel-based Unsupervised Embedding Alignment for Enhanced Visual Representation in Vision-language Models
- A Theoretical Study of Inductive Biases in Contrastive Learning
- Unsupervised Dense Information Retrieval with Contrastive Learning
- Understanding Dimensional Collapse in Contrastive Self-supervised Learning
- Contrastive Learning of Structured World Models
- Video-LLaVA: Learning United Visual Representation by Alignment Before Projection
- Representation Learning with Contrastive Predictive Coding
- Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
- Wav2CLIP: Learning Robust Audio Representations From CLIP
Related papers
- Biologically Inspired Coordination of Parameter Selection and Update Strength for Language Model Adaptation
- Sketching for First Order Method: Efficient Algorithm for Low-Bandwidth Channel and Vulnerability
- The WMDP Benchmark: Measuring and Reducing Malicious Use With Unlearning
- On the notion of missingness for path attribution explainability methods in medical settings: Guiding the selection of medically meaningful baselines
- Variable-Length Generative Protein Design via Generalized Poisson Flow
- MobileMoE: Scaling On-Device Mixture of Experts