Papers
Topics
Authors
Recent
Search
2000 character limit reached

Reverse-CGR: Reversible CGR for Sequence Recovery

Updated 12 July 2026
  • Reverse-CGR is a reversible formulation of chaos game representation that preserves complete sequence information through geometric encoding.
  • It employs two primary strategies—explicit-path storage and rational-trajectory computation—to enable exact inversion of traditional, irreversible CGR.
  • Extensions like MS-RCGR and FCGR reconstruction integrate multi-scale analysis and k-mer statistics, boosting classification and visualization in bioinformatics.

Reverse-CGR (R-CGR) denotes a set of reversible formulations of Chaos Game Representation for biological sequences. Across recent arXiv literature, the term is used for exact sequence recovery from stored CGR traces, for formal inversion of rational CGR trajectories, and for reconstruction of sequences from Frequency CGR (FCGR) or kk-mer statistics. In each case, the central objective is to remove the irreversibility of traditional CGR while retaining geometric structure suitable for visualization, feature extraction, and learning (Ali, 22 Sep 2025, Ali et al., 20 Apr 2026, He et al., 27 Jun 2025).

1. Conceptual basis and relation to classical CGR

Classical CGR maps a symbolic sequence to a geometric trace in the unit square, or more generally to corner points assigned to alphabet symbols, by iteratively moving toward the corner associated with the current symbol. In the reversible formulations, the same basic update is retained:

pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),

with initialization at p0=(0,0)p_0 = (0,0), where σ\sigma maps a symbol to its corner index and cσ(st)c_{\sigma(s_t)} is the corresponding corner (Ali et al., 20 Apr 2026).

The motivation for R-CGR is the irreversibility of standard CGR. Traditional CGR is described as losing the capacity to reconstruct the original sequence from the geometric path; character order and identity are not retrievable once the sequence has been mapped. The literature also identifies practical reasons for this failure: floating-point error accumulates during iteration, exact inversion is hindered, and the difficulty is amplified for larger alphabets such as proteins with m=20m=20 symbols (Ali, 22 Sep 2025, Ali et al., 20 Apr 2026).

This motivates a shift from purely geometric encoding to information-preserving geometric encoding. A plausible implication is that reversibility in this setting is not merely a decoding convenience but a design constraint that changes how corners are assigned, how coordinates are stored, and what auxiliary information is retained.

2. Exact reversibility from geometric trajectories

Two closely related but technically distinct reversible constructions appear in the literature. One stores the complete path explicitly. The other proves that exact inversion is possible from the rational trajectory itself.

In the explicit-path formulation, R-CGR augments CGR by storing the entire path trace. At each step, the representation records the current character sjs_j, the previous position pj1\mathbf{p}_{j-1}, the new position pj\mathbf{p}_j, and the corner point CkC_k associated with pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),0. The trace is

pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),1

and reconstruction is obtained by reading the stored characters in order; this yields exact recovery because character and positional information are preserved stepwise (Ali, 22 Sep 2025).

A second line of work constructs exact reversibility without storing the character stream separately. The corner set is placed on a rational grid:

pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),2

with pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),3. Because the corners are distinct rationals and all arithmetic is exact, the inverse step is

pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),4

The stated theorem gives perfect reconstruction for pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),5: if pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),6, the trajectory pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),7 is given, and pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),8, then the sequence can be recovered in pt=12(pt1+cσ(st)),p_t = \frac{1}{2}\big(p_{t-1} + c_{\sigma(s_t)}\big),9 time by computing each corner from adjacent points and mapping it back to its unique symbol (Ali et al., 20 Apr 2026).

Formulation Given representation Recovery mechanism
Explicit-path R-CGR Final point plus path trace p0=(0,0)p_0 = (0,0)0 Concatenate stored symbols in order
Rational-trajectory Reverse-CGR Exact trajectory p0=(0,0)p_0 = (0,0)1 Compute p0=(0,0)p_0 = (0,0)2 and identify the corner

For p0=(0,0)p_0 = (0,0)3, the rational inverse is applied to the stream of p0=(0,0)p_0 = (0,0)4-mers rather than single symbols; the full sequence is then reconstructed by concatenating overlapping p0=(0,0)p_0 = (0,0)5-mers through greedy overlap-extension. The literature states that this is always possible when the p0=(0,0)p_0 = (0,0)6-mers form a path in the de Bruijn graph induced by the sequence (Ali et al., 20 Apr 2026).

3. Multi-scale reversible CGR and hierarchical encoding

The multi-scale extension, termed Multi-Scale Reversible Chaos Game Representation (MS-RCGR), generalizes reversible CGR from single symbols to hierarchical p0=(0,0)p_0 = (0,0)7-mer streams. For each scale p0=(0,0)p_0 = (0,0)8, one defines

p0=(0,0)p_0 = (0,0)9

maps each unique σ\sigma0-mer deterministically to a symbol, and applies the same rational CGR process to that stream. The resulting multi-scale encoding is

σ\sigma1

The description in the source states that this permits patterns ranging from individual nucleotides to motif structures of length σ\sigma2 to be jointly and losslessly represented (Ali et al., 20 Apr 2026).

MS-RCGR is presented as a unified framework spanning three analytical paradigms: traditional machine learning using extracted geometric features, computer vision models operating on CGR-generated images, and hybrid approaches combining protein LLM embeddings with CGR features. The reversibility property is used here as a guarantee that the transformation preserves complete sequence information rather than discarding it for feature convenience alone (Ali et al., 20 Apr 2026).

This suggests a broader interpretation of Reverse-CGR: not only as a decoder, but as an encoding discipline in which reversibility is maintained across scales, alphabets, and downstream model families.

4. Reconstruction from FCGR and σ\sigma3-mer statistics

A different use of “Reverse-CGR” appears in reconstruction from FCGR images or σ\sigma4-mer frequency vectors. In that setting, the central result is that the FCGR of order σ\sigma5 is mathematically equivalent to the σ\sigma6-mer frequency vector of the sequence, and that FCGR arises by discretizing CGR at resolution σ\sigma7. For a sequence σ\sigma8 and a σ\sigma9-mer cσ(st)c_{\sigma(s_t)}0, the source states

cσ(st)c_{\sigma(s_t)}1

This establishes a bijective mapping between FCGR grid indices and cσ(st)c_{\sigma(s_t)}2-mers (He et al., 27 Jun 2025).

The associated reconstruction procedure uses a de Bruijn multigraph. Vertices are the observed cσ(st)c_{\sigma(s_t)}3-mers. Each cσ(st)c_{\sigma(s_t)}4-mer cσ(st)c_{\sigma(s_t)}5 becomes a directed edge from cσ(st)c_{\sigma(s_t)}6 to cσ(st)c_{\sigma(s_t)}7 with multiplicity equal to its target count cσ(st)c_{\sigma(s_t)}8. Reconstruction then proceeds by finding an Eulerian trail or cycle whose traversal emits a DNA sequence with the desired overlapping cσ(st)c_{\sigma(s_t)}9-mer composition. The marginal constraint is

m=20m=200

for each m=20m=201-mer vertex m=20m=202, except for possible start and end vertices in the linear case (He et al., 27 Jun 2025).

When exact balance is absent, the method adds the minimum number of artificial edges, or equivalently short m=20m=203-mer walks, to restore Eulerian feasibility. Given a target frequency profile m=20m=204 and sequence length m=20m=205, integer counts are formed as

m=20m=206

and the paper states the following error guarantee:

m=20m=207

provided

m=20m=208

This version of Reverse-CGR therefore reconstructs a sequence matching the prescribed m=20m=209-mer statistics with bounded error, rather than necessarily recovering the unique original sequence (He et al., 27 Jun 2025).

The same work also proves that symmetries of CGR images under the dihedral group sjs_j0 correspond to specific nucleotide permutations in the originating sequence. That result links image-level geometric operations to symbolic transformations of DNA and further clarifies the relationship between CGR geometry and sequence combinatorics (He et al., 27 Jun 2025).

5. Empirical performance and downstream use

Reversible CGR methods are used not only for reconstruction but also for classification and hybrid feature design. The explicit-path R-CGR paper evaluates 7-class synthetic biological sequence classification involving 4 DNA classes and 3 protein classes. The reported results include the following accuracy and F1 values (Ali, 22 Sep 2025):

Model Accuracy F1
R-CGR + VGG16 0.7907 0.7906
R-CGR + Logistic Reg. 0.7650 0.7670
SeqVec 0.7825 0.7784
ESM2 0.7451 0.7418
ProtT5 0.7348 0.7291
Spike2CGR 0.7575 0.7499

The same source states that R-CGR images with VGG16 outperform all baselines, and that even R-CGR with logistic regression exceeds sophisticated language-model baselines. The representation is described as generating feature-rich images suitable for deep learning while maintaining complete sequence information through explicit encoding (Ali, 22 Sep 2025).

MS-RCGR reports complementary empirical behavior. Across synthetic DNA and protein datasets containing seven distinct sequence classes, MS-RCGR features are said to consistently enhance classification performance across traditional machine learning, computer vision, and hybrid paradigms. In particular, the hybrid approach combining pre-trained LLM embeddings such as ESM2 and ProtT5 with MS-RCGR features is reported to achieve superior performance compared to either method alone (Ali et al., 20 Apr 2026).

These results position Reverse-CGR as both a reconstruction mechanism and a modeling substrate. The geometric representation can be rendered as images for CNNs, converted into extracted descriptors for conventional classifiers, or fused with protein LLM embeddings in hybrid systems.

6. Interpretability, storage, and terminological distinctions

Interpretability is a recurring motivation. The reversible encodings are presented as preserving direct links between geometric structure and sequence identity, enabling both machine analysis and human inspection. The explicit-path formulation describes position-aware coloring and feature-rich geometric traces, with DNA yielding square-patterned traces and proteins yielding intricate 20-sided polygon traces. Because the transformation is reversible, visual features can be related back to the underlying sequence rather than treated as anonymous image artifacts (Ali, 22 Sep 2025).

The explicit-path approach also gives a storage expression. If each step records the current character together with bounded-rational coordinates, total storage over sjs_j1 steps is stated as

sjs_j2

The same source states that R-CGR cannot compress below the sequence entropy sjs_j3 without losing fidelity, matching Shannon’s theorem. This places a theoretical limit on how much reversibility can be achieved without storage overhead (Ali, 22 Sep 2025).

A common source of confusion is that “reversibility” is used in more than one sense. In the explicit-path variant, perfect reconstruction is guaranteed because the path trace stores the symbols themselves. In the rational-trajectory variant, perfect reconstruction follows from exact arithmetic, distinct corners, and access to the full trajectory. In the FCGR/sjs_j4-mer setting, reconstruction refers to generating a sequence whose empirical sjs_j5-mer profile matches a target profile, with provable error bounds but not necessarily uniqueness of the recovered sequence (Ali et al., 20 Apr 2026, He et al., 27 Jun 2025).

Another common misconception is that classical CGR is already reversible. The cited literature states the opposite: traditional CGR loses sequence information during geometric mapping, and floating-point implementations introduce further irreversibility. Reverse-CGR is therefore best understood not as a minor implementation adjustment, but as a family of methods that redesign CGR around information preservation, exact arithmetic, or combinatorial reconstruction.

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-CGR (R-CGR).