
STRUCTURES:

The main files are located in "./PriRFed". Call it PATH for short.
In PATH, there are 9 folders (data, PCAsyn, PCAMNIST, PCAPATHMNIST, PCAsyn_EucvsRie, PCAsyn_compar, FMSyn, FMPATHMNIST, HSPWordNet) and 9 function
files of matlab.

Folders: 
-----
*) each folder (as its name implies) except from ``data'' includes the Matlab scripts reproducing the results corresponding to the experiments 
   in this paper. 
-----
*) In PATH/PCAsyn_EucvsRie, FedAvg is the combination of FedAvg [MMRH23] and the orthogonal projection, which is used in agents for each stochastic 
   gradient update and in the server for aggregation. 
-----
*) In PATH/PCAsyn_compar, RFedProj is drawn from [ZHSJ24], and RFedAGS from [HHJM24]. 
-----


(Note that in PATH/data/: providing the MNIST (MNIST.dat), PATHMNIST (RI.dat), and WordNet (mammal_closure.csv) datasets.)

Functions:
-----
*) PATH/PriRFed.m  : the implementation of Private Riemannian Federated Learning.
-----
*) PATH/DPRSGD.m   : the implementation of Riemannian Stochastic Gradient method with Differential privacy [HMJG24].
-----
*) PATH/DPRSVRG.m  : the implementation of Riemannian Stochastic Variance Reduced Gradient method with Differential privacy [ZHSJ24].
-----
*) PATH/clipping.m : the implementation of the clipping operator.
-----
*) PATH/agent_Prob_PCA.m : the implementation of constructing the problem of minimization of the PCA function on the Stiefel manifold.
-----
*) PATH/agent_Prob_FM.m  : the implementation of constructing the problem of computing Frechet mean of points on the SPD manifold.
-----
*) PATH/agent_Prob_HSP.m : the implementation of constructing the problem of hyperbolic structured predictioin over the hyperbolic manifold. 
-----
*) PATH/tangentSpaceGaussianSample.m : the implementation of Gaussian noise on the tangent space.
-----

Others: 
*) "manopt" is a Riemannian optimization toolbox [BMAS14]. The Riemannian operations in our code mostly are based on this toolbox. 


HOW TO RUN THE CODE:

*) Run importDir.m to import all the necessary directories.
*) Run all of the testing file to conduct the same experiments as that in the paper.

It is provided for educational/researrch purpose only. 
Please cite our paper if you found the software useful for your work.

If you have any questions, please contact:
Wen Huang: wen.huang@xmu.edu.cn
and
Zhenwei Huang: zwhhuang@stu.xmu.edu.cn



by Zhenwei Huang

----------------------------------------------------------------------------------------------------------------
[MMRH23] McMahan, H.B., Moore, E., Ramage, D., and Hampson, S., Arcas, B.A.: Communication-efficient learning of deep networks 
	 from decentralized data. arXiv preprint, 2023.

[HMJG24] Han, A., Mishra, B., Jawanpuria, P., and Gao, J.: Differentially private Riemannian optimization. Machine Learning, 113(3), 
	 1133–1161, 2024.

[UHJM23] Uptake, S., Han, A., Jawanpuria, P., Mishra, B.: Improved differentially private Riemannian optimization: Fast sampling 
	 and variance reduction. Transactions on Machine Learning Research, 2023.

[ZHSJ24] Zhang, J., Hu, J., So, A. M. C., and Johansson, M.: Nonconvex federated learning on compact smooth submanifolds with 
 	 heterogeneous data. In Aduances in Neural Information Processing Systems (NeurIPS), 2024.

[HHJM24] Huang, Z., Huang, W., Jawanpuria, P., and Mishra, B.: Riemannian federated learning via averaging gradient stream. 
 	 ArXiv abs/2409.07223, 2024.

[BMAS14] Boumal, N., Mishra, B., Absil, P. A., and Sepulchre, R.: Manopt, a Matlab toolbox for optimization on manifolds. 
	 Journal of Machine Learning Research, 15(1):1455-1459, 2014.



