Skip to main content
Back

UT Austin's Function Encoder Lets Robot Policies Adapt Without Retraining

A new imitation learning framework trains neural basis functions once, then adapts control policies to unseen objectives with no retraining and near-optimal accuracy.

Pro

  • New method learns reusable neural function encoder basis for optimal control policies across varying objectives.
  • Offline-online split: bases trained once via imitation learning, online adaptation is just coefficient fitting.
  • Two zero-shot modes: least-squares projection from data, or operator network mapping task spec to coefficients.
  • Under 4% error on 2D planning, only 0.4% error on 12D quadcopter with unseen targets.
  • Handles nonlinear bicycle dynamics with varying obstacle configurations, including near-discontinuous controls.
  • Code available on GitHub, implemented in PyTorch with theoretical convergence guarantees.

Solving optimal control problems is one of those tasks where classical methods run into a wall the moment you ask them to be flexible. Change the target location for a drone, tweak an obstacle in a planning problem, or adjust the running cost for different terrain, and traditional solvers have to start from scratch. A new paper introduces a way around this by learning a reusable basis for the entire policy space, so switching tasks becomes a lightweight coefficient update rather than a full re-solve.

The method, from researchers at UT Austin, UCLA, Clemson, and Johns Hopkins, is called function encoder (FE) policies for parametric optimal control, and the accompanying code is on GitHub.

The re-solve problem

In optimal control, you have some dynamics (how the system evolves) and an objective (what you want to minimize). Classical local solution methods are relatively fast but must be solved anew for each instance, whereas global methods based on the Hamilton-Jacobi-Bellman equations are intractable in high dimensions. Machine learning approaches sit in between, but they inherit a different problem: learned policies are typically tied to a fixed objective and lack transferability across tasks.

Concretely: if you train a neural policy to fly a quadcopter to point A, you cannot ask it to fly to point B without retraining. That is fine for one-off problems but terrible for anything requiring frequent adaptation, like trajectory planning across changing terrain or manufacturing with varying process requirements.

Basis functions, but for policies

The core idea borrows from a technique called the function encoder, which represents functions in a Hilbert space as linear combinations of learned neural basis functions. The authors apply this to the space of control policies. The control policy is modeled as a linear combination of learned basis functions, where the basis functions are learned once and are independent of the task parameter, forming a reusable representation of the policy function space.

Architecture diagram of offline basis learning and online zero-shot adaptation

Once the bases are trained, adapting to a new task reduces to finding the right coefficients. The paper gives two ways to do this at deployment:

  • Zero-shot least squares (LS): Given a small amount of trajectory data for the new task, project it onto the learned bases via least squares. Higher accuracy, but needs a few measurements.
  • Zero-shot operator: Train a second network that maps a task specification directly to coefficients. Completely data-free at inference time, but requires more offline training and struggles when task specifications are high-dimensional.

The offline training itself is imitation learning: solve a bunch of tasks with a standard solver, then fit the shared bases and per-task coefficients jointly.

How well it actually works

The team ran three benchmarks that span linear and nonlinear dynamics across different dimensionalities:

  1. 2D path planning with a fixed Gaussian obstacle and varying target locations. The model retains a low objective functional value with errors below 4% across all test cases. The method even generalized to targets outside the training grid (extrapolation).
  2. 12D quadcopter with nonlinear dynamics. Under the zero-shot LS inference approach, the policy incurs only 0.4% error in objective value over all 27 tasks tested, despite the high state dimension and strong nonlinearity.
  3. Nonlinear bicycle model under varying obstacle configurations, including a harder double-obstacle variant where the ground truth control has near-discontinuities as paths flip between going around either side.
Predicted vs true trajectories for an unseen target in the 2D planning task

Across all three, LS beat the operator approach on accuracy, at the cost of needing a handful of trajectory samples. The operator variant is faster online but hits its limits when the task specification is a high-dimensional cost map, which is why the bicycle experiments only use LS.

What is actually new here

The real contribution is the offline-online decomposition. Existing learned controllers are semi-global inside one task; this one is semi-global across a family of tasks. There is also a theoretical backbone: a universal approximation theorem inherited from the function encoder framework, plus a new sample-complexity bound showing the coefficient error decays as O(M^(-1/2)) with the number of online measurements.

Practically, this is useful anywhere you need to re-solve similar optimal control problems repeatedly, such as MPC-style deployments with shifting objectives, robotics tasks over changing terrain, or trajectory planning where the goal changes frequently. It is less useful when the objective family is very narrow (just retrain a single policy) or when your task specifications are extremely high-dimensional and unstructured, in which case learning the operator network becomes hard.

Limitations worth naming

A few caveats. The method still assumes dynamics are fixed across tasks, only the objective varies. Training data comes from an existing solver (CasADi in the experiments), so quality is capped by that. And the bases are learned per problem family; you cannot mix a 2D planner and a quadcopter into one model. The code is PyTorch, ran on an A100, and the experiments use a 4-layer MLP with 100 basis functions as a default configuration.