Deep steganographic approach for reliable data hiding using convolutional neural networks and adaptive loss optimization Authors: Malathi P., Gireesh Kumar T. Published: 2025 ABSTRACT This paper proposes a deep steganography framework using a three-layered Convolutional Neural Network (CNN) architecture—preparation, hiding, and revealing networks—for robust data hiding. The preparation network employs 50, 10, and 5 filters (3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3, 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}4, 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}5) for edge feature extraction, followed by adaptive embedding in the hiding network. Optimized with four loss functions, Loss Function 3 (LF 3), integrating mean and variance terms, achieves a payload of 3–5 bits per pixel and improved PSNR across Tiny-ImageNet, Linnaeus 5 dataset, Sky-text dataset and RGB-BMP datasets. LF 3 ensures robustness against Gaussian noise, cropping, and rotation, with low detection rates in histogram, statistical, and CNN-based steganalysis. Compared to state-of-the-art Generative Adversarial Network (GAN) based methods, LF 3 offers higher payload-robustness balance and computational efficiency, advancing secure data hiding for applications like medical imaging. Introduction The domain of information security aims to safeguard information from unauthorized access. Information security1 encompasses two primary subcategories: Information encryption and Information hiding. Regardless of an attacker’s presence, information encryption involves transforming data into an unreadable format using various techniques manually conducted by humans or computer algorithms. Two primary categories comprise information hiding: Watermarking and Steganography. Watermarking is essential for preventing copying or usage fraud, embedding identifiable markers into digital media like CDs, DVDs, and flash drives to ensure authenticity and ownership, particularly in media and publishing industries where intellectual property protection is critical2–6. Steganography, in contrast, conceals data within a medium so that it goes undetected. Steganalysis is a method of detecting hidden transmissions while reducing any adverse effects on regular transmissions. In Steganography, the term “Cover” pertains to media that does not possess concealed information, while “Stego” refers to media with hidden data. Steganographic techniques exhibit different variations contingent upon the nature of the secret information and the cover media involved. These techniques conceal information within various media types, including text, images, videos, audio, and network communications. The primary emphasis of this paper is on image steganography, which involves concealing either text or image data within an image (cover) to create a stego or container image. Embedding techniques are broadly classified into spatial and frequency domains. Spatial domain methods, such as Least Significant Bit (LSB) substitution7 and Pixel Value Differencing (PVD)8, directly modify pixel values, offering simplicity and high capacity (e.g., 1 bpp for LSB) but limited robustness to image processing like compression or noise. Frequency domain methods, including Discrete Cosine Transform (DCT) and Discrete Wavelet Transform (DWT), embed data in transformed coefficients, providing better resistance to compression but requiring higher computational resources and often yielding lower payloads. Traditional schemes in these domains, such as LSB-based techniques7 and DCT-based approaches8, have been foundational but exhibit significant limitations. They achieve low payload capacities (e.g., 0.3 bpp for LSB variants) and are vulnerable to advanced steganalysis8, particularly machine learning-based detectors that exploit statistical patterns. The evolution of steganalysis, with deep learning tools9,10, has further exposed weaknesses in adaptability to transformations like cropping or rotation, necessitating more robust solutions. Deep learning techniques8 have gained significant attention in Steganography, with various methods applied to Steganography and Steganalysis. One notable approach is the utilization of Generative Adversarial Networks (GANs), which employ adversarial training involving two competing networks: One network embeds confidential data into the original image. In contrast, the other network acts as a Steg analyzer, detecting the presence of hidden information. However, methodologies based on Generative Adversarial Networks (GANs) demonstrate resource-intensive characteristics and are susceptible to instability issues. In contrast, Convolutional Neural Network (CNN) based approaches for embedding confidential data by minimizing discrepancies in loss functions, making them more robust against steganalysis. The integration of optimization techniques with neural networks enhances computational efficiency by enabling faster convergence during training and reducing the need for extensive manual parameter tuning, as evidenced by the streamlined training process and reduced computational overhead in our experiments. Deep learning approaches, including CNN-based9,10 and GAN-based methods11,12, improve imperceptibility but face limitations. GANs suffer from training instability and high computational costs, while CNN-based methods often prioritize payload over robustness to transformations like cropping or rotation. To address these challenges, we propose a deep steganography framework using a three-layered CNN architecture optimized by a novel loss function, Loss Function 3 refer Table 2. The framework aims to balance high payload capacity, robustness to transformations, and resistance to steganalysis.The contributions are: Loss Function(LF) 3, integrating mean and variance terms for optimized embedding (3–5 bpp),a three-layered CNN architecture for adaptive data hiding, anda comprehensive evaluation demonstrates the robustness of the method (refer to Table 9), with steganalysis detection rates remaining below 45% across multiple datasets. Loss Function(LF) 3, integrating mean and variance terms for optimized embedding (3–5 bpp), Loss Function(LF) 3, integrating mean and variance terms for optimized embedding (3–5 bpp), a three-layered CNN architecture for adaptive data hiding, and a three-layered CNN architecture for adaptive data hiding, and a comprehensive evaluation demonstrates the robustness of the method (refer to Table 9), with steganalysis detection rates remaining below 45% across multiple datasets. a comprehensive evaluation demonstrates the robustness of the method (refer to Table 9), with steganalysis detection rates remaining below 45% across multiple datasets. The following sections of the manuscript are structured as follows: section “Related work” provides a comparative analysis between our methodology and related approaches documented in existing literature. Section “Proposed methodology” elucidates the proposed methodology, encompassing convolutional neural networks (CNN), adversarial embedding techniques, and diverse loss functions. Section “Metrics and dataset” delineates the metrics utilized and datasets employed for conducting comparative assessments. In section “Results and discussion”, the manipulation of images through the introduction of noise and the application of various geometrical transformations is thoroughly discussed. Finally, section “Conclusion and future enhancements” presents concluding remarks and delineates avenues for future research endeavors. Related work Steganography research spans traditional and deep learning-based techniques, each addressing the challenge of embedding secret data in cover media while ensuring imperceptibility and security against steganalysis. This section reviews key steganographic methods in the spatial domain, summarizes their strengths and limitations in Table 1, and identifies gaps in the state-of-the-art, highlighting how the proposed framework addresses these challenges. Table 1The survey of deep steganographic techniques in the spatial domain.AuthorsMethodsObjectivesLimitationsCapacity/metrics/ resistance against steganalysis(Pevný et al.)7HUGOSpatial domain algorithm using SPAM features to minimize distortionFeature set selection to avoid overfitting to steganalyzers (up to 107 features)0.3 bpp, vulnerable to steganalysis(Hussain et al.)13Spatial DomainAdaptive embedding in spatial domain, compares strengths/limitationsBalancing payload, imperceptibility, and resistance to statistical steganalysisHigh payload, visual imperceptibility, resists statistical/non-structural steganalysis(Kadhim et al.)14Image Steganography TypesReviews image steganography types, innovations, and performance evaluationsBalancing robustness, security, imperceptibility, and high payloadNA(Malathi et al.)15PSO + Binary Hamming CodeOptimal pixel placement in grayscale images using PSO and Hamming codeLow embedding rate0.2 bpp, PSNR, SSIM, resists Chi-Square, Histogram, RS steganalysis(Baluja et al.)9CNN, Adam5-layer CNN with 50 filters (3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3, 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}4, 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}5), ReLU, high payloadReconstruction errors, and residual exposure if the cover is disclosedN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}N\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}RGB, SSE, resists StegExpose(Zhu et al.)11GAN, AdamHiDDeN: end-to-end neural embedding, adversarial training, noise robustnessHigh GPU memory, long embedding time1–3 bpp, PSNR, low detection rate by steganalyzer(Rahim et al.)10CNN, AdamEncoder-decoder with loss function for high payload, versatile architectureNo steganalysis verification300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3 cover/stego, 300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}1 secret, PSNR, SSIM(Wu et al.)16Separable Conv, ResidualCombines separable convolution, residual blocks, batch normalization, and ReLUNoise in uniform regions, variance loss limitations64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64 images, ROC curve, StegExpose(Yamauchi et al.)17CNN, SharpeningQR code embedding in color images, Adam optimizer, sharpening filterInaccurate QR recovery with rapid color tone changesPSNR, SSIM(Sharma et al.)18CNN, ScramblingPixel scrambling for encryption, CNN with Adam optimizerWeak encryption with fewer blocks, and high correlation256\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}256 images, MSE(Huang et al.)19Texture Loss, GANTexture-based loss for hiding in complex regions, discriminator as steganalyzerComplex networks, high GPU memoryPSNR, SSIM, resists ATS steganalysis(Kevin et al.)20GAN, AdamHides binary data, and optimizes perceptual quality with three lossesUnclear image-in-image hiding metrics4.4 bpp, PSNR, SSIM, resists StegExpose, neural steganalysis(Kich et al.)21CNN, AdamGeneric approach for various image sources, variable sizesLimited by computing power for large images (>300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3)Variable sizes, PSNR, SSIM(Duan et al.)22DCT, ECC, CNNDCT for secret conversion, ECC encryption, and StegNet for embedding/extractionComplexity in implementation64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64 images, PSNR, SSIM, 1 bpp, StegExpose(Das et al.)23CNN, AdamEncodes up to three secret images in one cover, with minimal secret lossHigh cover image loss64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64 images, loss graph(Li et al.)12GAN, Cross-FeedbackGAN with cross-feedback channels for imperceptible embeddingUnclear architecture, spatial domain limitation0.5 bpp, resists anti-steganalysis(Martín et al.)24GAN, Genetic AlgoSpatial domain steganalysis with minimal alteration, genetic algorithmLimited to spatial domain, needs frequency domain explorationPayload not specified, resists steganalysisGao et al.GAN-based steganography with deep learning detectionDeep learning can detect GAN-based hidden images using statistical patternsGAN images may have patterns that make detection easierLow resistance to deep learning steganalysis; detected with high accuracyKumar et al.Robust steganography against transformationsA new method that hides data without being affected by rotation or scalingHard to keep image quality while making it strong against changesGood image quality (PSNR, SSIM); strong against steganalysis after transformations Table 1The survey of deep steganographic techniques in the spatial domain.AuthorsMethodsObjectivesLimitationsCapacity/metrics/ resistance against steganalysis(Pevný et al.)7HUGOSpatial domain algorithm using SPAM features to minimize distortionFeature set selection to avoid overfitting to steganalyzers (up to 107 features)0.3 bpp, vulnerable to steganalysis(Hussain et al.)13Spatial DomainAdaptive embedding in spatial domain, compares strengths/limitationsBalancing payload, imperceptibility, and resistance to statistical steganalysisHigh payload, visual imperceptibility, resists statistical/non-structural steganalysis(Kadhim et al.)14Image Steganography TypesReviews image steganography types, innovations, and performance evaluationsBalancing robustness, security, imperceptibility, and high payloadNA(Malathi et al.)15PSO + Binary Hamming CodeOptimal pixel placement in grayscale images using PSO and Hamming codeLow embedding rate0.2 bpp, PSNR, SSIM, resists Chi-Square, Histogram, RS steganalysis(Baluja et al.)9CNN, Adam5-layer CNN with 50 filters (3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3, 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}4, 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}5), ReLU, high payloadReconstruction errors, and residual exposure if the cover is disclosedN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}N\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}RGB, SSE, resists StegExpose(Zhu et al.)11GAN, AdamHiDDeN: end-to-end neural embedding, adversarial training, noise robustnessHigh GPU memory, long embedding time1–3 bpp, PSNR, low detection rate by steganalyzer(Rahim et al.)10CNN, AdamEncoder-decoder with loss function for high payload, versatile architectureNo steganalysis verification300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3 cover/stego, 300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}1 secret, PSNR, SSIM(Wu et al.)16Separable Conv, ResidualCombines separable convolution, residual blocks, batch normalization, and ReLUNoise in uniform regions, variance loss limitations64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64 images, ROC curve, StegExpose(Yamauchi et al.)17CNN, SharpeningQR code embedding in color images, Adam optimizer, sharpening filterInaccurate QR recovery with rapid color tone changesPSNR, SSIM(Sharma et al.)18CNN, ScramblingPixel scrambling for encryption, CNN with Adam optimizerWeak encryption with fewer blocks, and high correlation256\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}256 images, MSE(Huang et al.)19Texture Loss, GANTexture-based loss for hiding in complex regions, discriminator as steganalyzerComplex networks, high GPU memoryPSNR, SSIM, resists ATS steganalysis(Kevin et al.)20GAN, AdamHides binary data, and optimizes perceptual quality with three lossesUnclear image-in-image hiding metrics4.4 bpp, PSNR, SSIM, resists StegExpose, neural steganalysis(Kich et al.)21CNN, AdamGeneric approach for various image sources, variable sizesLimited by computing power for large images (>300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}300\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3)Variable sizes, PSNR, SSIM(Duan et al.)22DCT, ECC, CNNDCT for secret conversion, ECC encryption, and StegNet for embedding/extractionComplexity in implementation64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64 images, PSNR, SSIM, 1 bpp, StegExpose(Das et al.)23CNN, AdamEncodes up to three secret images in one cover, with minimal secret lossHigh cover image loss64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64 images, loss graph(Li et al.)12GAN, Cross-FeedbackGAN with cross-feedback channels for imperceptible embeddingUnclear architecture, spatial domain limitation0.5 bpp, resists anti-steganalysis(Martín et al.)24GAN, Genetic AlgoSpatial domain steganalysis with minimal alteration, genetic algorithmLimited to spatial domain, needs frequency domain explorationPayload not specified, resists steganalysisGao et al.GAN-based steganography with deep learning detectionDeep learning can detect GAN-based hidden images using statistical patternsGAN images may have patterns that make detection easierLow resistance to deep learning steganalysis; detected with high accuracyKumar et al.Robust steganography against transformationsA new method that hides data without being affected by rotation or scalingHard to keep image quality while making it strong against changesGood image quality (PSNR, SSIM); strong against steganalysis after transformations The survey of deep steganographic techniques in the spatial domain. Traditional methods (e.g., HUGO7, 0.3 bpp) offer low capacity, while deep learning methods (e.g., Baluja et al.9, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}8 bpp) achieve higher payloads but compromise robustness to transformations like cropping or noise. Most methods, including CNN-based9 and GAN-based11, degrade under real-world distortions (e.g., JPEG compression, rotation), limiting practical applicability. GAN-based approaches11,20 require high GPU memory and long embedding times, hindering scalability for real-time applications. Many techniques are confined to the spatial domain11,20 or frequency domain22, lacking versatility across diverse media types. Advanced deep learning steganalysis (e.g., Gao et al.25) exploits statistical patterns in GAN-based methods, reducing security. Traditional methods7 are particularly vulnerable to histogram and statistical attacks. Inconsistent metrics (e.g., PSNR, SSIM, ROC) across studies complicate fair comparisons, as noted in Kadhim et al.14. The proposed framework, utilizing a three-layered CNN architecture (preparation, hiding, reveal networks) optimized with Loss Function 3 (LF 3), addresses these gaps as follows: Balanced payload and imperceptibility: LF 3 achieves a payload of 3–5 bpp with PSNR of 22.11–25.98 dB and SSIM of 0.92–0.97, offering higher capacity than HUGO (0.3 bpp) and better quality than Baluja et al. (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}8 bpp, PSNR 25–30 dB).Transformation robustness: LF 3 maintains low BER (0.03–0.08) and high SSIM (0.90–0.97) under Gaussian noise (Tables 8 and 9), 10–50% cropping, and rotation, outperforming Kumar et al.26 (1–2 bpp, SSIM 0.90–0.94) in severe distortion scenarios.Computational efficiency: The streamlined CNN architecture reduces memory usage by 20% and embedding time by 30% compared to Zhu et al.11, enabling scalability for real-time applications. This efficiency stems from the optimized loss function that accelerates convergence and reduces the computational overhead typically associated with iterative optimization processes.Domain versatility: Adaptive embedding in the preparation network supports spatial and edge-based feature integration, overcoming spatial-domain limitations of Martín et al.24 and frequency-domain constraints of Duan et al.22.Steganalysis resistance: LF 3 achieves low detection rates (<45% accuracy, <0.50 precision/recall/f1-score) against histogram, statistical, and CNN-based steganalysis, surpassing Gao et al.25 (vulnerable to deep learning steganalysis) through optimized loss balancing.Standardized evaluation: The framework uses a consistent metric suite (PSNR, SSIM, BER, precision, recall, f1-score) across diverse datasets (Tiny-ImageNet, RGB-BMP, Linnaeus 5, Sky-text), addressing standardization gaps noted in Kadhim et al.14.By addressing these challenges, the proposed framework advances steganography toward practical, secure, and robust data hiding, particularly for applications requiring high payload and resistance to real-world distortions and steganalysis. Balanced payload and imperceptibility: LF 3 achieves a payload of 3–5 bpp with PSNR of 22.11–25.98 dB and SSIM of 0.92–0.97, offering higher capacity than HUGO (0.3 bpp) and better quality than Baluja et al. (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}8 bpp, PSNR 25–30 dB). Balanced payload and imperceptibility: LF 3 achieves a payload of 3–5 bpp with PSNR of 22.11–25.98 dB and SSIM of 0.92–0.97, offering higher capacity than HUGO (0.3 bpp) and better quality than Baluja et al. (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}8 bpp, PSNR 25–30 dB). Transformation robustness: LF 3 maintains low BER (0.03–0.08) and high SSIM (0.90–0.97) under Gaussian noise (Tables 8 and 9), 10–50% cropping, and rotation, outperforming Kumar et al.26 (1–2 bpp, SSIM 0.90–0.94) in severe distortion scenarios. Transformation robustness: LF 3 maintains low BER (0.03–0.08) and high SSIM (0.90–0.97) under Gaussian noise (Tables 8 and 9), 10–50% cropping, and rotation, outperforming Kumar et al.26 (1–2 bpp, SSIM 0.90–0.94) in severe distortion scenarios. Computational efficiency: The streamlined CNN architecture reduces memory usage by 20% and embedding time by 30% compared to Zhu et al.11, enabling scalability for real-time applications. This efficiency stems from the optimized loss function that accelerates convergence and reduces the computational overhead typically associated with iterative optimization processes. Computational efficiency: The streamlined CNN architecture reduces memory usage by 20% and embedding time by 30% compared to Zhu et al.11, enabling scalability for real-time applications. This efficiency stems from the optimized loss function that accelerates convergence and reduces the computational overhead typically associated with iterative optimization processes. Domain versatility: Adaptive embedding in the preparation network supports spatial and edge-based feature integration, overcoming spatial-domain limitations of Martín et al.24 and frequency-domain constraints of Duan et al.22. Domain versatility: Adaptive embedding in the preparation network supports spatial and edge-based feature integration, overcoming spatial-domain limitations of Martín et al.24 and frequency-domain constraints of Duan et al.22. Steganalysis resistance: LF 3 achieves low detection rates (<45% accuracy, <0.50 precision/recall/f1-score) against histogram, statistical, and CNN-based steganalysis, surpassing Gao et al.25 (vulnerable to deep learning steganalysis) through optimized loss balancing. Steganalysis resistance: LF 3 achieves low detection rates (<45% accuracy, <0.50 precision/recall/f1-score) against histogram, statistical, and CNN-based steganalysis, surpassing Gao et al.25 (vulnerable to deep learning steganalysis) through optimized loss balancing. Standardized evaluation: The framework uses a consistent metric suite (PSNR, SSIM, BER, precision, recall, f1-score) across diverse datasets (Tiny-ImageNet, RGB-BMP, Linnaeus 5, Sky-text), addressing standardization gaps noted in Kadhim et al.14. Standardized evaluation: The framework uses a consistent metric suite (PSNR, SSIM, BER, precision, recall, f1-score) across diverse datasets (Tiny-ImageNet, RGB-BMP, Linnaeus 5, Sky-text), addressing standardization gaps noted in Kadhim et al.14. Proposed methodology The proposed architecture, depicted in (Fig. 1) comprises three networks. The preparation network accepts the cover image and pre-processed secret image as inputs for embedding. In scenarios where the secret image is smaller than the cover image, the preparation network resizes it to match the dimensions, ensuring an even distribution of secret image bits across all pixels. Furthermore, this network transforms color-based pixels into edge features for embedding. The second is the Hiding network,which receives input from the preparation network and generates the stego image as output. Together, the preparation network and the hiding network constitute the sender block. The receiver side functions as the third network, where the stego image is taken as input, and the cover image is separated from it to extract the embedded secret image. The primary aim of the entire model is to minimize loss to the extent that detecting the presence of a secret image in the stego image becomes challenging. Additionally, the receiver should achieve enhanced clarity when recovering the secret image. Therefore, selecting a suitable loss function plays important role in achieving these objectives. Algorithm design Two distinct processes are encapsulated within the Encoder block: Preparation and Hiding27,28. Fig. 1Layered architecture of the Deep Steganographic technique. Illustrates the data flow: the preparation network extracts edge features from cover (C) and secret (S) images, the hiding network embeds S into C to produce the stego image (St), and the reveal network recovers the secret (Sr). Layered architecture of the Deep Steganographic technique. Illustrates the data flow: the preparation network extracts edge features from cover (C) and secret (S) images, the hiding network embeds S into C to produce the stego image (St), and the reveal network recovers the secret (Sr). The secret and cover image undergo resizing in the preparation network to attain uniform dimensions. Following this, the hiding network is employed to produce the stego image. Decoder block comprises the network, which is utilized to extract the hidden secret image from the stego image. Preparation network The cover and secret images are given as input to the preparation network. The hidden image undergoes a series of convolutional operations, utilizing blocks of 50, 10, and 5 filters with dimensions of 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3, 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}4, and 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}5, respectively. Subsequently, feature maps generated by these convolutional layers are merged and processed through a secondary convolutional operation, employing 50, 10, and 5 filters with 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3, 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}5, and 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}4 sizes, respectively. This process ensures the inclusion of all features of the hidden image within the resultant feature maps. The output is produced by integrating these concatenated feature maps with the cover image as input. The architectural layout of the Preparation network is illustrated in Fig. 2. Fig. 2Process of the preparation network. Process of the preparation network. Hidden network The preparation network’s output feeds the hidden network, consisting of 5 convolutional layers. It has 50, 10, and 5 filters with 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3, 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}4, and 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}5 dimensions. The preparation network’s output is fed into the first convolutional layer block. Each block’s concatenated outputs are then sent as inputs to their corresponding subsequent blocks. The hidden network’s final output is obtained by passing the output of the last convolution block with three filters of size 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3. This final output combines elements from the cover and hidden images to generate the container image, closely resembling the cover image and resulting from the intricately designed model. The architecture of the hidden network, including the concatenation of feature maps and their transmission to the respective convolution blocks, is depicted clearly in Fig. 3. Fig. 3Process of the hidden network. Process of the hidden network. Reveal network The architecture of reveal comprises five blocks of convolutional layers, which take both noise and output from the hidden network as input. It integrates 50, 10, and 5 filters with 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3, 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}4, and 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}5 dimensions. The result of the hidden network is fed into the initial convolutional block, while subsequent blocks receive concatenated outputs. Ultimately, the final result of the reveal network is generated through a single convolutional layer with three filters of size 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3, processing the output of the last convolution block. This resulting output represents the decoded secret image, aimed at closely resembling the original secret image. Additionally, the model is fine-tuned to facilitate the receiver’s retrieval of the secret image with minimal distortion. The architectural structure of the reveal network, encompassing the concatenation of feature maps and their transmission to corresponding convolution blocks, is vividly illustrated in Fig. 4. Fig. 4Process of the reveal network. Process of the reveal network. Concatenation layer For example, if the preparation layer has the feature maps - 64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}50, 64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}10, and 64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}5 - they are concatenated to form 64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}65. The 50 convolution feature maps, 10 convolution feature maps, and five convolution feature maps are combined by concatenation - simply stacking them together, so the total is 65 feature maps. This concatenation process ensures comprehensive feature integration across different filter sizes, enhancing the network’s ability to preserve both high-level and low-level image characteristics during the steganographic process. Loss functions The framework is optimized using four distinct loss functions, each designed to balance imperceptibility and reconstruction quality. Table 2 details these loss functions, their mathematical formulations, and their impact on the steganographic process. Table 2Mathematical formulation of loss functions.Loss functionReveal/decoder network lossFull network lossLoss 1 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Reveal & \;loss: \\ & \;\; = \beta \left\| {s - s^{\prime}} \right\| \\ & \;\; = \beta \times \left[ {\sum\limits_{{i = 0}}^{{h \times w}} {({\text{secret image}} - {\text{decoded secret image}})} ^{2} } \right] \\ \end{aligned}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Full\; & loss: \\ & \, = \left\| {c - c^{\prime}} \right\| + \beta \left\| {s - s^{\prime}} \right\| \\ & \; = \left[ {\sum\limits_{{i = 0}}^{{h \times w}} {({\text{cover image}} - {\text{encoded cover image}})^{2} } } \right] \\ & \;\; + {\text{Reveal loss}} \\ \end{aligned}$$\end{document} Loss 2 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} L_{CE}&= \dfrac{1}{n}\sum _{i=1}^{n} \left| {E_i - C_i}\right| = \\&\dfrac{\sum _{i=1}^{h \times w} \left| {\text {encoded cover image} - \text {input cover image}}\right| }{h \times w} \\ L_{HD}&= \dfrac{1}{n}\sum _{i=1}^{n} \left| {D_i - H_i}\right| = \\&\dfrac{\sum _{i=1}^{h \times w} \left| {\text {decoded secret image} - \text {input secret image}}\right| }{h \times w} \end{aligned}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Full\ Loss = \dfrac{1}{4}\bigg [L_{CE} + L_{HD} + Var(L_{CE}) + Var(L_{HD})\bigg ]$$\end{document} Loss 3 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Reveal\ loss: = \beta \Vert s - s' \Vert&+ Var(L_{HD}) = \\ \beta \times \bigg [ \sum _{i=0}^{h \times w}&(\text {secret image} - \\&\text {decoded secret image})^2 \bigg ] \\&+ Var(L_{HD}) \end{aligned}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Full\ loss = \dfrac{1}{4}\bigg [&\Vert c - c' \Vert + \beta \Vert s - s' \Vert \\&+ Var(L_{CE}) \\&+ Var(L_{HD}) \bigg ] \\ = \dfrac{1}{4}\bigg [&\bigg [ \sum _{i=0}^{h \times w} (\text {cover image} - \\&\text {encoded cover image})^2 \bigg ] \\&+ Var(L_{CE}) \\&+ \text {Reveal loss} \bigg ] \end{aligned}$$\end{document} Loss 4 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {secret\_ssim}&= \gamma \times \bigg (1 - \\&\bigg [ \dfrac{(2\mu _x \mu _y + C_1)(2\sigma _{xy} + C_2)}{(\mu _x^2 + \mu _y^2 + C_1)(\sigma _x^2 + \sigma _y^2 + C_2)} \bigg ] \bigg ) \\ \text {Reveal loss}&= \beta \Vert s - s' \Vert \\&+ \gamma \times (1 - \text {secret\_ssim}) \\ = \beta \times \bigg [ \sum _{i=0}^{h \times w}&(\text {secret image} - \\&\text {decoded secret image})^2 \bigg ] \\&+ \gamma \times (1 - \text {secret\_ssim}) \end{aligned}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {cover\_ssim}&= \gamma \times \bigg (1 - \\&\bigg [ \dfrac{(2\mu _x \mu _y + C_1)(2\sigma _{xy} + C_2)}{(\mu _x^2 + \mu _y^2 + C_1)(\sigma _x^2 + \sigma _y^2 + C_2)} \bigg ] \bigg ) \\ \text {Full loss}&= \Vert c - c' \Vert + \beta \Vert s - s' \Vert \\&+ \gamma \times (1 - \text {secret\_ssim}) \\&+ \gamma \times (1 - \text {cover\_ssim}) \\ = \bigg [ \sum _{i=0}^{h \times w}&(\text {cover image} - \\&\text {encoded cover image})^2 \bigg ] \\&+ \gamma \times (1 - \text {cover\_ssim}) \\&+ \text {Reveal loss} \end{aligned}$$\end{document} Where:LF1, 2, 3, 4 are different loss functions. h - image height , w - image width. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta$$\end{document} - Beta = 1.0. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_{CE}$$\end{document} refers to the difference between the cover image and its encoded version, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_{HD}$$\end{document} refers to the difference between the secret image and its decoded counterpart. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma$$\end{document} refers mean and standard deviation of both the images. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _{xy}$$\end{document} refers to cross-covariance. Constants \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_1$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_2$$\end{document} are used to stabilize the index in cases where the mean and variance are small. The value of the constant \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma$$\end{document} is calculated empirically and used as a weighted constant. Table 2Mathematical formulation of loss functions.Loss functionReveal/decoder network lossFull network lossLoss 1 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Reveal & \;loss: \\ & \;\; = \beta \left\| {s - s^{\prime}} \right\| \\ & \;\; = \beta \times \left[ {\sum\limits_{{i = 0}}^{{h \times w}} {({\text{secret image}} - {\text{decoded secret image}})} ^{2} } \right] \\ \end{aligned}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Full\; & loss: \\ & \, = \left\| {c - c^{\prime}} \right\| + \beta \left\| {s - s^{\prime}} \right\| \\ & \; = \left[ {\sum\limits_{{i = 0}}^{{h \times w}} {({\text{cover image}} - {\text{encoded cover image}})^{2} } } \right] \\ & \;\; + {\text{Reveal loss}} \\ \end{aligned}$$\end{document} Loss 2 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} L_{CE}&= \dfrac{1}{n}\sum _{i=1}^{n} \left| {E_i - C_i}\right| = \\&\dfrac{\sum _{i=1}^{h \times w} \left| {\text {encoded cover image} - \text {input cover image}}\right| }{h \times w} \\ L_{HD}&= \dfrac{1}{n}\sum _{i=1}^{n} \left| {D_i - H_i}\right| = \\&\dfrac{\sum _{i=1}^{h \times w} \left| {\text {decoded secret image} - \text {input secret image}}\right| }{h \times w} \end{aligned}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Full\ Loss = \dfrac{1}{4}\bigg [L_{CE} + L_{HD} + Var(L_{CE}) + Var(L_{HD})\bigg ]$$\end{document} Loss 3 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Reveal\ loss: = \beta \Vert s - s' \Vert&+ Var(L_{HD}) = \\ \beta \times \bigg [ \sum _{i=0}^{h \times w}&(\text {secret image} - \\&\text {decoded secret image})^2 \bigg ] \\&+ Var(L_{HD}) \end{aligned}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Full\ loss = \dfrac{1}{4}\bigg [&\Vert c - c' \Vert + \beta \Vert s - s' \Vert \\&+ Var(L_{CE}) \\&+ Var(L_{HD}) \bigg ] \\ = \dfrac{1}{4}\bigg [&\bigg [ \sum _{i=0}^{h \times w} (\text {cover image} - \\&\text {encoded cover image})^2 \bigg ] \\&+ Var(L_{CE}) \\&+ \text {Reveal loss} \bigg ] \end{aligned}$$\end{document} Loss 4 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {secret\_ssim}&= \gamma \times \bigg (1 - \\&\bigg [ \dfrac{(2\mu _x \mu _y + C_1)(2\sigma _{xy} + C_2)}{(\mu _x^2 + \mu _y^2 + C_1)(\sigma _x^2 + \sigma _y^2 + C_2)} \bigg ] \bigg ) \\ \text {Reveal loss}&= \beta \Vert s - s' \Vert \\&+ \gamma \times (1 - \text {secret\_ssim}) \\ = \beta \times \bigg [ \sum _{i=0}^{h \times w}&(\text {secret image} - \\&\text {decoded secret image})^2 \bigg ] \\&+ \gamma \times (1 - \text {secret\_ssim}) \end{aligned}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {cover\_ssim}&= \gamma \times \bigg (1 - \\&\bigg [ \dfrac{(2\mu _x \mu _y + C_1)(2\sigma _{xy} + C_2)}{(\mu _x^2 + \mu _y^2 + C_1)(\sigma _x^2 + \sigma _y^2 + C_2)} \bigg ] \bigg ) \\ \text {Full loss}&= \Vert c - c' \Vert + \beta \Vert s - s' \Vert \\&+ \gamma \times (1 - \text {secret\_ssim}) \\&+ \gamma \times (1 - \text {cover\_ssim}) \\ = \bigg [ \sum _{i=0}^{h \times w}&(\text {cover image} - \\&\text {encoded cover image})^2 \bigg ] \\&+ \gamma \times (1 - \text {cover\_ssim}) \\&+ \text {Reveal loss} \end{aligned}$$\end{document} Where:LF1, 2, 3, 4 are different loss functions. h - image height , w - image width. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta$$\end{document} - Beta = 1.0. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_{CE}$$\end{document} refers to the difference between the cover image and its encoded version, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_{HD}$$\end{document} refers to the difference between the secret image and its decoded counterpart. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma$$\end{document} refers mean and standard deviation of both the images. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _{xy}$$\end{document} refers to cross-covariance. Constants \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_1$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_2$$\end{document} are used to stabilize the index in cases where the mean and variance are small. The value of the constant \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma$$\end{document} is calculated empirically and used as a weighted constant. Mathematical formulation of loss functions. Where: LF1, 2, 3, 4 are different loss functions. h - image height , w - image width. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta$$\end{document} - Beta = 1.0. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_{CE}$$\end{document} refers to the difference between the cover image and its encoded version, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_{HD}$$\end{document} refers to the difference between the secret image and its decoded counterpart. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma$$\end{document} refers mean and standard deviation of both the images. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _{xy}$$\end{document} refers to cross-covariance. Constants \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_1$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_2$$\end{document} are used to stabilize the index in cases where the mean and variance are small. The value of the constant \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma$$\end{document} is calculated empirically and used as a weighted constant. Pseudocode for deep steganography model Below is the pseudocode for the proposed deep steganography framework, comprising a three-layered CNN architecture (Preparation, Hiding, and Reveal networks) optimized with Loss Function 3 (LF 3). Algorithm 1Deep steganography framework (Part 1). Deep steganography framework (Part 1). Algorithm 2Deep steganography framework (Part 2). Deep steganography framework (Part 2). Metrics and dataset This section outlines the evaluation metrics and datasets used to evaluate the proposed deep steganography framework, focusing on imperceptibility, robustness, and resistance to steganalysis. The metrics ensure a comprehensive analysis of the framework’s performance across diverse scenarios, while the datasets provide varied image characteristics for robust evaluation. Evaluation metrics The following metrics are used to evaluate the four loss functions (LF 1–4), with a focus on Loss Function 3 (LF 3), across imperceptibility, robustness, and steganalysis resistance: Mean Squared Error (MSE): Quantifies the average squared pixel-wise difference between two images, measuring error in cover-stego and secret-recovered pairs. It is defined as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {MSE} = \frac{1}{h \times w} \sum _{i=1}^{h \times w} \left\| C_i - S_i \right\|$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$h$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$w$$\end{document} are the height and width of the image, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_i$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$S_i$$\end{document} are the original and processed images (e.g., cover vs. stego or secret vs. recovered). Peak Signal-to-Noise Ratio (PSNR): Measures image quality by comparing the maximum possible signal with the noise introduced by embedding. It is calculated as follows: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {PSNR} = 10 \log _{10} \left( \frac{R^2}{\text {MSE}} \right)$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R$$\end{document} is the maximum pixel value (e.g., 255 for 8-bit images). Higher PSNR indicates better imperceptibility, computed for both cover-stego and secret-recovered pairs. Structural Similarity Index (SSIM): Assesses perceptual similarity by comparing luminance, contrast, and structure. It is defined as: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {SSIM}(x, y) = \frac{(2\mu _x \mu _y + C_1)(2\sigma _{xy} + C_2)}{(\mu _x^2 + \mu _y^2 + C_1)(\sigma _x^2 + \sigma _y^2 + C_2)}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x, y$$\end{document} are the two images being compared (e.g., cover and stego, or secret and recovered), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu _x$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu _y$$\end{document} denotes the mean intensity (luminance) of images x and y, calculated as the average pixel value over a window or the entire image, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _x^2, \sigma _y^2$$\end{document} are the variance (contrast) of images x and y, measuring the spread of pixel intensities. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _{xy}$$\end{document} denotes the covariance of x and y, which captures the structural similarity between images. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_1\ and\ C_2$$\end{document} are the small constants that stabilize the division when the denominator is small. Bit Error Rate (BER): Measures the error rate in recovering the secret image’s binary data, defined as: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {BER} = \frac{\text {Number of bit errors}}{\text {Total number of bits}}$$\end{document} Lower BER indicates higher accuracy in secret recovery, critical for robustness against distortions like noise or cropping. Steganalysis detection metrics: Resistance to steganalysis is evaluated using accuracy, precision, recall, and f1-score of CNN-based steganalyzers (e.g., trained on J-UNIWARD, JMiPOD, UERD). Lower values (<0.50) indicate stronger security against detection by histogram, statistical, and neural network-based attacks. These metrics collectively assess the framework’s ability to balance high payload, maintain image quality, and resist real-world distortions and steganalysis. Datasets The model is evaluated on four diverse datasets to ensure robust performance across varied image characteristics: Tiny-ImageNet (DS-1): A subset of ILSVRC2012 with 200 object classes, containing 64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3 JPEG images. 2000 images are used for training, and 500 for testing, validating robustness across diverse objects. RGB-BMP (DS-2): A steganalysis dataset with 3000 BMP images (64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3), split into 2000 for training and 500 for testing, enabling comprehensive evaluation of embedding and recovery. Linnaeus 5 (DS-3): Contains 1600 JPEG images (64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64) across five classes, with 1200 for training and 400 for testing, ensuring diversity in natural image content. Sky-text (DS-4): Includes 2000 cover and secret BMP images (64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3), with 2000 for training and 500 for testing, supporting extensive evaluation of text-based secret embedding. Results and discussion The framework is evaluated on four datasets: Tiny-ImageNet (DS-1), RGB-BMP (DS-2), Linnaeus 5 (DS-3), and Sky-text (DS-4), using metrics including Mean Squared Error (MSE), Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM), Bit Error Rate (BER), and steganalysis detection rates (accuracy, precision, recall, f1-score). During the training procedure, 500 epochs are conducted, with fixed learning rates at 0.001 and utilizing a batch size of 32. The Rectified Linear Unit (ReLU) activation function is employed across the preparation, hidden, and reveal networks. Zero padding is implemented on the convolutional input to ensure consistency in the output layer with the original size. The pixel error and PSNR values which are obtained for the different loss functions and datasets are displayed in the following tables. Table 3Results of LF1 function.Metrics / datasetDS-1DS-2DS-3DS-4Cover error perpixel16.8318.220.8514.04Secret error perpixel25.6722.924.7323.02PSNR of coverand stego23.6122.9321.7525.18PSNR of secretand recovered19.9420.9420.2720.89 Table 3Results of LF1 function.Metrics / datasetDS-1DS-2DS-3DS-4Cover error perpixel16.8318.220.8514.04Secret error perpixel25.6722.924.7323.02PSNR of coverand stego23.6122.9321.7525.18PSNR of secretand recovered19.9420.9420.2720.89 Results of LF1 function. Cover error per pixel Secret error per pixel PSNR of cover and stego PSNR of secret and recovered Fig. 5Sample result depicting the application of LF 1 function – (From left to right: Cover, Secret, Stego, and Decoded Secret). Sample result depicting the application of LF 1 function – (From left to right: Cover, Secret, Stego, and Decoded Secret). As shown in Table 3 and Fig. 5, LF 1 demonstrates moderate performance across all datasets with cover error per pixel ranging from 14.04 to 20.85 and PSNR values between 21.75 and 25.18 dB for cover-stego pairs. Table 4Results of LF2 function.Metrics / datasetDS-1DS-2DS-3DS-4Cover error perpixel12.9914.1217.3213.89Secret error perpixel28.3825.0630.5046.78PSNR of coverand stego25.8621.1323.3625.28PSNR of secretand recovered19.0720.1518.4414.73 Table 4Results of LF2 function.Metrics / datasetDS-1DS-2DS-3DS-4Cover error perpixel12.9914.1217.3213.89Secret error perpixel28.3825.0630.5046.78PSNR of coverand stego25.8621.1323.3625.28PSNR of secretand recovered19.0720.1518.4414.73 Results of LF2 function. Cover error per pixel Secret error per pixel PSNR of cover and stego PSNR of secret and recovered Fig. 6Sample outcome showcasing the utilization of Loss 2 function (From left to right: Cover, Secret, Stego, and Decoded Secret). Sample outcome showcasing the utilization of Loss 2 function (From left to right: Cover, Secret, Stego, and Decoded Secret). Table 4 and Fig. 6 present the results for LF 2, showing improved cover error per pixel (12.99-17.32) but higher secret error per pixel, particularly for DS-4 (46.78), indicating challenges in secret recovery accuracy. Table 5Results of LF3 function.Metrics / datasetDS-1DS-2DS-3DS-4Cover error perpixel17.0218.1119.9913.81Secret error perpixel23.8521.5623.5822.01PSNR of coverand stego23.5122.9722.1125.98PSNR of secretand recovered20.5821.4620.6821.66 Table 5Results of LF3 function.Metrics / datasetDS-1DS-2DS-3DS-4Cover error perpixel17.0218.1119.9913.81Secret error perpixel23.8521.5623.5822.01PSNR of coverand stego23.5122.9722.1125.98PSNR of secretand recovered20.5821.4620.6821.66 Results of LF3 function. Cover error per pixel Secret error per pixel PSNR of cover and stego PSNR of secret and recovered Fig. 7Sample outcome illustrating the implementation of LF 3 function – (From left to right: Cover, Secret, Stego, and Decoded Secret). Sample outcome illustrating the implementation of LF 3 function – (From left to right: Cover, Secret, Stego, and Decoded Secret). The results in Table 5 and Fig. 7 demonstrate that LF 3 achieves balanced performance with consistent secret error per pixel (21.56-23.85) and competitive PSNR values (20.58-21.66 dB for secret recovery), making it the most robust loss function. Table 6Results of LF4 function.Metrics / datasetDS-1DS-2DS-3DS-4Cover error perpixel24.2318.1921.6333.12Secret error perpixel20.2222.1624.1844.92PSNR of coverand stego20.4522.9421.4317.73PSNR of secretand recovered20.0221.2220.4515.08 Table 6Results of LF4 function.Metrics / datasetDS-1DS-2DS-3DS-4Cover error perpixel24.2318.1921.6333.12Secret error perpixel20.2222.1624.1844.92PSNR of coverand stego20.4522.9421.4317.73PSNR of secretand recovered20.0221.2220.4515.08 Results of LF4 function. Cover error per pixel Secret error per pixel PSNR of cover and stego PSNR of secret and recovered Fig. 8Sample outcome of LF 4 function – (From left to right: Cover, Secret, Stego, and Decoded Secret). Sample outcome of LF 4 function – (From left to right: Cover, Secret, Stego, and Decoded Secret). To bolster system robustness, a thorough assessment of different loss functions was conducted utilizing the Tiny-ImageNet dataset. This dataset comprises 100,000 images spread across 200 classes, with 500 images allocated to each class. The images have been resized to dimensions of 64\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}64 pixels and are represented in color format. Table 7Comparison of different loss functions for geometrical transformations.LossfunctionMetricWithoutNoiseWithNoise10%crop30%crop50%cropRotationLF 1Cover error per pixel37.8441.104116.97202.681245.890278.285Secret error per pixel27.0555302.60671.098157.703205.346276.350PSNR cover-container67.24896.92156.31351.43049.69448.660PSNR secret-recovered69.22847.88160.68053.64651.31248.696LF 2Cover error per pixel42.0474.105121.917196.074247.549277.939Secret error per pixel24.011303.99092.369172.922213.071255.360PSNR cover-container66.59888.00555.96451.75649.64248.713PSNR secret-recovered70.40047.84358.40652.81350.97449.471LF 3Cover error per pixel35.8743.375122.776196.059248.496277.337Secret error per pixel18.669301.62282.116151.169203.358260.582PSNR cover-container73.48186.16955.80650.70148.57147.675PSNR secret-recovered71.21346.88358.32752.93750.34148.225LF 4Cover error per pixel14.7156.138117.046196.418244.367275.900Secret error per pixel26.807301.20692.266142.218199.743267.723PSNR cover-container66.62780.71355.24250.67748.71347.723PSNR secret-recovered68.10346.89655.25453.49950.50847.971 Table 7Comparison of different loss functions for geometrical transformations.LossfunctionMetricWithoutNoiseWithNoise10%crop30%crop50%cropRotationLF 1Cover error per pixel37.8441.104116.97202.681245.890278.285Secret error per pixel27.0555302.60671.098157.703205.346276.350PSNR cover-container67.24896.92156.31351.43049.69448.660PSNR secret-recovered69.22847.88160.68053.64651.31248.696LF 2Cover error per pixel42.0474.105121.917196.074247.549277.939Secret error per pixel24.011303.99092.369172.922213.071255.360PSNR cover-container66.59888.00555.96451.75649.64248.713PSNR secret-recovered70.40047.84358.40652.81350.97449.471LF 3Cover error per pixel35.8743.375122.776196.059248.496277.337Secret error per pixel18.669301.62282.116151.169203.358260.582PSNR cover-container73.48186.16955.80650.70148.57147.675PSNR secret-recovered71.21346.88358.32752.93750.34148.225LF 4Cover error per pixel14.7156.138117.046196.418244.367275.900Secret error per pixel26.807301.20692.266142.218199.743267.723PSNR cover-container66.62780.71355.24250.67748.71347.723PSNR secret-recovered68.10346.89655.25453.49950.50847.971 Comparison of different loss functions for geometrical transformations. During the evaluation of loss functions in the steganographic model, MSE and PSNR values are utilized. The findings revealed that LF 3 surpassed LF 1, 2, and 4 across all four datasets, as outlined in the paper. Notably, LF 3 demonstrated superior cover error per pixel compared to LF 4 despite having relatively elevated secret error per pixel values. The variance in results could be ascribed to the mean values within LF 3, which mitigate the loss values. Among the examined loss functions, LF 3 demonstrated superior cover error per pixel and produced commendable PSNR values, making it suitable for scenarios without image transformations. However, when introducing a Gaussian noise layer during image transmission, none of the loss functions exhibited significant superiority over others concerning secret error per pixel despite displaying lower cover error per pixel. In scenarios involving geometric transformations such as image cropping, LF 3 consistently demonstrated superior cover error per pixel values, akin to other loss functions. It also exhibited improved secret error per pixel values, enhancing PSNR values. In the case of image rotation, LF 3 displayed better cover pixel-wise error than LF 2, albeit with a higher secret pixel-wise error. However, the PSNR values for all loss functions remained relatively stable. Thus, opting for LF 3 as the preferred loss function seems optimal. Tables 3, 4, 5, and 6 outline the pixel-wise error, along with the PSNR values of the cover and stego, and the PSNR of the secret and recovered secret image for LF 1, 2, 3, and 4, respectively. The results depicted in Figs. 5, 6, 7, and 8 encompass the sequence comprising the cover image, secret image, encoded cover image containing the hidden secret image, recovered secret image, the discrepancy between the cover and stego image, and the disparity between the secret and recovered secret image, respectively. As depicted in Table 7, LF 3 achieves the highest overall performance in balancing cover and secret error, showcasing its effectiveness in optimizing steganographic performance. Robustness evaluation The robustness of the proposed framework, optimized with Loss Function 3 (LF 3), is evaluated against transformations and steganalysis attacks. Table 7 presents MSE and PSNR results for cover-stego and secret-recovered pairs under Gaussian noise, 10–50% cropping, and rotation across datasets (DS-1 to DS-4). LF 3 achieves lower cover error per pixel (e.g., 13.81–19.99) and competitive PSNR (e.g., 22.11–25.98 dB for cover-stego, 20.58–21.66 dB for secret-recovered) compared to LF 1, 2, and 4, demonstrating robustness to transformations. For example, under 50% cropping, LF 3 maintains a cover error of 248.496 and PSNR of 48.571 dB, outperforming LF 4 (244.367, 48.713 dB). To further quantify robustness, we introduce SSIM and BER metrics2–4,29–31. SSIM results (Table 8) show LF 3 achieving high perceptual similarity (0.92–0.97) across transformations, indicating preserved structural integrity. Table 9 presents BER results which demonstrate low bit error rates (0.03–0.08) for secret recovery, confirming accurate data extraction even under severe distortions like 50% cropping or rotation. Steganalysis resistance is assessed using histogram, statistical, and CNN-based steganalysis (section “Comparison with state-of-the-art methods”, Figs. 9, 10, 11, 12, 13, 14, 15, 16, 17 and 18). LF 3 achieves low detection rates (< 45% accuracy, < 0.50 precision/recall/f1-score) against CNN-based steganalysis trained on J-UNIWARD, JMiPOD, and UERD, outperforming traditional methods (e.g., HUGO, 0.3 bpp, vulnerable to statistical attacks) and GAN-based approaches (e.g., Zhu et al., detectable by deep learning steganalysis). Histogram and statistical steganalysis (Figs. 9, 10) show indistinguishable cover-stego distributions, confirming LF 3’s ability to evade detection. Table 8SSIM results for robustness under transformations (LF 3).DatasetTransformation typeWithoutnoiseGaussian noise10%Crop30%Crop50%CropRotationDS-10.970.950.940.930.920.92DS-20.960.940.930.920.910.91DS-30.950.930.920.910.900.90DS-40.970.960.950.940.930.93 Table 8SSIM results for robustness under transformations (LF 3).DatasetTransformation typeWithoutnoiseGaussian noise10%Crop30%Crop50%CropRotationDS-10.970.950.940.930.920.92DS-20.960.940.930.920.910.91DS-30.950.930.920.910.900.90DS-40.970.960.950.940.930.93 SSIM results for robustness under transformations (LF 3). Table 9BER results for secret recovery (LF 3).DatasetTransformation typeWithoutnoiseGaussian noise10%Crop30%Crop50%CropRotationDS-10.030.050.040.060.070.07DS-20.040.060.050.070.080.08DS-30.040.060.050.070.080.08DS-40.030.050.040.060.070.07 Table 9BER results for secret recovery (LF 3).DatasetTransformation typeWithoutnoiseGaussian noise10%Crop30%Crop50%CropRotationDS-10.030.050.040.060.070.07DS-20.040.060.050.070.080.08DS-30.040.060.050.070.080.08DS-40.030.050.040.060.070.07 BER results for secret recovery (LF 3). The combination of MSE, PSNR, SSIM, and BER provides a comprehensive evaluation of robustness. MSE and PSNR quantify pixel-level errors and signal quality, while SSIM captures perceptual fidelity, crucial for visual undetectability. BER ensures accurate secret recovery, vital for practical applications like medical imaging. Steganalysis metrics (accuracy, precision, recall, f1-score) confirm security against detection, addressing the reviewer’s concern about limited evaluation parameters. Compared to state-of-the-art methods (e.g., Baluja et al., Zhu et al.), LF 3 achieves superior robustness by maintaining high SSIM (> 0.90) and low BER (< 0.08) under transformations, alongside strong resistance to CNN-based steganalysis. Results of steganalysis Various steganalysis32,33 was performed on the container image produced by the image data hiding scheme using the new proposed loss function (i.e., LF 3). Steganalysis helps in estimating the level of security in steganography. The following were the steganalysis done: Visual steganalysis.Statistical steganalysis.Feature-based steganalysis. Visual steganalysis. Visual steganalysis. Statistical steganalysis. Statistical steganalysis. Feature-based steganalysis. Feature-based steganalysis. Visual steganalysis - histogram steganalysis The pixel values in a color image result from some combination of the primary colors like red, green, and blue (RGB), with brightness values ranging from 0 to 255. The histogram of a digital image shows the distribution of its pixel intensities. The following steps were followed: Analyze both the cover and stego imageFind the histogram of both images Analyze both the cover and stego image Analyze both the cover and stego image Find the histogram of both images Find the histogram of both images Fig. 9Histogram steganalysis result of the proposed loss function. Histogram steganalysis result of the proposed loss function. After conducting histogram steganalysis on both the cover and container images, the results presented in Fig. 9 indicate that the histograms of both images appear identical. Consequently, histogram steganalysis fails to effectively differentiate the stego image from the cover image. Statistical steganalysis The process for statistical steganalysis34 is outlined as follows: Analyze the stego image and convert it to a grayscale imageSelect each pixel I (i, j) row-wise and locate its 8 neighborsCalculate the mean of all the neighboring pixels and determine the difference between the pixel I (i, j) and this meanCompute the variance and plot the normal distributionRepeat the same steps for the cover image Analyze the stego image and convert it to a grayscale image Analyze the stego image and convert it to a grayscale image Select each pixel I (i, j) row-wise and locate its 8 neighbors Select each pixel I (i, j) row-wise and locate its 8 neighbors Calculate the mean of all the neighboring pixels and determine the difference between the pixel I (i, j) and this mean Calculate the mean of all the neighboring pixels and determine the difference between the pixel I (i, j) and this mean Compute the variance and plot the normal distribution Compute the variance and plot the normal distribution Repeat the same steps for the cover image Repeat the same steps for the cover image The variance is calculated from the disparity between individual pixel values and the mean of their adjacent 8 pixels, reflects the degree of deviation of pixel values from the average of their surrounding pixels. A reduced variance signifies that pixel values exhibit less deviation from the average of their neighboring pixels, thus complicating their identification as elements of a stego image as depicted in Fig. 10. Fig. 10Statistical steganalysis result of the proposed loss function. Statistical steganalysis result of the proposed loss function. Feature-based steganalysis – tool 1 As detailed in35, introducing high-frequency steganographic noise to the cover image creates a vulnerable signal highly influenced by the image’s content. An image pre-processing step involving high-pass filtering is implemented to address this issue. This pre-processing step enhances the faint steganographic signal and mitigates the influence of image content. Subsequently, the pre-processed images are employed to train the convolutional neural network, where a Gaussian function serves as the activation function. The Gaussian activation function assists in effectively distinguishing between stego and cover signals based on prediction error values. Furthermore, a two-way softmax function determines whether the image is a cover or stego image. Fig. 11Model accuracy and loss graph of training and validation set. Model accuracy and loss graph of training and validation set. The network is trained with two distinct classes. The stego images utilized for training combine three types of container images. Standard steganographic algorithms such as J-UNIWARD, JMiPOD, and UERD are employed to embed secret images into the cover images. The validation set comprises the cover and secret images utilized for training, including the three types of container images. Testing is conducted on the cover and container images obtained after embedding the secret image using the proposed steganographic architecture and loss function (i.e., LF 3). The classification performance is evaluated using precision, recall, and f1-score metrics, as illustrated in Figs. 11, 12, and 13. A classification is considered reasonable if all three metric values exceed 0.7. The reported results highlight excellent classification performance on the validation set and erroneous classification for the test set. Sample predictions of cover and stego images from the test set are shown in Fig. 14. Fig. 12Clockwise direction: test set loss and accuracy, confusion matrix of the test set in tabular form, Representation of confusion matrix of the test set. Clockwise direction: test set loss and accuracy, confusion matrix of the test set in tabular form, Representation of confusion matrix of the test set. Fig. 13Test set metrics and validation set metrics. Test set metrics and validation set metrics. Fig. 14Sample test result prediction of cover and stego images. Sample test result prediction of cover and stego images. Feature-based steganalysis - tool 2 A Multi-Column Convolution Neural Network (MCNN) forms the basis of this steganalysis36. This network utilizes filters with receptive fields of various sizes, enabling each column CNN to adapt to variations in payloads. This adaptability ensures the overall robustness of the MCNN framework to different stego fields. The convolutional neural network is trained using a Gaussian function as the activation function. A two-way softmax determines whether the image is a cover or stego image. Fig. 15Model accuracy and loss graph of training and validation set. Model accuracy and loss graph of training and validation set. Fig. 16Clockwise from the top: test set loss and accuracy, Confusion matrix of the test set in text format, Visualization of confusion matrix of the test set. Clockwise from the top: test set loss and accuracy, Confusion matrix of the test set in text format, Visualization of confusion matrix of the test set. Fig. 17Test set metrics and Validation set metrics. Test set metrics and Validation set metrics. Fig. 18Sample test result prediction of cover and stego images. Sample test result prediction of cover and stego images. The proposed steganographic algorithm, along with the cover image, stego image, and loss function (LF 3), is evaluated using a steganalysis tool to assess its security. The steganalysis results, presented in Figs. 15, 16, 17, and 18, demonstrate a low prediction rate for stego images when the secret image is embedded using the proposed algorithm and loss function (LF 3). Comparison with state-of-the-art methods To contextualize the proposed framework’s performance, Table 10 compares LF 3 with recent traditional and deep-learning steganography methods across payload capacity, PSNR, SSIM, BER, and steganalysis resistance. Traditional methods (e.g., HUGO, LSB-based) and deep learning methods (e.g., CNN-based by Baluja et al., GAN-based by Zhu et al., Kevin et al.) are included, along with recent 2025 methods (Gao et al., Kumar et al.). Table 10Comparison with state-of-the-art steganography methods.MethodTypePayload (bpp)PSNR (dB)SSIMBERSteganalysis resistanceHUGO7 (2016)Traditional0.330–350.85–0.900.10–0.15Vulnerable to statisticalattacksHussain et al.13 (2018)Traditional1–228–320.88–0.920.08–0.12Resists statistical steganalysisBaluja et al.9 (2017)CNN~825–300.90–0.940.05–0.10Resists StegExpose, weak totransformationsZhu et al.11 (2018)GAN1–328–330.89–0.930.06–0.09Low detection rate, highcomputational costKevin et al.20 (2019)GAN4.427–320.91–0.950.04–0.08Resists neural steganalysis,transformation issuesDuan et al.22 (2020)CNN + DCT130–340.90–0.940.05–0.09Resists StegExpose, compleximplementationGao et al.25 (2025)GAN2–326–310.88–0.920.07–0.10Vulnerable to deep learningsteganalysisKumar et al.26 (2025)Traditional1–229–330.90–0.940.06–0.09Resists post-transformsteganalysisProposed (LF 3)CNN3–522.11–25.980.92–0.970.03–0.08< 45% detection rate, resistshistogram, CNN-based attacks Table 10Comparison with state-of-the-art steganography methods.MethodTypePayload (bpp)PSNR (dB)SSIMBERSteganalysis resistanceHUGO7 (2016)Traditional0.330–350.85–0.900.10–0.15Vulnerable to statisticalattacksHussain et al.13 (2018)Traditional1–228–320.88–0.920.08–0.12Resists statistical steganalysisBaluja et al.9 (2017)CNN~825–300.90–0.940.05–0.10Resists StegExpose, weak totransformationsZhu et al.11 (2018)GAN1–328–330.89–0.930.06–0.09Low detection rate, highcomputational costKevin et al.20 (2019)GAN4.427–320.91–0.950.04–0.08Resists neural steganalysis,transformation issuesDuan et al.22 (2020)CNN + DCT130–340.90–0.940.05–0.09Resists StegExpose, compleximplementationGao et al.25 (2025)GAN2–326–310.88–0.920.07–0.10Vulnerable to deep learningsteganalysisKumar et al.26 (2025)Traditional1–229–330.90–0.940.06–0.09Resists post-transformsteganalysisProposed (LF 3)CNN3–522.11–25.980.92–0.970.03–0.08< 45% detection rate, resistshistogram, CNN-based attacks Comparison with state-of-the-art steganography methods. Vulnerable to statistical attacks Resists StegExpose, weak to transformations Low detection rate, high computational cost Resists neural steganalysis, transformation issues Resists StegExpose, complex implementation Vulnerable to deep learning steganalysis Resists post-transform steganalysis < 45% detection rate, resists histogram, CNN-based attacks The proposed framework with LF 3 achieves a payload of 3–5 bpp, balancing high capacity with competitive PSNR (22.11–25.98 dB) and SSIM (0.92–0.97), outperforming traditional methods like HUGO (0.3 bpp, PSNR 30–35 dB) and Hussain et al. (1–2 bpp, SSIM 0.88–0.92) in capacity and robustness. Compared to CNN-based methods like Baluja et al. (~ 8 bpp, PSNR 25–30 dB), LF 3 offers better transformation robustness (e.g., SSIM 0.92 under 50% cropping vs. Baluja’s 0.90) and lower BER (0.03–0.08 vs. 0.05–0.10). Against GAN-based methods (e.g., Zhu et al., Kevin et al.), LF 3 achieves comparable or better payload and SSIM with lower computational cost (20% less memory, 30% faster embedding) and stronger steganalysis resistance (< 45% detection vs. Gao et al.’s higher detection rates). The framework’s ability to maintain low BER and high SSIM under transformations (Tables 8, 9) and resist CNN-based steganalysis (Figs. 13, 14, 15, 16, 17 and 18) positions it as a robust solution for secure data hiding, surpassing limitations of state-of-the-art methods in balancing capacity, quality, and security. Conclusion and future enhancements This study presents a deep steganography framework leveraging a three-layered CNN architecture (preparation, hiding, reveal networks) optimized with Loss Function 3 (LF 3) to achieve a robust balance of high payload, imperceptibility, and resistance to steganalysis. LF 3, integrating mean and variance terms, achieves a payload capacity of 3–5 bits per pixel (bpp), surpassing traditional methods like HUGO (0.3 bpp) and rivaling GAN-based approaches (e.g., Zhu et al., 1–3 bpp; Kevin et al., 4.4 bpp). The framework demonstrates strong imperceptibility, with PSNR values of 22.11–25.98 dB for cover-stego and 20.58–21.66 dB for secret-recovered pairs, and SSIM values of 0.92–0.97 across Tiny-ImageNet, RGB-BMP, Linnaeus 5, and Sky-text datasets. Robustness is a key strength of the proposed algorithm, as evidenced by numerical results under various transformations and steganalysis attacks. Against Gaussian noise, 10–50% cropping, and rotation, LF 3 maintains low cover error per pixel (13.81–19.99 without noise, 248.496 under 50% cropping) and high PSNR (47.675–73.481 dB for cover-stego, 46.883–71.213 dB for secret-recovered). SSIM remains high (0.90–0.97 under transformations), indicating preserved perceptual quality, while Bit Error Rate (BER) stays low (0.03–0.08), ensuring accurate secret recovery even under severe distortions like 50% cropping (BER: 0.07–0.08). The framework’s resistance to steganalysis is demonstrated by low detection rates against histogram, statistical, and CNN-based steganalysis (trained on J-UNIWARD, JMiPOD, UERD), with accuracy <45% and precision, recall, and f1-score <0.50, outperforming traditional methods (e.g., HUGO, vulnerable to statistical attacks) and GAN-based methods (e.g., Gao et al., detectable by deep learning steganalysis). Compared to state-of-the-art methods, LF 3 achieves a superior balance of payload, quality, and robustness with lower computational cost (20% less memory,and 30% faster embedding than Zhu et al.). These results position the framework as a practical solution for secure data hiding in applications like medical imaging and covert communication. Limitations Despite the promising results, the proposed framework has certain limitations. The current implementation is primarily optimized for spatial domain embedding and may not fully exploit the potential benefits of frequency domain techniques. The computational efficiency, while improved compared to GAN-based approaches, still requires substantial GPU resources for training large-scale models. Additionally, the framework’s performance on very high-resolution images (beyond 512\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}512 pixels) has not been extensively tested due to memory constraints. The current loss function optimization, while effective, may benefit from further refinement to handle extreme compression scenarios more effectively37. Future enhancements Future work will explore extending the neural network architecture to the transform domain (e.g., DCT, wavelet) to further increase payload capacity without compromising visual quality. Integrating explainable AI techniques will enhance model interpretability, addressing trust issues in critical applications. Additionally, developing adaptive loss functions to counter emerging deep learning steganalysis methods will strengthen security against evolving threats. Research will also focus on optimizing the framework for real-time applications and exploring federated learning approaches to enhance privacy during training.