Deep Learning Inverse Design of Phase‐Change Reconfigurable Terahertz Metadevices for Multidimensional Secure Communication Authors: Yisheng Dong, Xieyu Chen, Aarthy Nagarajan, Yi Yang, Zhihao Wang, Rui Yu, Chuang Zheng, Chunmei Ouyang, Xueqian Zhang, Tun Cao, Ranjan Singh, Zhen Tian Published: 2026 ABSTRACT ABSTRACTThe exponential rise in data exchange and cyber threats in next‐generation 6G networks demands communication systems that are inherently secure at the physical layer. Terahertz (THz) waves combine huge bandwidth with strong directionality, offering a fertile platform for high‐capacity and covert data transfer. Here, we introduce a deep‐learning‐enabled inverse‐design framework that enables the creation of dynamically reconfigurable THz metadevices capable of adaptive, multidimensional encryption. By using a residual neural network trained to directly map target electromagnetic responses to device geometries across continuous material phase transitions, our approach eliminates traditional iterative design bottlenecks and enables rapid, high‐precision generation of versatile meta‐architectures. The resulting devices exhibit multiplexed control over polarization, depth, and phase transitions in Ge2Sb2Te5 (GST), enabling eight‐channel encrypted holography with minimal crosstalk and near‐diffraction‐limited fidelity. Furthermore, we realize a reconfigurable diffractive THz neural metadevice that performs universal logic operations under a dual‐key security protocol, requiring both the physical hardware and a digital key sequence for accurate decryption. This combination of intelligent design automation and physical‐layer encryption establishes a new paradigm for secure, high‐capacity, and adaptive THz communication, paving the way for dynamically reconfigurable wireless architectures in 6G and beyond.Keywords: deep learning, inverse‐designed terahertz metadevices, multidimensional multiplexing, phase‐change materials, secure communication Introduction In the age of hyperconnectivity, global wireless traffic is surging at an unprecedented pace, pushing the limits of existing communication technologies. The terahertz (THz) frequency band (0.1–10 THz) has emerged as a frontier spectrum resource, offering the potential for ultra‐high‐speed and broadband wireless transmission. Recent laboratory and field demonstrations achieving data rates beyond 320 Gbit/s signify the imminent practicality of terahertz systems [1]. Yet, with this leap in capacity comes a parallel escalation in vulnerability in the form of malicious actors that intercept enormous volumes of sensitive information within milliseconds, posing a profound security threat. For domains where information sovereignty is non‐negotiable, such as defense, finance, and critical infrastructure, robust, adaptive encryption at the physical layer is imperative [2, 3]. Current THz security schemes, however, face two fundamental barriers: (i) limited functional adaptability, as static metadevices cannot dynamically respond to evolving threats or support real‐time key rotation [4], and (ii) restricted security dimensionality, as reliance on a single physical parameter leaves systems exposed to brute‐force attacks [5]. The realization of trustworthy THz‐based security infrastructures hinges critically on dynamic metadevices capable of on‐demand reconfiguration and multidimensional control [6]. Over the past decade, THz metadevices have attracted significant attention due to their exceptional ability to manipulate electromagnetic waves. To date, numerous THz wave manipulation devices have been developed, demonstrating functionalities such as polarization conversion [7, 8], beam forming [9, 10], optical vortex generation [11, 12], meta‐lens [13, 14], and on‐chip communication [1, 15]. However, conventional meta‐device designs are predominantly static, with functionalities confined to single‐operation modes, which fail to meet the requirements for multi‐dimensional functions in complex environments [16, 17]. This limitation severely restricts the application potential of THz devices in complex scenarios. To bridge this security‐capability gap, recent efforts have integrated metadevices with stimuli‐responsive materials [18, 19, 20, 21]. Prominent examples include the development of dynamic and varifocal terahertz metalenses enabled by the continuous tunability of liquid crystals [22, 23], as well as the integration of chalcogenide phase‐change materials like Ge2Sb2Te5 [24, 25, 26, 27, 28]. GST exhibits rapid reversible phase transitions between amorphous and crystalline states, as well as multi‐level tunability via optical, electrical, or thermal stimuli [29]. The non‐volatility, long‐term stability, and multi‐state switching properties of GST provide a robust physical foundation for designing tunable THz metadevices [30]. These characteristics enable multi‐channel and multi‐state information encryption, paving the way for dynamic holography and real‐time reconfigurable devices. Despite the remarkable electromagnetic modulation capabilities of tunable metadevices, traditional design methodologies face substantial challenges [31]. Achieving multi‐dimensional multiplexing requires iterative optimization of meta‐atom parameters using numerical methods like electromagnetic simulation, where design efficiency declines exponentially with increasing channel counts. Furthermore, the dynamic encryption protocol requires real‐time reconstruction of device parameters, but traditional electromagnetic simulation cannot meet the minute‐level key rotation requirements [32]. To address these challenges, deep learning‐driven inverse design strategies offer a transformative solution for dynamically reconfigurable THz metadevice development [32]. This approach establishes an end‐to‐end mapping model between target functionalities and geometric parameters, bypassing cumbersome physical modeling steps in conventional workflows [33, 34]. By leveraging neural networks to autonomously generate a metadevice from desired electromagnetic responses, this method significantly reduces dependence on specialized theoretical knowledge while achieving exponential improvements in design efficiency [35, 36]. Such a data‐driven intelligent paradigm lays the groundwork for rapid prototyping and functional innovation in tunable THz devices. Deep learning has emerged as one of the predominant methodologies in meta‐device design to date. For example, Zhang et al. employed deep learning to achieve the customized design of a planar chiral meta‐device for biosensing applications [37, 38, 39, 40]. Nevertheless, the inverse design of multidimensional tunable devices with multifunctional capabilities remains a significant scientific challenge; the existing reverse design focuses on static/finite adjustable devices and has not yet solved the multi‐parameter joint optimization and anti‐interference ability required for safe THz networks. This work presents an inverse design framework for multidimensional secure THz metadevices, specifically targeting critical challenges in physical‐layer information protection. It is crucial to distinguish our dynamically adaptive approach from existing methods. Unlike conventional deep‐learning inverse designs that target static components, our methodological novelty lies in an end‐to‐end deep neural network (Figure 1 and Figure 2) that explicitly learns and optimizes the multi‐physics coupling of continuous structural phase transitions (GST's amorphous‐to‐crystalline states). Furthermore, distinguishing from traditional static multidimensional multiplexing, our system‐level novelty resides in the framework's autonomous adaptability. By seamlessly integrating the deep‐learning inverse‐design algorithm with non‐volatile, stimuli‐responsive hardware, the resulting metasurface acts as an adaptive physical layer capable of on‐demand hardware reconfiguration. This hardware‐algorithm closed loop enables the automated generation of devices with integrated anti‐eavesdropping capabilities and represents a significant step toward intelligent, phase‐change reconfigurable wireless architectures. Critically, experimental validation confirms the framework's efficacy in realizing high‐capacity encrypted holography with 8 independent channels (via GST state/polarization/distance multiplexing), exhibiting crosstalk suppression essential for multi‐key hierarchical access control. It also enables 6G physical‐layer key distribution leveraging reconfigurable logic gates for tamper‐resistant binary data processing. Comparative analyses reveal that the inversely designed devices outperform those developed via traditional methods, showcasing the framework's versatility in meeting fundamental requirements for optical security, covert imaging, and anti‐counterfeiting. This work thus provides an efficient and universal methodology for advancing tunable THz devices, offering new insights for next‐generation 6G communication technologies and secure information systems. Deep‐learning inverse design of dynamically encrypted THz reconfigurable metadevices. An end‐to‐end deep learning framework maps target security functionalities to meta‐atom geometries, enabling automated generation of reconfigurable devices with multidimensional encryption capabilities: polarization‐selective phase control (x/y‐pol. for channel isolation), distance‐keyed holography, dual reconstruction planes at 6 and 12 mm, GST state‐switched modulation (amorphous and crystalline states for non‐volatile cipher switching). The output device supports hierarchical key generation through synergistic parameter tuning, forming the physical core for 6G anti‐eavesdropping systems. Results Forward Prediction Network for Dynamically Reconfigurable THz Metadevices Conventional forward design methodologies for multifunctional metadevices rely on exhaustive searches within high‐dimensional meta‐atom libraries to identify configurations matching target phase distributions derived from physical models, a computationally intensive and time‐consuming process. To overcome this limitation, we propose a forward prediction neural network (FPN) that establishes a direct mapping between geometric parameters and electromagnetic spectral responses, thereby eliminating the need for iterative library screening. To enhance electromagnetic response diversity, we extend traditional single‐dielectric‐pillar configurations to incorporate up to three silicon pillars within each meta‐molecule (see Figure 2a). This modification leverages inter‐pillar coupling effects to enrich modulation capabilities. Additionally, a composite meta‐molecule library is constructed by integrating diverse categories of meta‐molecules, maximizing the utilization of their diverse electromagnetic responses. The architecture and results of the Forward Predict Network and inverse design framework for multidimensional multiplexed THz metadevices. (a) Forward Predict Network based on the deep residual network. (b,c) Predicted amplitude and phase of amorphous‐GST‐integrated meta‐atoms, including the corresponding meta‐atom and prediction MSE, where the dots represent the prediction results from the network and the solid lines represent the real spectra. (The geometric parameters of the meta‐atom are Px = 200 µm, Py = 200 µm, Dx = 108 µm, and Dy = 20 µm). (d) Histogram of the MSE for the predicted complex transmission from the test set, where 95% of the data have an MSE < 6.3 × 10−4, Average MSE = 1.923 × 10−4, as indicated by the gray dashed line. (e)End‐to‐end design framework: An initial meta‐optics layout L initial is first input into FPN to model the optical properties of meta‐atoms. The FPN outputs the modulated field E recon, which is evaluated against the target field E target via a multi‐objective loss function constructed based on the target functionality. If the design criteria are not satisfied, a gradient‐based optimization iterative loop is initiated to update the meta‐optics layout. This loop proceeds until the design criteria are met, yielding the final meta‐optics layout L initial that enables full light field control over multiple parameters (frequency, polarization, spatial coordinates (x, y, z), and phase change material state). For efficient numerical modeling of GST‐integrated silicon pillars, a hybrid workflow combining CST Microwave Studio and Python is employed to generate a meta‐atom dataset via randomized parameter sampling. The meta‐molecule spectral responses are evaluated using a time‐domain solver across the 0.2 – 1.2 THz band (See more information about data format in Supporting Information S1: Note 2). To augment data diversity, the original dataset is expanded by applying seven symmetry‐based transformations to meta‐molecules: x‐axis symmetry, y‐axis symmetry, diagonal symmetries (top‐left to bottom‐right and top‐right to bottom‐left), and clockwise rotations (90°, 180°, 270°) (See more information in Supporting Information S1: Note 3). Duplicate entries are subsequently removed, and the dataset is partitioned into training, validation, and test sets at an 18: 1: 1 ratio for model training, hyperparameter tuning, and performance evaluation, respectively. A deep residual neural network (ResNet) is adopted as the core architecture. As illustrated in Figure 2a, residual blocks (gray boxes) mitigate gradient vanishing issues through skip connections, enabling effective deep feature extraction. By reformulating learning objectives as residual function approximations, this architecture enhances training efficiency and convergence stability. (See more information in Supporting Information S1: Note 4 and Note 5) The monotonic decrease in loss‐train and loss function during training (see Figure 2d) confirms successful network optimization. To validate the efficacy of FPN, geometric parameters from the test set are randomly selected, and predicted transmission spectra/phase profiles are compared with the electromagnetic simulation results. As shown in Figures 2b,c, the FPN‐predicted amplitude and phase spectra in amorphous state (dotted curves) exhibit excellent agreement with the electromagnetic simulation results (solid curves), achieving a mean squared error (MSE) of 0.2649 × 10− 3. (see Supporting Information S1: Note 4 for details on the amplitude and phase prediction of the crystalline meta‐atoms)This demonstrates the FPN's high‐fidelity modeling capability for GST‐integrated silicon structures. To assess model robustness, 8,600 untrained samples from the test set are evaluated. The MSE distribution histogram (Figure 2d) reveals that 95.2% of predictions fall below the 6.3 × 10−4 threshold, with an average MSE of 1.923 × 10− 4. The low and consistent error distribution confirms the FPN's resistance to underfitting or overfitting, ensuring reliable predictions of frequency‐dependent responses for GST‐integrated meta‐atoms. These results underscore the robustness of the network and engineering practicality in meta‐device design. It is noteworthy that the FPN developed in this study exhibits significant performance advantages: By leveraging a residual learning‐based deep architecture and symmetry‐enhanced datasets, the FPN achieves low MSE in modeling complex electromagnetic responses. Through a physics‐constrained data augmentation strategy, over 95% of prediction errors for unseen data are concentrated below the 6.3 × 10−4 threshold, demonstrating its robust generalization capability in addressing multiparameter coupling challenges inherent to meta‐device design. Furthermore, the FPN reduces meta‐atom design cycles from hours per iteration in electromagnetic simulation results to milliseconds, while enabling multiphysics‐coupled modeling of GST phase transitions, polarization states, and other tunable parameters. This finding provides a tool for real‐time optimization of tunable reconfigurable metadevices, marking a pivotal advancement in intelligent photonic device design. Inverse Design Framework for Dynamically Reconfigurable Multidimensional Multiplexed THz Metadevices In conventional forward design approaches, the development of multidimensional multiplexed THz meta‐device holograms necessitates exhaustive searches within pre‐constructed meta‐atom libraries to identify configurations that satisfy target phase profiles derived from physical models‐a process that is both time‐intensive and heavily reliant on domain‐specific expertise. To address these challenges, our framework reformulates the physical design problem as a mathematical optimization task. Specifically, we treat GST phase states, frequency, reconstruction distance, polarization states, and target images as fixed inputs, while optimizing meta‐device geometric parameters as variables. The loss function is defined as the cumulative deviation between reconstructed and target intensities across all multiplexing channels, and then the physics problem can be written as an optimization problem: where I target denotes the desired intensity of the electric field distribution, and E recon is the electric field distribution produced by the meta‐device. L is the geometric parameter. p is polarization, z is reconstruction distance, f is frequency, and state represents different states of GST. Figure 2h illustrates the workflow of the proposed inverse design algorithm. Initially, a meta‐device composed of randomly distributed meta‐atoms L is fed into the algorithm. The forward prediction network (Section 2.1) is then employed to compute the modulation electric field distribution of the meta‐device. where f FPN represents the functional mapping between the geometric parameters of the forward prediction network and its associated electromagnetic spectral responses. Subsequently, diffraction theories are applied to simulate E recon reconstructed field distribution at target planes. where G propa represents the propagation process. F represents the two‐dimensional Fourier transform, F −1 represents the two‐dimensional inverse Fourier transform, and H is the transfer function in the angular spectrum method. Then, the derivative of the sum of loss functions of multiple images with respect to each length and width of each super atom is calculated, and the geometric parameter L i+1 of the meta‐device is updated by the gradient descent method. where Re{…} denotes the real part of the value in the bracket. Hence, the Wirtinger calculus and derivative properties of linear operators should be applied in the derivative operation(See Supporting Information 6 for more information). To realize gradient calculation, we have constructed a differentiable analytical forward process in the forward prediction neural network in Section 2.1. The forward prediction network is used to map the geometric design freedom of the super atoms to their amplitude and phase responses under 0.2–1.2 THz and different polarizations, which overcomes the time‐consuming and non‐differentiable nature of subwavelength subatomic numerical simulation, to quickly update and optimize the meta‐device parameters. Notably, optimized parameters cannot be directly input into the neural network for the next cycle. Categorical parameters, meta‐molecule types, and GST integration status are processed via Softmax functions to determine their classifications. Post‐classification, a two‐step parameter refinement is implemented: (1) non‐relevant geometric parameters are nullified to eliminate interference in spectral predictions. (2) parameters exceeding design constraints are resampled within ranges to ensure manufacturability. The refined parameters are then fed back into the network for subsequent optimization cycles. By establishing a direct relationship between meta‐device structural/state parameters and reconstructed images, this framework enables the end‐to‐end design of non‐volatile reconfigurable devices. Simply modifying target performance criteria (e.g. hologram patterns or multiplexing channels) allows rapid generation of optimized meta‐device geometries. Through iterative forward simulations and back propagation‐guided gradient descent, the loss function is minimized until convergence, yielding the final geometric layout (L final). This closed‐loop optimization, physics‐driven forward modeling and algorithm‐driven inverse design, achieves automated multidimensional electronic field control, significantly advancing the development of intelligent THz meta‐device systems. Experimental Validation of Dynamically Reconfigurable Multidimensional Terahertz Tunable Reconfigurable Metadevices To validate the proposed methodology, this study designed and fabricated several distinct multidimensional THz tunable reconfigurable metadevices. The fabricated metasurface consists of a 70 × 70 array of individually optimized meta‐atoms, corresponding to an overall active area of 14 mm × 14 mm. The meta‐atom consists of alternating silicon pillars integrated with GST and pure silicon pillars. All silicon pillars are fixed at a height of 200µm, with GST thin films deposited to a thickness of 200nm. (Microscopic images of the samples are available in Figure S12.) The meta‐device can achieve eight‐channel dynamic THz encrypted holography (Figure 1 inset) by integrating GST phase states (amorphous/crystalline), orthogonal polarizations (x‐/y‐pol), and dual reconstruction distances (6 mm and 12 mm). As shown in Figure 3a, experimental results show that in the amorphous state, x‐polarized light reconstructs a solid heart at Z1 (6 mm) and a WiFi symbol at Z2 (12 mm), while y‐polarized light generates a “humanoid” image at Z1 and a “plus” symbol at Z2. Switching GST to the crystalline state alters the responses: x‐pol light produces a hollow heart at Z1 and a WiFi symbol with weak signal at Z2, and y‐pol light displays a circle at Z1 and a “minus” symbol at Z2. To quantify the crosstalk between images from different channels in simulations and experimental results, the correlation coefficient (See more information in Supporting Information S1: Note 7) was introduced. To quantify the channel isolation, we evaluated the correlation coefficient matrices (Figure 3b), where diagonal elements represent target signal fidelity and off‐diagonal elements indicate inter‐channel crosstalk. In simulations, the diagonal terms consistently exceed 0.95, while the average off‐diagonal correlation remains below 0.4. The experimental measurements align well with these predictions; although some experimental off‐diagonal values exhibit slightly higher correlations, the diagonal terms remain robustly above 0.93, with the majority of off‐diagonal terms staying below 0.35. Simulation and experimental characterization of proposed THz dynamically reconfigurable meta‐device. (a) Reconstructed image patterns at different observation planes under various GST states and polarization conditions(The scale bar in the figure represents 2 mm). (b) Simulated and measured correlation coefficient matrices, where identical colors indicate the correlation coefficients of corresponding image channels. (c) Schematic of the THz multichannel information encryption mechanism. Target and camouflage information are co‐encoded on the meta‐device and transmitted to the receiver, where the correct data are decoded using an exclusive key. Utilizing eight images mapped to eight encrypted channels, this approach enables high‐capacity and secure information transmission through THz meta‐device modulation. While the high diagonal values confirm high‐fidelity signal reconstruction, it is crucial to objectively analyze the origin of the residual off‐diagonal crosstalk. Fundamentally, multiplexing eight independent channels onto a single‐layer metasurface constitutes a highly overdetermined optimization problem. The inverse design algorithm must find a global mathematical compromise to simultaneously satisfy eight distinct phase and amplitude targets using limited geometric degrees of freedom (i.e., the dimensions of the rectangular pillars). This intrinsic compromise leads to imperfect channel orthogonality, manifesting as the baseline crosstalk observed in the simulations. Furthermore, the elevated crosstalk in certain experimental measurements (with a few exceeding 0.5) is primarily attributed to practical imperfections, including fabrication tolerances (e.g., deviations in deep‐silicon etching profiles and micro‐nonuniformities in GST crystallization) and finite cross‐polarization isolation within the THz measurement setup. To further suppress this crosstalk and enhance multichannel decoding robustness, future optimizations could explicitly incorporate an orthogonality penalty term into the loss function. Additionally, expanding the structural design space to include topology‐optimized free‐form meta‐atoms or multi‐level architectures would provide richer scattering degrees of freedom, alleviating these overdetermined constraints and paving the way for near‐perfect channel isolation. Beyond managing crosstalk, a hallmark of a robust encryption platform is its ability to multiplex completely arbitrary and unrelated images. To rigorously demonstrate this capability, we designed and simulated a new four‐channel metasurface that successfully reconstructs four highly dissimilar letters (‘A’, ‘M’, ‘T’, and ‘J’) across different GST states and focal planes (detailed results are presented in Figure S8). This powerful versatility is driven by the significant conductivity contrast of the GST phase transition, which introduces substantial modulation depth. This affords the inverse design algorithm a vast solution space to find global optima even for drastically different target wavefronts. Ultimately, this successful multidimensional parameter synergy validates our framework as a highly capable platform for high‐capacity information encryption, advancing the frontiers of dynamic optical field manipulation and secure data storage. Furthermore, we propose and demonstrate a scheme for THz information encryption and decryption, as shown in Figure 3c, to illustrate the great potential and high security of metadevices for information encryption. Within this scheme, the encrypted meta‐device requires decryption using a specific key sequence to retrieve the target information. The key sequence consists of n keys, and each member within the communication group possesses only one unique, customized key sequence. An individual key comprises three elements: state (Original, Heat, ns Laser), polarization (x‐pol, y‐pol), and image plane position (d 1, d 2). This configuration yields 12 distinct combinations per key. Consequently, the encrypted meta‐device, in conjunction with a specific key sequence, can represent 12n possible combinations of information. By increasing the sequence length n, the probability of non‐target members acquiring the correct information is effectively reduced, while simultaneously expanding the communication group capacity. A simplified case (n = 2), illustrated in Fig 3(c), elucidates this optical information encryption and decryption scheme: Dr. Dong established a communication group with frequently contacted colleagues, where each member holds a dedicated key sequence for information decryption. When Dr. Dong intends to transmit specific information to Dr. Chen, a codebook is first generated, and the decoding rules are defined. Dr. Chen's key sequence is composed of ns Laser/x‐pol/d 2 and heat/y‐pol/d 1, with genuine information corresponding exclusively to this specific sequence. To ensure security, Dr. Dong must incorporate decoy information corresponding to other key components, guaranteeing that only Dr. Chen's key sequence can decode accurately. The encrypted information is then integrated into a single meta‐device and transmitted to the receiver. Upon receiving the sample, Dr. Chen successfully retrieves the correct information using his dedicated key sequence. Conversely, other members, such as Dr. Du, obtain only erroneous information even if they acquire the sample and attempt decryption with their own key sequences. Furthermore, should Dr. Du attempt to deduce other key sequences for decryption, the probability of acquiring the correct information is merely 1/144 (1/122). If the sample falls into the hands of non‐group members, the absence of the correct decoding method renders them incapable of extracting any valid information. This demonstrates the scheme's high security: accurate terahertz information decoding requires possession of both the encrypted meta‐device and the correct key sequence. Without both, decryption either reveals only decoy information or fails completely. Moreover, this scheme achieves information encryption and decryption by modulating multiple degrees of freedom (DoFs) of light and still possesses significant potential for enhancement. Future work could expand the scheme by incorporating additional optical DoFs as encryption channels, thereby further augmenting information capacity and security. We designed a reconfigurable logic device based on THz diffractive neural networks, successfully implementing the four fundamental Boolean logic operations: AND, OR, XOR, and XNOR. The innovative architecture of this device integrates dual‐channel spatial encoding inputs with dynamically tunable meta‐device technology: as shown in Figure 4a, the input plane is constructed through binary spatial segmentation to form orthogonal dual optical paths, where the left/right incident regions correspond to the encoding states of logic “0” and “1”, respectively. By cascading two layers of reconfigurable metadevices based on GST, a THz diffractive neural network with programmable characteristics is built. Through precise control of the phase transition between amorphous (a‐GST) and crystalline (c‐GST) states of different hidden layer, dynamic switching of various logic operation modes (AND/OR/XOR/XNOR) is achieved. Experimental verification at a working frequency of 0.9 THz (Figure 4b–f) demonstrates that the device exhibits excellent logic operation performance. Quantitative analysis shows that the energy concentration efficiency in the output plane target area is over 69.5%, and the average crosstalk suppression ratio in non‐target areas is better than 8.3 dB. The electromagnetic simulation results closely match the measured field distribution characteristics, validating the spatial field control mechanism of this architecture. Notably, compared to traditional logic devices based on electron carrier modulation, this approach has three significant advantages: (1) a full optical domain parallel processing architecture achieves high‐speed operation rates; (2) the non‐volatile reconstruction properties of phase‐change materials reduce power consumption; (3) sub‐wavelength scale meta‐device structures ensure miniaturization of the device. This study, for the first time, combines diffractive neural networks with dynamic met‐devices, offering a new paradigm for programmable logic systems in the THz band. By cascading multiple logic units, it is possible to further construct THz photonic integrated circuits (TPICs) with complex decision‐making capabilities, which show significant application potential in high‐speed optical computing, quantum communication security protocols, and real‐time signal processing. Future research will focus on optimizing the phase quantization accuracy of the metadevices and the dynamics of GST phase transitions to enhance the computational fidelity and reconstruction speed of the system. THz reconfigurable logic computing platform. (a) Schematic architecture of the diffractive optical neural network‐based terahertz logic processor, illustrating the metadevice integration and wavefront modulation mechanism. (b) Spatially encoded input states with corresponding amplitude distributions (from top to bottom: 11, 00, 01, 10). (c, e, g, i) Output optical field distributions corresponding to four different logical operations (AND, OR, XOR, XNOR) under respective input conditions. (d, f, h, j) Energy distribution profiles in different regions of the output plane for AND, OR, XOR, and XNOR operations, respectively. (k)The conceptual schematic depicts THz optical network‐based encrypted communication. This system utilizes a cryptographic key defined by the combination of specific logical operation rules and designated detection positions to encrypt the intended message. Crucially, agents possessing distinct keys (e.g., Alice and Bob) yield markedly distinct decoded information outputs from the same transmitted signal. It is worth noting the architectural rationale behind employing a cascaded double‐layer metasurface rather than a single layer. In principle, multiple logic operations could be realized on a single‐layer GST metasurface through pixel‐level localized optical programming [27, 41], or by multiplexing logic functions into different polarization channels. However, pixel‐level reconfiguration demands highly complex and bulky external optical addressing setups. Our double‐layer diffractive neural network architecture offers a distinct advantage: the GST phase transition is actuated homogeneously across each entire layer. By simply switching the global state of Layer 1 or Layer 2 (yielding 22 = 4 combinations), the device dynamically toggles between AND, OR, XOR, and XNOR operations. This global switching mechanism drastically simplifies the in‐situ actuation process, circumventing the need for pixel‐by‐pixel redrawing. Furthermore, the cascaded architecture introduces physical network depth, providing the necessary spatial scattering degrees of freedom to natively resolve non‐linearly separable logic problems (such as the XOR gate) through deep wave interference [42, 43]. The underlying principle of the proposed THz logic operation device also enables its application in THz encrypted communication. In this scheme, distinct secret keys are assigned to communicating parties: Alice and Bob. Bob utilizes a decoding device configured in the logical AND operation state, targeting detection region “1”, while Alice employs a device configured in the OR operation state, also targeting detection region “1”. The information to be transmitted is encoded, according to specific design principles, into unique sequences of THz optical images. These images possess carefully pre‐engineered intensity distributions specifically designed to simulate information sharing and secure communication scenarios, as illustrated in the Figure 4k. For Agent “Alice”, when the encoded sequence is projected onto the detection plane, the decoding process yields the binary string “10110010000”. Here, a binary “1” signifies that the normalized intensity within the specified region exceeds the threshold of 0.5, whereas a “0” indicates an intensity below 0.5. Crucially, when presented with the identical encoded sequence, Agent “Bob” decodes a distinctly different binary string: “101100110010”. This demonstrates that the same encoded information manifests as markedly distinct decoded messages for recipients possessing different cryptographic keys, fundamentally underpinning the security mechanism. For the practical application of this reconfigurable logic platform in THz encrypted communication (as conceptualized in Figure 4k), it is crucial to delineate two distinct operational time scales. The first is the hardware reconfiguration time, which corresponds to updating the physical encryption key by switching the GST phase states. While amorphization occurs within nanoseconds (10 ns), crystallization currently requires thermal annealing; however, this key rotation rate (ns‐to‐µs scale with integrated microheaters) is sufficient for robust physical‐layer security, as keys need not be updated at the data transmission rate. The second is the data processing time. The switching speed between different input signal streams is dictated by the front‐end spatial light modulators (typically operating at µs‐to‐ms rates). Most importantly, once the input signal is encoded, the subsequent logic computation (encryption/decryption) is executed entirely in the optical domain as the THz wave propagates through the sub‐millimeter cascaded metasurfaces. This all‐optical, massively parallel processing occurs at the speed of light, yielding an ultra‐low computation latency on the order of picoseconds. This decoupling of on‐demand hardware reconfiguration from ultrafast optical data processing highlights the platform's immense potential for high‐capacity, low‐latency secure communication in 6G networks. Conclusion In summary, we introduce a deep learning‐driven inverse design framework for dynamically reconfigurable terahertz metadevices, offering a new paradigm for reconfigurable photonics. By establishing an end‐to‐end mapping between target functionalities and geometric parameters, our methodology overcomes the limitations of conventional design methods, enabling efficient multi‐dimensional multiplexing in THz applications. Experimental validations have demonstrated dynamically reconfigurable metasurfaces with enhanced functional versatility, showcasing their potential in secure communication, dynamic holography, and reconfigurable logic. Comparative studies confirm superior performance metrics and drastically reduced design costs. This work establishes a new paradigm at the intersection of deep learning, computational physics, and reconfigurable meta‐device engineering, achieving unprecedented control over electromagnetic responses. Our framework consistently achieves sub‐millimeter precision, high modal purity, and stable switching, outperforming existing approaches. The essence of this methodology lies in the deep, closed‐loop integration of a data‐driven inverse‐design algorithm with a stimuli‐responsive, phase‐change hardware platform. This synergy, where the algorithm actively adapts and optimizes the physical device's behavior in response to evolving operational demands, defines our core contribution. By embedding this deep‐learning‐enabled adaptability into THz architectures, we enable a pathway toward secure, flexible, and high‐capacity 6G communication. Our devices, for instance, provide unprecedented physical‐layer security through dynamic key reconfiguration, rendering the communication channel a programmable cryptographic element. Furthermore, the demonstrated functional versatility from imaging to computation paves the way for software‐defined metasurfaces, enhancing network efficiency and adaptability. The scalability of our inverse‐design framework across frequency regimes suggests a universal strategy for multifunctional metasystems. The underlying principles are readily transferable to infrared and visible domains, promising dynamically reconfigurable meta‐optics for a range of applications. Looking ahead, we envision highly adaptive metasystems driven by real‐time algorithmic control and the exploration of hybrid materials for enhanced performance. Integrating quantum photonic elements could unlock new possibilities in secure quantum communication. These advances lay the groundwork for a new generation of photonic technologies, where dynamic reconfigurability, adaptability, and security are intrinsic. This work is a foundational contribution in the ongoing pursuit of deep‐learning‐empowered programmable metadevices. Methods Numerical Simulation The meta‐atom was simulated using CST Microwave Studio. The period of the meta‐atom was set as 200 µm, with periodic boundary conditions applied in the x and y directions, and open boundary conditions implemented in the z direction. To make full use of the electromagnetic response of different types of meta‐atom, we designed a unit structure library composed of three types of meta‐atom. The height h of the dielectric column is uniformly set to 200 µm. The refractive index of Si was 3.42. The conductivity variation of the GST layer under various Crystallization degrees was taken into consideration. The conductivity of the GST layer under amorphous and crystalline conditions was set to be 500 and 3 × 105 S·m−1, respectively, based on the terahertz time‐domain spectroscopy (THz‐TDS) system. Neural Network Training The forward prediction residual neural network architecture consists of an input layer, two dimension‐expanding fully connected layers, 15 residual blocks with residual connections, and output layers. The ReLU activation function is employed between hidden layers. The input layer accepts meta‐molecule category parameters and geometric parameters. The output layer predicts the real and imaginary components of transmission spectra across 0.2 – 1.2 THz (8008 dimensions). Training utilized an expanded dataset generated through symmetry transformations (7 augmentation methods) and electromagnetic simulations via Python‐controlled commercial software. The dataset was partitioned into training/validation/test sets at 18:1:1. The network was optimized using Adam with an initial learning rate of 0.001 and StepLR decay (gamma = 0.9 /100 epochs). Training convergence was validated by near‐perfect overlap between predicted and simulated spectra for randomly sampled test structures, demonstrating robust generalization capability. Sample Fabrication The fabrication of a dynamic multidimensional THz device involves several processing steps. Initially, a 500 µm‐thick silicon wafer is cleaned ultrasonically using acetone, isopropanol, and deionized water. After drying, a 13 µm‐thick layer of photoresist (AZ4620) is applied using a spin coater. The photoresist is patterned through UV lithography and image development using a preprepared photomask and developer (NMD‐W). Subsequently, the patterned all‐dielectric structure undergoes deep etching using a Bosch process in a high‐aspect‐ratio silicon etcher (HSE M200, NAURA). Following the etching process, acetone, isopropyl alcohol, and deionized water are used to remove the photoresist and any remaining residues. On the lower surface of the silicon structure obtained from the first photolithography, the photoresist is rotated and coated again, exposed under alignment, and developed into a photoresist pattern using mask 2. Next, a 200 nm thick GST film was deposited on the surface with photoresist by magnetron sputtering technology, followed by a lift‐off process. Finally, the fabrication of the non‐volatile reconfigurable dynamic terahertz device was finished. Experiment Setup Fiber‐based near‐field scanning terahertz microscopy was employed to experimentally detect the interference patterns of a dynamic terahertz metadevice. Femtosecond fiber laser pulses with ≈50 fs pulse width and 1550 nm central wavelength were split into two beams. One of the beams focused onto a commercial photoconductive antenna to generate broadband terahertz radiation ranging from 0.2 to 1.5 THz in a linear polarization state. A terahertz lens was placed after the THz photoconductive antenna to collimate and adjust the size of the outgoing terahertz spot. The other beam illuminated a commercial terahertz near‐field probe to detect the x/y‐polarized electric field component with high resolution. The scanning step is 10 µm. Details of these setups for characterizing the metadevice are shown in the Supporting Information 11. Funding This work is supported by the National Natural Science Foundation of China (Grant Nos. 62235013, 62335012, 62405215, 62275195); China Postdoctoral Science Foundation (Grant No. 2024M752359); Postdoctoral Fellowship Program of CPSF (Grant No. GZC20241200). Conflicts of Interest The authors declare no conflicts of interest. Supporting information Supporting File: adma73630‐sup‐0001‐SuppMat.docx. Contributor Information Tun Cao, Email: caotun1806@dlut.edu.cn. Ranjan Singh, Email: rsingh3@nd.edu. Zhen Tian, Email: tianzhen@tju.edu.cn. Data Availability Statement Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request. References Associated Data Supplementary Materials Supporting File: adma73630‐sup‐0001‐SuppMat.docx. Data Availability Statement Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.