NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Balanced Permutation Codes

Ryan Gabrys, Olgica Milenkovic

Abstract

Rank modulation is a promising technique for flash memory, where data is represented by the relative order of charge levels in a group of cells. This paper introduces balanced permutation codes, which ensure that the average charge across a sequence remains near the mean. We show that these codes can achieve maximum data capacity (rate 1) and present efficient construction algorithms that balance electrical stability with storage efficiency.

Introduction

Flash memory reliability is often compromised by charge leakage and inter-cell interference. Rank modulation addresses leakage by using permutations of charge levels rather than absolute voltages. However, large variations in charge across a block can still lead to uneven wear and noise. This work proposes "balanced" permutation codes to maintain a stable average charge level throughout the memory block, thereby improving the physical longevity and reliability of the storage medium.

Problem Formulation

The core challenge addressed is the design of a code where, for any permutation $\pi$ of length $n$, the sum of any $b$ consecutive elements stays close to the expected average $b(n+1)/2$. This balancing constraint helps manage the electrical properties of the memory cells. Specifically, the paper investigates the capacity of such codes—how much information can be stored under these constraints—and how to map data bits into these permutations efficiently.

Methodology: Construction of Balanced Codes

The authors propose two primary construction methods based on the severity of the balancing requirement:

  1. Greedy Interleaving ($D_1$-balanced): The alphabet $[n]$ is split into two halves: a "low" set and a "high" set. The encoder monitors the current running average; if it is too low, it pulls the next symbol from the high set, and vice versa. This is a permutation-based extension of Knuth’s algorithm for balancing binary strings.
  2. Subset Partitioning ($D_2$-balanced): For stricter constraints, the alphabet is partitioned into $N$ smaller subsets of consecutive integers. The encoder moves between these subsets to maintain fine-grained control over the discrepancy.
Alphabet partitioning for balanced code construction.

As shown in the figure above, the alphabet can be structured into specific groupings (pairing low-value symbols like $O_1, O_2$ with high-value symbols like $O_{N-1}, O_N$) to facilitate the interleaving process and ensure the resulting permutation remains balanced.

Key Results and Insights

  • Capacity Preservation: A major finding is that for the $D_1$ balancing constraint, the code capacity is 1. This means that, asymptotically, no storage efficiency is lost by requiring the code to be balanced.
  • Stricter Constraints: For $D_2$ constraints where the allowed discrepancy scales inversely with $n$, the capacity is slightly reduced to $1 - \epsilon$.
  • Constraint Conflicts: The authors highlight a fundamental tension: balancing requires placing high values near low values to cancel them out, whereas "two-neighbor constraints" (used to prevent electrical cross-leakage) require adjacent values to be close to each other. When both constraints are active, the capacity is shown to be $(1 + \epsilon_k)/2$.

Conclusion and Future Work

Balanced permutation codes offer a robust way to improve flash memory reliability without sacrificing storage capacity. While the current theoretical framework establishes the feasibility of these codes, future work is needed to optimize encoding complexity toward $O(n \log n)$ and to develop robust decoding algorithms capable of correcting errors in noisy, real-world environments.

Summary updated

BibTeX
@inproceedings{gabrys2016balanced,
  author = {Ryan Gabrys and Olgica Milenkovic},
  title = {{Balanced Permutation Codes}},
  booktitle = {ISIT},
  year = {2016},
  doi = {10.1109/isit.2016.7541327},
}
Figure