Comments (2)
Thanks for the question, minfree123.
What is Host / Guest / Arbiter?
Host / Guest / Arbiter are roles. A role is a logical representation of one Federated Learning (hereinafter referred to as FL) participant in a FL algorithm.
Let's take Vertical (i.e. 'Hetero' or 'Heterogeneous') LR algorithm as an example.
The complete dataset is a matrix X ∈ Rn×d. This matrix does not exist in one place but is composed of the columns of the datasets A and B held respectively by A and B . B also holds the label vector Y.
Then we can decompose W⊤x as: W⊤x = W⊤aXa + W⊤bXb. Party A and Party B is supposed to cooperate to get the federated W⊤x and update model parameters W further.
In our algorithm implementation, the party in possess of Y is named 'Guest' in algorithm, and this party has 'Guest' as its role name. Similarly, 'Host' is the party with Xa but WITHOUT Y, 'Arbiter' is the party to perform decryptions for Guest and Host.
To sum up, Host / Guest / Arbiter are roles, and roles are symbols of different FL algorithm parties.
What is a proxy?
Proxy is the networking communication endpoint for one FL party. Generally you can think of it as an application-layer router.
Proxy is connected to Federation Service only at current version.
How to configure a route_table?
route_table.json defines communication rules among FL parties. For now, it is a file-based configuration. If a guest needs to send data to a Host, it must find the corresponding rule in route_table. Followings are the example route_table you can find in this project:
{
"route_table": { # route_table section
"default": { # global default party, i.e. default rule
"default": [ # global default rules
{
"ip": "127.0.0.1",
"port": 9999
}
]
},
"10000": { # rules for party id 10000
"default": [ # default rule for this party, in json array
{ # one json object represents one rule entry
"ip": "127.0.0.1",
"port": 8889
}
]
},
"9999": { # rules for party id 9999
"default": [
{
"ip": "127.0.0.1",
"port": 8890
}
]
}
},
"permission": { # permission section
"default_allow": true # default permission rule. This will evolve in near future release so let's just put a true here for now
}
}
If party 10000 is running FATE, then the section for party 10000 in party 10000 can be configured as following:
"10000": { # rules for party id 10000
"fate": [ # federation endpoints this party, in json array
{ # one json object represents one federation entry, use one guest entry for now
"ip": "192.168.0.1",
"port": 8088
}
]
}
Route rule has the following priority: party id > role. More specifically:
- Exact match: both party id and role match. Corresponding rule will be used.
- Party id match only: party id matches, but role does not match. Default rule for that specific party will be used in this occasion.
- Nothing match: neither party id nor role matches. Global default rule will be used.
Vertical LR Example
Let's assume 10000 is Guest (the party in possess of Y), 9999 is Host (the party without Y), 10001 is Arbiter (central decryption party), and we use a central endpoint to deploy them as a star model.
role | party id | proxy ip:port | federation ip:port |
---|---|---|---|
guest | 10000 | 172.16.0.1:8443 | 192.168.1.1:9394 |
host | 9999 | 172.16.0.2:8443 | 192.168.10.10:9394 |
arbiter | 10001 | 172.16.0.3:8443 | 192.168.20.20:9394 |
<central> | <n/a> | 172.16.0.4:8443 | <n/a> |
In 10000, the configuration looks like the following:
{
"route_table": { # route_table section
"default": { # global default party, i.e. default rule
"default": [ # global default rules
{
"ip": "172.16.0.4",
"port": 8443
}
]
},
"10000": { # rules for party id 10000
"fate": [ # default rule for this party, in json array
{ # one json object represents one rule entry
"ip": "192.168.1.1",
"port": 9394
}
]
}
},
"permission": { # permission section
"default_allow": true # default permission rule. This will evolve in near future release so let's just put a true here for now
}
}
In 9999, the configuration looks like the following:
{
"route_table": { # route_table section
"default": { # global default party, i.e. default rule
"default": [ # global default rules
{
"ip": "172.16.0.4",
"port": 8443
}
]
},
"9999": { # rules for party id 9999
"fate": [ # default rule for this party, in json array
{ # one json object represents one rule entry
"ip": "192.168.10.10",
"port": 9394
}
]
}
},
"permission": { # permission section
"default_allow": true # default permission rule. This will evolve in near future release so let's just put a true here for now
}
}
In 10001, the configuration looks like the following:
{
"route_table": { # route_table section
"default": { # global default party, i.e. default rule
"default": [ # global default rules
{
"ip": "172.16.0.4",
"port": 8443
}
]
},
"10001": { # rules for party id 10000
"fate": [ # default rule for this party, in json array
{ # one json object represents one rule entry
"ip": "192.168.20.20",
"port": 9394
}
]
}
},
"permission": { # permission section
"default_allow": true # default permission rule. This will evolve in near future release so let's just put a true here for now
}
}
In central point, the configuation looks like the following:
{
"route_table": { # route_table section
"10000": { # rules for party id 10000
"default": [ # default rule for this party, in json array
{ # one json object represents one rule entry
"ip": "172.16.0.1",
"port": 8443
}
]
},
"9999": { # rules for party id 9999
"default": [ # default rule for this party, in json array
{ # one json object represents one rule entry
"ip": "172.16.0.2",
"port": 8443
}
]
},
"10001": { # rules for party id 10001
"default": [ # default rule for this party, in json array
{ # one json object represents one rule entry
"ip": "172.16.0.3",
"port": 8443
}
]
}
},
"permission": { # permission section
"default_allow": true # default permission rule. This will evolve in near future release so let's just put a true here for now
}
}
Ending
In fact, we support deploying more than one role in one party.
We plan to provide more mechanisms for route table configurations and permission controls.
If above resolves your issue, we will create a document for proxy configuration.
from fate.
maxwong, Thanks for your detailed answer.
follow the conf rule you explained, it works now.
i put the same conf file in guest,host,arbiter nodes, as follows
{
"route_table": {
"default": {
"default": [
{
"ip": "172.16.0.1",
"port": 8443
}
]
},
"10000": {
"default": [
{
"ip": "172.16.0.1",
"port": 8443
}
],
"fate": [
{
"ip": "172.16.0.1",
"port": 9394
}
]
},
"9999": {
"default": [
{
"ip": "172.16.0.2",
"port": 8443
}
],
"fate": [
{
"ip": "172.16.0.2",
"port": 9394
}
]
},
"10001": {
"default": [
{
"ip": "172.16.0.3",
"port": 8443
}
],
"fate": [
{
"ip": "172.16.0.3",
"port": 9394
}
]
}
},
"permission": {
"default_allow": true
}
}
from fate.
Related Issues (20)
- 关于部分同态加密PHE的密钥生成 HOT 3
- 关于文档 HOT 1
- 关于新增接口 HOT 2
- Which communication protocol and serialization method is supported?
- 上传数据时候,不加label可以正确上传,但是加入label之后会报错ValueError: invalid literal for int() with base 10: '0.8960573476702509,但是我的数据都是浮点数啊。 HOT 2
- 算法组件容器化的镜像federatedai/fate:2.0.0无法获取
- 关于2.0之后支持算法是否有变化 HOT 1
- 关于某些算法的参数配置 HOT 1
- 项目的DataFrame,是在pandas的基础上扩展的DataFrame,还是自定义的 HOT 1
- FATE-Builder工程有更新2.1.0版本构建docker镜像的文档吗 HOT 1
- FATE-Builder工程有更新2.X版本构建docker镜像的文档吗 HOT 8
- 关于开发调试和接口
- 目前是否有支持SM2算法?
- How to implement object detection algorithms in homo-nn
- PSI 算法 HOT 1
- Fedkseed HOT 9
- 联邦学习发起方角色是否固定 HOT 3
- 如果我想对框架自定义的Dataframe的元素进行操作,该如何进行 HOT 1
- 希望在FATE 1.7.2 中测量求交协议中 rsa方案和dh方案的通信量。 HOT 4
- 求教关于改动源代码 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fate.