Yudong Tian, Haifeng Xu, Yuqing Liu, Xiangyu Zhao, Jingzhu Shao, Jierong Cheng, Chongzhao Wu
Optical neural networks have recently garnered considerable research interest owing to their energy-efficient operation and ultralow latency characteristics. As an emerging framework in this domain, diffractive deep neural networks ( D 2 NNs ) integrate deep learning algorithms with optical diffraction principles to perform computational tasks at the speed of light without requiring additional energy consumption. However, conventional D 2 NN architectures face functional limitations. They are typically constrained to single-task operation or require additional costs and structures for functional reconfiguration. Here, we present an arrangeable diffractive neural network (A-DNN) that can perform various recognition tasks by altering the order of the internal diffractive layers. In addition, we develop a weighted multitask loss function that enables flexible adjustment of each task’s performance according to specific requirements. Furthermore, the A-DNN can be extended to applications such as multi-degree-of-freedom holographic imaging and high-capacity optical encryption/decryption. Finally, the proposed A-DNN framework is experimentally validated by recognizing five types of handwritten digits and fashion items at terahertz frequency. This flexible and powerful architecture can significantly expand the reconfigurability of D 2 NNs at a low cost, providing a new approach for realizing high-speed, energy-efficient versatile artificial intelligence systems.