代写program、代做Java语言程序
page 1 of 4
University of Aberdeen
School of Natural and Computing Sciences
Department of Computing Science
2024 – 2025
Programming assignment – Individually Assessed (no teamwork)
Title: JC4001 – Distributed Systems Note: This assignment accounts for 30% of
your total mark of the course.
Learning Outcomes
On successful completion of this component a student will have demonstrated to be able to:
• Understand the principles of federated learning (FL) in distributed systems and how it
differs from centralized machine learning.
• Implement a basic federated learning in distributed systems for image classification using
the MNIST dataset.
• Simulate a federated learning environment in distributed systems where multiple clients
independently train models and the server aggregates them.
• Explore the effects of model aggregation and compare with centralized training.
• Evaluate the performance of the FL model under different conditions, such as non-IID data
distribution and varying number of clients.
Information for Plagiarism and Collusion: The source code and your report may be submitted for
plagiarism check. Please refer to the slides available at MyAberdeen for more information about
avoiding plagiarism before you start working on the assessment. The use of large language
models, such as ChatGPT, for writing the code or the report can also be considered as plagiarism.
In addition, submitting similar work with another student can be considered as collusion. Also read
the following information provided by the university:
https://www.abdn.ac.uk/sls/online-resources/avoiding-plagiarism/ page 2 of 4
Introduction
In this assignment, your task is to build a federated learning (FL) algorithm in a distributed system.
FL is a distributed approach to train machine learning models, designed to guarantee local data
privacy by training learning models without centralized datasets. As shown in Fig. 1, the FL structure
should include two parts. The first part is an edge server for model aggregation. The second part
should include several devices, and each device has a local dataset for local model updating. Then,
each device transmits the updated local model to the edge server for local model aggregation.


Figure 1. Illustration of the FL structure.


General Guidance and Requirements
Your assignment code and report must conform to the requirements given below and include the
required content as outlined in each section. You must supply a written report, along with the
corresponding code, containing all distinct sections/subtasks that provide a full critical and reflective
account of the processes undertaken.
This assignment can be done in Python/PyCharm on your own device. If you work on your own device,
then be sure to move your files to MyAberdeen regularly, so that we can run the application and
mark it.
Note that it is your responsibility to ensure that your code runs on Python/PyCharm. By default,
your code should run by directly clicking the “run” button. If your implementation uses some other
command to start the code, it must be mentioned in the report.
Submission Guideline. After you finish your assignment, please compress all your files in a
compressed file and submit it in MyAberdeen (Content -> Assignment Submit -> View Instructions ->
Submission (Drag and drop files here)) page 3 of 4
Part 1: Understanding Federated Learning [5 points]
1. Read the Research Paper: You should read a foundational paper on federated learning, such
as Communication-Efficient Learning of Deep Networks from Decentralized Data by
McMahan et al. (2017).
2. Summary Task: Write a 500-word summary explaining the key components of federated
learning (client-server architecture, data privacy, and challenges like non-IID data). [5 points]


Part 2: Centralized Learning Baseline [15 points]
1. Implement Centralized Training: You should implement a simple neural network using a
centralized approach for classifying digits in the MNIST dataset. This will serve as a
baseline.
o Input: MNIST dataset. [5 points]
o Model: A basic neural network with several hidden layers. [5 points]
o Task: Train the model and evaluate its accuracy. [5 points]

Part 3: Federated Learning Implementation [30 points]
1. Simulate Clients: Split the MNIST dataset into several partitions to represent data stored
locally at different clients. Implement a Python class that simulates clients, each holding a
subset of the data. [10 points]
o Task: Implement a function to partition the data in both IID (independent and
identically distributed) and non-IID ways.
2. Model Training on Clients: Modify the centralized neural network code so that each client
trains its model independently using its local data. [5 points]
3. Server-Side Aggregation: Implement a simple parameter server that aggregates model
updates sent by clients. Use the Federated Averaging (FedAvg) algorithm: [10 points]
o Each client sends its model parameters to the server after training on local data.
o The server aggregates these parameters (weighted by the number of samples each
client has) and updates the global model.
4. Communication Rounds: Implement a loop where clients train their local models and the
server aggregates them over multiple communication rounds. [5 points]

Part 4: Experimentation and Analysis [20 points] page 4 of 4
1. Experiment 1 - Impact of Number of Clients: [10 points]
o Vary the number of clients (e.g., 5, 10, 20) and evaluate the accuracy of the final
federated model.
o Plot the training accuracy and loss over communication rounds for each case.
2. Experiment 2 - Non-IID Data: [10 points]
o Modify the data distribution across clients to simulate a non-IID scenario (where
clients have biased or skewed subsets of the data).
o Compare the performance of the federated learning model when clients have IID
data vs. non-IID data. Plot the accuracy and loss over communication rounds for
both cases.
Part 5: Performance Comparison with Centralized Learning [5 points]
• Compare the federated learning model (both IID and non-IID) to the centralized learning
baseline in terms of:
o Final accuracy
o Number of epochs/communication rounds needed to converge

Requirements and Marking Criteria for the Project Report [25 points]
You should write a report. Your report should describe the overall design of the federated learning
in distributed system, as well as the challenges faced during programming federated learning.
The marking criteria for the report is the following:
• Structure and completeness (all the aspects are covered) [5 points].
• Clarity and readability (the language is understandable) [5 points].
• Design explained [5 points].
• Challenges discussed [5 points].
• References to the sources [5 points].

Submission
You should submit the code and the report in MyAberdeen, using the Assignment Submit linked in
MyAberdeen for the coursework assignment. The deadline is 22 December 2024. Please do not be
late than the deadline.

热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图