Papers
Topics
Authors
Recent
Search
2000 character limit reached

Reverse-LOCO: Inversion in LOCO Codes & PEFT

Updated 5 July 2026
  • Reverse-LOCO is a reverse mapping mechanism used in binary and DNA LOCO codes and in low-rank PEFT to invert forward operations.
  • It enables reindexing of lexicographically ordered constrained codebooks, supporting complement symmetry, error detection, and balanced signaling.
  • In PEFT, Reverse-LOCO provides an efficient inverse of low-rank orthogonal adapters, allowing reversible fine-tuning without altering baseline model behavior.

Reverse-LOCO denotes an inverse or reverse-order operation within the broader LOCO family, but its technical meaning is context dependent. In binary lexicographically-ordered constrained codes, the 2019 LOCO paper does not introduce “Reverse-LOCO” as a separate code construction; instead, reverse indexing appears through the map grev(c)=N(m,x)1g(c)g_{\mathrm{rev}}(c)=N(m,x)-1-g(c), which is used to identify complementary codewords in the lexicographically ordered codebook. In DNA LOCO codes, Reverse-LOCO is the sequence-to-index decoder for admissible $4$-ary codewords. In Low-rank Compositional Orthogonal fine-tuning, Reverse-LOCO is the exact or approximate inverse of a low-rank orthogonal adapter constructed from Cayley transforms and compositional rotation chains (Hareedy et al., 2019, İrimağzı et al., 2023, Nguyen et al., 15 May 2026).

1. Scope of the term

The term is used in multiple ways across the literature, and the distinctions are operational rather than merely terminological. In constrained coding, Reverse-LOCO refers to reversing an enumeration or decoding a lexicographically ordered admissible sequence. In orthogonal PEFT, it refers to inverting a learned transformation.

Context Forward object Reverse-LOCO operation
Binary LOCO codes Lexicographically ordered codebook Cm,x\mathcal{C}_{m,x} Reindexing by N(m,x)1g(c)N(m,x)-1-g(c)
DNA LOCO codes Admissible sequence in Dm,\mathcal{D}_{m,\ell} Sequence-to-index demapping g(c)g(\mathbf{c})
LoCO fine-tuning Orthogonal adapter RR or chain k=1KRk\prod_{k=1}^{K} R_k Exact or approximate inverse R1R^{-1}

A recurrent misconception is to treat Reverse-LOCO as a single, universally defined construction. The cited papers support a narrower formulation: the name denotes a reverse map relative to a forward LOCO mechanism, but the object being reversed differs across line coding, DNA constrained coding, and orthogonal fine-tuning (Hareedy et al., 2019, İrimağzı et al., 2023, Nguyen et al., 15 May 2026).

2. Reverse indexing in binary LOCO codes

Binary LOCO codes are fixed-length, binary constrained codes for bipolar non-return-to-zero signaling. A code with parameters m1m \ge 1 and $4$0 is denoted by $4$1, and its codewords are all binary sequences of length $4$2 that avoid the forbidden-pattern set

$4$3

The codebook is ordered lexicographically with $4$4 and decreasing bit significance from left to right. This lexicographic structure is not incidental: it is the mechanism that enables enumerative encoding and decoding (Hareedy et al., 2019).

The cardinality $4$5 satisfies the base case $4$6 for $4$7 and the recurrence

$4$8

For $4$9, this becomes the Fibonacci recurrence. The asymptotic capacity equals that of Cm,x\mathcal{C}_{m,x}0 run-length-limited codes with Cm,x\mathcal{C}_{m,x}1, since the paper shows

Cm,x\mathcal{C}_{m,x}2

The lexicographic index of a codeword Cm,x\mathcal{C}_{m,x}3, with Cm,x\mathcal{C}_{m,x}4 if Cm,x\mathcal{C}_{m,x}5 and Cm,x\mathcal{C}_{m,x}6 if Cm,x\mathcal{C}_{m,x}7, is

Cm,x\mathcal{C}_{m,x}8

Within this framework, Reverse-LOCO is not a new constraint family. It is the reverse enumeration

Cm,x\mathcal{C}_{m,x}9

Because this operation leaves N(m,x)1g(c)N(m,x)-1-g(c)0 and N(m,x)1g(c)N(m,x)-1-g(c)1 unchanged, it does not alter the constraint set, the recurrence for N(m,x)1g(c)N(m,x)-1-g(c)2, or the capacity. The paper’s own discussion states that reversing order does not affect ISI mitigation, ICI alleviation, self-clocking properties, or the essential encoder/decoder structure. A plausible implication is that Reverse-LOCO in the binary setting is best understood as a reindexing of the same constrained object rather than a distinct code (Hareedy et al., 2019).

3. Complement symmetry, balancing, and self-clocked variants

The main structural reason reverse indexing matters in binary LOCO codes is complement symmetry. The paper proves that for any codeword N(m,x)1g(c)N(m,x)-1-g(c)3 that starts with N(m,x)1g(c)N(m,x)-1-g(c)4, the codeword with index N(m,x)1g(c)N(m,x)-1-g(c)5 is its bitwise complement N(m,x)1g(c)N(m,x)-1-g(c)6. Under NRZ signaling, the disparity N(m,x)1g(c)N(m,x)-1-g(c)7 is the difference between the number of N(m,x)1g(c)N(m,x)-1-g(c)8’s and N(m,x)1g(c)N(m,x)-1-g(c)9’s in Dm,\mathcal{D}_{m,\ell}0, and complementary codewords satisfy

Dm,\mathcal{D}_{m,\ell}1

Thus the reverse index is already embedded in the balancing construction (Hareedy et al., 2019).

Balanced LOCO codes pair each message with two complementary codewords and select between them according to the running disparity Dm,\mathcal{D}_{m,\ell}2, choosing the codeword whose disparity sign opposes the sign of Dm,\mathcal{D}_{m,\ell}3. Self-clocked balanced LOCO codes, denoted CB-LOCO, remove the all-Dm,\mathcal{D}_{m,\ell}4’s and all-Dm,\mathcal{D}_{m,\ell}5’s codewords to enforce at least one transition per codeword. Their cardinality is

Dm,\mathcal{D}_{m,\ell}6

and at most half of these correspond to distinct messages because each message is represented by two complementary codewords.

The rate formulas make the balancing penalty explicit. For the self-clocked unbalanced code,

Dm,\mathcal{D}_{m,\ell}7

whereas for the self-clocked balanced code,

Dm,\mathcal{D}_{m,\ell}8

The difference is exactly

Dm,\mathcal{D}_{m,\ell}9

The paper emphasizes that this one-bit minimum penalty is the minimal possible rate penalty for the two-codeword-per-message approach, and that the loss vanishes as g(c)g(\mathbf{c})0 grows.

The worked example with g(c)g(\mathbf{c})1 and g(c)g(\mathbf{c})2 makes the reverse relation concrete. Since g(c)g(\mathbf{c})3, the codeword g(c)g(\mathbf{c})4 has index g(c)g(\mathbf{c})5, so its reverse index is g(c)g(\mathbf{c})6, which corresponds to g(c)g(\mathbf{c})7, its complement. This suggests that in binary LOCO usage, Reverse-LOCO is less a separate decoding rule than a symmetry operator that underpins DC-free signaling and minimal-cost balancing (Hareedy et al., 2019).

4. Reverse-LOCO decoding in DNA LOCO codes

DNA LOCO codes transpose the lexicographically ordered constrained-coding idea to the alphabet g(c)g(\mathbf{c})8. For run parameter g(c)g(\mathbf{c})9, the admissible set is

RR0

where the forbidden patterns are runs of identical symbols of length exceeding RR1. Lexicographic order is defined by RR2. In this paper, Reverse-LOCO is explicitly the inverse mapping from an admissible sequence to its lexicographic index (İrimağzı et al., 2023).

The cardinality RR3 satisfies

RR4

with RR5 and RR6 for RR7. The decoder computes the index

RR8

and the general encoding-decoding rule is

RR9

with the coefficient conditions specified by the local prefix/run pattern. The algorithm runs in k=1KRk\prod_{k=1}^{K} R_k0 iterations, while arithmetic on up to k=1KRk\prod_{k=1}^{K} R_k1-bit numbers yields an implementation complexity k=1KRk\prod_{k=1}^{K} R_k2. The storage overhead for precomputed values is

k=1KRk\prod_{k=1}^{K} R_k3

The paper gives a concrete decoding example for k=1KRk\prod_{k=1}^{K} R_k4 and k=1KRk\prod_{k=1}^{K} R_k5. With k=1KRk\prod_{k=1}^{K} R_k6, k=1KRk\prod_{k=1}^{K} R_k7, k=1KRk\prod_{k=1}^{K} R_k8, k=1KRk\prod_{k=1}^{K} R_k9, R1R^{-1}0, and R1R^{-1}1, the Reverse-LOCO decoder maps R1R^{-1}2 to index R1R^{-1}3. The recovered binary message length, without bridging bits, is R1R^{-1}4.

Complement symmetry again plays a central role. If R1R^{-1}5 is defined by the mapping R1R^{-1}6 and R1R^{-1}7, then for odd R1R^{-1}8 the paper shows

R1R^{-1}9

and the disparity

m1m \ge 10

changes sign under complement. This enables GC-balancing by selecting either m1m \ge 11 or m1m \ge 12 per message, with a minimum m1m \ge 13 bit penalty that vanishes asymptotically.

Bridging determines how Reverse-LOCO interacts with error detection and extra bits:

Scheme Bridge structure Stated property
I 1-symbol bridge Encodes 1 bit; no per-codeword detection
II-A 3-symbol bridge with checksum Single substitution detection per codeword
II-B 3-symbol bridge, 1 extra bit Balancing-friendly; single substitution detection
III 5-symbol bridge, triple checksum Single substitution detection; lower miss probability

Because Reverse-LOCO decodes the codeword index and, when applicable, the bridge bits while skipping the bridge in the stream, it is part of a complete constrained-coding and error-detection stack rather than an isolated demapper (İrimağzı et al., 2023).

5. Reverse-LOCO as inversion of low-rank orthogonal adapters

In the 2026 LoCO fine-tuning paper, Reverse-LOCO is an exact or approximate inverse for a parameter-efficient orthogonal transformation. LoCO constructs a skew-symmetric generator from low-rank matrices m1m \ge 14,

m1m \ge 15

and defines

m1m \ge 16

so that m1m \ge 17. The forward orthogonal map is the Cayley transform

m1m \ge 18

which can be written in low-rank form as

m1m \ge 19

Multiple such rotations are composed into a chain

$4$00

and a first-order parallel approximation replaces the sequential product by a sum of low-rank updates (Nguyen et al., 15 May 2026).

Reverse-LOCO is the inverse of this adapter. For a single component,

$4$01

For a chain,

$4$02

If the first-order approximation $4$03 is used, then for small $4$04 the inverse is approximated by

$4$05

and the orthogonality deviation satisfies

$4$06

when each component obeys $4$07. The same paper also defines temperature control

$4$08

with

$4$09

so Reverse-LOCO at inference can be implemented by evaluating the adapter with negative temperature.

This is a stronger notion of reversal than in constrained coding. In the PEFT setting, Reverse-LOCO is an operator inverse, not merely a reverse traversal of an ordering. If a layer is adapted as $4$10, baseline behavior can be recovered by applying $4$11 to the features before the frozen weight. The paper explicitly presents this as reversible PEFT that can turn adaptations on or off post-training without reloading checkpoints (Nguyen et al., 15 May 2026).

6. Complexity, performance, and practical significance

Across the three literatures, Reverse-LOCO preserves the low-complexity design philosophy of the forward method, but the relevant complexity terms differ. In binary LOCO codes, encoding is mainly comparisons and subtractions, decoding is additions, the values $4$12 are precomputed and stored, and multiplying by $4$13 is a $4$14-bit right shift in binary. Reverse lexicographic enumeration does not materially change this structure; it introduces at most a single subtraction $4$15 in index mapping. The same paper reports that moderate-length C-LOCO codes achieve up to $4$16 rate gain over practical FSM-based constrained codes for the same purpose, and that using a LOCO code to encode only the parity bits of an LDPC code yields about $4$17 channel density gain in MR systems (Hareedy et al., 2019).

In DNA LOCO codes, Reverse-LOCO decoding runs in $4$18 iterations with implementation complexity $4$19 and storage $4$20 for the precomputed cardinalities. The paper contrasts this with lookup-table approaches that scale like $4$21, and states that the same decoder hardware can be reprogrammed to switch $4$22, $4$23, or bridging scheme by changing the stored cardinalities and comparison thresholds. D-LOCO is also described as capacity-achieving, intrinsically balanced, and able to support single substitution error detection under Schemes II-A, II-B, and III. For $4$24, the normalized asymptotic capacity is $4$25 with largest root $4$26 (İrimağzı et al., 2023).

In LoCO fine-tuning, the exact per-component forward pass has dominant cost $4$27 per component, plus $4$28 setup amortized across the batch; the exact chain multiplies this by $4$29, whereas the first-order parallel approximation has critical-path span $4$30. The parameter count is $4$31 per rotated linear module. Empirically, the paper reports that LoCO $4$32 achieves mean GLUE score $4$33, that LoCO $4$34 attains GSM8K $4$35 and MATH $4$36, and that it provides competitive image quality and better CLIP-Image alignment on diffusion tasks such as Mask and Deblur. Reverse-LOCO inherits the same input-centric low-rank structure because inversion is reduced to solves in $4$37 systems rather than $4$38 inversions (Nguyen et al., 15 May 2026).

Taken together, these results show that Reverse-LOCO is not a single algorithmic primitive but a family resemblance across LOCO-derived methods. In binary LOCO, it is reverse indexing over a fixed constrained codebook; in D-LOCO, it is the arithmetic sequence-to-index decoder; in LoCO PEFT, it is exact or approximate inversion of a composed orthogonal map. What remains invariant is the reliance on structured enumeration or low-rank algebra to make reversal practical without changing the fundamental forward object.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Reverse-LOCO.