Hierarchical Cache-Aided Networks for Linear Function Retrieval

In a hierarchical caching system, a server is connected to multiple mirrors, each of which is connected to a different set of users, and both the mirrors and the users are equipped with caching memories. All the existing schemes focus on single file retrieval, i.e., each user requests one file. In this paper, we consider the linear function retrieval problem, i.e., each user requests a linear combination of files, which includes single file retrieval as a special case. We propose a new scheme that reduces the transmission load of the first hop by jointly utilizing the two layers’ cache memories, and we show that our scheme achieves the optimal load for the second hop in some cases.


Introduction
In order to reduce the transmission pressure of wireless networks during peak traffic times, Maddah-Ali and Niesen in [1] provided a (K, M, N) coded caching scheme (MN Scheme) where a single server has N files and connects K cache-aided users with the cache memories of M files through an error-free shared link.A coded caching scheme consists of two phases: (1) the placement phase, where the server is equipped with the data and each user's cache is also equipped with the size of at most M files without knowledge of the users' future demands; (2) the delivery phase, where each user randomly requests one file and then the server sends the coded signal to the users such that each user can decode its requested file with the help of its cached packets.It is shown that the MN Scheme is generally order-optimal within a factor of 2 [2] and optimal under the uncoded data placement when K ≤ N [3].The MN Scheme is also widely used in different networks, such as combination networks [4,5], device-to-device networks [6], etc.
In practical scenarios, caching systems are transformed into multiple layers in order to make transmission more efficient, such as the hierarchical edge caching architecture for Internet of Vehicles [7], the three-tier mobile cloud-edge computing structure [8], and so on.In this paper, we particularly study the hierarchical caching system [9], a two-layer network as illustrated in Figure 1.A (K 1 , K 2 ; M 1 , M 2 ; N) hierarchical caching system consists of a single server with a library of N files, K 1 cache-aided mirror sites, and K 1 K 2 cache-aided users.For the first layer, the K 1 mirror sites are connected to the server through an error-free shared link, and for the second layer, each user connects to only one mirror.Our goal is to design a scheme to decrease the first load R 1 in the first hop (i.e., from the server to all the mirror sites) and the second load R 2 in the second hop (i.e., from each mirror site to its connected users).The authors in [9] proposed the first hierarchical coded caching scheme (KNMD Scheme).The MN Scheme is applied two times in two layers consecutively.Although the KNMD Scheme achieves the optimal transmission load for the second hop, it involves a significant increase in R 1 since it ignores the users' cache memory when designing the multicast message sent from the server.To improve the first load R 1 , the authors in [10,11] proposed new schemes that jointly use the two types of the MN Scheme together for the mirror sites and users, respectively.
It is worth noting that all the schemes consider the single file retrieval case, i.e., each user requests one file.The authors in [12] first considered the linear function retrieval scheme (WSJT Scheme), i.e., a linear combination of files is requested from each user through the shared link broadcast network.Clearly, linear function retrieval includes the single file retrieval case.In this paper, we study the linear function retrieval scheme for hierarchical networks and obtain the following results.

•
We first propose a baseline scheme via the WSJT Scheme and KNMD Scheme where the second-layer load achieves the optimal transmission load.However, we achieve this by sacrificing the first-layer load.• Then, in order to reduce the first-layer load, we propose another scheme whose second load also achieves optimality at the expense of increased subpacketization.Our scheme also aids in reducing the redundancy for some special demand distributions.
The rest of this paper is organized as follows.Section 2 formally introduces the system model and some existing schemes.Section 3 presents the main results.Section 4 gives an example and the general description of our scheme, i.e., the scheme for Theorem 2. The conclusion of this paper is given in Section 5.
Notations: For any positive integers a and b with a < b, let [a : b] {a, . . ., b} and For a positive integer n, the n-dimensional vector space over the field F q is denoted by F n q .For a given matrix P with row size X 1 , we divide it into X 1 parts by row, which is represented by For any integer set T , define P T as the sub-matrix of P by selecting some rows from P, where the rows have indices in T .The rank of matrix P is denoted as rank(P).The transpose of P is represented by P .

Preliminary
In this section, we give a formal description of the hierarchical caching system and review some existing related schemes for the hierarchical caching problem.

System Model
Consider a hierarchical network as shown in Figure 1.It consists of a single server with a library of N files, K 1 cache-aided mirror sites, and K 1 K 2 cache-aided users.For the first layer, the K 1 mirror sites are connected to the server through an error-free shared link, and for the second layer, each user connects to only one mirror.M k 1 represents the k 1 -th mirror and the k 2 -th user attached to M k , and the set of users attached to M k 1 as U k 1 .The server contains a collection of N files, denoted by W = {W (1) , W (2) , . . ., W (N) }, each of which is uniformly distributed over F B 2 , where B ∈ N + .Each mirror and user is equipped with M 1 and M 2 files, respectively, where M 1 , M 2 ≥ 0. A (K 1 , K 2 ; M 1 , M 2 ; N) hierarchical caching system contains two phases.

•
Placement phase: The mirror site M k 1 caches some parts of the files by using a cache

2
, where M 1 N is the memory ratio of the mirror in the first layer, The user U k 1 ,k 2 caches some parts of the files by using a cache function

2
, where M 2 N is the memory ratio of users in the second layer, • Delivery phase: Each user U k 1 ,k 2 randomly requests a linear combination of the files for any k 1 ,k 2 ) ∈ F N 2 denotes the demand vector of user U k 1 ,k 2 .When each user requests a single file, the demand vector d k 1 ,k 2 is a N-length unit vector.For example, if user U k 1 ,k 2 only requests the 1-st file, then the demand vector is set as , which is a special case of our proposed scheme.We can obtain the demand matrices of all users as follows: D (1)  . . .
where D (k 1 ) represents the demand vectors of U k 1 .Given the demand matrix D, we should consider the following two types of messages.
-The messages sent by the server: The server generates signal X server by using an encoding function χ : where and then the server sends X server to the mirrors.The normalized number of transmissions R 1 is called the transmission load for the first layer.

-
The messages sent by the mirror: Based on X server , Z k 1 , and D, each mirror M k 1 generates a signal X mirror k 1 by using the encoding function κ : where and then mirror M k 1 sends X mirror k 1 to its connected users.The normalized number of transmissions R 2 is called the transmission load for the second layer.
For the retrieval process, each user U k 1 ,k 2 can decode its required linear combination of files from (D, Z k 1 ,k 2 , X mirror k 1 ), which means that there exist decoding functions We define the optimal transmission loads for the two layers as R * 1 and R * 2 separately.
Our goal is to design schemes in which the transmission loads R 1 and R 2 are as small as possible.

Existing Schemes
In the following, we review the KNMD Scheme for the hierarchical caching problem and the WSJT Scheme over the binary field F 2 , which will be useful for the hierarchical caching system with linear function retrieval.First, let us outline the MN Scheme.
(1) MN Scheme [1]: t )}.In the delivery phase, the file W d k is requested by each user U k , where d k ∈ [N].Fixing a user k ∈ S, the user k requests the subfiles W d k ,S \{k} when it is presented in the cache of any user k ∈ S \ {k}.Then, the server transmits the coded signal k∈S W d k ,S \{k} , where S ⊆ [K] of |S| = t + 1.The transmission load R MN = K(1−M/N) KM/N+1 .(2) KNMD Scheme [9]: This scheme uses the MN Scheme in each layer of the hierarchical network.More specifically, for the first layer between the server and K 1 mirrors, it uses the (K 1 , M 1 , N) MN Scheme K 2 times to recover all K 1 K 2 requested files, and then each mirror M k 1 , k 1 ∈ [K 1 ] works as a server whose library contains K 2 files that are requested by users in U k 1 , and finally it utilizes the (K 2 , M 2 , N) MN Scheme between M k 1 and U k 1 .Then, each user can retrieve its requested file with the transmission load as follows.
However, the MN Scheme only works for single file retrieval.The authors in [12] proposed a scheme (WSJT Scheme) that is suitable for the linear function retrieval problem.
(3) WSJT Scheme [12]: Using the placement strategy of the MN Scheme, each user U k where k ∈ [K] requests a linear combination of files with demand vector d k ∈ F N 2 .After revealing the demand matrix D = (d 1 , . . ., d K ) with dimension K × N, the server broadcasts some coded packets by modifying the transmission strategy of the MN Scheme such that each user is able to recover its demanded linear combination of files with the transmission load It is worth noting that when D is row full rank, R WSJT is optimal under the uncoded placement.

Main Results
In this section, we first propose a baseline scheme via the WSJT Scheme where R 2 achieves optimality when the sub-matrix D (k 1 ) , k 1 ∈ [K 1 ], is full rank.Then, we propose another scheme that improves R 1 while the R 2 remains unchanged compared with the Baseline Scheme.Finally, some theoretical and numerical comparisons are provided.
For the sake of convenience in proposing another scheme for some special demand distributions, the following definitions of the leader mirror and user sets are necessary.Definition 1 (Leader mirror set).For a K 1 K 2 × N demand matrix D in (1), we call a subset of mirrors the leader mirror set, which is represented by ( and it has the minimum cardinality among all the subsets satisfying (2), where (α Definition 2 (Leader user set).For a K 2 × N demand matrix D (k 1 ) in (1), we call a subset of users the leader user set, which is represented by , it satisfies the condition (3) and it has the minimum cardinality among all the subsets satisfying (3), where (α 1 , . . ., Now, we introduce the Baseline Scheme, which is generated by using the KNMD Scheme in [9] and the WSJT Scheme in [12].We utilize the WSJTC Scheme to replace the MN Scheme in the KNMD Scheme, and then we obtain the Baseline Scheme, which is suitable for the linear function retrieval problem in the hierarchical network. Theorem 1 (Baseline Scheme).For any positive integers K 1 , K 2 , t 1 ∈ [K 1 ], t 2 ∈ [K 2 ] and the demand matrix D in (1), there exists a (K 1 , K 2 ; M 1 , M 2 ; N) hierarchical coded caching scheme for a linear function retrieval problem with memory ratios M where L M is defined in Definition 1.
In fact, the transmission loads are related to the placement strategy and demand distribution, respectively.The KNMD Scheme considers the first and second layers separately and ignores the users' and mirrors' cache memories, which leads to good performance on R 2 but results in a large transmission load R 1 .For the second layer, it can be regarded as a (K 2 , M 2 , N) shared link caching problem in which the WSJT Scheme achieves the optimal transmission load under certain circumstances, i.e., when the sub-matrix For the purpose of improving R 1 , we propose another scheme, stated below, and the proof is included in Section 4.

Theorem 2. For any positive integers K
] and the demand matrix D in (1), there exists a (K 1 , K 2 ; M 1 , M 2 ; N) hierarchical coded caching scheme for a linear function retrieval problem with memory ratios M Now, let us consider the performance of our two schemes.For the first layer, we claim that R 1 < 1 t 2 +1 R base1 , where t 2 ≥ 0 since Obviously, this scheme has the same performance as the Baseline Scheme, i.e., R 2 = R base2 , which also achieves the optimal transmission load when the demand matrix Finally, we perform a numerical comparison to further show the performance of our scheme.In Figure 2, we compare the Baseline Scheme with the scheme for Theorem 2 with fixed parameters (K 1 , K 2 , |L M |, N) = (20, 10, 10, 200) and varying the memory ratio M 1 /N from 0 to 1 with a step size 0.1.As seen in Figure 2, compared to the Baseline Scheme, the scheme for Theorem 2 can reduce the transmission load R 1 significantly, as this scheme utilizes both the user's cache and the mirror's cache when constructing the multicast message sent by the server.The scheme for Theorem 2 achieves the same R 2 as the Baseline Scheme, while our scheme has a lower transmission load R 1 .

Scheme for Theorem 2
In this section, we first give an illustrative example of our scheme.Then, the general description of the scheme is provided.Before the description, we first introduce the following lemmas regarding the message sent by the server and mirrors, whose proofs are included in Appendices A and B, respectively.
Lemma 1 (The messages sent by the server).Given a demand matrix D in (1), the leader mirror set L M , and a user set B ∈ ( [K 2 ] t 2 +1 ), if there exists a mirror set C ∈ ), where L M ⊆ C, let V C be the family of mirror set V, V ⊆ C, where each V satisfies Definition 1.Then, we have ∑ V ∈V C X C\V,B = 0, where X C\V,B represents the message sent by the server, which is defined in (8).
Lemma 2 (The messages sent by the mirror).Given a sub-matrix ), where L k 1 ⊆ C , let V C be the family of all set V , V ⊆ C , where each V satisfies Definition 2.Then, we have T 1 ,C \V = 0, where X T 1 ,C \V represents the message sent by the mirror M k 1 , which is defined in (9).

By Lemma 1, for any mirror set
) can be computed directly from the broadcast messages by using the following equation where C = A L M .By Lemma 2, for any user set B = ( T 1 ,B can be computed directly from the broadcast messages by using the equation where C = B L k 1 .After receiving the messages sent by the mirror M k 1 , user U k 1 ,k 2 is able to recover its desired linear combination of files.

•
Placement phase: For simplicity, we represent a set that is the subscript of some studied object by a string.For example, T {1,2} is represented by T 12 .The contents cached by the mirrors are as follows: The subfiles cached by the users are as follows: • Delivery phase: In the delivery phase, the demand vectors with length 12 are As we can see, D (1) = D (2) = D (3) .
Without loss of generality, we set L M = {1}.We denote a linear combination of subfiles as where . Then, the messages sent in this hierarchical system consist of the following two parts.
according to the following rule, which is mainly related to the second subscript T 2 .
Under this caching strategy, we can verify that it satisfies the memory constraints stated in Theorem 2. Each mirror caches ( K 1 −1 t 1 −1 )( K 2 t 2 )N subfiles and each user caches ( K 1 t 1 )( K 2 −1 t 2 −1 )N subfiles, where each subfile is B/( K 1 t 1 )( K 2 t 2 ) bits.Thus, the memory ratios of the mirror and user are and M 2 N = t 2 K 2 , respectively.For any user's demand vector k 1 ,k 2 ) of N-length, we use the notation as follows to denote a linear combination of subfiles: • Delivery phase: For the convenience of the subsequent discussion, we first give the following two definitions of the signals transmitted in the first layer, say X A,B , and the second layer, say X T 1 ,B .For any mirror set containing t 1 + 1 mirrors defined as A ∈ ( [K 1 ] t 1 +1 ), any mirror site set containing t 1 mirror sites defined as T 1 ∈ ( [K 1 ] t 1 ), and any user set containing t 2 + 1 users defined as B ∈ ( [K 2 ] t 2 +1 ), we define After the demand matrix D of size K 1 K 2 × N and its sub-matrix D (k 1 ) of size K 2 × N in (1) are revealed, we have the leader mirror set L M according to Definition 1.For each sub-matrix D (k 1 ) of D, k 1 ∈ [K 1 ], we have the leader user set L k 1 , L k 1 ⊆ [K 2 ] according to Definition 2. There are two types of messages transmitted by the server and mirror, respectively.
-The messages sent by the server: ), L M A = ∅, the server transmits X A,B to the mirror sites.

-
The messages sent by the mirror: T 1 ,B via the following rules.
(1) For each T 1 ,B to its connected users generated from its cached content Z k 1 .As regards the messages X A,B , A L M = ∅, and X (k 1 ) T 1 ,B , B L k 1 = ∅, which are also necessary for the users, these messages can be computed from the sent messages by using Lemmas 1 and 2.More precisely, X A,B , A L M = ∅ can be obtained by (5), and X (k 1 ) T 1 ,B , B L k 1 = ∅ can be obtained by (6).Now, we prove that each message X A,B transmitted by the server is decodable, i.e., after each mirror subtracts some packets from X A,B , the rest of the message only contains coded packets required by the users in U k 1 .Then, we further prove that each message X T ,B , the rest of the message only contains coded packets required by user U k 1 ,k 2 .

Decodability of Mirror
For each mirror M from the server.By (8), we have The coded packets required by users in The coded packets cached by M k 1 .
where (10) holds directly from (7), and (11) holds by separating k 1 from A. Moreover, (11) holds by ( 7) and (9).The first term of (11) denotes coded packets that will be transmitted to U k 1 and the second term denotes packets cached by M k 1 because k 1 ∈ A \ {k 1 }.

Decodability of User
For each user U where (12) holds directly by separating k 2 from B. It is clear that user U k 1 ,k 2 can decode its desired linear combination of packets, i.e., the first term of (12), by subtracting the cached contents, i.e., the second term of (12), as k 2 ∈ B \ {k 2 }, which means that U k 1 ,k 2 has already cached the packets from X (k 1 ) T 1 ,B .

Performance
From the placement phase, each file is firstly divided into ( K 1 t 1 ) subfiles and then each subfile is further divided into ( K 2 t 2 ) subfiles, so the subpacketization is ( K 1 t 1 )( K 2 t 2 ).Each subfile is B/( K 1 t 1 )( K 2 t 2 ) bits, each mirror caches ( K 1 −1 t 1 −1 )( K 2 t 2 )N subfiles, and each user caches ( K 1 t 1 )( K 2 −1 t 2 −1 )N subfiles.Thus, the memory ratios of the mirror and user are M 1 N = t 1 K 1 and M 2 N = t 2 K 2 , which satisfy the memory constraints in Theorem 2. In total, the server transmits ( K 1 t 1 +1 ) − ( K 1 −|L M | t 1 +1 )( K 2 t 2 +1 ) multicast messages, and the mirror transmits ( K 2 t 2 +1 ) − ( K 2 −rank(D (k 1 ) ) )( K 1 t 1 ) multicast messages.Each message contains B/( K 1 t 1 )( K 2 t 2 ) bits, so the trans- mission loads of the first layer and the second layer are as illustrated in (4).Although the scheme for Theorem 2 has a higher subpacketization level of ( K 1 t 1 )( K 2 t 2 ) compared with ( K 1 t 1 ) + ( K 2 t 2 ) of the Baseline Scheme, we achieve a much lower transmission load R 1 under the same transmission load R 2 , where both schemes achieve the optimal transmission load of the second layer when the sub-demand matrix D (k 1 ) , k 1 ∈ [K 1 ] is full rank.

Conclusions
In this paper, we studied the linear function retrieval problem for hierarchical cacheaided networks.We proposed two schemes, where the first scheme achieves the optimal transmission load for the second layer for some demand distribution and our second scheme further reduces the load of the first layer while maintaining the same transmission load in the second layer.
Thus, there are in total k 1 + 1 mirrors in C \ T 1 , which is an even number, satisfying the two constraints.