---
title: 'TinyProto: Efficient Federated Learning'
url: https://www.emergentmind.com/topics/tinyproto
type: topic
---

# TinyProto: Efficient Federated Learning

Searching arXiv for the TinyProto paper and closely related prototype-based federated learning work.
TinyProto is a communication-efficient prototype-based federated learning (PBFL) framework designed for resource-constrained and heterogeneous environments. It replaces dense class prototypes with class-wise structured sparse prototypes and augments aggregation with adaptive prototype scaling, targeting the communication bottleneck that arises when clients exchange per-class mean activations in a shared \(d\)-dimensional penultimate feature space [2507.04327]. In the reported experiments, TinyProto reduces communication costs by up to \(4\times\) compared to efficient baselines and by up to \(10\times\) relative to original PBFL configurations, while maintaining or improving accuracy, especially in larger-class and heterogeneous settings [2507.04327].

## 1. Problem setting and motivation

In PBFL, a client \(i\) uses a feature extractor \(f_i(\cdot)\) with output dimension \(d\), and for each class \(c \in \{1,\dots,C\}\) forms a local prototype \(p_{i,c} \in \mathbb{R}^d\), typically the mean activation in the penultimate layer. The server aggregates these into global prototypes \(p_c \in \mathbb{R}^d\). This reduces communication relative to full model exchange, but the per-round cost still scales with \(C \cdot d\), because each class contributes a length-\(d\) prototype on both uplink and downlink [2507.04327].

The TinyProto formulation is motivated by two empirical observations. First, decision-layer features under ReLU are sparse and exhibit many “dead units” (approximately \(50\%\) per class empirically), so local prototypes already contain many zeros. Second, heterogeneity across clients, in both data and model, makes zero locations inconsistent, so naïve global aggregation fills in most coordinates and the aggregate prototype remains dense. The framework also addresses a second limitation of prototype aggregation: PBFL often uses simple averaging to avoid transmitting per-class client counts \(n_{i,c}\), but that choice sacrifices fidelity because client importance is not reflected [2507.04327].

These observations define the central problem that TinyProto addresses. Dense prototypes are structurally wasteful when the feature geometry is already sparse, and simple averaging under heterogeneous class frequencies can degrade prototype quality. TinyProto therefore imposes consistent sparsity patterns across clients and restores class-frequency weighting without directly sending \(n_{i,c}\) as metadata [2507.04327].

## 2. Class-wise Prototype Sparsification

The core mechanism is Class-wise Prototype Sparsification (CPS). For each class \(c\), TinyProto defines a fixed support \(S_c \subseteq \{1,\dots,d\}\) of size \(s\), together with a binary mask \(M_c \in \{0,1\}^d\), where \((M_c)_j = 1\) iff \(j \in S_c\). The structured sparse prototype is

\[
\tilde{p}_c = p_c \odot M_c,
\]

and the compressed prototype is the coordinate subvector restricted to \(S_c\),

\[
\hat{p}_c = (p_{c,j}: j \in S_c) \in \mathbb{R}^s.
\]

Clients and server share these class-specific masks once, so subsequent rounds transmit only the \(s\) selected values rather than all \(d\) coordinates [2507.04327].

A defining property of CPS is that zero locations are consistent across clients. This is the mechanism by which sparsity survives aggregation: each client sends values only on the same support \(S_c\) for class \(c\), and the server aggregates only those coordinates. In contrast, if each client were sparse in different coordinates, global averaging would refill the vector and destroy sparsity. The paper states that masks are typically designed to maximize pairwise Hamming distance between \(\{M_c\}\). Disjoint supports \(S_c \cap S_{c'} = \varnothing\) are described as a simple, strong choice, while overlapping supports are allowed provided that masks remain sufficiently separated [2507.04327].

This design is structured rather than adaptive at each round. A plausible implication is that TinyProto trades per-round optimization freedom for deterministic communication cost and zero index overhead during training. The reported practical guidance is to start with \(s \approx 0.1d\), corresponding to \(90\%\) compression, and to prefer disjoint or near-disjoint supports when feasible [2507.04327].

## 3. Prototype aggregation, adaptive scaling, and local training

TinyProto retains the standard prototype definition at the client. If \(D_{i,c} \subseteq D_i\) is the subset of local samples with label \(c\), and \(n_{i,c} = |D_{i,c}|\), then the local class prototype is

\[
p_{i,c}^L = \frac{1}{n_{i,c}} \sum_{(x,y)\in D_{i,c}} f_i(\theta_i; x).
\]

The count-weighted global prototype would be

\[
p_c^G = \frac{\sum_{i \in N_c} n_{i,c} p_{i,c}^L}{\sum_{i \in N_c} n_{i,c}},
\]

but many PBFL implementations replace this with simple averaging,

\[
p_c^G = \frac{1}{|N_c|} \sum_{i \in N_c} p_{i,c}^L,
\]

to avoid sending \(n_{i,c}\) [2507.04327].

TinyProto’s adaptive prototype scaling recovers the effect of importance weighting without explicitly transmitting counts. Each client multiplies its compressed prototype by the local class count before uplink and sends

\[
n_{i,c} \cdot \hat{p}_{i,c}^L.
\]

The server then performs simple averaging on these scaled values,

\[
\hat{p}_c^G = \frac{1}{|N_c|} \sum_{i \in N_c} n_{i,c}\hat{p}_{i,c}^L,
\]

and reconstructs \(\tilde{p}_c^G\) by placing \(\hat{p}_c^G\) back at \(S_c\) and zeros elsewhere. The paper describes this as achieving the effect of count-weighted aggregation without explicitly transmitting \(n_{i,c}\) as metadata [2507.04327].

A second scaling step is global. The server scales reconstructed global prototypes by a hyperparameter \(\mu\), and clients use \(\mu \tilde{p}_c^G\) in prototype regularization. Local optimization is

\[
\tilde{\mathcal{L}}_i(w_i) = \mathcal{L}_i(w_i) + \lambda \mathcal{R}_i,
\]

with

\[
\mathcal{R}_i = \sum_c \rho(p_{i,c}^L, \mu \tilde{p}_c^G),
\]

where \(\rho(\cdot,\cdot)\) is Euclidean distance. In the reported experiments, \(\lambda = 1\), and \(\mu\) is dataset-dependent: \(1.5\times 10^{-4}\) for CIFAR-10 and \(1.5\times 10^{-3}\) for CIFAR-100 and TinyImageNet [2507.04327]. Prediction for PBFL methods uses nearest-prototype classification,

\[
\hat{y} = \arg\min_c \|f_i(\theta_i; x) - p_{i,c}^L\|_2.
\]

Because only prototypes are exchanged, TinyProto is architecture-agnostic provided that clients emit features in a common \(d\)-dimensional space. Different backbones are therefore supported without shared weights. The paper notes that if some clients have different native feature dimensions \(d_i\), a lightweight projection to a common \(d\) can be added, although TinyProto does not prescribe a specific projection operator [2507.04327].

## 4. Communication scaling and computational profile

The communication analysis is one of TinyProto’s main contributions. With \(b\) bytes per float, the baseline PBFL byte cost is written as

\[
B_{\text{base}} \approx b \cdot \sum_{i=1}^{M}(K_i \cdot d + C \cdot d)
= b \cdot d \cdot \sum_{i=1}^{M}(K_i + C),
\]

which the paper identifies as the byte version of the parameter-count expression for dense-prototype methods. This notation suggests that \(K_i\) denotes the number of classes represented on client \(i\) [2507.04327].

Under CPS, only \(s\) coordinates per class are transmitted, so the per-round cost becomes

\[
B_{\text{tinyproto}} \approx b \cdot \sum_{i=1}^{M}(K_i \cdot s + C \cdot s)
= b \cdot s \cdot \sum_{i=1}^{M}(K_i + C).
\]

The compression ratio is therefore approximately

\[
CR \approx \frac{B_{\text{base}}}{B_{\text{tinyproto}}} \approx \frac{d}{s}.
\]

When \(s = 0.1d\), the paper reports \(CR \approx 10\times\) relative to original PBFL [2507.04327].

TinyProto avoids a common source of sparse-communication overhead: per-round index transmission. Because masks are pre-shared once, the round-wise index overhead is zero. The one-time mask broadcast cost is \(C \cdot d\) bits, amortized across rounds. On the client, prototype computation remains \(O(|D_i| \cdot d)\) because prototypes are still mean-pooled over the full feature space; CPS compression is then only a fixed subselect of size \(s\), i.e., \(O(s)\) per class, with no top-\(k\) search, auxiliary pruning, or additional optimization. On the server, reconstruction is \(O(s \cdot C)\) [2507.04327].

This distinction is important for interpretation. TinyProto compresses communication while preserving the full training-time and inference-time representation dimension \(d\). The paper’s ablations state that CPS consistently outperforms shrinking the actual layer width to match the same communication budget. The stated reason is that TinyProto keeps full \(d\) capacity in training and inference while communicating only \(s\) coordinates; reducing \(d\) directly harms representational power [2507.04327].

## 5. Experimental results and empirical behavior

The reported evaluation uses CIFAR-10 (\(C=10\)), CIFAR-100 (\(C=100\)), and TinyImageNet (\(C=200\)); backbones include ResNet-8, EfficientNet, ShuffleNet v2, and MobileNet v2, all with global average pooling and prototype dimension \(d=500\). The federated configuration uses \(M=20\) clients, all participating per round, over 300 rounds, with learning rate \(0.01\), batch size \(32\), and one local epoch per round. Data heterogeneity is generated with Dirichlet \(\alpha=0.1\), with additional tests at \(\alpha=0.01\) and \(\alpha=0.5\). The paper evaluates TinyProto-FP, integrated into FedProto, and TinyProto-FT, integrated into FedTGP/ACL [2507.04327].

At \(d=500\) and \(s=50\), corresponding to \(90\%\) compression, the reported communication and accuracy are as follows. On CIFAR-10, FedProto attains \(82.90 \pm 0.46\) with communication \(0.15\), FedTGP \(86.32 \pm 0.49\) with \(0.15\), FedDistill \(86.93 \pm 0.12\) with \(<0.01\), TinyProto-FP \(84.52 \pm 0.06\) with \(0.02\), and TinyProto-FT \(88.47 \pm 0.21\) with \(0.02\). On CIFAR-100, FedProto attains \(29.97 \pm 0.18\) with \(1.46\), FedTGP \(36.92 \pm 0.16\) with \(1.46\), FedDistill \(39.52 \pm 0.33\) with \(0.29\), TinyProto-FP \(31.82 \pm 0.24\) with \(0.15\), and TinyProto-FT \(45.94 \pm 0.40\) with \(0.15\). On TinyImageNet, FedProto attains \(13.30 \pm 0.06\) with \(2.93\), FedTGP \(19.44 \pm 0.12\) with \(2.93\), FedDistill \(22.98 \pm 0.15\) with \(1.17\), TinyProto-FP \(16.01 \pm 0.21\) with \(0.29\), and TinyProto-FT \(27.29 \pm 0.21\) with \(0.29\) [2507.04327].

The paper highlights two specific communication reductions. TinyProto-FT achieves approximately \(9.7\times\) reduction relative to FedProto on CIFAR-100, from \(1.46\) to \(0.15\) million parameters per round, and approximately \(4\times\) reduction relative to FedDistill on TinyImageNet, from \(1.17\) to \(0.29\) [2507.04327]. These are the central reported efficiency comparisons.

Robustness experiments further emphasize heterogeneous settings. On CIFAR-100 with \(M=50\), TinyProto-FT reaches \(43.51 \pm 0.35\), ahead of TinyProto-FP at \(32.43 \pm 0.31\), FedDistill at \(40.70 \pm 0.40\), and FedTGP at \(36.69 \pm 0.15\). With \(\alpha=0.01\), TinyProto-FT reaches \(72.74 \pm 0.59\), while TinyProto-FP reaches \(61.52 \pm 0.54\) and FedTGP \(64.02 \pm 0.34\). With \(\alpha=0.5\), TinyProto-FT reaches \(24.35 \pm 0.11\), described as best among PBFL-type methods, and TinyProto-FP reaches \(17.01 \pm 0.45\) [2507.04327].

Taken together, the results indicate that TinyProto is most advantageous when \(C\) and \(d\) are large enough that dense-prototype exchange becomes expensive. The paper’s own summary recommends it when communication is the primary constraint, when models are heterogeneous but can agree on a shared embedding dimension, and when the raw \(C \cdot d\) cost of PBFL is otherwise prohibitive [2507.04327].

## 6. Theoretical properties, limitations, and privacy considerations

TinyProto extends FedProto’s convergence analysis by introducing a fixed-support, non-expansive sparsification operator \(S\) for each class. The stated assumption is that for class \(j\), \(S\) maintains a fixed support \(\Omega_j\) and is non-expansive:

\[
\operatorname{supp}(S(\cdot)) = \Omega_j, \qquad \|S(u)-S(v)\|_2 \le \|u-v\|_2.
\]

Under this assumption, the components of FedProto’s Lemma 2 that involve global prototypes are modified by inserting \(S\), and because masking is linear on fixed locations, the bound is preserved. The paper gives the key inequality

\[
\mathcal{L}_{(t+1)E+\frac{1}{2}}
\le
\mathcal{L}_{(t+1)E}
+
\lambda \|S(C_{t+2}) - S(C_{t+1})\|_2
=
\mathcal{L}_{(t+1)E}
+
\lambda \left\|\sum_{i=1}^{m} q_i \big(C_{i,(t+1)E} - C_{i,tE}\big)\right\|_2,
\]

and states that this supports carrying over FedProto’s non-convex convergence rate to CPS [2507.04327].

The framework’s limitations are explicit. Even with \(s \ll d\), total communication still grows with \(C\), so very large class counts can make mask storage and broadcast overhead non-trivial, and disjoint support allocation may become impossible when \(C \cdot s > d\). Extreme class imbalance or rapid distribution drift can destabilize distance-based training because local scaling depends on \(n_{i,c}\); the paper states that server-side normalization and \(\mu\) scaling mitigate this, but further adaptive normalization may be helpful. Fixed supports \(S_c\) can also become stale if informative feature directions drift substantially over training [2507.04327].

Mask overlap is another design risk. If supports overlap excessively, inter-class discriminativeness can degrade; the recommended mitigation is to maintain large pairwise Hamming distances between masks. Heterogeneous models with differing native feature dimensions \(d_i\) require an added projection to a common \(d\), which the method allows but does not specify in detail. The paper also notes that class-wise prototypes may leak label distribution information. Proposed mitigations include Gaussian or Laplace noise on prototypes, differential privacy accounting for the scaling step, and secure aggregation [2507.04327].

Future directions follow naturally from these constraints. The paper identifies adaptive support allocation, combination with quantization or sketching such as randomized projections, and privacy-preserving variants that integrate differential privacy noise and secure aggregation of compressed vectors [2507.04327].

## 7. Other technical usage of the name

The name “TinyProto” also appears in a distinct systems-design context derived from the Bebop serialization and RPC work reported in "Simplicity Scales" [2604.09591]. In that usage, TinyProto denotes a proposed minimal, high-performance serialization/RPC system that mirrors Bebop’s fixed-width wire rules, fixed \(4\)-byte length prefixes, packed structs, and transport-independent RPC framing. The guiding principle is that every data type uses a fixed number of bytes: for example, a \(32\)-bit integer is always \(4\) bytes, a float64 is always \(8\) bytes, and length prefixes are always \(4\) bytes. The stated purpose is to eliminate data-dependent branches in decoding, replacing varint and text parsing with single loads, pointer assignment, and fixed strides [2604.09591].

In that systems context, the proposed wire format uses little-endian fixed sizes for primitive and extended numeric types, strings encoded as \(4\)-byte byte-length plus UTF-8 bytes plus a \(1\)-byte NUL terminator, arrays encoded as a \(4\)-byte count followed by contiguous elements, structs encoded positionally with no tags or padding, and messages encoded as a \(4\)-byte total length followed by a stream of \(1\)-byte tags and a single \(0x00\) end marker. Unknown tags are skipped deterministically using fixed widths or fixed-width length prefixes, preserving message evolvability without per-byte continuation checks [2604.09591].

The same source also specifies a transport-agnostic RPC layer with a fixed \(9\)-byte frame header composed of length (\(uint32\)), flags (byte), and stream identifier (\(uint32\)); method dispatch uses a \(4\)-byte hash of “/ServiceName/MethodName”, and the protocol supports HTTP/1.1, HTTP/2, HTTP/3, TCP, WebSocket, and IPC. Batch pipelining is a central feature: a BatchCall carries dependency information through `input_from`, the server builds a DAG of dependent calls, partitions it into layers, and executes layers concurrently, collapsing \(N\) dependent round trips into one. Cursors, absolute deadlines, and async futures are also described [2604.09591].

The reported performance claims for Bebop motivate that usage of the name. Across \(19\) decode workloads, Bebop decodes \(9\)–\(213\times\) faster than Protocol Buffers; on a \(1536\)-dimension embedding vector, it decodes in \(2.80\) ns versus \(111.12\) ns for Protocol Buffers and \(4.69\) \(\mu\)s for simdjson; and for records above approximately \(64\) KB, cold-cache utilization reaches \(86\%\) of peak DRAM bandwidth, summarized as \(\text{throughput} \approx 0.86 \times BW\) [2604.09591]. This systems-oriented “TinyProto” is unrelated in purpose to the federated-learning framework, but both usages share a common design theme: reducing overhead by constraining representation structure rather than adding runtime complexity.

Source: https://www.emergentmind.com/topics/tinyproto