Manuscript Offprint

arXiv:2610.19899

Universal Sample-Based Embeddings of Higher-Order Objects

Radovan Haluška, Christopher Solinas, Nathan R. Sturtevant, Martin Schmid, Michael Bowling

ABSTRACT

Neural networks operate naturally on finite-dimensional vectors, yet many problems require reasoning about higher-order objects such as distributions, functions, and graphs. Such objects capture relationships within a ground set and rarely admit an explicit compact representation. Moreover, we typically want a compact representation not of a single higher-order object but of an entire family of such objects, including members unseen during training. While a few approaches exist for particular object types, none is designed to work across object types. We propose a unified framework that represents any higher-order object as a fixed-size embedding vector learned over a family of such objects. An encoder maps an object, seen only through a finite set of samples, to an embedding, and a domain-specific decoder supplies the training signal by modeling the object conditioned on that embedding. Since the encoder works only from samples, one architecture serves different object types. Because the decoder is a model already suited to single instances of the object type, the framework inherits that model's native operations and inductive biases. We instantiate the framework on distributions, functions, and graphs. In each case we show that a single trained model represents an entire family and generalizes to members unseen during training. Furthermore, we demonstrate the downstream utility of these embeddings: interpolating distributions in embedding space, solving differential equations in embedding space, and predicting unseen edges from a graph's embedding.

1 INTRODUCTION

Neural networks have seen a widespread adoption in practically every field of science and engineering where inputs and outputs can be represented as finite-dimensional vectors. In such cases, existing approaches excel at approximating complex relationships between inputs and outputs coming from complex distributions (LeCun et al., 2015; Goodfellow et al., 2016; Wang et al., 2023). However, there is no natural way of capturing distributions, functions, or generally any higher-order objects, as inputs or producing them as outputs. For instance, it is not obvious how to train a neural network to predict the probability density function of an input distribution as there is no general compact representation to provide to the network.

Once we allow higher-order objects as inputs and outputs, it is natural to restrict ourselves to the relevant families of such objects. Examples include families of distributions that share a common parameterization, such as the family of Gaussian distributions parameterized by their mean and covariance, or solutions to differential equations under varying parameters and initial conditions. When a family admits a closed-form parameterization, one can simply feed the parameters into the neural network, but in many cases such a parameterization is not known a priori. Manipulating these higher-order objects, and families thereof, efficiently, with generalization to unseen members, has no general and established solution and is typically handled in ad-hoc and domain-specific manners (e.g., Edwards & Storkey, 2016; Kovachki et al., 2023; Narayanan et al., 2017).

These approaches each target a single object type and carry inductive biases that do not transfer to the others. For distributions, kernel mean embeddings (Muandet et al., 2017) depend on a hand-crafted kernel, and the Neural Statistician (Edwards & Storkey, 2016) ties its embeddings to a variational autoencoder. For functions, Neural Processes (Garnelo et al., 2018) learn distributions over functions, and neural operators such as DeepONet (Lu et al., 2021) and FNO (Li et al., 2020) learn maps between function spaces, but impose rigid input assumptions and expose no representation of an individual function. For graphs, most methods embed nodes rather than whole graphs (Hamilton et al., 2017) or learn to generate graphs (Simonovsky & Komodakis, 2018; You et al., 2018; Vignac et al., 2022) without exposing an embedding of any single one. More recently, distribution embeddings have been proposed independently in two distinct domains: as part of a filtering algorithm for state-space models (Solinas et al., 2026b) and as a way to reason across scales in computational biology (Fishman et al., 2025).

We propose a unified framework for representing and learning from families of higher-order objects, building on the distribution embeddings introduced in the initial version of Solinas et al. (2026b). It couples an encoder, which maps an object given only as a finite set of samples to a fixed-size vector, with a domain-specific decoder that provides the training signal. Because the encoder sees only samples, a single architecture handles very different object types; because the decoder is the model one would normally fit to a single object, the framework lifts its native operations, such as sampling, density evaluation, and spectral reconstruction, from one object to a whole family, while producing a compact representation of each member that is reusable in downstream tasks.

We instantiate the framework on three object types, changing primarily the decoder. For distributions, a generative decoder reconstructs densities from few samples, and the embedding space supports arithmetic and interpolation between distributions. For functions, a pointwise decoder reconstructs functions faithfully and scales to high-dimensional state; because whole functions become vectors, an ordinary network acts as a neural operator, which we use to differentiate functions and solve ODEs in embedding space. For graphs, a spectral decoder recovers a Laplacian representation that reliably separates edges from non-edges, from sampled edges alone. In every case, a single trained model generalizes to unseen family members and to sample sets of arbitrary size.

References (55)

  • Statistical mechanics of complex networks
  • JAX: composable transformations of Python+NumPy programs, 2018
  • Density estimation using Real NVP
  • Neural spline flows
  • Towards a neural statistician (opens arXiv in a new tab)
  • Generative distribution embeddings: Lifting autoencoders to the space of distributions for multiscale representation learning
  • Neural processes (opens arXiv in a new tab)
  • Discrete flow matching
  • Proper laplacian representation learning
  • Deep Learning
  • Inductive representation learning on large graphs
  • Flow++: Improving flow-based generative models with variational dequantization and architecture design
  • Zero-shot reinforcement learning via function encoders (opens arXiv in a new tab)
  • Function encoders: A principled approach to transfer learning in hilbert spaces (opens arXiv in a new tab)
  • Auto-Encoding Variational Bayes
  • Neural operator: Learning maps between function spaces with applications to pdes
  • Set transformer: A framework for attention-based permutation-invariant neural networks
  • Fourier neural operator for parametric partial differential equations (opens arXiv in a new tab)
  • Fourier neural operator with learned deformations for pdes on general geometries
  • Flow Matching for Generative Modeling
  • Learning nonlinear operators via deeponet based on the universal approximation theorem of operators
  • Kernel mean embedding of distributions: A review and beyond
  • graph2vec: Learning distributed representations of graphs (opens arXiv in a new tab)
  • Normalizing flows for probabilistic modeling and inference
  • Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations
  • Graphvae: Towards generation of small graphs using variational autoencoders
  • Belief embedding tree search, 2026a
  • Neural bayesian filtering, 2026b
  • Digress: Discrete denoising diffusion for graph generation (opens arXiv in a new tab)
  • Nature, 620(7972):47–60, 2023
  • Graphrnn: Generating realistic graphs with deep auto-regressive models
  • Latent normalizing flows for discrete sequences
  • A sample is $x = f_{\psi}(z)$ with $z \sim p_0$, and its density follows from the change-of-variables formula
  • Flows live on continuous spaces; a discrete support is reached through variational dequantization (Ho et al., 2019), which adds learned noise to each point so the categorical target becomes a continuous density, at the price of an implicit ordinal structure over classes that may in fact be unordered
  • Sampling integrates $\dot{z}_{\tau} = v_{\psi}(z_{\tau}, \tau)$ from $z_0 \sim p_0$ and returns $x \stackrel{\text{def}}{=} z_1$, and densities follow from integrating the instantaneous change of variables along the same trajectory
  • The Laplacian representation assigns each vertex $i$ the $d$-dimensional vector formed from the $i$-th component of the $d$ smallest eigenvectors of $\mathbf{L}$
  • Existing work targets specific object types: mostly functions, through operator learning, and more recently distributions across a range of domains
  • This generality is what lets many of these methods be recast as special cases of our framework under particular choices of $g_{\psi}$ and $\mathcal{L}$, and it lets any existing single-object model serve as a decoder, making the framework straightforward to adapt to new problems and domains
  • The family draws the center from $\mathcal{N}(0, I)$, the radius uniformly from $[0.5, 2]$, and the width uniformly from $[0.01, 0.75]$, spanning both thin and thick donuts
  • Two further experiments test whether it is also linear: whether straight lines and vector arithmetic between embeddings correspond to meaningful operations on the distributions
  • The interior points are interpolated in embedding space, not embedded from samples
  • Blue panels are embedded from samples; the orange panel decodes the prediction $\hat{D} = z_B + z_C - z_A$, which matches $D$ to within the sampling-noise floor
  • The prediction (orange) again matches D to within the noise floor
  • The prediction $\hat{E} = z_B + z_C + z_D - 2z_A$ (orange) is visibly thinner than $E$, because a donut's thickness is the product of radius and width
  • >n</td><td colspan=
  • Both generator heads are conditioned on $\theta$ by concatenation: every MLP inside a head receives $\theta$ appended to its input
  • ><tr><td rowspan=
  • We train the embedding over degrees 0–3; the differential operator is then trained over degrees 1–3 only, since the derivative of a degree-0 polynomial is identically zero and undefined under a relative-$\hat{L}^2$ loss
  • We use two such stage blocks, both built on the induced set attention block (ISAB) of the Set Transformer (Lee et al., 2019)
  • the decoder reconstructs each $f$ from a small sample set (left), while the differential operator maps its embedding to that of its derivative, which the decoder in turn expands into $f'$ (right)
  • >Decoder (cross-attention)</td></tr><tr><td>Query MLP hidden size</td><td>128</td></tr><tr><td>Query MLP layers</td><td>2</td></tr><tr><td>Query/key size</td><td>48</td></tr><tr><td>Key/value slots</td><td>24</td></tr><tr><td>Activation</td><td>GELU</td></tr><tr><td colspan=
  • Rel Max is the relative max-abs error
  • Table 12 lists the hyperparameters; across families only the number of representation dimensions and the number of edges sampled per graph change
  • The medians network reconstructs with a recall near one but a low precision on the n = 20 families, the signature of the over-prediction discussed in the main text, whereas the degree oracle keeps the two balanced
  • The source code will be publicly available on GitHub upon publication