Autonomous Single-Molecule Manipulation Based on Reinforcement Learning

Bernhard Ramsauer, Grant J. Simpson, Johannes J. Cartus, Andreas Jeindl, Víctor García‐López, James M. Tour, Leonhard Grill, Oliver T. HofmannThe Journal of Physical Chemistry A 2023

TL;DR

Researchers have developed a reinforcement learning (RL) agent that can autonomously manipulate single molecules on a surface using a scanning tunneling microscope (STM). This approach significantly speeds up the process of building nanostructures and provides novel insights into molecular behavior at the nanoscale.

What Problem Does This Paper Address?

Building complex nanostructures atom by atom or molecule by molecule is a fundamental goal in nanotechnology, enabling the creation of novel materials and molecular machines. However, this process requires extremely precise control over individual molecules, involving hundreds or thousands of manipulation steps. Performing these tasks manually is tedious, time-consuming, and prone to human error. While automated methods exist, they often rely on pre-programmed trajectories or require extensive prior knowledge of the molecule-surface interactions. This paper addresses the challenge of creating an autonomous system that can learn to manipulate molecules efficiently and adaptively, even in the face of complex and sometimes stochastic quantum mechanical interactions.

Methods

The core of this work is a reinforcement learning algorithm, specifically Q-learning, applied to control a scanning tunneling microscope (STM) for single-molecule manipulation.

  • Reinforcement Learning Framework: The system is framed as a Markov Decision Process (MDP). The "state" is defined by the molecule's position and orientation relative to a target "goal" position. "Actions" are the placement of the STM tip at specific locations around the molecule, followed by applying a voltage pulse. The "reward" function is designed to incentivize movements towards the goal while penalizing no movement or movement away from the goal.
  • STM Control: The STM is controlled via a component object model (COM) interface, allowing the Python-based RL algorithm to communicate with the microscope.
  • Molecule Manipulation: A specific molecule, 2,5-di(ethynyladamantanyl)-4-(dimethylamino)nitrobenzene (DDNB), known for its dipole moment, is used. The manipulation relies on the electric field generated by the STM tip, which induces movement and rotation of the polar molecule. The tip is positioned at a fixed height (1 Å above the surface) with a specific bias voltage (1.7 V) and tunneling current (11 pA).
  • State and Action Space: The state space is discretized into 360 possible orientations and 15 distances. The action space consists of a 15x15 grid of tip positions around the molecule.
  • Learning Strategy: The algorithm uses a combination of exploration (70% probability) and exploitation (30% probability) to learn the optimal actions. To accelerate learning, "virtual states" are employed, where the outcome of an action is evaluated for multiple hypothetical goal positions simultaneously.

Datasets

The paper does not explicitly mention pre-existing datasets for training. Instead, the "dataset" is generated in situ through the autonomous manipulation experiments. The algorithm learns from approximately 12,379 actions performed during training and validation. The training trajectory involves moving the molecule along a square path, and validation runs are performed on this square path and a more complex fish-shaped trajectory.

Key Insights and Ideas

  • Autonomous Learning of Complex Tasks: RL can effectively learn to perform highly precise, repetitive, and complex tasks like single-molecule manipulation, which are challenging for traditional automation or manual control.
  • Physical Insights from Data: The learned behavior of the RL agent provides valuable insights into the molecule's interaction with the STM tip's electric field. This includes identifying directions where movement is inhibited and understanding the asymmetric torque.
  • Generalizability of the Approach: The learned manipulation strategy is not limited to the specific training trajectory (a square) but can be generalized to arbitrary paths, demonstrating the robustness of the RL approach.
  • Stochasticity and Reward Design: The paper highlights the inherent stochasticity of quantum mechanical interactions at the nanoscale. The design of the reward function is crucial for guiding the agent towards reliable and efficient actions, and it influences the trade-off between movement distance and success rate.
  • Post-hoc Analysis: The data generated by the autonomous agent allows for detailed post-hoc analysis of molecular behavior, which would be difficult and time-consuming to obtain manually.

Key Results

  • Efficient Manipulation: After approximately 2250 training iterations (about half a day of training), the agent learned to manipulate the molecule with an 82% success rate toward individual goals, achieving an average translation distance of 0.77 nm per manipulation.
  • Reduced Manipulations: The trained algorithm completed a square trajectory in about 63 manipulations, which is significantly faster than the estimated minimum of 36 manipulations under ideal, but unrealistic, conditions.
  • Arbitrary Trajectories: The agent successfully navigated a more complex fish-shaped trajectory, demonstrating its ability to handle non-linear movements and different crystallographic directions.
  • Understanding Molecular Behavior: The analysis of the agent's actions revealed that molecular movement is strongly inhibited in some directions and that the torque is not symmetric around the dipole moment. The direction of motion is dictated by the tip's position relative to the dipole axis, suggesting an electrostatic mechanism.
  • High Success Rate: The average success rate for manipulations was 82% on the fish-shaped trajectory, even higher than during the square trajectory validation runs.

Limitations and Future Work

  • Reward Function Design: The authors acknowledge that the reward function design is critical and could be improved. The current function penalizes unsuccessful actions heavily, leading to an initial trade-off between reliability and movement distance. Future work could involve incorporating rotation into the reward, using bootstrapping, or employing inverse reinforcement learning to automatically determine an optimal reward function.
  • Tip Asymmetry: While the study suggests molecular interactions are independent of tip asymmetry, this was not definitively proven as all manipulations used the same tip. Future work could explore the impact of different tip shapes.
  • Pulse Parameter Optimization: The current approach fixes the voltage pulse parameters. Future work could extend the algorithm to autonomously optimize these parameters as well.
  • Integration with Pathfinding and Recognition: The authors envision combining this RL approach with pathfinding and image recognition algorithms to create fully autonomous systems for assembling complex nanostructures, navigating around surface defects and adsorbates.
  • Bootstrapping for Complex Manipulations: For more complex manipulations, the authors suggest implementing bootstrapping to evaluate the outcome of combined actions, which would increase learning effort but enable more intricate tasks.

Summary updated

BibTeX
@article{ramsauer2023autonomous,
  author = {Bernhard Ramsauer and Grant J. Simpson and Johannes J. Cartus and Andreas Jeindl and Víctor García‐López and James M. Tour and Leonhard Grill and Oliver T. Hofmann},
  title = {{Autonomous Single-Molecule Manipulation Based on Reinforcement Learning}},
  journal = {The Journal of Physical Chemistry A},
  year = {2023},
  doi = {10.1021/acs.jpca.2c08696},
}
Figure