Func-JEPA: Learning a Sobolev Space of Functions as Latent Vectors

Alejandro Moreno ArcasarXiv 2026 · arXiv

TL;DR

Func-JEPA (f-JEPA) introduces a unified way to represent mathematical functions as vectors in a latent space that mimics a Sobolev space ($H^1$). By anchoring the geometry of the latent space to real-world calculus—where the distance between vectors reflects the difference in function values and derivatives—the authors create a single, frozen encoder that can be reused for symbolic regression, integration, and solving differential equations.

What Problem Does This Paper Address?

In fields like computer vision and NLP, we take for granted that a single "foundation model" (like BERT or CLIP) can provide a rich representation of data for many different tasks. However, neural symbolic mathematics has largely remained stuck in a "task-specific" paradigm. If you want to integrate a function, you train a sequence-to-sequence (seq2seq) transformer; if you want to solve an ODE, you train another.

The problem is that these models treat mathematical expressions as mere strings of text, ignoring the underlying analytical structure. A function is not just a sequence of tokens; it is an element of a vector space. This paper asks: Can we pretrain a single encoder that understands the analytical "soul" of a function and reuse it across the entire mathematical toolbox?

Methods

The authors propose the Function Joint-Embedding Predictive Architecture (f-JEPA). Its core innovation is forcing the latent space to behave like a Sobolev space ($H^1$).

  1. Sobolev Geometry: In an $H^1$ space, the inner product of two functions considers both their values and their derivatives. f-JEPA uses this to define its latent geometry.
  2. Factored Latents: A latent vector $z_f$ is split into a magnitude $n(f)$ and a direction $u_f$. Crucially, the magnitude is computed exactly using numerical quadrature (Gauss-Legendre) from the function's values, while the transformer encoder only has to learn the direction.
  3. Learned Operators: Instead of symbolic manipulation, operations like differentiation ($\mathcal{D}$) and integration ($\mathcal{I}$) are learned as operators acting directly on the latent vectors. The derivative operator is "factored" to ensure it is exactly homogeneous (i.e., the derivative of $2f$ is exactly twice the derivative of $f$).
  4. Training Objectives: The model is trained on three goals:
  5. Geometry: Matching latent angles to Sobolev angles.
  6. Linearity: Ensuring the latent of a sum is the sum of the latents ($z_{f+g} \approx z_f + z_g$).
  7. JEPA Derivative: Predicting the representation of $f'$ from the representation of $f$.

Once pretrained, the encoder is frozen. Lightweight "heads" are then trained for downstream tasks like decoding latents back into formulas or encoding noisy sampled points into the latent space.

Datasets

  • Pretraining: A synthetic corpus of 2.0 million functions generated from 17 parameterized families (polynomials, Fourier sums, Gaussians, etc.) and random expression trees.
  • Evaluation Benchmarks:
    • Symbolic Regression: Tested on 24 classic univariate benchmarks (Nguyen, Keijzer, etc.).
  • Integration: Evaluated on the MIT Integration Bee and the Rubi suite.
  • ODEs: Tested on ODEBench and standard test sets from prior literature (Lample & Charton).

Key Insights and Ideas

  • The "Analytical Anchor": Most JEPA models struggle with "representation collapse" (where all inputs map to the same vector). f-JEPA avoids this by using the Sobolev inner product as a ground-truth geometric target. The data itself defines the geometry, not just the loss function.
  • Exact Norms Matter: By calculating the $H^1$ norm analytically and only learning the direction, the model offloads a difficult numerical task to a classical algorithm, allowing the neural network to focus on the "semantic" structure of the function.
  • Zero-Shot Calculus: Because the latent space is linear and geometrically grounded, the model can perform "zero-shot" operations. For example, it can solve linear ODEs by finding the null space of a learned latent operator $p(\mathcal{D})$, even if it wasn't explicitly trained on those specific ODE types.

Key Results

  • Symbolic Regression: f-JEPA is remarkably robust to noise. It recovered exact formulas from noisy samples ($\sigma = 10^{-2}$) for 62% of test functions, whereas traditional methods like PySR or Operon dropped to near zero or struggled significantly under the same noise levels.
  • Speed: It is highly efficient. A symbolic regression pass takes only 0.44 seconds, compared to 20+ seconds for search-based genetic algorithms.
  • Integration & ODEs: While f-JEPA achieves a high solve rate on its internal test set (91.7% for integration), it is currently weaker than specialized, task-specific seq2seq models on out-of-distribution benchmarks like the MIT Integration Bee. This suggests the "foundation model" approach is promising but needs a broader training distribution to beat specialized "expert" models.
  • Derivative Retrieval: The learned derivative operator retrieves the correct symbolic derivative from a pool of candidates with 82% top-1 accuracy.

Limitations and Future Work

  • The "Noise Floor": The learned operators are accurate to within a few percent, but not perfect. This means f-JEPA is best used as a proposal mechanism—it suggests a likely formula or solution, which must then be verified by a symbolic engine like SymPy.
  • Expression Length: The decoder struggles with very long expressions (over 30 tokens), where accuracy drops significantly.
  • Univariate Only: Current work is limited to univariate functions on a fixed interval $[-\pi, \pi]$.
  • Future Directions: The authors suggest extending the architecture to multivariate functions (using partial derivative operators) and pretraining on much broader, non-synthetic distributions of mathematical expressions.

Summary updated

Abstract

Pretraining an encoder once and reusing it across tasks is a widespread approach in vision and language. However, neural symbolic mathematics still trains a dedicated sequence-to-sequence model for each task, so that no representation of a function is shared. In this work, we propose the Function Joint-Embedding Predictive Architecture (Func-JEPA, abbreviated f-JEPA): an encoder of mathematical functions, pretrained on their symbolic form, whose latent space imitates the Sobolev space H^1 and in which differentiation is a learned latent operator. The norm of a latent is computed exactly from the function, whereas its direction is learned to match Sobolev angles. The frozen encoder is then reused by lightweight modules for decoding, composition, integration, and regression from samples. The representation and four downstream tasks are evaluated within and outside the pretraining distribution. f-JEPA recovers exact formulas from noisy samples more often than the compared symbolic-regression methods, whereas computer algebra and task-specific models remain stronger on standard integration and differential-equation benchmarks.
BibTeX
@misc{arcas2026func,
  author = {Alejandro Moreno Arcas},
  title = {{Func-JEPA: Learning a Sobolev Space of Functions as Latent Vectors}},
  year = {2026},
  eprint = {2611.19542},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.19542},
}
Figure