Deep reinforcement learning for optical systems: A case study of mode-locked lasers

Chang Sun, Eurika Kaiser, Steven L. Brunton, J. Nathan Kutz

Abstract

We demonstrate that deep reinforcement learning (deep RL) provides a highly effective strategy for the control and self-tuning of optical systems. Deep RL integrates the two leading machine learning architectures of deep neural networks and reinforcement learning to produce robust and stable learning for control. Deep RL is ideally suited for optical systems as the tuning and control relies on interactions with its environment with a goal-oriented objective to achieve optimal immediate or delayed rewards. This allows the optical system to recognize bi-stable structures and navigate, via trajectory planning, to optimally performing solutions, the first such algorithm demonstrated to do so in optical systems. We specifically demonstrate the deep RL architecture on a mode-locked laser, where robust self-tuning and control can be established through access of the deep RL agent to its waveplates and polarizers. We further integrate transfer learning to help the deep RL agent rapidly learn new parameter regimes and generalize its control authority. Additionally, the deep RL learning can be easily integrated with other control paradigms to provide a broad framework to control any optical system.

Introduction

Mode-locked fiber lasers are essential tools in ultrafast optics, generating high-energy, short-duration pulses for applications ranging from precision manufacturing to medical surgery. However, achieving stable "mode-locking"—the synchronization of longitudinal modes—is a complex challenge. It requires the precise orientation of multiple waveplates and polarizers within a high-dimensional search space, a process often colloquially referred to as "black magic" due to its sensitivity and non-intuitive nature.

A primary obstacle in automating this tuning is bi-stability. The laser's state is frequently path-dependent (hysteresis); a specific configuration may yield stable pulses if approached from one direction but fail if approached from another. Traditional optimization algorithms and standard supervised neural networks often struggle with these local optima and the history-dependent dynamics of the system.

Methodology

To address these challenges, we implemented a Double Deep Q-Network (DDQN) architecture to serve as an intelligent controller for the laser system.

Figure 4: Demonstration of laser dynamics bi-stability and the DRL agent's trajectory to reach a stable mode-locked state (i) versus a failed state (ii).

As shown in Figure 1, the DRL agent interacts with the laser environment by observing the current state—defined by electric fields and waveplate angles—and executing actions to adjust the quarter-waveplates, half-waveplate, and polarizer. The agent is guided by a reward function $r = E/M$, where $E$ represents cavity energy and $M$ is the spectral kurtosis. This reward structure encourages high energy while using kurtosis to distinguish clean mode-locked pulses from chaotic noise.

Unlike standard optimization, RL optimizes for delayed rewards. This enables the agent to plan complex trajectories through the parameter space, potentially making temporary sacrifices in immediate performance to reach a superior, stable long-term state. For local stabilization against minor drifts, we combined the RL agent’s global search capabilities with Extremum-Seeking Control (ESC), creating a robust hybrid control framework.

Results and Discussion

The DRL agent demonstrated remarkable robustness, successfully driving the laser from random initial states to high-energy mode-locking across a wide range of fiber birefringence values ($K$ from -0.2 to 0.4).

The most significant advantage of the DRL approach is its ability to identify and navigate bi-stable regions. Figure 4 illustrates how the agent learns to maneuver around unstable zones to reach a stable mode-locked state.

Figure 4: Demonstration of laser dynamics bi-stability and the DRL agent's trajectory to reach a stable mode-locked state (i) versus a failed state (ii).

In specific tests, the RL agent achieved a high reward of 0.2062 (stable mode-locking) by following a learned trajectory. In contrast, a direct path between the same start and end points resulted in a reward of only 0.0066, corresponding to unstable plane waves. This highlights the agent's ability to develop a "long-term strategy" to avoid physical traps in the system's dynamics.

Transfer Learning and Efficiency

While training an agent from scratch is computationally intensive (requiring ~2000 episodes), we demonstrated that transfer learning can significantly accelerate the process. An agent pre-trained on one birefringence setting can be successfully re-tuned for a new environment in approximately 300 episodes, showcasing the generalizability of the learned control authority.

Conclusion

Deep reinforcement learning provides a powerful framework for the automated control of complex optical systems. By successfully managing bi-stability and hysteresis in mode-locked lasers, this approach offers a "turn-key" solution for stable operation. Future work will focus on transitioning these simulated results to physical experimental setups, where real-world noise and higher-dimensional variables will further test the agent's adaptability. This methodology holds promise for a broad spectrum of optical applications, including high-power pulse compression and the management of instabilities in long-haul dispersion-managed links.

Summary updated

Abstract

Abstract We demonstrate that deep reinforcement learning (deep RL) provides a highly effective strategy for the control and self-tuning of optical systems. Deep RL integrates the two leading machine learning architectures of deep neural networks and reinforcement learning to produce robust and stable learning for control. Deep RL is ideally suited for optical systems as the tuning and control relies on interactions with its environment with a goal-oriented objective to achieve optimal immediate or delayed rewards. This allows the optical system to recognize bi-stable structures and navigate, via trajectory planning, to optimally performing solutions, the first such algorithm demonstrated to do so in optical systems. We specifically demonstrate the deep RL architecture on a mode-locked laser, where robust self-tuning and control can be established through access of the deep RL agent to its waveplates and polarizers. We further integrate transfer learning to help the deep RL agent rapidly learn new parameter regimes and generalize its control authority. Additionally, the deep RL learning can be easily integrated with other control paradigms to provide a broad framework to control any optical system.
BibTeX
@inproceedings{sun2020deep,
  author = {Chang Sun and Eurika Kaiser and Steven L. Brunton and J. Nathan Kutz},
  title = {{Deep reinforcement learning for optical systems: A case study of mode-locked lasers}},
  booktitle = {Machine},
  year = {2020},
  doi = {10.1088/2632-2153/abb6d6},
}
Figure