# Design and Application of Secret Codes for Learning Medical Data
## 3 Design of Secret Codes for Distributed Systems  
The authors of [12] summarized the federated learning structure for health care systems sharing data. In this section, we consider a framework for a group of users or institutions with secret information. If a group of users or participants in the distributed learning system can regenerate some part of the secret information, any other group including this group should also be able to regenerate the same information. On the other hand, the entire secret should not be generated from one user or a small group of users. Furthermore, to support adaptive amounts of information on each user and flexibility in the number of users, the construction of secret codes supporting various numbers of users and adaptive rates of information is required. Our framework, with secret codes for application in distributed systems, is summarized in Figure 3. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Reference** & **Alphabet Size** & **Length** & \
\begin{tabular}{c} **Number of** \\ **Distinct** \\ **Weights** \\ \end{tabular} &
\begin{tabular}{c} **Restricted in** \\ **(1)** \\ \end{tabular} \\ \hline
[16] & 2 & \(2^{m}-1\) & 3 & Yes \\
[19] & 2 & \(2^{m}-1\) & 3 & Yes \\
[20] & 2 & \(2^{m}-1\) & 4 \(\sim\) 6 & No \\
[21] & \(p\) & \(p^{m}-1\) & 3 & Yes \\
[22] & \(p\) & \(p^{m}-1\) & 3 \(\sim\) 4 & No \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Known classes of binary minimal codes (\(p\) is an odd prime). The support of a codeword can be regarded as the position of the secret information on the corresponding user. Let \(C=\{x_{1},x_{2},\ldots,x_{l}\}\) be a minimal code of length \(N\) and size \(l\). For each codeword \(\mathbf{x}_{i},1\leq i\leq l\), we can describe its support as  
\[\mathbf{s}_{i}=\text{supp}(x_{i})=\Big{\{}s_{i,j}\Bigm{|}s_{i,j}<s_{i,j^{\prime }}\text{ if }j<j^{\prime}\Big{\}}. \tag{3}\]  
Furthermore, we define the set of user indices as \(L=\{1,2,\ldots,l\}\). **Construction A. **_For a minimal code \(C\) of length \(N\), let \(y_{l+1}\) be a new vector whose support is given by a union of supports of two codewords as_  
\[supp(y_{l+1})=s_{i_{1}}\cup s_{i_{2}} \tag{4}\]  
_where \(1\leq i_{1}<i_{2}\leq l\) and \(s_{i}\) is not a subset of \(s_{i_{1}}\cup s_{i_{2}}\) for any \(i\in L\setminus\{i_{1},\ i_{2}\}\). The new code \(C_{A}\) is constructed as the union of \(C\backslash\{x_{i_{1}},x_{i_{2}}\}\) and \(\{y_{l+1}\}\). In a recursive way, the supports can be merged into an arbitrary combination of the supports._  
Note that the code \(C_{A}\) in Construction A is not linear since the support set is not the direct sum of two supports, but the union of the two sets. However, the distributed property of the secret is preserved by the characteristics of the minimal code. Construction A corresponds to the situation where a user is out of the federated group, and the amount of corresponding information and learning resources can be assigned to another user. The information of a user is not subordinate to that of the other users even after merging the resources. Although Construction A only describes a case where the information on the user who has left is assigned to only one user, we can generalize to a case where it is distributed to multiple users. **Construction B. **_For a minimal code \(C\) of length \(N\), let \(y_{l+1},\ y_{l+2}\) be a new vector whose union of two supports make_  
\[s_{i}=supp(y_{l+1})\cup supp(y_{l+2}) \tag{5}\]  
_where \(1\leq i\leq l\) and \(supp(y_{l+1})\) and \(supp(y_{l+2})\) are not a subset of \(s_{i}\) for any \(i\in L\setminus\{i\}\). The new code \(C_{B}\) is constructed as the union of \(C\backslash\{x_{i}\}\) and \(\{y_{l+1},\ y_{l+2}\}\). Applying this construction in a recursive way, the supports can be separated into arbitrary sizes._  
Because of the non-inclusive property of the supports in Construction B, the situation can be interpreted as one where a user is out of the federated group, and the amount of corresponding information and learning resources can be assigned to another user.