All posts

research digesten April 13, 2026 4 min read

Compositional Lifelong Learning through the Lens of Formal Methods

By kualia research desk

Introduction

Lifelong reinforcement learning represents one of the most challenging frontiers in artificial intelligence. Unlike standard multi-task learning where tasks are presented simultaneously, lifelong learning requires agents to master tasks sequentially without catastrophic interference, while leveraging prior experience to accelerate acquisition of new capabilities. The paper "Lifelong Reinforcement Learning with Temporal Logic Formulas and Reward Machines" introduces LSRM, a framework that addresses this challenge through the integration of formal specification languages and structured reward representations.

The fundamental insight driving this work recognizes that human learning relies heavily on compositional abstraction. We do not relearn motor primitives from scratch when encountering new objectives; rather, we recombine previously mastered skills according to new logical constraints. LSRM operationalizes this intuition by encoding tasks in Sequential Linear Temporal Logic and representing reward functions as finite state machines, enabling explicit decomposition and transfer of subpolicies across a lifetime of tasks.

Sequential LTL and the Logic of Task Specification

Standard Linear Temporal Logic provides a rigorous mathematical framework for specifying temporally extended goals, yet exhibits limitations when expressing certain compositional task structures common in robotic applications. The authors introduce Sequential Linear Temporal Logic as a supplement to existing LTL formalisms, facilitating more flexible specification of temporally ordered subgoals through explicit sequential composition operators.

In SLTL, tasks decompose into ordered sequences of subtasks, each representable as distinct phases in a reward machine. This decomposition proves crucial for lifelong learning because it exposes the Markovian structure underlying non-Markovian reward signals. When an agent encounters a new task specified as a sequence of temporal logic formulas, it can identify overlapping subformulas with previously learned tasks and transfer the corresponding value functions or policies directly. The sequential nature of SLTL specifically supports this identification by making the temporal boundaries between subtasks explicit, rather than requiring the learning algorithm to infer them from reward signals alone.

Reward Machines as Compositional Memory

The second pillar of LSRM involves Reward Machines, which encode non-Markovian reward functions as finite state automata. Unlike standard RL where rewards depend solely on the current state, reward machines maintain internal state transitions based on high-level events, enabling the representation of complex temporally extended goals through explicit automaton states.

LSRM extends this machinery for lifelong learning through two mechanisms: automatic RM extension and efficient knowledge transfer. When encountering a new task, the framework does not construct an isolated reward machine from scratch. Instead, it automatically extends the existing machine structure by identifying shared propositional symbols and logical subformulas across tasks. This structural overlap enables zero-shot or few-shot transfer of subpolicies corresponding to specific machine states.

The knowledge transfer mechanism operates at the level of these automaton states. If a previously learned task required satisfying proposition A before proposition B, and a new task requires A before C, the policy for achieving A transfers immediately while the agent learns only the novel transition to C. This contrasts sharply with standard lifelong RL approaches that attempt to transfer at the level of neural network parameters, often suffering from negative transfer or catastrophic forgetting when task distributions shift.

Empirical Validation and the Efficiency of Composition

The experimental evaluation of LSRM demonstrates substantial improvements over baseline methods that learn each task independently from scratch. While the specific benchmark domains in the study involve navigation and task sequencing scenarios typical of robotic applications, the results consistently indicate that the combination of SLTL-based decomposition and RM-based knowledge transfer yields significant sample efficiency gains during the lifelong learning process.

The performance gains stem primarily from the explicit factorization of tasks into reusable components. Rather than treating each new task as an opaque reinforcement learning problem, LSRM parses the logical structure to identify previously mastered subroutines. This approach effectively implements a form of curriculum learning where the curriculum emerges naturally from the logical structure of tasks rather than being manually engineered. The automatic extension mechanism ensures that as the agent encounters more tasks, its library of reusable reward machine states grows, leading to accelerating returns on experience over the lifetime of the agent.

Structural Regularity and the Future of Robotic Learning

The LSRM framework illuminates a broader principle that deserves attention in the reinforcement learning community: the value of inductive biases derived from formal language theory. By committing to temporal logic specifications, the authors sacrifice some flexibility in task representation (requiring users to specify goals formally rather than through demonstrations or natural language) in exchange for compositional guarantees that enable systematic knowledge reuse.

This tradeoff appears particularly valuable for robotics applications, where tasks often exhibit regular structure. Consider a household robot tasked with watering plants after checking soil moisture, then returning to the charging station. This instruction decomposes naturally into sequential temporal logic formulas, and the reward machine structure explicitly represents the progression through checking, watering, and returning. As the robot encounters variations of this task for different plants or different sequences of operations, it reuses the constituent policies rather than relearning the entire behavioral pipeline.

However, limitations exist. The reliance on formal specifications creates a human factors bottleneck. While temporal logic offers precision, it remains inaccessible to non-expert users. The framework also assumes that the propositional symbols grounding the logic are predefined and consistent across the lifetime, which may not hold in open-ended environments where new objects and predicates emerge dynamically.

Furthermore, the automatic extension of reward machines, while powerful for logical compositions, may struggle with tasks requiring continuous interpolation between previously learned skills rather than discrete sequential composition. The discrete automaton structure, while providing clarity, may limit applicability to tasks with graded or overlapping temporal constraints.

Connecting to broader literature, LSRM sits at the intersection of hierarchical reinforcement

This digest was drafted by kualia's research assistant from a public paper and reviewed before publishing. It summarises the paper; it is not a substitute for reading it.