>_ DevTrendsen

Language

Home

Languages

Sections

Frontend Backend Mobile DevOps AI / ML
Jupyter

LIBERO: Teaching Robots Not to Forget Old Tricks

1,987 stars

Imagine you've taught a manipulator robot to carefully place a book on a shelf. Great! Now you ask it to put a cup on the table, and... it completely forgets how to handle books. Familiar situation in the world of machine learning? This phenomenon, known as "catastrophic forgetting," is one of the main headaches for robotics researchers. A robot that is good at only one task is almost useless in the real world.

This is exactly what the LIBERO project (Lifelong-Robot-Learning) was created to solve. It's not just code, but a whole framework and benchmark for developing and testing robots capable of "lifelong learning" — that is, accumulating knowledge and skills without losing existing ones. Let's figure out what this creature is and why you should pay attention to it.

What is LIBERO and who needs it?

If we put it simply, LIBERO is a "gym" and "exam arena" for robot artificial intelligence. It provides researchers and developers with everything they need to teach an AI agent to perform multiple tasks sequentially, transferring knowledge from one to another.

The project will be especially useful for:

  • AI/ML and robotics researchers: LIBERO offers a standardized set of tasks and metrics for comparing different lifelong learning approaches.
  • Students and graduate students: It's a ready-made sandbox for learning and experimenting with advanced robot learning concepts.
  • Practicing engineers: Those who want to test their own algorithms under realistic conditions where the robot needs to constantly adapt.

Instead of creating environments and tasks from scratch every time, you get a ready-made toolkit that lets you focus on what matters most — the learning algorithms.

LIBERO workflow diagram

Key features: What's inside?

LIBERO is not just a collection of scripts, but a comprehensive platform. Here are its most interesting components.

1. Infinite task generator

One of the main highlights of the project is procedural task generation. This means that theoretically, LIBERO can create an infinite number of unique manipulation scenarios. This solves the "dataset memorization" problem: the model won't be able to simply memorize the correct actions for a limited set of examples. It will have to learn to generalize.

2. Ready-made task suites

For convenience, the authors grouped 130 tasks into four thematic sets:

  • LIBERO-Spatial: Tasks requiring understanding of spatial relationships ("put the cube on the box", "push the object under the table").
  • LIBERO-Object: Focus on interaction with different objects. Here the robot needs to transfer skills from working with one type of item to another.
  • LIBERO-Goal: Tasks where the end goal changes while the objects and environment remain the same.
  • LIBERO-100: The most challenging set of 100 diverse tasks requiring mixed knowledge transfer. It is further divided into LIBERO-90 for pre-training and LIBERO-10 for final testing of the agent's continual learning capability.

This division allows targeted testing of how a model transfers specific types of knowledge — procedural (how to move) or declarative (what is where).

3. "Batteries included": Algorithms and architectures

To make it easier to get started with experiments, LIBERO already has basic algorithms and neural network architectures built in:

  • Three vision-motor architectures: bc_rnn_policy, bc_transformer_policy, bc_vilt_policy. These are ready-made "brains" for the robot that transform the camera image into manipulator actions.
  • Five learning algorithms: Including basic approaches (sequential fine-tuning, multi-task learning) and more advanced methods for continual learning (er, ewc, packnet).

This means you can immediately start comparing different approaches without spending time implementing them from scratch.

How does it work in practice?

Getting started with LIBERO is quite simple. After standard installation via conda and pip, you get access to the entire toolkit.

For example, to download datasets with human demonstrations (yes, the project focuses on imitation learning), you just need to run one script. By the way, they recently added the ability to download them directly from HuggingFace — very convenient!

# Скачать все датасеты с HuggingFace
python benchmark_scripts/download_libero_datasets.py --use-huggingface

And here's what a minimal example of loading and running one of the tasks looks like:

from libero.libero import benchmark
from libero.libero.envs import OffScreenRenderEnv

# Получаем список доступных наборов задач
benchmark_dict = benchmark.get_benchmark_dict()
task_suite_name = "libero_10"
task_suite = benchmark_dict[task_suite_name]()

# Выбираем конкретную задачу по её ID
task_id = 0
task = task_suite.get_task(task_id)
task_description = task.language

print(f"Загружена задача: {task_description}")

# Инициализируем окружение для симуляции
env_args = {
    "bddl_file_name": os.path.join(get_libero_path("bddl_files"), task.problem_folder, task.bddl_file),
    "camera_heights": 128,
    "camera_widths": 128
}
env = OffScreenRenderEnv(**env_args)
env.reset()

# Выполняем 10 шагов с пустым действием
for step in range(10):
    obs, reward, done, info = env.step([0.] * 7)
env.close()

As you can see, the API is quite simple and intuitive. You can easily integrate your own models and algorithms into this pipeline.

Conclusions: Is it worth trying?

Absolutely yes, if your work or studies are at all related to robot learning. LIBERO is a powerful and well-documented tool that solves a real problem in this field. It doesn't teach the robot for you, but it provides an excellent environment for experiments.

Who will LIBERO especially suit:

  • Researchers: To publish reproducible and comparable results.
  • Enthusiasts: To "get hands-on" with state-of-the-art approaches in robotics.
  • Instructors: As a practical platform for machine learning and robotics courses.

The project is actively developing, and its authors have done tremendous work creating a unified standard for one of the most complex and interesting areas of AI. So, if you want to teach a robot not only to put down cups but also not to forget about books, check out the project's GitHub. It's a great starting point.