오늘은 Federated Learning에 간략하게 살펴보겠다.
최근 Mobile device가 점차 증가함에 따라, Mobile device에 딥러닝을 결합한 application이 현재 개발 중에 있다. Mobile device의 예시는 다음과 같다.
기존 AI algorithm은 data를 single machine/server data에 올려놓는 방식으로 동작한다.
그러나 각 개인이 소유하고 있는 mobile device의 data를 data center(single machine/server)에 올려놓는 것은 몇 가지 문제점이 존재한다.
어떠한 문제점이 존재할까?
Mobile device가 가지는 정보를 사용 하는 데 privacy issue가 존재
Figure 1. Google GBoard
Google GBoard를 사용할때, 유저들의 채팅 기록이 남음(e.g., url message)
Data전체를 data center(server)에 올려놓는 방식으로 사용 → privacy issue
환자 임상 데이터 → 환자 개인정보를 유출 할 수 있음 → privacy issue
Data양이 방대하다. → increasing cost
Smart phone에 저장되어 있는 사진첩을 예로 들면, 각 개인(client)이 소유하고 있는 사진 전체를 data center(server)에 올려 놓고 사용하기엔 비용이 많이 든다.
본 연구에서는 decentralized network를 기반으로 한 Federated learning을 제안함과 동시에, 기존 연구의 문제점을 해결하는데 중점을 두었다. Federated learning이란, data를 data center에 업로드하지 않고, shared(global) model을 학습하는 방법을 의미한다.
아래 그림은 Federated learning의 예시이다.
Figure 2. https://medium.com/tensorflow/introducing-tensorflow-federated-a4147aa20041
이때, 각 client는 local data을 가지고 있으며, 이 data는 data center(server)로 보내지 않고 local 환경에 둔다. → data를 서버로 보내지 않고 local에서 model을 학습시킨 다음, weight 정보만 data center(server)로 전달하기 때문에 privacy issue 해결함.
Federated learning 동작 과정은 다음과 같다.
각 client가 소유한 local data의 weight 값을 계산(A) → 여러 local data의 weight를 aggregation(B) → shared(global) model로 transfer(다른 말로 focused collection[C])
Federated Learning은 몇가지의 특성을 지닌다. 특성은 다음과 같다.
Non-IID
Unbalanced
Massively distributed
Federated learning (Non-IID setting)
는 client 수를 의미하며, 각 client별 loss는 로 표현 가능하다.
즉, data는 명의 client에게 분산되어 있으며, 는 k번째 client가 소유한 data 집합을 의미한다.
각 client가 소유한 data수는 다르기 때문에 term을 추가하여 를 계산한다.
( = )
만약 각 local data가 서로 IID를 띤다고 가정해보면, 와 같다. (일반적으로 사용하는 수식)
다음은 본 연구에서 제안한 Federated Averaging algorithm에 대해 간략히 살펴보도록 하겠다.
Figure 3. FederatedAveraging Pseudo code
Notation
알고리즘 설명
만약 1000명의 client가 있다고 가정해보자. 이때 C(the fraction of clients)를 0.1로 둔다면, 매 round마다 100명의 client를 추출하여 학습을 진행하게 된다.
Server executes
Advances and Open Problems in Federated Learning[.,2021]
Federated learning을 살펴보면 Distributed learning과 비슷해 다소 비슷해 보이나, Federated learning은 Distributed learning과 차이가 존재한다. 어떤 차이가 있는지 살펴보도록 하겠다.
Distributed learning
Federated learning