Reverse-LOCO: Inversion in LOCO Codes & PEFT
- 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 , 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 | Reindexing by |
| DNA LOCO codes | Admissible sequence in | Sequence-to-index demapping |
| LoCO fine-tuning | Orthogonal adapter or chain | Exact or approximate inverse |
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 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 0 run-length-limited codes with 1, since the paper shows
2
The lexicographic index of a codeword 3, with 4 if 5 and 6 if 7, is
8
Within this framework, Reverse-LOCO is not a new constraint family. It is the reverse enumeration
9
Because this operation leaves 0 and 1 unchanged, it does not alter the constraint set, the recurrence for 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 3 that starts with 4, the codeword with index 5 is its bitwise complement 6. Under NRZ signaling, the disparity 7 is the difference between the number of 8’s and 9’s in 0, and complementary codewords satisfy
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 2, choosing the codeword whose disparity sign opposes the sign of 3. Self-clocked balanced LOCO codes, denoted CB-LOCO, remove the all-4’s and all-5’s codewords to enforce at least one transition per codeword. Their cardinality is
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,
7
whereas for the self-clocked balanced code,
8
The difference is exactly
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 0 grows.
The worked example with 1 and 2 makes the reverse relation concrete. Since 3, the codeword 4 has index 5, so its reverse index is 6, which corresponds to 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 8. For run parameter 9, the admissible set is
0
where the forbidden patterns are runs of identical symbols of length exceeding 1. Lexicographic order is defined by 2. 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 3 satisfies
4
with 5 and 6 for 7. The decoder computes the index
8
and the general encoding-decoding rule is
9
with the coefficient conditions specified by the local prefix/run pattern. The algorithm runs in 0 iterations, while arithmetic on up to 1-bit numbers yields an implementation complexity 2. The storage overhead for precomputed values is
3
The paper gives a concrete decoding example for 4 and 5. With 6, 7, 8, 9, 0, and 1, the Reverse-LOCO decoder maps 2 to index 3. The recovered binary message length, without bridging bits, is 4.
Complement symmetry again plays a central role. If 5 is defined by the mapping 6 and 7, then for odd 8 the paper shows
9
and the disparity
0
changes sign under complement. This enables GC-balancing by selecting either 1 or 2 per message, with a minimum 3 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 4,
5
and defines
6
so that 7. The forward orthogonal map is the Cayley transform
8
which can be written in low-rank form as
9
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.