Papers
Topics
Authors
Recent
Search
2000 character limit reached

Local Random Access Sequence (LRAS)

Updated 3 July 2026
  • Local Random Access Sequence (LRAS) is a formal model that supports efficient local edits and random queries on large structured data.
  • It leverages persistent data structures such as the Random Access Zipper to achieve sublinear and logarithmic access times for editing and navigation.
  • LRAS underpins applications ranging from sublinear combinatorial sampling to advanced autoregressive generative models with flexible, pointer-driven decoding.

A Local Random Access Sequence (LRAS) is a formal model and family of algorithms arising across theoretical computer science, combinatorics, and machine learning, providing efficient, compositional, and locality-preserving access to large random objects, persistent data structures, and flexible generative models. The distinguishing feature of LRAS constructions is their ability to support local edits, evaluations, or random queries at arbitrary positions, with consistency guarantees and, typically, sublinear or even logarithmic access and update costs. LRAS concepts underpin developments in efficient data structures, sublinear sampling algorithms, and, more recently, autoregressive models for high-dimensional data such as images and videos with random-access decoding.

1. Mathematical Definition and Core Properties

The Local Random Access Sequence (LRAS) paradigm targets the efficient emulation or construction of sequences—algebraic, combinatorial, or statistical—admitting both local and global access guarantees within a single formalism. In the persistent data structure setting, an LRAS over an element type α\alpha consists of a collection SS of sequences length nn with two principal capabilities:

  • Local edit and view: Support for efficient (often constant-time) operations to insert, delete, replace, or view the element at a "focus" or "cursor" position.
  • Global move: Support for efficient navigation to, or access of, an element at an arbitrary index, typically in logarithmic time.

Formally, this is realized by operations such as

focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}

where Z αZ\ \alpha is the zipper/cursor-equipped view, and the guarantees are O(1)O(1) worst-case or amortized for local edits, O(logn)O(\log n) for (un)focusing, and O(1)O(1) for view operations (Headley et al., 2016).

In the random access sampling context, an LRAS algorithm (oracle) emulates local queries on a large random combinatorial object XX (e.g., a long Dyck path, a solution to a kk-CNF formula, random walk, or coloring), ensuring that:

  • There exists a single globally consistent SS0 (possibly sampled on-the-fly).
  • Queries (e.g., SS1 or SS2) are answered in sublinear time, often SS3.
  • The distribution is (approximately) statistical uniform over the object family (Biswas et al., 2017, Dong et al., 2024, Biswas et al., 2021).

2. Persistent Data Structures: The Random Access Zipper

An archetypal LRAS data structure is the Random Access Zipper (RAZ), introduced as a simple, purely functional realization of a sequence with editable local focus and global navigation (Headley et al., 2016). The RAZ represents a sequence as a (probabilistically) balanced binary tree of labeled nodes, where:

  • Each leaf is assigned a random level SS4 with SS5 (yielding expected logarithmic height).
  • The cursor (zipper) is a triplet SS6, isolating focus SS7 and maintaining left/right paths as t-lists encoding the tree shape and subtree levels.

Principal operations and costs:

  • SS8: Brings the cursor to position SS9 in nn0 expected time.
  • nn1: Modifies the focused element in nn2 time.
  • nn3: Moves focus left/right in nn4 amortized time.
  • nn5: Reconstructs the full tree in nn6 time if nn7 local edits, nn8 if nn9.

Distinct from classic finger trees, the RAZ’s shape is history-insensitive (insert sequences yield identical structure), aiding persistent hashing and structural sharing. The model admits direct extensions: priority annotations, interval trees, deterministic balancing, or alternative cursor semantics (Headley et al., 2016).

3. Random Access Sampling of Large Combinatorial Objects

An important application of LRAS is in sublinear-time random sampling from large discrete structures. The model formalizes an oracle focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}0 giving query access to a vast combinatorial family focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}1 (e.g., Dyck paths, random walks, focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}2-SAT assignments), guaranteeing that:

  • Each query is consistent with a single focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}3.
  • The hidden focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}4 is (nearly) uniform over focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}5.
  • Each query is answered in focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}6 time, memory, and randomness (Biswas et al., 2017).

Typical instantiations:

  • Dyck paths/bracketings: Height queries and first-return queries are resolved by recursive interval partitioning, leveraging the Catalan-trapezoid combinatorics. After each query, the sequence is partitioned into intervals encoded by key breakpoints, supporting efficient conditional midpoint sampling. The total distributional error can be driven to focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}7 (Biswas et al., 2017).
  • focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}8-SAT solution sampling: The model implements an oracle focus:S αNZ α unfocus:Z αS α insert, delete, replace, move:Z αZ α view:Z αα\begin{align*} &\text{focus}: S\ \alpha \to \mathbb{N} \to Z\ \alpha \ &\text{unfocus}: Z\ \alpha \to S\ \alpha \ &\text{insert, delete, replace, move}: Z\ \alpha \to Z\ \alpha \ &\text{view}: Z\ \alpha \to \alpha \end{align*}9 such that for every query of the coordinate Z αZ\ \alpha0 in the solution Z αZ\ \alpha1, there exists a single assignment Z αZ\ \alpha2 consistent with all queries, with total-variation distance to uniform at most Z αZ\ \alpha3. The core construction leverages local marking (via a local computation algorithm), recursive "overflow" marginal sampling, and shattering to reduce the dependency graph to polylog-sized components, each handled by exact uniform samplers (Dong et al., 2024).
  • Random walks: For undirected Z αZ\ \alpha4-regular graphs, the position at time Z αZ\ \alpha5 is answered via a branching/collision-based approach on a partially revealed transcript, maintaining joint fidelity to the global random walk law (within Z αZ\ \alpha6 in Z αZ\ \alpha7), with Z αZ\ \alpha8 query complexity for expanders and Z αZ\ \alpha9 time for Cayley/hypercube structures (Biswas et al., 2021).

4. LRAS in Autoregressive and Generative Modeling

The LRAS paradigm has been adapted in state-of-the-art generative modeling, particularly for image, video, and 3D scene understanding under high compositional or spatial control. The "Local Random Access Sequence" (LRAS) in this setting refers to an explicit factorization strategy for generative models, combining local patch quantization with arbitrary, pointer-driven generation orders (Lee et al., 4 Apr 2025, Kim et al., 11 Jul 2025).

Core architectural features:

  • Local Patch Quantization: Input images (or flow fields) are tokenized via convolutional autoencoders into per-patch codes (e.g., O(1)O(1)0 grid, O(1)O(1)1 codebook).
  • Pointer–Content Sequences: Randomized or flexible (not raster-order) generation orders are encoded via pointer tokens, addressing each spatial slot.
  • Autoregressive Factorization: The full grid of pointer–content pairs is modeled as a sequence, with standard next-token prediction or conditional prediction given fixed pointers.
  • Random Access Decoding: At inference, any subset of patches can be revealed or generated in parallel/arbitrary order—enabling direct partial completions, flow/image interleaving, or object-centric manipulation via spatial masking.
  • Probabilistic Decoding: Each patch is generated via probability distributions over discrete token codes, not just point predictions.

This architecture enables precise scene manipulations, compositional inference, and self-supervised depth estimation via flow prediction, outperforming prior diffusion-based models in NVS (novel view synthesis), object editing, and zero-shot flow extraction benchmarks (Lee et al., 4 Apr 2025, Kim et al., 11 Jul 2025).

5. Analytical Guarantees and Lower Bounds

LRAS algorithms across domains are characterized by precise computational and statistical guarantees:

Problem Domain Per-query Complexity Statistical Guarantee Structural Lower Bound
Persistent sequences O(1)O(1)2 edit, O(1)O(1)3 focus Functional, persistent correctness Simple structure, history-insensitivity
Dyck path/RW/CSP O(1)O(1)4 O(1)O(1)5 total-variation from uniform Impossibility of O(1)O(1)6 for RW
Image generative O(1)O(1)7 patch generation (parallelizable) Next-token cross-entropy, full compositionality N/A

For random walks, no algorithm with O(1)O(1)8 probes can answer local access queries with subconstant error (Biswas et al., 2021). For general O(1)O(1)9-SAT or CSPs, LRAS models are known in the LLL regime, but earlier constructions for O(logn)O(\log n)0-colorings required O(logn)O(\log n)1 for bounded-degree graphs (Dong et al., 2024, Biswas et al., 2017).

6. Applications, Extensions, and Outlook

LRAS methodologies underpin various advances:

  • Data structures: Fast persistent sequence editors, functional segment trees, and interval trees, with natural room for monoidal extension or perfect balancing (Headley et al., 2016).
  • Sublinear algorithms: Partial random-walk simulators, random combinatorial sampler oracles for large families.
  • Machine learning: Unified architectures for novel view synthesis, object-level video editing, self-supervised depth estimation, and zero-shot flow extraction—notably the pointer–content factorization enables precise local or object-centric scene control (Lee et al., 4 Apr 2025, Kim et al., 11 Jul 2025).
  • Theoretical frameworks: LRAS constructions generalize to high-temperature Gibbs distributions in constraint satisfaction and spin systems, conditional on shattering and local sampling properties (Dong et al., 2024).

A plausible implication is that the LRAS random-access factorization—pointer-based serialization with local patch quantizers—provides a generic skeleton for future controllable, compositional, and computationally efficient generative modeling frameworks.

LRAS shares conceptual ground with, but is distinct from:

  • Finger trees and vectors: Both support efficient splits/edits, but RAZ (the canonical LRAS) achieves equivalent asymptotics with simpler invariants and data path (Headley et al., 2016).
  • Diffusion models (vision): Diffusion-based approaches require expensive encoder inversion for editing and lack patchwise random-access manipulation; LRAS factorization avoids these limitations (Lee et al., 4 Apr 2025).
  • Global-sequential autoregressive models: Standard raster-ordered LLMs for images exhibit causal bias, precluding patchwise or parallel access, while pointer–content LRAS models eliminate generation-order rigidity.
  • Sublinear sampling models: Early models for coloring and constraint satisfaction were restricted to high O(logn)O(\log n)2 or limited dependencies; new LRAS constructions extend this to exponential-clause-density O(logn)O(\log n)3-SAT and large random objects without full materialization (Dong et al., 2024, Biswas et al., 2017).

Continued research is extending the LRAS paradigm to broader classes of random objects (e.g., additional CSPs, more general graphical models) and deep generative architectures, with a focus on improved compositionality and controllability.

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 Local Random Access Sequence (LRAS).