---
title: Log-Polar Space Convolution
url: https://www.emergentmind.com/topics/log-polar-space-convolution-lpsc
type: topic
---

# Log-Polar Space Convolution

A Recurrent Attention Model with Log-Polar Mapping (RAM-LPM) is a bio-inspired vision architecture that extracts and processes sequences of log-polar “glimpses” from input images, emulating foveated vision and saccadic attention mechanisms observed in the primate visual system. This design confers inherent robustness to geometric transformations, computational efficiency, and—in some variants—increased resistance to adversarial attacks. RAM-LPM comprises a differentiable glimpse-sensor based on the log-polar transform, a recurrent attention mechanism to select fixation points, and a policy for adapting the focus of attention over time based on task objectives. It has been realized in classification, reinforcement learning, and adversarially robust settings, as exemplified by models in RetinotopicNet [2005.05701], adversarially robust RAM-LPM [2002.05388], and log-polar gaze control for RL agents [2309.12634].

## 1. Log-Polar Mapping: Formulation and Properties

The log-polar transform maps Cartesian image coordinates $(x, y)$ to log-polar coordinates $(\rho, \varphi)$ relative to a chosen pole $(x_c, y_c)$:

\[
r = \sqrt{(x - x_c)^2 + (y - y_c)^2}, \qquad
\varphi = \mathrm{atan2}(y - y_c, x - x_c),
\]
\[
\rho = \log r.
\]

The inverse mapping reconstructs pixel locations for differentiable sampling:

\[
x = e^{\rho}\cos\varphi + x_c, \quad
y = e^{\rho}\sin\varphi + y_c.
\]

The log-polar patch samples the input image with high resolution at the center and logarithmically coarser resolution toward the periphery, mimicking retinal foveation [2005.05701]. Log-polar sampling induces equivariance to global scale and rotation, e.g.,

\[
(\rho, \theta) \mapsto (\rho + \log s,\, \theta + \phi)
\]

for image scale $s$ and rotation $\phi$ [2002.05388].

Some RAM-LPM variants use stacked rectangular windows with increasing subsampling rates emulating log-polar properties, called “log-polar–like” sampling [2309.12634]. All methods result in fixed-size tensors encoding both fine central and coarse contextual information.

## 2. Model Architecture and Variants

### A. Core Components

- **Glimpse Sensor (Log-Polar Retina):** At each timestep, a fixed-size log-polar patch centered at $(x_t, y_t)$ is sampled and regridded.
- **Feature Extraction:** Glimpse patches are processed by convolutional (CNN) backbones, often with padding choices reflecting the topology of log-polar coordinates—wrap-around for angular and reflect for radial axes.
- **Recurrent Aggregation:** Features from multiple timesteps are integrated using either vanilla RNNs [2005.05701] or LSTMs [2002.05388, 2309.12634].
- **Attention/Localization Network:** Computes the policy for next fixation. Techniques include deterministic coordinate regression (spatial softmax over CNN maps) [2005.05701], or stochastic Gaussian policies trained via REINFORCE [2002.05388].
- **Classifier Head:** Final prediction is made by a lightweight MLP on the aggregated recurrent state.

### B. Major Architectural Variants

| Model                    | Sampling   | Attention Policy         | Aggregation   | Task           |
|--------------------------|------------|-------------------------|---------------|----------------|
| RetinotopicNet [2005.05701] | Log-polar   | Deterministic (softmax)  | Vanilla RNN   | Classification |
| Adversarial RAM-LPM [2002.05388] | Log-polar   | Stochastic (REINFORCE)     | Two-pathway LSTMs | Robust classification |
| RL Log-polar [2309.12634]         | Log-polar–like | A3C-LSTM RL        | LSTM          | RL + gaze control |

*RetinotopicNet* uses a spatially differentiable, deterministic softmax-based saccade mechanism, while *Adversarial RAM-LPM* and RL variants leverage policy-gradient-based stochastic attention.

## 3. Recurrent Attention and Gaze Policies

In RAM-LPM, classification or control arises from sequences of glimpses centered at algorithmically selected locations:

- At each step $t$, state variables $(x_t, y_t)$ designate the next fixation center.
- Feature maps from the glimpse feed into the attention network:
  - *RetinotopicNet*: score map $S$ via $1 \times 1$ conv layers, spatial softmax to $P_{u,v}$, next $(\rho',\varphi') = \sum P_{u,v} (\Phi_{u,v}, \Rho_{u,v})$ mapped back to Cartesian [2005.05701].
  - *Adversarial RAM-LPM/RL*: LSTM outputs $\mu_{x}, \mu_{y}$ as means of a Gaussian policy, with sampling for exploration and robustness [2002.05388, 2309.12634].
- The attending process is recurrent: features $g_t$ or $h_t$ are aggregated (RNN/LSTM); after $T$ steps, outputs are used for the main task (classification, reinforcement learning, etc.).
- In some RL implementations, separate policy heads govern “natural” and “visual” (gaze) actions, each with its own policy/value losses [2309.12634].

## 4. Training Methodologies

### A. Supervised Learning

- **Deterministically Differentiable Attention**: All components, including the glimpse sampler, are differentiable. End-to-end backpropagation with standard cross-entropy loss suffices for training [2005.05701].
- **Two-stage Pretraining**: In RetinotopicNet, the localization net is pretrained for single saccades before full recurrence is unrolled [2005.05701].

### B. Reinforcement/Policy Gradient Learning

- **Stochastic Hard Attention:** Where glimpse selection is non-differentiable (sampling steps), REINFORCE with learned baselines stabilizes gradient estimates for $({x}_{t+1}, {y}_{t+1})$ decisions [2002.05388]. Total loss combines task reward (classification, RL objective) and attention policy loss.
- **RL-Gaze Control with A3C:** The visual/gaze policy is trained alongside natural action in an actor-critic framework, often using Generalized Advantage Estimation (GAE) for credit assignment [2309.12634].

## 5. Empirical Performance and Invariance

<table>
  <thead>
    <tr><th>Dataset/Task</th><th>Performance</th><th>Notable Findings</th></tr>
  </thead>
  <tbody>
    <tr>
      <td>CIFAR-10 (classification)</td>
      <td>&gt; 80% accuracy  (T=4, 32×32 patch)</td>
      <td>Accuracy robust to image size and patch size doubling yields marginal improvements [2005.05701]</td>
    </tr>
    <tr>
      <td>MNIST (classification)</td>
      <td>&gt; 99% accuracy</td>
      <td>Multipoint aggregation critical; single glimpse loses ~10% on cluttered scenes [2005.05701]</td>
    </tr>
    <tr>
      <td>RL Atari (Breakout, etc.)</td>
      <td>Performance matches full-frame baseline (<em>≈ident.</em>)</td>
      <td>RAM-LPM reduces pixels seen 5× (6400→1225) without quality loss, accelerates learning with peripheral glimpses [2309.12634]</td>
    </tr>
    <tr>
      <td>SIM2MNIST (transformed)</td>
      <td>5.00% error</td>
      <td>Rotation and scale equivariance matches polar-transform SOTA [2002.05388]</td>
    </tr>
  </tbody>
</table>

- Rotation and scale invariance are empirically confirmed by negligible accuracy loss under these transformations; angular wrap-padding is critical (dropping it degrades rotation equivariance by $\sim$5%) [2005.05701].
- Diminishing returns are observed beyond $T\sim4$ saccades [2005.05701].
- Peripheral vision and wide low-res context accelerate RL learning, and a large low-res field of view is more impactful than tiny high-res fovea in task performance [2309.12634].

## 6. Robustness and Computational Properties

- **Adversarial Robustness:** RAM-LPM demonstrates significant resistance to adversarial attacks (e.g., SPSA, PGD) relative to baseline CNNs. Success rates for attacks are much lower on RAM-LPM, especially under non-cropped (full-size) images, where ResNet-50 fails on ~90% of $\epsilon=2/255$ PGD attacks, but RAM-LPM is markedly more robust [2002.05388].
- **Mechanisms of Robustness:**
  - *Gradient Masking*: Non-differentiable/stochastic sampling obscures attack gradients.
  - *Limited Visibility*: Each adversarial step confronts only the current glimpse.
  - *Recurrent Integration*: Adversarial perturbations must persistently fool the model across a sequence of different glimpses, raising complexity exponentially.
- **Computational Efficiency:** Glimpses are fixed-size ($H\times W$); total computation scales with $T\cdot H\cdot W$, independent of input size [2002.05388]. This enables fixed FLOPs per sample and efficiency gains in high-resolution settings and on embedded hardware.
- **Low-latency Pathways:** Reflex-like shallow paths can supply rapid, coarse predictions from the initial glimpse, analogous to biological reflex arcs [2002.05388].

## 7. Biological Motivation, Extensions, and Limitations

The RAM-LPM framework is grounded in neurobiological principles:

- **Foveated Sampling:** Mirrors the exponential falloff in retinal sampling density (center-to-periphery).
- **Saccadic Attention:** Models iterative, task-driven gaze shifts.
- **Parallel “What” and “Where” Pathways:** Functional partitioning as observed in dorsal and ventral streams of primate vision [2002.05388].

Extensions under consideration include:

- Continuous (rather than discrete) parametrizations of gaze [2309.12634].
- Application of true log-polar sampling beyond rectangular approximations, enhancing invariance and context aggregation.
- Broadening application space: object detection, robotic vision, and highly resource-constrained embedded systems.

Limitations identified include:

- Higher sample complexity: learning effective attention and control policies is accompanied by slower training and partial observability [2309.12634].
- Joint gaze-action state–action spaces increase the burden on RL optimization.
- In some implementations, approximate rather than exact log-polar transforms limit theoretical equivariance [2309.12634].

RAM-LPM thus provides a versatile, efficient, and robust framework for attention-based visual reasoning, grounded in computational neuroscience and validated across classification, adversarial, and reinforcement learning settings [2005.05701, 2002.05388, 2309.12634].

Source: https://www.emergentmind.com/topics/log-polar-space-convolution-lpsc