---
title: 'Function-Correcting Codes: Theory & Constructions'
url: https://www.emergentmind.com/topics/function-correcting-codes
type: topic
---

# Function-Correcting Codes: Theory & Constructions

Searching arXiv for recent papers on function-correcting codes to ground the article in the latest literature.
Function-correcting codes (FCCs) are coding-theoretic objects designed to protect a function of the message, rather than the entire message itself. For a function \(f:\mathbb{F}_q^k\to \operatorname{Im}(f)\), a systematic encoder \(c:\mathbb{F}_q^k\to\mathbb{F}_q^{k+r}\) of the form \(c(u)=(u,p(u))\) is an \((f,t)\)-FCC if
\[
f(u_i)\neq f(u_j)\ \Longrightarrow\ d(c(u_i),c(u_j))\ge 2t+1.
\]
The optimal redundancy \(r_f(k,t)\) is the smallest such \(r\). Because the distance constraint is imposed only on pairs of messages with different function values, FCCs are weaker than classical error-correcting codes (ECCs), which require distance \(2t+1\) between every pair of distinct codewords. The two extremal cases are immediate: if \(f\) is bijective, FCCs reduce to ordinary systematic ECCs, whereas if \(f\) is constant then \(r_f(k,t)=0\) [2102.03094, 2504.14410].

## 1. Formal model and relation to classical coding

In the standard systematic model, the transmitter holds a message \(u\in \mathbb{F}_q^k\), transmits \(c(u)=(u,p(u))\in\mathbb{F}_q^{k+r}\), and the received vector is
\[
y=c(u)+e,\qquad w(e)\le t.
\]
The receiver knows \(f\) and the encoder, but is required to recover only \(f(u)\), not necessarily \(u\) itself [2504.14410].

This formulation is naturally described in terms of the equivalence relation
\[
u\sim v \quad \Longleftrightarrow \quad f(u)=f(v),
\]
because FCCs only need to separate different function classes. This is the central distinction from classical ECCs: an ECC preserves the identity of \(u\), whereas an FCC preserves only \(f(u)\) [2502.16983]. The same distinction appears across later variants, including \(b\)-symbol read channels, Lee-metric codes, homogeneous-metric codes, and insertion-deletion channels, where the metric and decoding objective change but the basic principle remains identical: only pairs with different function outputs must be protected [2503.12894, 2507.17654, 2512.07243].

## 2. Irregular-distance, graph, and partition formulations

A central development in FCC theory is the reduction of FCC design to an irregular-distance problem. For a list of messages \(u_1,\dots,u_M\), the distance requirement matrix is defined by
\[
[D_f(t,u_1,\dots,u_M)]_{ij}=
\begin{cases}
[2t+1-d(u_i,u_j)]_+, & f(u_i)\neq f(u_j),\\
0, & f(u_i)=f(u_j),
\end{cases}
\]
where \([x]_+=\max\{x,0\}\). A \(D\)-code is a set of redundancy vectors whose pairwise distances dominate this matrix, and the optimal FCC redundancy is exactly the minimum length \(N(D_f)\) of such an irregular-distance code [2102.03094].

The same problem also admits a graph-theoretic formulation. In the function-dependent graph \(\mathcal{G}_f(t,k,r)\), vertices are pairs \((u,r)\in \mathbb{F}_q^k\times\mathbb{F}_q^r\), and an independent set of size \(q^k\) corresponds to a valid FCC. This viewpoint yields lower bounds via independence numbers and, for linear functions, spectral bounds through the adjacency structure of \(\mathcal{G}_f(t,k,r)\) [2404.15135].

A further reformulation replaces functions by partitions. If \(\mathcal{P}_f=\{f^{-1}(a):a\in\operatorname{Im}(f)\}\) is the domain partition induced by \(f\), then an \((f,t)\)-FCC is exactly a function-correcting partition code (FCPC) for \(\mathcal{P}_f\). This makes FCCs a special case of coding directly on partitions of \(\mathbb{F}_q^k\), and later generalizations use joins of partitions to protect multiple functions simultaneously [2601.06450].

## 3. Redundancy bounds over finite fields

A universal lower bound for nonconstant functions is
\[
r_f(k,t)\ge 2t.
\]
Originally proved over the binary field, this bound was extended to any finite field \(\mathbb{F}_q\) by showing that every nonconstant function has two messages at Hamming distance \(1\) with different function values, forcing the redundancy part to contribute at least \(2t\) distance [2504.14410].

Over \(\mathbb{F}_2\), an upper bound of logarithmic order in \(k\) is known:
\[
2t\le r_f(k,t) < t \log(2k)\,\frac{1}{1-\log_e(2)}.
\]
This follows from systematic binary BCH codes of distance \(2t+1\), and establishes that for fixed \(t\), the optimal redundancy is within a logarithmic factor of the lower bound [2504.14410]. For sufficiently large fields, the situation is sharper:
\[
r_f(k,t)=2t \qquad \text{whenever } q\ge k+2t.
\]
The construction uses a systematic MDS code with parameters \([k+2t,k,2t+1]_q\), so in this regime the redundancy depends only on \(t\), not on \(k\) [2504.14410].

For linear functions \(f(x)=Fx\), several bounds can be rewritten in terms of \(\ker(f)\). In the Hamming-metric case, the simplified Plotkin-like lower bound is
\[
r_f(k,t)\ge \left(\frac{q}{q-1}\right)(2t+1)(1-q^{-l}) -k +\frac{s}{(q-1)(q^k-1)},
\qquad
s=\sum_{x\in\ker(f)} w_H(x),
\]
showing explicitly that the kernel weight distribution sharpens the redundancy estimate [2404.15135].

A different general mechanism comes from local boundedness. If \(f\) is a locally \((\lambda,2t)\)-function, meaning \(|B_f(u,2t)|\le \lambda\) for every \(u\), then
\[
r_f(k,t)\le N(\lambda,2t),
\]
where \(N(\lambda,2t)\) is the minimum length of a binary code with \(\lambda\) codewords and minimum distance \(2t\) [2504.07804]. This converts local structure of \(f\) directly into a code-length bound.

## 4. Structured function families and explicit constructions

Several function families admit substantially sharper results than the generic theory. For the Hamming weight function \(wt(u)\), the optimal redundancy can be reduced to an irregular-distance problem on ordered weight representatives \(u_i=(0^{k-i}1^i)\), and the known bounds were significantly tightened:
\[
r_{wt}(k,t)\ge 4t-\frac{4}{3}\sqrt{6t+2}+2
\]
for \(t\ge 5\) and \(k>t\), while explicit constructions based on Gray codes improve the upper bound to \(4t-\log t\) when \(t+1\) is a power of two [2502.16983]. The Gray-code method starts from a binary linear code with systematic generator matrix, orders the message vectors according to the binary reflected Gray code, and assigns parity vectors cyclically from the parity parts of the linear codewords [2502.16983].

For the Hamming weight distribution function
\[
\Delta_T(u)=\left\lfloor \frac{wt(u)}{T}\right\rfloor,
\]
the threshold for optimal redundancy \(2t\) is now known to be \(T\ge t+1\), improving the earlier condition \(T\ge 2t+1\). In the regime \(T=o(t)\), explicit constructions achieve redundancy \(4t-o(t)\), and the lower bounds show that this scale is near-optimal [2502.16983].

Locally bounded functions also support explicit small-redundancy constructions. For locally \((4,2t)\)-functions,
\[
r_f(k,t)\le 3t,
\]
and if \(|\operatorname{Im}(f)|\ge 3\) and there exist three messages \(u_1,u_2,u_3\) with pairwise function separation and
\[
d(u_1,u_2)=1,\qquad d(u_3,u_1)=1,\qquad d(u_3,u_2)=2,
\]
then the bound is tight:
\[
r_f(k,t)=3t.
\]
The construction uses four binary patterns \(000,110,101,011\) repeated \(t\) times [2504.07804].

For linear functions, coset geometry plays a decisive role. When the function-value distance matrix can be realized by representatives of the cosets of \(\ker(f)\), the coset-wise upper bound is tight, and in some classes the FCC parity design reduces exactly to a lower-dimensional classical ECC problem [2404.15135].

## 5. Extensions to other channels and metrics

The first major channel extension after the substitution channel was the symbol-pair read channel. There the channel output is the cyclic pair representation
\[
\pi(u)=((u_0,u_1),(u_1,u_2),\dots,(u_{n-1},u_0)),
\]
the relevant metric is the pair distance \(d_p\), and an FCSPC requires
\[
f(u_1)\neq f(u_2)\ \Longrightarrow\ d_p(\mathrm{Enc}(u_1),\mathrm{Enc}(u_2))\ge 2t+1
\]
[2312.16271].

This was generalized to \(b\)-symbol read channels over finite fields, where the receiver observes overlapping blocks of length \(b\) and the distance is
\[
d_b(u,v)=d_H(T_b(u),T_b(v)).
\]
The corresponding function-correcting \(b\)-symbol code (FCBSC) uses the same systematic form \(\mathrm{Enc}(u)=(u,p(u))\), and the optimal redundancy is denoted \(r_b^f(k,t)\) [2503.12894]. For linear functions on the \(b\)-symbol channel, a Plotkin-like lower bound takes the form
\[
r_b(k,t)\ge \frac{q^b}{q^b-1}\Big((2t-b+2)(1-q^{-1})-k\Big)+\frac{s}{q^b-1},
\qquad
s=\sum_{u\in\ker(f)} w_b(u),
\]
and specializes to the known symbol-pair and substitution-channel bounds when \(b=2\) and \(b=1\), respectively [2503.23059]. The locality-based theory was also extended to locally \((\lambda,\rho,b)\)-functions, with the recurrence
\[
r_f^{b+1}(k,t)\le r_f^b(k,t)
\]
and explicit bounds such as \(r_f^b(k,t)\le 3t-b+1\) for locally \((4,2t,b)\)-functions [2505.09473].

The Lee-metric analogue replaces Hamming distance by
\[
d_L(u,v)=\sum_i w_L(u_i-v_i),\qquad w_L(x)=\min\{x,m-x\},
\]
over \(\mathbb{Z}_m\). In this setting the optimal redundancy is characterized by irregular Lee-distance codes:
\[
r_f^L(k,t)=N_L(D_f^L(t,u_1,\dots,u_{m^k})).
\]
For locally binary Lee functions, the exact formula is
\[
r_f^L(k,t)=N_L(2,2t)=\left\lceil \frac{2t}{\lfloor m/2\rfloor}\right\rceil,
\]
which specializes to \(2t\) for \(m=2\) and \(t\) for \(m=4\) [2507.17654]. Later work provided explicit constructions for Lee weight, Lee weight distribution, modular sum, and locally bounded functions, with optimal cases identified for several small parameter sets [2508.01702].

Over the chain ring \(\mathbb{Z}_{2^s}\), homogeneous-weight versions of FCCs were introduced under the name FCCHDs, again with an exact reduction to irregular-distance problems. For the homogeneous weight distribution function \(\Delta_T^h(x)=\lfloor w_h(x)/T\rfloor\), explicit FCCHDs achieve redundancy \(t\) when \(T\mid (2k+1)\), \(T\ge 2t+1\), and \(T<2k+1\) [2507.03332]. A broader homogeneous-metric theory later incorporated locally bounded functions, modular sum functions, and linear functions over \(\mathbb{Z}_{2^s}\) [2603.14471].

The insertion-deletion extension defines function-correcting deletion, insertion, and insdel codes and proves that the three formulations are equivalent. The insdel version requires
\[
d_{\mathrm{ID}}(\psi(x),\psi(y))>2t
\quad \text{whenever } f(x)\neq f(y),
\]
and the optimal redundancy is bounded through irregular insdel-distance codes. This framework was applied to VT syndrome functions, number-of-runs functions, maximum-run-length functions, and locally bounded functions [2512.07243].

## 6. Data protection, partition generalizations, and later developments

The original FCC model protects only function values. A later generalization imposes two distance levels: \(d_d\) for data protection and \(d_f\) for function protection, with \(d_d\le d_f\). An encoding is an \((f:d_d,d_f)\)-FCC if every pair of distinct messages is separated by at least \(d_d\), and every pair with different function values is separated by at least \(d_f\) [2511.18420]. This setting yields a distance requirement matrix with two thresholds and a two-step construction procedure: first protect the data by a systematic ECC, then add only the extra function-specific protection [2511.18420].

In the strict regime \(d_f>d_d\), graph structure becomes decisive. Using the \(\alpha\)-distance graph \(G_\alpha(C)\), it was shown that for linear codes the graph is isomorphic to a Cayley graph, so its connected components are cosets of the subcode generated by low-weight codewords. This converts the existence problem for strict FCCs into a subcode-generation problem. The paper also identified chain codes and narrow-sense BCH codes with designed distance three as sources of strict FCCs [2604.26397]. By contrast, perfect codes and MDS codes cannot provide additional protection to function values over and above the amount of protection for data, because their minimum-distance graphs are connected [2511.18420].

Partition-based generalization continued beyond single functions. FCPCs treat the function only through its induced partition, and generalized function-correcting partition codes (GFCPCs) simultaneously protect multiple partitions \(\mathcal{P}_1,\dots,\mathcal{P}_H\) at distances \(d_1,\dots,d_H\). Their optimal redundancy is characterized by a distance requirement matrix \(\mathcal{D}\), and the framework strictly generalizes both ordinary FCCs and FCCs with data protection [2605.03370].

Specialized case studies show that even when redundancy is fixed, code structure can matter. For the Hamming code membership function on \(\mathbb{F}_2^7\), valid single-error-correcting FCCs are characterized by a complementary parity rule, the distance-3 graph on Hamming codewords is bipartite, and a balanced bipartite construction uniquely achieves the maximum sum-distance \(73728\), the largest possible minimum distance \(2\), and the minimum number of distance-2 pairs [2602.21932]. For maximally-unbalanced Boolean functions, optimal single-error-correcting FCCs were classified through their codeword distance matrices, and different distance-matrix structures were shown to produce different data BER and function error behavior under AWGN with soft-decision and hard-decision decoding [2601.10135].

The current research landscape therefore contains several distinct regimes. Some are close to resolution, such as the large-field finite-field case \(r_f(k,t)=2t\) [2504.14410] and the threshold \(T\ge t+1\) for the Hamming weight distribution function [2502.16983]. Others remain explicitly open, including the conjecture that the binary upper bound \(t \log(2k)/(1-\log_e(2))\) should hold for all finite fields [2504.14410] and the broader problem of optimizing redundancy for insertion and deletion channels [2512.07243].

Source: https://www.emergentmind.com/topics/function-correcting-codes