arXiv:2610.08075cs.LGOct 2026

Manuscript Offprint

arXiv:2610.08075

Optimization Encoders: Rethinking Second-Order Meta-Learning for Neural Fields

Rudolf L. M. van Herten, Soufiane Ben Haddou, Rachit Saluja, Johannes C. Paetzold

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Conditional neural fields represent signals continuously, but their effectiveness depends on how the conditional latent representations are inferred from observed data. In meta-learning, this encoding occurs through gradient updates induced by the decoder, tying representation learning directly to decoder design. We formalize this connection by interpreting latent optimization as an optimization encoder, unifying the roles of second-order differentiation, latent parameterization, and task supervision. This concept enables second-order meta-learning for end-to-end training of the encoding procedure alongside the decoder, and clarifies which learning pathway first-order approximations discard. Guided by this view, we introduce Attentive Latent Fields (MetaLF), an equivariant transformer-based neural field that contextualizes a latent pointcloud through self-attention. These interactions shape both field predictions and the updates that construct their representation, allowing local observations to inform coherent non-local structure. Disentangling the inner encoding objective from outer task supervision unifies reconstruction, classification, and segmentation within an end-to-end meta-learning framework, using reconstruction-only latent adaptation at test time. Controlled experiments on polynomial fields link latent coordination to lower effective rank and stronger alignment with the underlying function space. Across image and 3D shape reconstruction, MetaLF improves fidelity within three to five gradient updates, while supporting semantic prediction across images, shapes, and volumes. Together, these findings position the optimization encoder perspective as a unified basis for designing neural fields around how representations are constructed, coordinated, and used. Code is made publicly available on GitHub.

Keywords Neural fields · implicit neural representations · meta-learning · representation learning · bilevel optimization · equivariant neural networks

1 Introduction

In recent years, neural fields [1] have gained traction for their ability to represent discretely sampled data as continuous signals. A neural field parameterizes a function that maps coordinates to field values, i.e. fθ:Rdin→Rdoutf_{\theta} : \mathbb{R}^{d_{\text{in}}} \to \mathbb{R}^{d_{\text{out}}}. For example, an RGB image can be represented by fθ:R2→R3f_{\theta} : \mathbb{R}^2 \to \mathbb{R}^3, which maps each spatial coordinate to its corresponding color. Conditional neural fields (CNFs) extend this formulation by conditioning the coordinate-based function on a sample-specific latent representation zi∈Zz_i \in \mathcal{Z} [2]:

fθ:Rdin×Z→Rdout.f_{\theta}:\mathbb{R}^{d_{\mathrm{i n}}}\times\mathcal{Z}\to\mathbb{R}^{d_{\mathrm{o u t}}}.

This allows the shared parameters θ\theta to capture structure across a dataset, while ziz_i encodes variation specific to sample ii. Learning a CNF requires a mechanism for obtaining sample-specific representations. Existing approaches use amortized encoders [5], auto-decoding [2], or meta-learning [6–8]. In the functa framework [9], a representation ziKz_i^K is

∗^{*}Contributed equally

†^{\dagger}Corresponding author: rlv4001@med.cornell.edu

fθ(x;z1)f_{\theta}(\mathbf{x}; z^{1})

fθ(x;z2)f_{\theta}(\mathbf{x}; z^{2})

...

fθ(x;z5)f_{\theta}(\mathbf{x}; z^{5})

ENF

GT

Figure

Left ventricle myocardium

Figure

Right ventricle

Figure

Figure

Figure 1: Example use case of MetaLF meta-learning latent cardiac shape representations [3]. The first three panels illustrate smooth shape recovery as a shared latent pointcloud z is refined over k=1,…,5k = 1, \ldots, 5 gradient steps. MetaLF learns contextualized latent representations that preserve detail while capturing the underlying function, an ill-posed task for local representation models such as ENF [4].

constructed from a shared initialization z0z^{0} through a small, fixed number of gradient updates. The inner loop adapts the latent representation while keeping the decoder fixed; the outer loop then updates the shared parameters to improve reconstruction after latent adaptation. This enables new signals to be represented within only a few gradient steps. Figure 1 illustrates this few-step fitting process for cardiac shape reconstruction.

Second-order meta-learning is central to the effectiveness of this approach, with first-order approximations typically yielding substantially worse reconstructions. Yet treating this distinction primarily as a choice of optimization method obscures its implications for model design. Second-order differentiation propagates the outer objective through the unrolled latent updates, accounting for how the decoder influences the representation obtained during adaptation. First-order variants omit this dependence on the decoder parameters. To understand what this gradient pathway learns, we revisit meta-learned CNFs from an encoder–decoder perspective.

Building on the view of optimization as encoding [10], we interpret the inner loop as an optimization encoder: a mapping from observed data to a latent representation, implemented through gradient updates rather than a separate feed-forward network (Figure 2a-b). Its encoding behavior is determined by the decoder's backward pass, together with the latent parameterization and inner objective. Second-order meta-learning therefore trains the encoding procedure and decoder end-to-end, just as a conventional encoder–decoder model learns both how to construct a representation and how to use it. This interpretation makes the decoder architecture a design choice for encoding itself: its expressivity and interactions shape both field predictions and the updates through which their representation is inferred (Figure 2c).

This observation motivates meta-learned Attentive Latent Fields (MetaLF), an equivariant transformer-based neural field that combines spatially localized representations with contextual interactions. Equivariant neural fields (ENFs) [4] provide a strong foundation for local fitting by conditioning predictions on a latent pointcloud, but lack direct information exchange among latent elements before decoding. Drawing on attention-based shape autoencoders [5], MetaLF extends ENF with self-attention that contextualizes the content of latents. These interactions shape both decoding and the gradients used for encoding, allowing local observations to inform coherent non-local structure while retaining fine detail.

The encoder–decoder perspective also clarifies the distinct roles of the inner and outer objectives. The inner objective determines how observations construct a representation, while the outer objective determines what that representation should support, i.e. they need not describe the same task. With end-to-end differentiation through adaptation, reconstruction updates can learn to produce representations useful for classification or segmentation, even though semantic labels are available only during meta-training. MetaLF accommodates these objectives through task-specific outputs while retaining reconstruction-only adaptation at test time (see Figure 3).

Our contributions follow from this perspective:

  1. We formalize few-step meta-learning as an optimization encoder, identifying second-order differentiation as the pathway through which the outer objective trains the encoding procedure alongside the decoder. This clarifies which learning pathway first-order approximations discard.

  2. Because the decoder also determines how representations are inferred, we introduce MetaLF to coordinate a latent pointcloud through equivariant self-attention. On controlled polynomial fields, this coordination yields more compact, function-aligned representations and improves reconstruction, linking architectural design to encoding behavior.

(a) Conventional encoder

Figure

(b) Optimization encoder

Figure

(c) Architecture shapes adaptation

Figure

Figure 2: Second-order meta-learning trains an optimization encoder whose behaviour is shaped by decoder architecture. (a) A conventional encoder maps an observed signal to a latent representation ziz_i, which the decoder evaluates at a query coordinate x\mathbf{x}. (b) In meta-learned neural fields, an explicit encoder is replaced by KK gradient updates on zz, forming an optimization encoder. Second-order differentiation propagates the outer objective Lout\mathcal{L}_{\text{out}} through these unrolled updates, jointly shaping the finite-step encoding behavior and the decoder fθf_\theta. (c) Because the decoder induces the latent updates, its architecture shapes the resulting adaptation trajectory. ENF represents a local fitting model, lacking direct exchange of context among localized latents. MetaLF instead coordinates these latents through attention. This shared context produces coherent updates that quickly capture non-local structure, as illustrated by fitting cardiac signed distance functions.

  1. Extending this design to images and 3D shapes, we demonstrate improved reconstruction over functa-based baselines within three to five gradient updates, showing that contextual latent interactions benefit few-step fitting beyond the controlled setting.

  2. Finally, our optimization encoder perspective disentangles the roles of the inner and outer loops, allowing distinct encoding and decoding objectives, respectively. We demonstrate end-to-end learning of segmentation and classification through reconstruction-based inner-loop encoding and outer-loop semantic supervision on images, shapes, and volumes.

References (43)