A Typed Tensor Language for Shared-State Federated Computation
Theofilos Mailis, Theodore Papamarkou, Andreas Ktenidis, Kalliopi-Christina Despotidou, Konstantinos Filippopolitis, Yannis Foufoulas, Thanasis-Michail Karampatsis, Evdokia Mailli, Yannis Ioannidis
NeurIPS 2026
Abstract. Shared-state federated computations combine client-local tensor computation, mergeable aggregation into shared state, and shared-only post-processing. We introduce a typed tensor language for this class of computations. Its two tensor sorts separate client-partitioned data from globally available values, and typing tracks the partitioned axis. A virtual global tensor serves as a semantic reference for centralized evaluation. We show that typed one-round programs factor through shared tensors whose shapes depend on the program but are independent of client and sample counts. The converse applies to typed-realizable factorizations: each encoder component is represented by an allowed aggregation or contraction with its valid merge, and the decoder is shared-only. The construction extends round by round to programs whose persistent state is shared. For a loss supplied with a client-local per-sample gradient expression, summation represents the empirical gradient. This gives typed programs for server-side first-order updates and, with shared linear algebra, curvature-block updates. The language covers federated analytics and FedSGD. General multi-local-step FedAvg and persistent private client state are outside its scope.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:47 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This is a quite interesting theory-heavy paper that formalizes a unified framework for federated learning and analytics, and develops a shared-state factorization theory. Though interesting, the reviewers raised some major concerns -- some of them overlap with each in a non-trivial manner. Below is a partial list of the major concerns. Nevertheless, the authors are strongly encouraged to go through the individual review comments and response accordingly. • Theorem/proposition statements need to be polished up to clarify the conditions, and to enhance readability. • Discussions on the theorem/proposition implications need to be provided. Beyond the existing corollaries, discussion on the potential applicability to other merging methods can be very helpful. • The technical novelty and theorem insights need to be clarified and further discussed. • The paper provides no complexity or dimensionality analysis. Providing analytical or numerical evidences can be helpful. • Clarifications on how multi-local steps are handled. • Practical relevance needs to be justified.
Final justification
The authors responded to the raised questions and clarifications carefully. Most of the concerns were addressed. I urged the authors to fully incorporate the revised scopes and the clarifications as promised during the rebuttal discussion.
Read meta-review
Meta-review
This is a quite interesting theory-heavy paper that formalizes a unified framework for federated learning and analytics, and develops a shared-state factorization theory. Though interesting, the reviewers raised some major concerns -- some of them overlap with each in a non-trivial manner. Below is a partial list of the major concerns. Nevertheless, the authors are strongly encouraged to go through the individual review comments and response accordingly. • Theorem/proposition statements need to be polished up to clarify the conditions, and to enhance readability. • Discussions on the theorem/proposition implications need to be provided. Beyond the existing corollaries, discussion on the potential applicability to other merging methods can be very helpful. • The technical novelty and theorem insights need to be clarified and further discussed. • The paper provides no complexity or dimensionality analysis. Providing analytical or numerical evidences can be helpful. • Clarifications on how multi-local steps are handled. • Practical relevance needs to be justified.
Final justification
The authors responded to the raised questions and clarifications carefully. Most of the concerns were addressed. I urged the authors to fully incorporate the revised scopes and the clarifications as promised during the rebuttal discussion.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper proposes a typed tensor language designed to formalize the structural commonalities underlying federated learning and analytics protocols. The core contribution is a semantic framework centered on "virtual global tensors," which enables rigorous verification of distributed computations against centralized equivalents without actual data centralization. Building on this foundation, the authors develop a shared-state factorization theory demonstrating that typed one-round programs correspond exactly to computations factoring through fixed-dimensional shared state via an "encode-merge-decode" algebraic pattern. The type system further enforces an exposure discipline that statically prevents client-local data structures from leaking into shared state. While the theoretical contributions are sound and provide meaningful structural insights into federated computation, the work is intentionally narrow in scope: it lacks empirical validation, does not support persistent client state required by many practical FL algorithms, and offers no concrete programming syntax.
Strengths and weaknesses
Strengths
The paper introduces a "virtual global tensor" as a semantic reference object and proves virtual-global consistency. This provides a mathematically precise way to verify the correctness of distributed computations against centralized equivalents without requiring actual centralization, which is a significant theoretical advancement over ad-hoc protocol definitions.
The authors establish a comprehensive factorization theory showing that typed one-round programs correspond exactly to computations factoring through fixed-dimensional shared state. This unifies diverse algorithms under a single algebraic framework of "encode, merge, decode," providing deep structural insight into federated computation.
The type system explicitly tracks the record axis and enforces an exposure discipline, ensuring that shared state can only be created through designated primitives like record-axis aggregation or federated-federated matrix multiplication. This prevents accidental leakage of client-local data structures into shared state at the language level, offering stronger static guarantees than placement-based systems.
Weaknesses
The paper is purely theoretical and explicitly states "N/A" for experimental reproducibility. There is no prototype implementation to demonstrate that the proposed language can actually express real-world FL frameworks efficiently or that the type checking overhead is manageable, making it difficult to assess practical viability.
The base iterative class only carries information across rounds through shared tensors. Many practical FL algorithms (e.g., FedProx, SCAFFOLD) rely on persistent private client state. While acknowledged as a limitation, the inability to express these standard methods within the base language significantly restricts its immediate applicability to the broader FL literature.
The language is defined via abstract mathematical syntax and typing judgments rather than a concrete programming surface. Without a user-facing syntax or examples of how a practitioner would write code in this language (beyond mathematical notation in Appendix G), it remains unclear how accessible or usable this formalism would be for system designers.
While Theorem 5 shows compatibility with differential privacy, the base language itself is deterministic and provides no intrinsic privacy guarantees. The "exposure discipline" is merely a semantic boundary, not a cryptographic one. Readers might overestimate the safety guarantees provided by the type system alone without careful reading of the limitations.
The shared-state factorization relies heavily on commutative monoids for merging. This excludes holistic aggregates (e.g., exact medians, quantiles) or algorithms requiring non-commutative or unbounded intermediate state. The paper does not discuss how frequently such exclusions occur in modern FL applications beyond brief mentions.
The learning theory assumes the existence of a "representably differentiable loss" where the per-record gradient is already expressible as a client-local tensor expression. It does not provide an automatic differentiation mechanism for arbitrary federated programs, limiting the utility compared to systems like DrJAX or Federated AD that handle differentiation automatically.
Questions
Please see weaknesses.
Limitations
Yes
Final justification
The author has addressed most of my concerns. Given that my original rating was already leaning towards the positive, I will maintain this score.
Formatting concerns
n/a
2 comments
Rebuttal
We've carefully addressed your feedback in our response. Should you have any remaining questions before the deadline today, we'd welcome the chance to discuss them further.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 2/4
- Significance
- 2/4
- Originality
- 2/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
Authors propose a typed tensor language for horizontal federated learning and analytics problems within a formal framework. This framework operates over two types of tensors: federated, in which records are distributed across clients alongside a designated record axis, and shared tensors that are identical at every client. The actual contribution is the shared-state factorization composed as typed programs factor into local encoding, a merge into shared state whose size is independent of clients and records, and shared-only decoding. The extensions support first-order and second-order differentiable optimizers. Supporting results cover closure under post-processing and factorization interface for privacy mechanisms.
Strengths and weaknesses
Strengths
- Detailed literature review and clean prior-work positioning
- Record-axis typing in FL is novel
- Assumptions are moderate given the scope of the paper
Weaknesses
Some weaknesses are explored further inside Questions part.
- Overall theoretical motivation reads weak and proofs are not novel
- TensorFlow Federated already defines typed computations, so what exactly the proposed language propose practically is not clear.
- Writing-wise, the high-level proof ideas are not articulated properly and theoretical contributions(Theorem/Proposition results) could be clearer
- Possible assumption mismatch in Proposition 5
- Multi-local step support is not clear
Questions
- (multi-local steps) How is FedAvg with local steps > 1 handled? That is, the base iterative class carries cross-round information via shared state, and the differentiable part covers one aggregated gradient per round with a server aggregation. If we have local SGD steps > 1, we maintain the locally updated model inside the round before averaging. This should imply that the local state should be transient across local steps. How is this expressed or outside the scope of the work?
- (Proposition 5) Prop.5 concludes that under certain conditions Propositions 1-3 extend to \sigma^{+}, but virtual-global consistency is not among them. I believe this is missing or proposition 3 should be dropped.
- In Examples 1 & 2 of Appendix G, the per-record gradient is an element-wise product of two federated tensors of different non-record rank. Def17 is shared vs shared and Def 31 is federated vs shared. Neither provides federated vs. federated broadcasting. Def 23, federated vs federated however requires equal local shapes. As the residual is federated and not shared (per-record), no broadcasting rule for this case. Are you trying to utilize client-local primitive under Proposition 5?
- Could you clarify how exactly the typed language is different from TFF’s Federated Core? An example over comparison between concrete computation and TFF’s system treats differently beyond X^{T}X could be nice.
Limitations
Yes, limitations are mentioned
Final justification
I have read the rebuttal and discussions, and increased my overall score based on the additional information provided by authors.
Formatting concerns
No major issues, however, the example illustrations(G.1) in the Appendix G should have been moved to the main paper instead. More explained in the Weaknesses section.
3 comments
Rebuttal
Response to reviewer 2 (zwkw)
We thank the reviewer for the precise questions. They identify one formal omission (Proposition 5 lacks a premise needed for virtual-global consistency) and one important scope clarification about transient local training and the base two-sort calculus. We address both below.
Q1: FedAvg with multiple local steps; transient local state. A round of FedAvg with fixed local SGD steps contains one server synchronization. At the semantic factorization level, client starts from shared , computes transient iterates using only , and sends only or its delta. For nonempty participating clients (empty clients contribute ), weighted averaging factors as , , . So, the local steps belong to one encoder; Theorem 3 counts the server synchronizations. Applying Theorem 3 times would instead introduce communication rounds.
The important qualification is that the submitted two-sort syntax has no fixed-shape client-local summary/state sort. Ρecord-axis reduction produces shared state, not a private local model. In the proposed extension, the encoder's output shape is fixed independently of , but its local running time may depend on and ; it may not read another client's data, expose intermediate local state, or retain it after the round. General FedAvg is therefore a valid one-round semantic factorization but is not expressible in the base calculus. We will add a transient-local-encoder extension whose state is created and discarded within a round and whose output is a fixed-shape mergeable message. It preserves client-locality, exposure discipline, and factorization. Because general FedAvg is partition-dependent, it does not preserve the current virtual-global-consistency theorem against evaluation on the concatenated tensor. Persistent client variables across rounds (e.g., SCAFFOLD/FedDyn control state) require a further local-state sort and revised iterative semantics. This is the same boundary described in our response to kK9C.
Revision (after Theorem 3; new appendix "Transient intra-round state"): we will distinguish (i) the virtual-global-consistent base class, (ii) transient local encoders such as -step FedAvg/FedProx, which preserve factorization but not generally virtual-global consistency, and (iii) persistent private cross-round state.
Q2: Proposition 5 and virtual-global consistency. The reviewer is correct: as written, the hypotheses establish the locality/exposure conditions, but do not state the ordinary-semantics agreement needed for Proposition 3. The proof then refers to that agreement as an assumption. We will correct the relevant part of the proposition rather than drop Proposition 3.
For each added client-local primitive , besides uniform client-locality, we will require a well-defined ordinary interpretation and , where for federated inputs and for shared inputs. For an added shared-only primitive, its distributed and ordinary shared semantics must coincide. Under these premises, client-locality, exposure discipline, and virtual-global consistency all extend by structural induction.
The extension remains conservative only if an added primitive with at least one federated input returns a federated value. It may enrich local encoders (projections, row-wise maps, convolutions, record-aligned broadcasting) or shared-only decoders (shared matrix multiplication/solve), but it may not create a new federated-to-shared path. Any such new path requires its own fixed-dimensional merge law and a corresponding extension of the one-round/iterative program definitions.
Revision (appendix "Conservative extensions of the primitive signature"): Proposition 5 will include the ordinary interpretation and displayed virtual-global equation, and its proof will invoke that premise explicitly.
Q3: Federated-federated broadcasting in Examples 1-2. The reviewer is also correct that the displayed residual-feature products are not derivable from the minimal federated-federated element-wise rule, which requires equal local shapes. The examples intended to use a record-aligned client-local extension, but did not say so. We will write the operation explicitly as per-record scalar-to-feature broadcasting (equivalently, treat the complete residual-feature product as a client-local primitive). It returns a federated tensor, performs no cross-client access, and its virtual global value is the ordinary broadcasted product; hence it satisfies the corrected Proposition 5.
Revision (appendix "Learning examples"): both examples will name this extension before using it, and the conservative-extension appendix will list record-aligned federated broadcasting as an example. This is a clarification/correction to the examples, not a new federated-to-shared primitive.
Q4: Difference from TFF Federated Core and practical purpose. TFF and our language operate at different levels. TFF types placement (, ) and supplies intrinsics such as map, broadcast, and sum; programmers explicitly compose client/server computations and communication. Our types additionally track the record axis inside a tensor and prove that every admitted centralized-style tensor program (i) stays client-local until a designated record-axis elimination, (ii) agrees with ordinary evaluation on the virtual global tensor, and (iii) mechanically yields a fixed-dimensional encode-merge-decode factorization. We do not claim that TFF cannot express the same algorithms; the difference is what is inferred and guaranteed from the source expression.
The anonymous Federated Tensor Algebra (FeTA) implementation (https://anonymous.4open.science/r/FederatedAlgebra) makes this difference concrete. FederatedTensor and SharedTensor wrap NumPy/PyTorch-like tensors. Ordinary operations remain local; a record-axis reduction or permitted federated-federated contraction invokes the aggregation service and returns a shared wrapper. For example:
def cov(x: FederatedTensor, y: FederatedTensor):
mx, my = x.mean(), y.mean()
return ((x - mx) * (y - my)).mean()
The two means become shared, subtraction/broadcast and multiplication remain client-local, and the final mean is another record-axis elimination. An equivalent TFF computation is possible (see our response to Reviewer 3, W4), but the programmer explicitly stages the local maps, federated reductions/broadcasts, and their dependency; FeTA infers those boundaries from record-axis semantics. This comparison does not claim fewer logically necessary communication phases.
We evaluated five executable tasks against Flare, Flower, Ray, Syft, and TFF under one controlled generation-and-validation protocol; every output matched the same centralized reference. Across five executable tasks, FeTA and five frameworks matched the same centralized references under one controlled protocol:
Logical Lines of Code (LLOC - lower is better)
| Task | FeTA | Flare | Flower | Ray | Syft | TFF |
|---|---|---|---|---|---|---|
| K-Means | 48 | 147 | 149 | 65 | 56 | 55 |
| LR | 38 | 124 | 135 | 65 | 59 | 54 |
| Hist | 35 | 119 | 106 | 40 | 40 | 36 |
| Stats | 42 | 138 | 127 | 56 | 90 | 52 |
| GLMM | 134 | 272 | 288 | 155 | 139 | 148 |
Maintainability Index (MI - higher is better)
| Task | FeTA | Flare | Flower | Ray | Syft | TFF |
|---|---|---|---|---|---|---|
| K-Means | 46.64 | 31.38 | 26.42 | 42.22 | 44.14 | 43.8 |
| LR | 48.43 | 33.08 | 28.94 | 39.87 | 41.44 | 41.76 |
| Hist | 48.96 | 32.99 | 33.62 | 46.2 | 46.33 | 47.2 |
| Stats | 44.98 | 28.14 | 28.31 | 37.05 | 29.02 | 37.76 |
| GLMM | 27.4 | 17.02 | 14.6 | 23.71 | 26.49 | 24.22 |
FeTA has the lowest LLOC and highest MI against all five baselines on every task. LLOC/MI are programming-complexity proxies, not runtime or developer-productivity measurements. We will add a new appendix Implementation and empirical evaluation describing the AST analyzer, runtime wrappers, backend adapters (including NVFlare), validation protocol, and complete results, with pointers from the Introduction and TFF related work.
Technical novelty and proof intuition. We agree that the main text should explain the insight rather than rely on appendix proofs. The proof techniques are structural; the contribution is the resulting semantic characterization. Propositions 1-3 establish, respectively, uniform client-local realizability, the only legal federated-to-shared boundaries, and agreement with centralized tensor semantics. Theorem 1 then reads one encoder and certified merge from every such boundary and composes their product state with the shared-only decoder. Theorem 2 closes the language-realizable converse; Theorem 3 identifies the persistent-memory boundary by showing that every round retains the same factorization while only shared tensors cross rounds. We will add this roadmap after Theorem 1, move the key aggregation rule and an early mean example to the main text, and point to the effective-extraction and state-dimension results described in our response to kK9C. This is why the result is more than a restatement of placement types: record-axis typing yields centralized semantic consistency and a constructive communication structure.
Taken together, these revisions separate a correction (the missing Proposition 5 premise and the unannounced broadcast extension) from scope clarifications (multi-local-step training) and supporting evidence (FeTA). They leave the submitted theoretical core intact while making its guarantees, limits, constructive content, and practical programming consequence directly checkable.
Rebuttal
We've carefully addressed your feedback in our response. Should you have any remaining questions before the deadline today, we'd welcome the chance to discuss them further.
We would like to thank you once again for your valuable and constructive feedback, which motivated us to provide an anonymous reference implementation together with an empirical evaluation of its programming complexity. We also included, in our response to Qqav, a simple federated-covariance example illustrating the brevity of the tensor language and its differentiation from TensorFlow Federated's placement-and-orchestration style. Given that the discussion period concludes today, we wanted to follow up and ask whether there is any remaining point that we could clarify or improve. We would be grateful for any further guidance.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 2/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper introduces a typed tensor calculus distinguishing two sorts, federated tensors (client-specific information) and shared tensors (globally available counterpart), with semantics defined relative to a virtual global tensor serving as a centralized reference object. The main contribution is a shared-state factorization theory that every well-typed one-round program decomposes into , where is a client-local encoder, is a commutative merge, and is a shared-only decoder, with the intermediate shared state having dimension independent of the number of clients or total records . The result extends to iterative programs, captures first- and second-order optimization updates, and connects to differential privacy via a privacy-lifting lemma.
Strengths and weaknesses
Quality
Strengths
- The two-sort typing discipline (federated vs. shared) is a clean, minimal, well-motivated design point. The three foundational propositions build on each other: client-locality (Proposition 1), exposure discipline (Proposition 2), and virtual-global consistency (Proposition 3). This layered structure provides an acceptable foundation for the main theorem.
- The main factorization result (Theorem 1, one-round shared-state factorization) is non-trivial and useful, providing a structural guarantee: the of the shared state is fixed independently of and .
- The instantiation to SGD, momentum, Adam (first-order) and Newton, Gauss–Newton, ... updates provides useful corollaries, demonstrating that the type system can instantiate algorithms.
- Theorem 4 (i.e., gradient expressibility) closes a natural question that for any differentiable loss expressible in the language, the gradient of the empirical risk is also expressible. This goes well with the FL framework.
Weaknesses
- Overall, all theorem/proposition statements are too verbose, abstract, generic to be read an understood at first glance...
- Theorem 2 needs a sharper statement of conditions. The converse, that any function admitting a shared-state factorization is representable in the typed language, is inherently the easier direction. However, the precise regularity conditions on , , and especially needs explicit discussion. What class of merge operators is permitted? The optimization corollaries all use summation, suggesting . If this is the only supported merge, the paper should state so as a design choice rather than presenting Theorem 2 as a general converse. If arbitrary commutative operations are allowed, the proof obligations change significantly and should be discussed.
- Theorem 3 is somewhat mechanical. The extension to multi-round programs via inductive re-application of Theorem 1 is natural but raises an important modeling question: how does the type system handle FedAvg-style protocols where each client performs local SGD steps before communicating? Is local multi-step computation modeled as a complex single-round encoder (in which case Theorem 1 suffices), or does it require the iterative machinery of Theorem 3 (one round per local step, creating communication rounds)?
- The paper provides no complexity or dimensionality analysis. The factorization only guarantees existence of fixed-dimensional shared state but provides no bounds on how large may be as a function of the program structure. For first-order methods (i.e., # params), while for second-order methods appears to be . Are these dimensions inherent to the type structure, or could alternative factorizations achieve smaller ?
Clarity
Strengths
- The paper is organized for a theory contribution. The progression is logical from type system → foundational propositions → main factorization theorem → extensions (iterative, gradient, privacy).
Weaknesses
- The formal syntax and inference rules, particularly the typing rule for aggregation, belong in the main body as a compact figure rather than solely in the appendix. For a theory paper, it weakens the self-containedness of the main text.
- The notation is introduced without sufficient discussion. Is this a family of distinct functions, or a single polymorphic definition operating on variable-length inputs via reduction? This distinction matters for understanding what "fixed-dimensional shared state" means operationally; the claim concerns the output dimension of , but the computational cost may still scale arbitrarily with .
- A small worked example is definitely needed at the early page of the paper (e.g., federated mean or one round of FedAvg expressed in the typed language, then mechanically factored into the form) I strongly believe this would ground the formalism and make the main theorem concrete before the general statement.
Significance
Strengths
- While TensorFlow Federated (Bonawitz et al., 2019) introduced federated types with placement decorators (
{T}@CLIENTS,T@SERVER) and theall_equalbit, but provided no formal factorization guarantees. The present paper can be understood as proving that the informal "encode–aggregate–decode" pattern underlying TFF's design is not merely a convention but a theorem: every well-typed federated computation necessarily admits this structure. This seems a meaningful foundational contribution. - The connection to the field calculus / aggregate computing tradition (Viroli et al., 2019; Domini et al., 2026) is acknowledged in the related work, which is appropriate since that community has explored type-theoretic approaches to collective distributed computation with formal guarantees, i.e., full abstraction.
- The gradient expressibility result in Theorem 4, combined with the privacy-lifting lemma, provides an end-to-end story: express a loss → differentiate it within the type system → factorize the gradient computation → apply DP to the aggregate. This pipeline is coherent with FL systems.
Weaknesses
- The practical impact is questioning. The theorems guarantee that factorizations exist, but do not provide an algorithm to extract them. A practitioner writing a federated program must still manually structure code into the encode/aggregate/decode pattern. A constructive version of Theorem 1 (even a sketch showing how to read off from the typing derivation) would dramatically increase impact. Without this, the results remain only descriptive rather than prescriptive.
- The restriction to synchronous star-topology protocols excludes increasingly important FL paradigms: asynchronous FL, peer-to-peer decentralized protocols, and hierarchical aggregation. These limitations should be discussed explicitly.
Originality
Strengths
- The synthesis is novel. While the individual ingredients exist (typed tensor languages, e.g., Dex by Paszke et al., 2021; federated computation frameworks, e.g., TFF and Flower; tensor program theory by Yang, 2019; federated AD by Rush et al., 2024), combining them into a formal factorization theory with precise communication guarantees is a new contribution.
Weaknesses
- Session types for distributed systems (Honda, Vasconcelos & Kubo, 1998; Honda, Yoshida & Carbone, 2008 on multiparty session types; Wadler, 2012 on the propositions-as-sessions correspondence) are a mature tradition using types to guarantee structural properties of distributed protocols. The methodological parallel seems strong: both this paper and the session-types literature use type systems to derive global guarantees. Thus, even a brief discussion should be added.
- Communication complexity lower bounds in distributed statistical estimation (Braverman et al., 2016; Zhang et al., 2013) could contextualize whether the fixed-dimensional shared state guarantee is tight. For instance, is the shared-state dimension for first-order methods optimal, or could a richer type system enable sub-linear communication?
References
- Rush et al., "Federated Automatic Differentiation," JMLR, 2024.
- Bonawitz et al., "Towards Federated Learning at Scale: A System Design," MLSys, 2019.
- Viroli et al., "From Distributed Coordination to Field Calculus and Aggregate Computing," JLAMP, 2019.
- Domini et al., "Fbfl: A Field-Based Coordination Approach for Data Heterogeneity in Federated Learning," LMCS, 2025.
- Paszke et al. (Dex), "Getting to the Point: Index Sets and Parallelism-Preserving Autodiff for Pointful Array Processing," arXiv/POPL, 2021.
- Beutel et al. (Flower), "Flower: A Friendly Federated Learning Research Framework," arXiv, 2020.
- Yang, "Wide Feedforward or Recurrent Neural Networks of Any Architecture Are Gaussian Processes," NeurIPS, 2019.
- Honda, Vasconcelos & Kubo, "Language Primitives and Type Discipline for Structured Communication-Based Programming," ESOP, 1998.
- Honda, Yoshida & Carbone, "Multiparty Asynchronous Session Types," POPL, 2008.
- Wadler, "Propositions as Sessions," ICFP, 2012.
- Braverman et al., "Communication Lower Bounds for Statistical Estimation Problems via a Distributed Data Processing Inequality," STOC, 2016.
- Zhang et al., "Information-Theoretic Lower Bounds for Distributed Statistical Estimation with Communication Constraints," NeurIPS, 2013.
Questions
- Q1) Is the factorization in Theorem 1 restricted to summation as the merge, or does the type system support a broader class of commutative aggregation operators (e.g., element-wise , concatenation with subsequent reduction)? Please state the precise algebraic requirements on and whether Theorem 2 (converse) holds for the same class.
- Q2) Given a well-typed program, can the triple be extracted algorithmically from its typing derivation? If so, what is the complexity? If the proof is non-constructive, can you comment on the gap between the existential guarantee and practical scenario?
- Q3) For example, how does the type system model FedAvg with local SGD steps per round? Is client-side iteration absorbed into (single round, complex encoder), or does it require applications of Theorem 3's iterative extension (creating communication rounds)? The distinction has concrete implications for communication cost.
- Q4) Can you bound as a function of the typed program's structure? For second-order corollaries with parameters, appears necessary, but is this a lower bound inherent to the type system, or could structured factorizations (e.g., sketched Hessians) reduce ?
- Q5) Can you provide a concrete example of a natural federated computation that is not expressible in the typed language?
Limitations
- While acceptable for a pure theory contribution, the paper provides no implementation or empirical validation. A prototype compiler showing mechanical factorization extraction, or even a case study on a non-trivial FL pipeline, would be definitely needed.
- The formalism is restricted to synchronous star-topology settings, excluding decentralized, asynchronous, peer-to-peer, and hierarchical FL settings. The anchor work of Domini et al. seems to show that aggregate computing primitives can handle such topologies.
- The privacy-lifting result is underdeveloped.
- The factorization bounds communication (fixed-dimensional messages) but says nothing about the computational cost of , which could be arbitrarily expensive; no computational complexity analysis is provided.
- Partial client participation (random subsampling of clients per round), which is standard in practical FL, is not discussed.
Final justification
The authors made improvements during rebuttals. While a critical caveat exists (no support of local step > 1) with other minor weaknesses (lack of comparison with precursors), I believe these can be readily refined in the revised manuscript.
Formatting concerns
- The core typing rules, especially the aggregation rule that drives the entire factorization theory, should appear in the main body as a compact inference-rule figure, not solely in the appendix.
- An early worked example (e.g., federated mean expressed in the language and factored step-by-step) would significantly improve accessibility.
4 comments
Rebuttal
Response to reviewer 1 (kK9C)
We thank the reviewer for the detailed and technically useful assessment. We appreciate the recognition that the one-round theorem is non-trivial and useful, the synthesis is novel, and the differentiability-factorization-privacy pipeline is coherent. The review also identifies places where the submitted version did not make the merge conditions, constructive content, state-size bound, and round semantics sufficiently clear. We answer these points and state the corresponding revisions.
Q1: Merge operators and Theorem 2. We agree that the distinction was not sufficiently prominent: Theorem 1 is not sum-only. Fiber-wise, a record-axis aggregation schema is admissible when there is a commutative monoid such that, for all record-compatible , including empty inputs, , . Equivalently, global aggregation equals the merge of the client-local aggregations for every partition. Only such pairs are admitted as record-axis eliminations in the factorization program class; federated-federated matrix products use ordinary addition. Sum qualifies. Element-wise max qualifies only with an identity in its state domain (e.g., a bottom element; this is absent from unrestricted when empty clients are allowed). Raw concatenation is variable-dimensional and order-sensitive, hence excluded; concatenation followed by a reduction is covered precisely when the composite admits a fixed-dimensional mergeable statistic.
The semantic definition permits any commutative monoid, whereas Theorem 2 is a converse only for the typed-admissible subclass: every component encoder must be denoted by an allowed aggregation or matrix-product expression with its certified merge, and the decoder must be shared-only. It therefore does not claim that every abstract monoid factorization is expressible.
Revision (Sec. 3.2, before the one-round-program definition): we will add the displayed admissibility law and examples, define "typed-admissible factorization", and shorten Theorem 2 to: Every typed-admissible shared-state factorization is induced by a one-round typed program. The detailed realization clauses will remain in the appendix Proofs for shared-state factorizations.
Q2: Constructive extraction. Yes. Once each aggregation primitive carries its merge component, the proof of Theorem 1 is already a syntax-directed extractor; the existential statement obscured this. Traverse the merge-annotated typing derivation once. Structural recursion on a client-local expression yields one uniformly defined family , rather than unrelated functions for each . For , set and read off . For a federated-federated matrix product, set and use addition. Then , -which means that the product state is merged componentwise, using the merge associated with each component- , . With memoization over a shared-subexpression DAG and constant-time primitive-metadata lookup, extraction and its symbolic output are , where is the annotated derivation size. This is extraction complexity, not the evaluation cost of , which may depend on .
Revision (after Theorem 1; proof in the factorization appendix):
Proposition (Effective factorization extraction). From a merge-annotated derivation of a one-round typed program, the factorization of Theorem~1 can be extracted in time and represented in space.
The absence of an implementation in the submission reflected scope, not a non-constructive proof. Since submission, we completed an anonymous FeTA reference implementation (https://anonymous.4open.science/r/FederatedAlgebra). It accepts centralized Python tensor code, performs AST-level record-axis/exposure checks, enforces the same boundary through FederatedTensor/SharedTensor wrappers, and targets execution backends through adapters, including NVFlare. Across five tasks against five existing frameworks, all implementations matched centralized references; FeTA had the lowest logical lines of code (LLOC) and highest maintainability index (MI) in every task. These are code-complexity, not runtime-performance, results. We will summarize them at the end of the Introduction and in a new appendix Implementation and empirical evaluation; see also our responses to zwkw and Qqav.
Q3: Multiple local steps. FedAvg with fixed local steps has one communication round, not applications of Theorem 3. At factorization level, client computes a transient final model from and shared , and, for nonempty participating clients (empty clients contribute ), weighted FedAvg uses , , . Theorem 3 then composes server synchronizations; applying it times would incorrectly describe communications.
However, the submitted two-sort calculus does not contain the local-summary/state construct needed for general local record reductions and transient model updates. So, general FedAvg is a semantic one-round factorization but is outside the base syntax. We will add a factorization-preserving transient-local-encoder extension; it may read only one client's data and shared , retain state only within round , and emit a fixed-shape mergeable message. This preserves client-locality, exposure discipline, and round-wise factorization, but general FedAvg is partition-dependent and therefore does not preserve the present virtual-global-consistency claim. Persistent private state across rounds is a further extension. We will state this after Theorem 3 and formalize the encoder extension in a new appendix Transient intra-round state.
Q4: State dimension and complexity. The extracted state is syntactically bounded. If the shared-state expressions have shapes , with and , then , round-wise. These are exact dimensions of the extracted factorization and upper bounds for the represented computation, not minimum-state or information-theoretic lower bounds. A first-order gradient message has ; momentum/Adam additionally keep persistent shared server state. The curvature-block corollary sends and , hence . Diagonal, block, low-rank, or fixed-sketch curvature can reduce this to or when represented by corresponding mergeable expressions; absent exact structure, this changes or approximates the update.
Let , and let denote encoder, merge, and decoder costs. One-round work is . A streaming fold uses auxiliary space (constant in ); a balanced tree has merge depth. For dense element-wise merges, uplink and total merge work are . No term universally dominates without additional cost assumptions, and fixed message dimension does not bound local work or transmitted bits.
Revision: after Theorem 1 we will add:
Corollary (State dimension). The extracted state has dimension .
We will add the round-wise form, the cost decomposition, and the examples near the learning corollaries.
Q5: Excluded computation. An order-sensitive update whose result changes under a client permutation is not expressible. Every admitted merge is commutative, so every factorized output is client-permutation invariant. Standard exact median/quantile operators are also not admitted unless supplied with a fixed-dimensional mergeable sufficient state. Fixed-accuracy mergeable sketches may be admitted. This non-universality makes the characterization substantive.
Remaining scope and exposition. Partial participation is handled by conditioning round on the sampled finite set and applying Theorem 1 to that federation; sampling is external randomness. Associativity permits hierarchical/tree evaluation of the same merge, so a physical star is not essential. Stale asynchronous execution, order-sensitive arrivals, and peer-to-peer protocols with divergent persistent states remain outside the semantics. Exposure discipline controls only where federated values may become shared; it is neither DP nor cryptographic secrecy. Theorem 5 proves central- and local-DP lifting under its sensitivity/randomizer assumptions; SMPC compatibility is discussed separately.
We will also move the key aggregation typing rule into a compact main-text figure, add an early federated-mean factorization, explain that is one syntax-induced family whose evaluation cost may grow with , and shorten the theorem statements. We will distinguish our tensor-placement/record-axis guarantees from session types, which primarily constrain protocol traces and endpoint compatibility, and position as a constructive coordinate upper bound rather than a communication lower bound. Finally, we will add a dedicated paragraph in Related Work incorporating the suggested references. These revisions make the contribution even clearer: a constructive semantic characterization with specified scope.
Rebuttal
We've carefully addressed your feedback in our response. Should you have any remaining questions before the deadline today, we'd welcome the chance to discuss them further.
Dear authors, sorry for the late response, and appreciate your efforts. I'm happy that most concerns are clearly addressed. I would raise a score accordingly, but there still is room for improvement.
- For Q3,
- The authors concede that general FedAvg is outside the submitted syntax and requires a new construct, and that this extension does not preserve virtual-global consistency (i.e., Proposition 3).
- This imprints me that the flagship FL algorithms in the wild are neither covered by the submitted calculus nor by the full guarantee set of the promised one. (since local steps is one of the critical factors that characterizes the necessity of FL in practice)
- While I fully acknowledge the described extension, please seriously consider narrowing down the paper's scope from federated learning to heterogeneous local SGD (incl. FedSGD) or parallel SGD.
- For the second weakness in the originality subsection,
- While it is optional, I was wondering whether is optimal against communication lower bounds, compared against Braverman et al. and Zhang et al.
- Could you please succinctly answer this? Even one-liner reply would be appreciated.
Thanks again for the author's efforts.
We thank the reviewer for this important observation and agree with the substance of the scope concern. The current title and framing can be read as claiming coverage of federated learning in general, whereas the guarantee applies to the narrower class in which all inter-client dependencies pass through shared state. We will correct this. We propose to change the title to "A Typed Tensor Language for Shared-State Federated Computation" and to use shared-state federated computation, rather than federated learning broadly, throughout the abstract, introduction, and theorem discussion. We think this is helpful in relation to your important remark, because the characterized class also includes non-SGD federated analytics, such as exact means, covariances, and fixed-dimensional sufficient statistics, as well as FedSGD and server-side first- and second-order updates. Importantly, the qualifier shared-state is a genuine restriction: general multi-local-step FedAvg and methods with persistent private client state are not covered by the base calculus and its full virtual-global-consistency guarantee; the transient-local-state construction will be presented only as an extension preserving factorization, not as part of the base result. Concretely, we will add the following scope statement near the beginning of the introduction:
This paper studies shared-state federated computations, not federated learning in general, that is, computations whose inter-client dependence factors through shared tensors of dimension independent of the numbers of clients and records, and whose base-language execution is consistent with evaluation on the virtual global tensor. This class includes federated analytics such as means and covariances and learning procedures such as FedSGD and server-side optimization, but excludes general multi-local-step FedAvg and protocols with persistent private client state.
We thank the reviewer for this valuable connection to Braverman et al. and Zhang et al; adding it will improve the paper’s positioning. We do not claim that is optimal in general. It is the number of real coordinates in the exact factorization extracted from the program, hence a constructive upper bound. Braverman et al. and Zhang et al. instead derive task-specific lower bounds on communicated bits needed to attain a prescribed statistical risk, under certain distributional and protocol assumptions. Consequently, a comparison additionally requires a statistical task, accuracy criterion, and finite-precision/quantization model; an equivalent or approximate factorization may also have smaller dimension than . As a revision, we propose to add the following remark, immediately after the state-dimension corollary:
The dimension is a coordinate upper bound, rather than a communication-optimality result. Relating it to task-specific bit lower bounds requires a precision model; we note this connection to Braverman et al. and Zhang et al., identifying such further comparisons as future work.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
Response to reviewer 3 (Qqav)
We thank the reviewer for the constructive assessment and for recognizing the virtual-global semantics, exact factorization characterization, and record-axis exposure discipline as meaningful contributions. We agree that the submitted version did not sufficiently demonstrate a programming interface or sharply separate semantic exposure, privacy, transient local training, and persistent client state.
W1/W3: Practical validation, type checking, and programming surface. Since submission, we completed an anonymous Federated Tensor Algebra (FeTA) implementation (https://anonymous.4open.science/r/FederatedAlgebra). It embeds the two sorts as
FederatedTensorandSharedTensorwrappers over NumPy/PyTorch-like backends, so users write ordinary Python rather than typing derivations. An AST-level analyzer checks record-axis discipline, permitted exposure, and collective ordering before execution; wrappers re-check placement, shapes, and record-axis effects dynamically. Ordinary tensor operations remain client-local, while only record-axis aggregation or a permitted federated-federated contraction invokes a merge and returns shared state. The current evaluation establishes mechanical realizability and programming complexity.W4: Concrete realistic examples. Federated covariance is written as:
The first two means eliminate record axes and become shared; subtraction/broadcast and the centered product remain client-local; the final mean performs the next merge. An equivalent TFF version is possible, but the programmer sequences it manually:
FeTa was used for complete K-Means, logistic-regression, histogram, a suite of eleven summary statistics, and GLMM workflows. Each implementation was executed and matched a centralized reference. Under a controlled generation-and-validation protocol against Flare, Flower, Ray, Syft, and TFF, FeTA had the lowest logical lines of code (LLOC) and highest maintainability index (MI) for every task. For example, K-Means used 48 LLOC versus 55-149 across baselines, and GLMM used 134 versus 139-288; FeTA's MI was also highest in both cases. These metrics support reduced implementation surface, not runtime superiority or a human-productivity claim; the relevant numerical results appear in our response to zwkw.
Revision (Introduction and new appendix "Implementation and empirical evaluation"): we will describe the Python surface, static/runtime checks, pluggable controller/executor adapters (including NVFlare), all five workflows, validation protocol, and complete LLOC/MI results. This implementation is corroborating evidence that the formal construction is executable; the paper's primary contribution remains the semantic theory.
W2: FedProx, SCAFFOLD, and private state. The review usefully exposes two important points. FedProx, like K-step FedAvg, uses a transient local model within a round and then communicates once. At the factorization level, the entire local optimizer is one encoder. However, the submitted two-sort calculus has no fixed-shape private local-summary/state sort, so general local training is not expressible in the base syntax. We will add a transient-local-encoder extension that preserves client-locality, exposure discipline, and encode-merge-decode factorization. Since multi-step local optimization is generally partition-dependent, it does not preserve the current virtual-global-consistency theorem against a single concatenated tensor.
SCAFFOLD and FedDyn additionally maintain client-specific variables across rounds. Those require a persistent local-state sort, participation-aware lookup/update rules, and a revised iterative semantics; they are not claimed as conservative instances of the base language. FeTA's adapter architecture is designed to let such algorithms coexist with tensor-algebra components in an external framework, but that engineering interoperability is not a formal expressibility result. We will make this three-way difference cleaer after Theorem 3 and in Discussion; see also our responses to kK9C and zwkw.
W5/W6: Exposure discipline versus privacy. Exposure discipline is a static semantic boundary: a federated tensor can become shared only through a designated record-axis-elimination primitive. It does not bound what an allowed shared statistic reveals, and it is not differential privacy, cryptographic confidentiality, secure aggregation, or protection against inference.
The deterministic base language therefore has no intrinsic privacy guarantee. Theorem 5 is a lifting theorem: under its stated adjacency, sensitivity, and randomizer assumptions, noise applied to the merged state yields central DP after decoding, and independently randomized client messages yield the stated local-DP guarantee. SMPC/secure aggregation compatibility is discussed separately: a secure protocol may realize the same merge under its own threat model. Revealing an unnoised state is not repaired by later post-processing. We will move this guarantee/non-guarantee distinction into the main text and sharpen the privacy appendix accordingly.
W7/W8: Excluded computations and their practical relevance. The unconditional exclusion is any order-sensitive/non-commutative protocol: a commutative merge makes every output invariant to client permutation. Computations requiring state that grows with the data, such as standard exact kernel constructions retaining all support records, are also outside the fixed-dimensional class. Standard exact median/quantile operators are not admitted unless one supplies a fixed-dimensional mergeable sufficient state; fixed-accuracy mergeable sketches may be added and remain within the framework.
These exclusions are practically meaningful but delimited. Persistent private state affects heterogeneous-FL methods such as SCAFFOLD/FedDyn; transient local training covers a different and broader family once the extension above is admitted. Holistic analytics often use mergeable sketches when approximation is acceptable, while exact record-growing methods remain outside.
W9/W10: Gradients, DrJAX, and Federated Automatic Differentiation (AD). The present theory and prototype do not perform automatic differentiation. The user supplies a client-local expression for the per-record gradient; Theorem 4 proves that record-axis summation represents the global empirical gradient, and the ensuing optimizer corollaries place the resulting updates in the typed factorization. The repository's logistic-regression workflow is a complete example.
DrJAX and Federated AD address the complementary problem of differentiating distributed/MapReduce-style programs automatically. Our result instead assumes an expressible per-record gradient and proves record-axis typing, virtual-global agreement, fixed-dimensional factorization, and compatibility with shared-state privacy mechanisms. We will state this point in the differentiable-systems related work.
W11: Intended contribution. Yes: the primary contribution is a formal semantic foundation between application algorithms and execution frameworks. Its novelty is the combination of record-axis types, virtual-global consistency, exposure discipline, and a two-way characterization of language-realizable fixed-dimensional shared-state computations. FeTA is a reference realization of that foundation, without claiming that this theory paper contributes a fully optimized FL runtime.
W12: Required extensions. We will distinguish three categories. (1) Additional client-local or shared-only primitives preserve all base guarantees when they satisfy the corrected Proposition 5, including an explicit ordinary-semantics/virtual-global premise; the broadcasting correction discussed in our response to zwkw is of this kind. (2) Transient local-summary state for FedAvg/FedProx preserves locality, exposure, and factorization, but not generally virtual-global consistency. (3) Persistent private state for SCAFFOLD/FedDyn requires a third sort and new cross-round semantics; it does not relax exposure discipline, because the state remains private, but it extends what may persist. User-facing syntax and execution support now exist through FeTA; automatic differentiation, persistent-state typing, and runtime optimization remain separate extensions.
Revision summary. We will add the implementation appendix and main-text pointers; clarify the three state regimes after Theorem 3; state the privacy non-guarantees in Sections 2 and 5; list excluded classes conditionally and discuss their relevance; state that gradients are currently supplied manually; expand the DrJAX/Federated-AD comparison; and sharpen the Introduction/Discussion to identify the paper as a semantic foundation with an executable reference surface.
These changes answer the applicability concern without changing the basis of the submission. The theory supplies the formal novelty, the corrected scope statements prevent overclaiming, and the anonymous implementation demonstrates that the constructive discipline can be embedded in ordinary Python and existing federated infrastructure.