Hi all,
I’m actually trying to implement an Algorithm that i found by reading the paper Robust and Communication-Efficient Federated Learning from Non-IID Data by [Simon Wiedemann] [Klaus-Robert Müller] [Wojciech].
I wanted to try to implement it inside the simple_fedavg offered by Tensorflow Federated. I have actually already created the algorithm and seems to works fine in test case, the real problem is to put it inside the simple_fedavg project. I don’t get where i could change what the client send to the server and what the server expect to recieve.
So, basically, from client_update i don’t want to send weights_delta, but instead i want to send a simple list like [ [list of negatives indexes] [list of positives indexes] [average value] ], then on the server side i will recreate the weights like explained in the paper. But i can’t understand how to change this behaviour.
English is not my main language, so i hope i have explained the problem good enough.
  test = weights_delta.copy()
  for index in range(len(weights_delta)):
      original_shape = tf.shape(weights_delta[index])
      tensor = tf.reshape(test[index], [-1])
      negatives, positives, average = test_stc.stc_compression(tensor, sparsification_rate)
      test[index] = test_stc.stc_decompression(negatives, positives, average, tensor.get_shape().as_list(), original_shape)
      test[index] = test_stc.stc_compression(tensor, sparsification_rate)
      
  client_weight = tf.cast(num_examples, tf.float32)
  return ClientOutput(test, client_weight, loss_sum / client_weight)

This is the behaviour that i would like, stc_compression return a tuple. Then i would like to access to each “test” variable sent from a client inside the server and recreate all the weights.