SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.14513 · NeurIPS · 2020

Group Knowledge Transfer: Federated Learning of Large CNNs at the Edge

Chaoyang He, Murali Annavaram, Salman Avestimehr

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-21; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2007.14513.json · badge: /api/ran/2007.14513.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
vinuni-vishc/feddct community
Papers with Code archive
3 ran · 1 no recorded run
FunctionStatusWhere it lives
KL_Loss Ran
ran on a synthesized input
vinuni-vishc/feddct/fedml_api/distributed/fedgkt/GKTServerTrainer.py
code served (permissive licence) · get_code("8809d87803cd8180")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn
import torch.nn.functional as F

class KL_Loss(nn.Module):

    def __init__(self, temperature=1):
        super(KL_Loss, self).__init__()
        self.T = temperature

    def forward(self, output_batch, teacher_outputs):
        output_batch = F.log_softmax(output_batch / self.T, dim=1)
        teacher_outputs = F.softmax(teacher_outputs / self.T, dim=1) + 10 ** (-7)
        loss = self.T * self.T * nn.KLDivLoss(reduction='batchmean')(output_batch, teacher_outputs)
        return loss


INIT_ARGS = {
    'temperature': 3.0
}

ARGS = {
    'output_batch': torch.randn(2, 4),
    'teacher_outputs': torch.randn(2, 4)
}

if __name__ == '__main__':
    model = KL_Loss(**INIT_ARGS)
    result = model(**ARGS)
    print(f"Loss output: {result}")
    print(f"Loss shape: {result.shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RunningAverage Ran
ran on a synthesized input
vinuni-vishc/feddct/fedml_api/distributed/fedgkt/GKTServerTrainer.py
code served (permissive licence) · get_code("e308ac4a9f1743b6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

class RunningAverage:
    """A simple class that maintains the running average of a quantity

    Example:
    
    loss_avg = RunningAverage()
    loss_avg.update(2)
    loss_avg.update(4)
    loss_avg() = 3
    
    """

    def __init__(self):
        self.steps = 0
        self.total = 0

    def update(self, val):
        self.total += val
        self.steps += 1

    def value(self):
        return self.total / float(self.steps)


INIT_ARGS = {}

ARGS = {
    'val': 2.5
}

METHOD = 'update'


if __name__ == '__main__':
    # Construct the instance
    instance = RunningAverage(**INIT_ARGS)
    
    # Call update multiple times
    instance.update(2)
    instance.update(4)
    instance.update(6)
    
    # Get the running average
    result = instance.value()
    print(f"Running average: {result}")
    print(f"Expected: 4.0")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vinuni-vishc/feddct/fedml_api/distributed/fedgkt/GKTServerTrainer.py
code served (permissive licence) · get_code("edeed3edc9c8355b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function expects:
# - output: a tensor with shape (batch_size, num_classes) that supports .topk() and .size()
# - target: a tensor with shape (batch_size,) that supports .size(), .view(), .expand_as()
# - topk: a tuple of integers

batch_size = 2
num_classes = 4

# Create output tensor (logits/scores): shape (batch_size, num_classes)
output = torch.randn(batch_size, num_classes)

# Create target tensor (class indices): shape (batch_size,)
target = torch.tensor([0, 2])

# topk parameter
topk = (1, 2)

ARGS = {
    "output": output,
    "target": target,
    "topk": topk
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
GKTServerTrainer Not yet run
unverified (harvested, no recorded run)
vinuni-vishc/feddct/fedml_api/distributed/fedgkt/GKTServerTrainer.py
code served (permissive licence) · get_code("2f62c363e1a20bdc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Scaling up the convolutional neural network (CNN) size (e.g., width, depth, etc.) is known to effectively improve model accuracy. However, the large model size impedes training on resource-constrained edge devices. For instance, federated learning (FL) may place undue burden on the compute capability of edge nodes, even though there is a strong practical need for FL due to its privacy and confidentiality properties. To address the resource-constrained reality of edge devices, we reformulate FL as a group knowledge transfer training algorithm, called FedGKT. FedGKT designs a variant of the alternating minimization approach to train small CNNs on edge nodes and periodically transfer their knowledge by knowledge distillation to a large server-side CNN. FedGKT consolidates several advantages into a single framework: reduced demand for edge computation, lower communication bandwidth for large CNNs, and asynchronous training, all while maintaining model accuracy comparable to FedAvg. We train CNNs designed based on ResNet-56 and ResNet-110 using three distinct datasets (CIFAR-10, CIFAR-100, and CINIC-10) and their non-I.I.D. variants. Our results show that FedGKT can obtain comparable or even slightly higher accuracy than FedAvg. More importantly, FedGKT makes edge training affordable. Compared to the edge training using FedAvg, FedGKT demands 9 to 17 times less computational power (FLOPs) on edge devices and requires 54 to 105 times fewer parameters in the edge CNN. Our source code is released at FedML (https://fedml.ai). Federated Learning. Existing FL methods such as FedAvg [6], FedOpt [26], and FedMA [8] face significant hurdles in training large CNNs on resource-constrained devices. Recent works FedNAS [27, 3] and [28] work on large CNNs, but they rely on GPU training to complete the evaluations. Others [29,30,31,32,33,34,35,36,37] optimize the communication cost without considering edge computational limitations. Model parallelism-based split learning [11,12] attempts to break the computational constraint, but it requires frequent communication with the server. Knowledge Distillation (KD). We use KD [19] in a different manner from existing and concurrent works [38,39,40,41,42,43,44,45]. Previous works only consider transferring knowledge from a large network to a smaller one [19,20,21,22], or they transfer knowledge from a group, but each member in the group shares the same large model architecture or a large portion of the neural architecture with specific tail or head layers [46,47,48,49,50,51]. Moreover, all teachers and students in distillation share the same dataset [50,52,53,54], while in our setting each member (client) can only access its own independent dataset. Previous methods use centralized training, but we utilize an alternating training method. Efficient On-device Deep Learning. Our work also relates to efficient deep learning on edge devices, such as model compression [55,56,57], manually designed architectures (MobileNets [58], ShuffeNets [59], SqueezeNets [60]), or even efficient neural architecture search (EfficientNets [4], FBNet [61]). However, all of these techniques are tailored for the inference phase rather than the training phase.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2007.14513")
get_code_for_paper("2007.14513")
have("2007.14513")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2007.14513.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2007.14513.svg)](https://syntology.ai/paper/2007.14513)

Connect an agent — have() is free.