CSE5313 Coding and information theory for data science (Lecture 14)
The repair problem
Main challenge:
- Locality (number of contacted servers)
- Bandwidth (number of bits transferred)
From last lecture we build optimal Local Recoverable Codes (LRCs) for storage systems.
Let which is -LRC, with minimum distance .
-
Bound 1: .
-
Bound 2: .
-
Optimal LRC:
-
Let , partition to for to .
-
is good if and is constant on all ‘s.
-
, where
- ,
- , where is a good polynomial.
- is a “good” polynomial.
-
and .
Minimizing the repair bandwidth
Goal: understand repair bandwidth.
- What is the minimum repair bandwidth?
- Is repair bandwidth in trade-off with other parameters?
- Tool: The information flow graph.
Spoiler alert:
- Tradeoff: Storage Repair and bandwidth.
- Codes which achieve an optimal tradeoff.
Information flow graph
We can model the repair problem as a directed graph.
- Source: System admin.
- Sink: Data collector.
- Nodes: Storage servers.
- Nodes leave/crash
- Newcomer replaces them new nodes.
- Edges: Represents transmission of information. (Number of elements is weight.)
Main observation:
- elements from must “flow” from the source (system admin) to the sink (data collector).
- Any cut which separates source from sink must have capacity at least .
Roadmap:
Information flow graph Minimum cut analysis Bound on file size Storage/bandwidth tradeoff.
Basic definitions for information flow graph
This is not the same as definitions in linear codes. is not the dimension of the code and is not the minimum distance of the code for general cases.
Parameters:
- is the number of nodes in the initial system (before any node leaves/crashes).
- is the number of nodes required to reconstruct the file .
- is the number of nodes required to repair a failed node.
- is the storage at each node.
- is the edge capacity for repair.
- is the file size.
Goal: Find the trade off between using min-cut analysis of the information flow graph.
Initial system:
We denote the system admin as
Sever as , each with edge capacity .
For each new server:
We have two nodes and , the edge weight is .
Connect to previous nodes ‘s with edge capacity .
Data collector:connects to arbitrary nodes with each edge capacity .
Observe that:
- File size .
- Any cut separating form must have capacity at least .
- Otherwise, two different files are indistinguishable to .
Bound on bandwidth
Claim: .
Intuition: Let be a cut separating form .
- The DC contacts newest nodes, say .
- The cut must decide if to cross edges or edges.
- At east edges to go to .
Proof
Let be a cut separating form , assuming and .
Every directed acyclic graph has topological sort.
Let be the first node in . There are two cases:
- . Then edges must be crossed.
- . Then all incoming edges to must be crossed. (Otherwise, there exists an earlier node with , contradicting the topological sort.)
So contributes at least to the cut capacity.
Let be the second node in . There are two cases:
- . Then edges must be crossed.
- . Then at least incoming edges ( edge may come from ) to must be crossed. (Otherwise, there exists an earlier node with , contradicting the topological sort.)
So contributes at least to the cut capacity.
By repeating this process, we can show that the minimum cut capacity is at least .
Storage/bandwidth tradeoff
Claim: There exists an information graph with .
Homework: Build this graph as follows:
- Construct the initial graph with nodes and the system admin.
- Add nodes, each node connects to the most recent nodes.
- Find the minimum cut capacity.
Corollary: .
Definition of regenerate code
A code which attains is called a regenerate code.
Goal: Find tradeoff between storage to repair bandwidth .
Let , then .
Tool: Fix and , and minimize for (not shown).
Result: The storage/bandwidth tradeoff.
- Each point on/above the line is feasible.
- Points on the line = regenerating codes.
- One endpoint: Minimum Bandwidth Regenerating (MBR) codes.
- another endpoint: Minimum Storage Regenerating (MSR) codes

For Minimum Storage Regenerating (MSR) codes, we have ,
For Minimum Bandwidth Regenerating (MBR) codes, we have ,
Notes:
- In MSR , Data collector contacts nodes and downloads from each to reconstruct the file of size , that is optimal.
- In MBR , new comer download exactly what it stores, which is the same as replication. This has much smaller storage overhead in the replication.
Regenerating codes, Magic #1:
- MBR: Same repair-bandwidth as replication (), at lower storage costs.
- MSR: Same reconstruction-bandwidth () as replication, at lower storage costs.
Regenerating codes, Magic #2:
- In MSR: ,
- In MBR: ,
- Both decreasing functions of .
- Less repair-bandwidth by contacting more nodes, minimized at .
Constructing Minimum bandwidth regenerating (MBR) codes from Maximum distance separable (MDS) codes
Observation: For MBR code with parameters and , one can construct MBR with parameters and any .
Next: Construct MBR for and .
In any MBR:
Specifically:
- Storage .
- File size
Take an MDS code (e.g., Reed-Solomon).
Need .
Consider a complete graph on nodes.
- edges.
- Place each codeword symbol on a distinct edge.
- Storage server stores all codeword symbols adjacent with node .
- .
Repairing on MBR codes
New comer contacts each node ;
And downloads the symbol on edge .
We get which is optimal.
Reconstruction on MBR codes
We use MDS code. So any symbols suffice to reconstruct the file.
Any nodes have edges between them, and edges to other nodes.
Overall . For , we get .
Constructing Minimum bandwidth regenerating (MBR) codes from Product-Matrix MBR codes
Recall: File size in MBR .
Step 1: Arrange the symbols in a matrix follows:
- is a symmetric matrix. contains symbols.
- is a matrix. contains symbols.
So there are elements overall.
Step 2: Construct the encoding matrix
such that
- Any rows are linearly independent.
- Example: Vandermonde matrix.
such that
- Any rows of are linearly independent.
- Example: Complete to a full Vandermonde matrix.
Step 3: Encoding of the data using the encoding matrix .
- Multiply by .
- Store the the row of in the node .
- Note
Repairing on Product-Matrix MBR codes
Assume node storing is lost.
Repair from (any) nodes .
- Node stores .
Newcomer contacts each : “My name is , and I’m lost.”
Node sends (inner product).
Newcomer assembles .
invertible by construction!
-
Recover .
-
Recover ( is symmetric)
Reconstruction on Product-Matrix MBR codes
Data Collector (DC) contacts (any) nodes .
- Node stores .
Downloads from node .
DC assembles .
- Recall
invertible by construction.
- DC computes
- DC obtains .
- Subtracts from to obtain .