Anti-interference medical image tamper detection method and system based on deep hash

CN122530782BActive Publication Date: 2026-10-09JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611008679.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-10-09
Estimated Expiration
2046-07-08

AI Technical Summary

Technical Problem

[0007]同时,现有医学图像哈希认证方法在安全性方面也存在不足

Benefits of technology

1、本发明通过预先训练完成的深度哈希网络对待认证医学图像进行非侵入式哈希认证,无需修改原始医学图像像素,避免了数字水印等侵入式认证方式可能对医学图像诊断内容造成影响的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122530782B_ABST
    Figure CN122530782B_ABST
Patent Text Reader

Abstract

The application provides an anti-interference medical image tamper detection method and system based on deep hashing, and belongs to the technical field of medical image processing and information security technology. The method comprises the following steps: extracting multi-scale features of a to-be-authenticated medical image, obtaining lesion perception enhanced features through cross-scale fusion and sparse attention enhancement, generating binary hash codes through hash mapping and symbol quantization; generating bit weights according to an authentication key, calculating the key weighted distance with a reference hash code, and determining whether tampering occurs through threshold comparison. The application can resist common interference such as format conversion, brightness adjustment, contrast adjustment, noise and compression without modifying the original image pixels, and can effectively detect tampering such as deletion, forgery, covering and replacement of the lesion area, thereby improving the accuracy, robustness and security of medical image integrity authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing and information security technology, and specifically relates to a method and system for detecting interference-resistant medical image tampering based on deep hashing. Background Technology

[0002] With the rapid development of telemedicine, inter-institutional consultations, and medical image data sharing, medical images are playing an increasingly important role in clinical diagnosis, treatment planning, medical record archiving, and forensic identification. Medical images typically contain details of patient lesions, tissue structures, and diagnostic information; their authenticity and completeness directly impact doctors' diagnostic judgments and subsequent treatment decisions. Therefore, integrity authentication and tamper detection of medical images are crucial during transmission, storage, and sharing.

[0003] Existing methods for medical image integrity authentication mainly include cryptographic hashing, digital watermarking, and perceptual hashing. Cryptographic hashing methods are highly sensitive to file-level bit changes and are suitable for determining whether image files have undergone any bit-level modifications. However, in real-world medical scenarios, medical images often undergo format conversions, brightness adjustments, contrast adjustments, noise interference, and compression during transmission and storage. These operations typically do not alter the diagnostic semantics of the medical image, but they can cause drastic changes in the cryptographic hash value, leading to false alarms and failing to meet the authentication requirements of actual medical image circulation.

[0004] Digital watermarking methods embed authentication information into medical images to achieve image copyright protection, integrity authentication, or tamper location. While watermarking methods have been extensively studied in medical image security, they typically require modification of original image pixels or transform domain coefficients, making them somewhat invasive. For medical images, lesion areas and subtle textures can have significant diagnostic value, and even small pixel perturbations can introduce diagnostic risks. Therefore, under strict medical regulations and clinical diagnostic requirements, how to achieve integrity authentication without modifying the original medical image pixels remains a crucial problem to be solved in the field of medical image security.

[0005] Perceptual hashing technology extracts stable features from image content to generate compact hash sequences, which are used to determine whether image content is consistent. Compared to cryptographic hashing, perceptual hashing can tolerate changes in content such as format conversion, compression, and noise to a certain extent, making it more suitable for non-invasive authentication of medical images during actual transmission and sharing. However, most existing perceptual hashing methods are designed for natural images, typically focusing on global visual features, and are insufficient for representing small, intricately structured but diagnostically significant lesion regions in medical images. When attackers perform minor tampering such as deletion, masking, forgery, or replacement of lesion regions, traditional perceptual hashing methods are prone to failing to produce sufficiently obvious hash differences due to the loss of detailed information during hash compression.

[0006] Furthermore, medical image hash authentication faces a trade-off between robustness and sensitivity to tampering. To resist common operations such as format conversion, noise interference, and compression, hash algorithms typically need to extract relatively stable global features and weaken local high-frequency details; however, the detection of minor lesion tampering relies precisely on the detailed changes and structural differences in local lesion regions. If robustness is overemphasized, the model may ignore subtle tampering in lesion regions; if sensitivity is overemphasized, the model may misjudge normal content preservation transformations as malicious tampering. Therefore, how to balance robustness to content preservation transformations and sensitivity to minor lesion tampering within the same hash authentication framework is a key technical challenge in medical image tampering detection.

[0007] Meanwhile, existing medical image hash authentication methods also have shortcomings in terms of security. Some methods rely solely on ordinary hash distance or fixed similarity metrics for authentication. Once the hash code is obtained by an attacker, it can be used to forge the authentication process, making it difficult to resist replay attacks or forgery attacks targeting the hash code. Therefore, it is necessary to incorporate the authentication key into the hash code generation or hash distance calculation process, associating the hash authentication result with the key, thereby improving the security and anti-forgery capabilities of medical image tampering detection methods.

[0008] Therefore, there is an urgent need to propose a deep hash-based anti-interference medical image tampering detection method that can resist conventional content preservation transformation interference without modifying the original medical image pixels, while maintaining high sensitivity to tampering behaviors such as deletion, forgery, masking and replacement of small lesion areas, and improve the security and reliability of the authentication process through a key weighting mechanism. Summary of the Invention

[0009] In view of the above, the main objective of this invention is to propose a method and system for detecting interference-resistant medical image tampering based on deep hashing, so as to solve the above-mentioned technical problems.

[0010] This invention proposes a method for detecting interference-resistant medical image tampering based on deep hashing, the method comprising the following steps: Obtain the medical image to be certified and its corresponding baseline hash code, input the medical image to be certified into a pre-trained deep hash network, and extract multi-scale features of the medical image; Cross-scale fusion and sparse attention enhancement are performed on multi-scale features to obtain enhanced lesion perception features; The lesion perception enhancement features are input into the hash mapping network to obtain continuous hash representations, and a binary hash code to be authenticated is generated through a symbol quantization function. A hash bit weight vector is generated based on the authentication key, and the key-weighted hash distance between the binary hash code to be authenticated and the base hash code is calculated using the hash bit weight vector. Based on the comparison between the key weighted hash distance and the preset authentication threshold, it is determined whether the medical image to be authenticated has been tampered with.

[0011] This invention also proposes a deep hash-based anti-interference medical image tampering detection system, wherein the system is applied to the deep hash-based anti-interference medical image tampering detection method described above, and the system includes: The multi-scale feature encoding module is used for: Obtain the medical image to be certified and its corresponding baseline hash code, input the medical image to be certified into a pre-trained deep hash network, and extract multi-scale features of the medical image; The lesion perception hash generation module is used for: Cross-scale fusion and sparse attention enhancement are performed on multi-scale features to obtain enhanced lesion perception features; The lesion perception enhancement features are input into the hash mapping network to obtain continuous hash representations, and a binary hash code to be authenticated is generated through a symbol quantization function. The key-weighted authentication module is used for: A hash bit weight vector is generated based on the authentication key, and the key-weighted hash distance between the binary hash code to be authenticated and the base hash code is calculated using the hash bit weight vector. The tamper detection output module is used for: Based on the comparison between the key weighted hash distance and the preset authentication threshold, it is determined whether the medical image to be authenticated has been tampered with.

[0012] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention uses a pre-trained deep hash network to perform non-invasive hash authentication on medical images to be authenticated. It does not require modification of the original medical image pixels, thus avoiding the problem that invasive authentication methods such as digital watermarking may affect the diagnostic content of medical images.

[0013] 2. This invention extracts shallow texture features, mid-level lesion structure features, and deep anatomical semantic features of medical images through a multi-scale feature extraction module. It also enhances the local response of lesion-related areas through cross-scale feature fusion and sparse attention enhancement, so that the generated hash features can pay more attention to small lesion areas, thereby improving the detection capability of tampering behaviors such as lesion deletion, forgery, masking, and replacement.

[0014] 3. This invention compresses high-dimensional medical image features into low-dimensional binary hash codes through a hash mapping network and a gradient-preserving symbolic quantization function. This reduces storage and computational overhead while maintaining the expressive power of medical image content, thereby improving the efficiency and practicality of the medical image authentication process.

[0015] 4. This invention generates a hash bit weight vector based on the authentication key and uses the key-weighted hash distance for authentication determination, thus linking the hash distance calculation process with the authentication key, thereby improving the security and anti-forgery capability of the medical image tampering detection process.

[0016] 5. This invention trains a deep hash network using training samples consisting of a quadruple of original medical images, content-preserving transformed images, lesion-tampered images, and differentially expressed medical images. This enables the model to resist conventional interference operations such as format conversion, brightness adjustment, contrast adjustment, noise interference, and compression processing, while maintaining high sensitivity to minor lesion tampering, thereby improving the accuracy, robustness, and reliability of medical image integrity authentication.

[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by means of embodiments of the invention. Attached Figure Description

[0018] Figure 1 This is a flowchart of the anti-interference medical image tampering detection method based on deep hashing proposed in this invention; Figure 2 This is a schematic diagram of the anti-interference medical image tampering detection system based on deep hashing proposed in this invention; Figure 3 This is a weighted distance between the original image and the tampered image, and a comparison chart of the weighted distance between the original image and the image after brightness adjustment, contrast adjustment, and other operations. Detailed Implementation

[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0020] These and other aspects of the embodiments of the present invention will become clear from the following description and accompanying drawings. In these descriptions and drawings, some specific embodiments of the present invention are specifically disclosed to illustrate some ways of implementing the principles of the embodiments of the present invention; however, it should be understood that the scope of the embodiments of the present invention is not limited thereto.

[0021] Please see Figure 1 This embodiment provides a method for detecting interference-resistant medical image tampering based on deep hashing, the method comprising the following steps: Step 1: Obtain the medical image to be certified and its corresponding baseline hash code. Input the medical image to be certified into a pre-trained deep hash network to extract multi-scale features of the medical image. In this embodiment, the medical image to be authenticated can be a CT image, MRI image, ultrasound image, X-ray image, or other medical imaging data. This embodiment uses a CT medical image as an example for illustration, but it does not constitute a limitation on the scope of protection of this invention.

[0022] Before tamper detection, the original medical image has already generated a corresponding baseline hash code using a pre-trained deep hashing network. This baseline hash code is then associated and stored with the image identifier, patient identifier, examination sequence identifier, or image number of the original medical image. When integrity authentication of the medical image to be authenticated is required, the corresponding baseline hash code is retrieved based on the image identifier, patient identifier, examination sequence identifier, or image number of the image to be authenticated. The medical image to be authenticated corresponds to the same medical image object as the original medical image, and the baseline hash code serves as the authentication benchmark for subsequent key-weighted hash distance calculations.

[0023] In this embodiment, the medical image to be certified is first normalized in size and grayscale, and then cropped as needed to reduce input differences caused by different devices, scanning protocols, or storage formats. Subsequently, the preprocessed medical image to be certified is input into a pre-trained deep hashing network.

[0024] In this embodiment, the multi-scale feature extraction module of the deep hash network adopts an improved MobileNetV3-Small backbone network. Since medical images are typically single-channel grayscale images, this embodiment adjusts the first-layer convolution of the MobileNetV3-Small backbone network from a three-channel input structure to a single-channel input structure to adapt to medical grayscale images. Through this improved MobileNetV3-Small backbone network, staged convolutional feature extraction and downsampling are performed on the medical image to be authenticated, resulting in four levels of multi-scale features. The corresponding process has the following relationship: ; Where x represents the input medical image to be authenticated. This represents the first in the improved MobileNetV3-Small backbone network. l Each feature extraction stage Indicates the first l The scale features output by each feature extraction stage.

[0025] In this embodiment, the first-level scale features are used as shallow texture features, which mainly include edges, textures, local grayscale changes, and fine-grained structural information in medical images; the second-level and third-level scale features are used as mid-level lesion structure features, which are mainly used to characterize the morphology, contour, boundary changes, and local tissue structure differences of the lesion region; and the fourth-level scale features are used as deep anatomical semantic features, which are mainly used to characterize the global anatomical structure and high-level semantic information of medical images.

[0026] Through the multi-scale feature extraction method described above, deep hashing networks can simultaneously obtain local detail information and global structural information of medical images, providing a feature basis for subsequent lesion perception hash code generation.

[0027] Step 2: Perform cross-scale fusion and sparse attention enhancement on the multi-scale features to obtain lesion perception enhancement features; To address the issue of traditional hashing methods over-relying on global features and neglecting minute lesion regions, this embodiment introduces cross-scale feature fusion and sparse attention enhancement. Cross-scale feature fusion is used to establish the correlation between shallow detail features and deep semantic features, while sparse attention enhancement is used to highlight lesion-related discrimination regions and reduce background redundancy regions.

[0028] In this embodiment, the current scale feature is denoted as X, and the adjacent scale features are denoted as Y. First, the current scale feature and the adjacent scale features are mapped to a unified dimension using 1×1 convolutions. Then, the mapped current scale feature and the adjacent scale feature are divided into several local windows according to a preset window size, and the features within each local window are expanded into a feature sequence.

[0029] A linear mapping is performed on the feature sequence to obtain the query vector, key vector, and value vector. The corresponding process has the following relationship: ; in, This represents the feature sequence after the current scale features are expanded within the window. This represents the feature sequence after adjacent scale features are expanded within the window. Let Q, K, and V represent the learnable linear mapping matrices corresponding to Q, K, and V, respectively. Q represents the query vector, K represents the key vector, and V represents the value vector.

[0030] Cross-scale attention similarity is calculated based on the query vector and key vector, and a relative position bias is introduced to obtain the attention similarity matrix. The corresponding process has the following relationship: ; in, Represents the attention similarity matrix. This indicates a relative position offset.

[0031] After obtaining the attention similarity matrix, this embodiment further introduces a dual Top-K sparse attention mechanism. The dual Top-K sparse attention mechanism performs pre-processing on the attention similarity matrix S. The elements and the previous Filter by element. The screening process can retain a significant number of medium-to-strong response regions. Screening can highlight a small number of highly responsive lesion-related areas, thus taking into account both contextual information and significant areas of small lesions.

[0032] The unretained attention responses are set to negative infinity, and the filtered attention responses are weighted and normalized to obtain a sparse attention weight matrix. The corresponding process has the following relationship: ; in, They represent the uses of and Weighted learnable weights, ; Indicates before extraction The operator for finding the maximum value. Indicates before extraction The operator for finding the maximum value. This indicates a row-based normalization operation; and satisfies the following conditions: They respectively focus on a very small number of the strongest responses and a large number of medium-strong response locations.

[0033] The sparse attention enhancement features are obtained by weighting and aggregating the value vector V based on the sparse attention weight matrix P. The corresponding process has the following relationship: ; in, This indicates a sparse attention enhancement feature.

[0034] Through the aforementioned dual Top-K sparse attention mechanism, the network can reduce the response to background regions and irrelevant anatomical structures, and enhance the feature representation of small lesions, boundary changes, local forgery regions, and lesion-covered regions, thereby improving the sensitivity of medical image tampering detection.

[0035] In a preferred embodiment of the present invention, cross-scale feature fusion further includes a local gated enhancement process. The current-scale feature X and the adjacent-scale features Y are respectively input into a depthwise separable convolutional layer, and corresponding gated weights are generated through an activation function. The corresponding process follows the following relationship: ; in, This represents depthwise separable convolution. This represents the Sigmoid activation function. This represents the gating weights corresponding to the current scale features. This represents the gating weights corresponding to features at adjacent scales.

[0036] Local modulation of the current-scale features and adjacent-scale features is performed based on the gating weights to obtain local gating features. The corresponding process has the following relationship: ; in, Indicates the characteristics of departmental control. This indicates element-wise multiplication.

[0037] Localized door control features are fused with sparse attention-enhanced features, and lesion perception enhancement features are output through convolutional normalization and residual connections. The localized door control enhancement process further enhances the response of structurally consistent regions and reduces the interference of noisy regions, background regions, and irrelevant textures on hash feature generation.

[0038] Step 3: Input the lesion perception enhancement features into the hash mapping network to obtain continuous hash representations, and generate a binary hash code to be authenticated through a symbolic quantization function; In this embodiment, the lesion perception enhancement features include not only superficial texture details and mid-layer lesion structures, but also deep anatomical semantic information. To facilitate subsequent rapid authentication and storage, this embodiment compresses high-dimensional medical image features into a low-dimensional continuous hash representation space through a hash mapping network, and then obtains the binary hash code to be authenticated through a symbolic quantization function.

[0039] Specifically, adaptive average pooling is applied to the lesion perception enhancement features, and the pooled features are expanded into a one-dimensional feature vector. The corresponding process has the following relationship: ; in, Indicates enhanced perception of lesions. This indicates an adaptive average pooling operation. denoted as flattening operation, z represents a one-dimensional feature vector, and B and D represent the number of samples in the batch and the dimension of the feature vector, respectively.

[0040] By inputting a one-dimensional feature vector into a hash mapping network consisting of a nonlinear projection layer and a hash constraint layer, a continuous hash representation is obtained. The corresponding process has the following relationship: ; in, Represents a continuous hash representation. This represents two distinct learnable weight matrices in a hash mapping network. This represents two distinct bias terms in a hash mapping network. Represents the hyperbolic tangent function. Indicates the hash length.

[0041] The process of converting a continuous hash representation into a binary hash code to be authenticated using a symbolic quantization function follows the following relationship: ; in, This represents the i-th element in the continuous hash representation. This represents the i-th bit in the binary hash code to be authenticated. This represents the symbolic quantization function.

[0042] During the training phase, since the symbolic quantization function itself is not differentiable, this embodiment uses a pass-through estimator to approximate the gradient of the symbolic quantization function, enabling the hash mapping network to participate in backpropagation training. Through this approach, the deep hash network can learn a binary hash representation suitable for medical image authentication tasks during end-to-end training.

[0043] Step 4: Generate a hash bit weight vector based on the authentication key, and use the hash bit weight vector to calculate the key-weighted hash distance between the binary hash code to be authenticated and the base hash code; Based on the comparison between the key weighted hash distance and the preset authentication threshold, it is determined whether the medical image to be authenticated has been tampered with.

[0044] In this embodiment, a hash bit weight vector is generated based on the authentication key, the key-weighted hash distance between the binary hash code to be authenticated and the base hash code is calculated, and the medical image to be authenticated is determined to have been tampered with based on the comparison result of the key-weighted hash distance and the preset authentication threshold.

[0045] Specifically, the authentication key Ksec generates a pseudo-random sequence of length L. The pseudo-random sequence is non-negatively normalized to obtain the hash bit weight vector. The corresponding process has the following relationship: ; in, Let represent the weight corresponding to the k-th hash bit, and satisfy . .

[0046] The hash bit weight vector is used to weight the binary hash code to be authenticated and the base hash code bit by bit, and the key weighted hash distance is calculated. The corresponding process has the following relationship: ; in, This represents the key-weighted hash distance between the medical image x to be authenticated and the original medical image y. This represents the binary hash code to be authenticated. The base hash code is represented by w, and the hash bit weight vector is represented by w. Represents standard cosine similarity. This indicates element-wise multiplication.

[0047] If the key weighted hash distance is less than the preset authentication threshold, the medical image to be authenticated is determined to be unaltered; if the key weighted hash distance is greater than or equal to the preset authentication threshold, the medical image to be authenticated is determined to be tampered with.

[0048] In this embodiment, the preset authentication threshold can be determined based on the authentication performance on the verification set. Specifically, a threshold that balances robustness and tamper sensitivity can be selected based on the key-weighted hash distance distribution between the transformed image and the lesion-tampered image while maintaining normal content.

[0049] The training process of a pre-trained deep hash network is described below.

[0050] Before the detection phase, this embodiment pre-trains the deep hashing network using quadruplet training samples. The quadruplet training samples include original medical images, content-preserving transformed images, lesion-modified images, and differentially expressed medical images.

[0051] Specifically, the original medical image is acquired, and content-preserving transform is applied to it to obtain a content-preserving transformed image. Content-preserving transform simulates common interference operations encountered during the transmission, storage, and sharing of medical images, including at least one of format conversion, brightness adjustment, contrast adjustment, sharpness adjustment, gamma correction, Gaussian noise, salt-and-pepper noise, and image compression. The content-preserving transformed image maintains diagnostic semantic consistency with the original medical image, but differences may exist at the pixel level or file level.

[0052] Based on lesion masking or lesion location information, lesion areas in the original medical image are altered to obtain lesion-altered images. Lesion area alteration includes at least one of lesion deletion, lesion masking, lesion forgery, lesion replacement, and lesion copying and movement. Lesion-altered images are used to simulate situations where malicious attackers make minor alterations to critical diagnostic areas in medical images.

[0053] Differential medical images are obtained by selecting medical images from different sources, sections, patients, or lesion contents than the original medical image. These differential medical images are used to constrain the hash uniqueness between different medical images, preventing them from being too close in the hash space.

[0054] The original medical image, the content-preserving transformed image, the lesion-modified image, and the differentially expressed medical image were combined into a four-tuple training sample, which was then preprocessed. The preprocessing included at least one of the following: size normalization, grayscale normalization, edge enhancement, and lesion region contrast enhancement.

[0055] During pre-training, the deep hashing network employs a key-weighted multi-objective loss function for end-to-end optimization. The original medical image is denoted as... The content is preserved by the transformation image, denoted as The image of the lesion was altered and recorded as Differential medical images are recorded as The key-weighted hash distances between the original medical image and the content-preserving transformed image, the original medical image and the lesion-modified image, and the original medical image and the differentially expressed medical image are calculated respectively. The corresponding process has the following relationship: ; ; ; in, This represents the key-weighted hash distance of a robust sample pair. This represents the key-weighted hash distance of the tampered sample pair. This represents the key-weighted hash distance between pairs of differing samples.

[0056] Set target distance within the class Inter-class target distance Based on the key-weighted hash distance, robustness loss, tamper sensitivity loss, and uniqueness loss are constructed, and the corresponding processes have the following relationships: ; ; ; in, Indicates robust loss. This indicates a loss due to tampering with sensitive information. This indicates a loss of uniqueness.

[0057] Based on robustness loss, tamper sensitivity loss, and uniqueness loss, a key-weighted multi-objective loss function is constructed. The corresponding process has the following relationship: ; in, This represents the key-weighted multi-objective loss function. These represent the weights of robustness loss, tamper sensitivity loss, and uniqueness loss, respectively.

[0058] Using the aforementioned key-weighted multi-objective loss function, the model is constrained to ensure that the content-preserving transformed image and the original medical image maintain a compact distribution in the hash space, while the lesion-modified image and the differentially expressed medical image form a separable distribution with the original medical image in the hash space. Therefore, the deep hashing network can resist interference from conventional content-preserving transformations while maintaining high sensitivity to minor lesion modifications.

[0059] In this embodiment, the hyperparameters in the key-weighted multi-objective loss function can be determined through an adaptive hyperparameter optimization strategy. The robustness loss weights are then... , tampering with sensitivity loss weights Uniqueness loss weight Intra-class target distance Inter-class target distance As hyperparameters to be optimized, they form a hyperparameter vector: ; The hyperparameter vector is searched with the authentication performance on the validation set as the optimization objective. The authentication performance includes at least one of robustness, tamper sensitivity and uniqueness.

[0060] A Bayesian optimization method based on a tree-structured Parzen estimator is adopted. Based on the performance results of the completed training experiments, a superior hyperparameter distribution and a suboptimal hyperparameter distribution are constructed. The next set of candidate hyperparameters is then selected according to the desired improvement criterion. The corresponding process follows the following relationship: ; in, This indicates a good hyperparameter distribution. This indicates a non-ideal hyperparameter distribution. Indicates the next set of candidate hyperparameters. This means finding a hyperparameter combination λ such that the ratio of good hyperparameter distribution to bad hyperparameter distribution is maximized.

[0061] During the hyperparameter search process, the deep hashing network corresponding to the candidate hyperparameters undergoes phased training and validation. If the median performance of the current training experiment is lower than the median performance of historical training experiments, the current training experiment is terminated early. Finally, the deep hashing network is retrained based on the optimal hyperparameters obtained from the search, resulting in a pre-trained deep hashing network.

[0062] In this implementation, robustness, tamper sensitivity, and uniqueness are all single-point evaluation indicators based on fixed thresholds, measuring the model's ability to match images with similar robust transformations, its ability to identify tampered images with lesions, and its ability to distinguish different original images, respectively. This invention utilizes the receiver operating characteristic (ROC) curve, traversing all possible thresholds, plotting the false positive rate of robust similar samples on the horizontal axis and the correct recognition rate of tampered and dissimilar samples on the vertical axis. The area under the ROC curve (AUC) is used as the integral result of this curve, providing a global performance indicator independent of specific thresholds, and comprehensively quantifying the model's overall discriminative performance across the three dimensions of robustness, tamper sensitivity, and uniqueness.

[0063] Therefore, the median performance of the current training experiment and the median performance of the historical training experiments can be replaced by the median area under the receiver operating characteristic curve of the current training experiment on the validation set and the median area under the receiver operating characteristic curve of the completed historical training experiments at the same training progress.

[0064] Please refer to Figure 2 This embodiment also provides a deep hash-based anti-interference medical image tampering detection system, the system comprising: The multi-scale feature encoding module is used for: Obtain the medical image to be certified and its corresponding baseline hash code, input the medical image to be certified into a pre-trained deep hash network, and extract multi-scale features of the medical image; The lesion perception hash generation module is used for: Cross-scale fusion and sparse attention enhancement are performed on multi-scale features to obtain enhanced lesion perception features; The lesion perception enhancement features are input into the hash mapping network to obtain continuous hash representations, and a binary hash code to be authenticated is generated through a symbol quantization function. The key-weighted authentication module is used for: A hash bit weight vector is generated based on the authentication key, and the key-weighted hash distance between the binary hash code to be authenticated and the base hash code is calculated using the hash bit weight vector. The tamper detection output module is used for: Based on the comparison between the key weighted hash distance and the preset authentication threshold, it is determined whether the medical image to be authenticated has been tampered with.

[0065] In this embodiment, Figure 3This paper demonstrates the visualization results of medical images under different processing conditions. The left image shows the original medical image and its result after content-preserving transformations (including brightness and contrast adjustments and noise interference). The right image shows a corresponding example of lesion tampering, with red circles marking the lesion areas where minor tampering occurred. By calculating the weighted distance *d* between the original image and the tampered image, and the weighted distance *d* between the original image and the image after content-preserving operations (brightness and contrast adjustments), it can be seen that while content-preserving transformations alter the grayscale distribution or noise characteristics of the image, they do not change the main medical semantics. Furthermore, lesion area tampering typically occurs only in small, localized areas with weak visual differences, making it easily overlooked by traditional hash authentication methods. Therefore, this experimental scenario effectively verifies the performance of this invention in terms of anti-interference robustness and sensitivity to minor lesion tampering.

[0066] To verify the effectiveness of this invention in medical image tampering detection, the area under the receiver operating characteristic curve (AUC) was used as the main evaluation metric. AUC measures the model's overall ability to distinguish between untampered medical images and lesion-tampered medical images. The closer the AUC value is to 1, the stronger the model's ability to distinguish between normal samples and tampered samples. This experiment selected seven existing mainstream perceptual hashing schemes as baselines for comparison, covering different technical approaches such as deep hashing, traditional transform domain hashing, and saliency map weighted hashing. The correspondence between each comparison scheme and the table number is as follows: Existing technology 1 is DeepHash, Existing technology 2 is Fusion, Existing technology 3 is Perceptual Hash (pHash), Existing technology 4 is Multi-scale Adaptive Perceptual Hashing (MADP), Existing technology 5 is Weighted Saliency Map (WSM), Existing technology 6 is Local Tangent Space Alignment (LTSA), and Existing technology 7 is Perceptual Difference Hash (PDQ). All comparison methods were tested on the same test dataset and under the same experimental environment. Table 1 shows the AUC comparison results of this invention and various existing technologies in the medical image tampering detection task. As shown in the table, the AUCs of existing technologies 1 to 7 (Deephash, Fusion, pHash, MADP, WSM, LTSA, and PDQ) are 0.8159, 0.8481, 0.8950, 0.9046, 0.9300, 0.8555, and 0.8422, respectively, while the AUC of the method of this invention reaches 0.9915, significantly higher than all the comparative methods. This result demonstrates that the present invention, through multi-scale feature extraction, cross-scale feature fusion, sparse attention enhancement, and key-weighted hash distance calculation, can effectively improve the model's ability to distinguish regions tampered with minor lesions, making the untampered medical images and lesion-tampered medical images form a more obvious separable distribution in the hash space, thereby improving the accuracy and stability of medical image tampering detection.

[0067] Table 1. Comparison of AUC results of different methods in medical image tampering detection task.

[0068] In summary, the method of this invention achieves the highest AUC result, which is still a significant improvement over the best-performing prior art 5. This indicates that the present invention can more accurately distinguish between normal medical images and lesion-tampered medical images, verifying the effectiveness of the present invention in medical image integrity authentication and detection of minor lesion tampering.

[0069] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for detecting interference-resistant medical image tampering based on deep hashing, characterized in that, The method includes the following steps: Obtain the medical image to be certified and its corresponding baseline hash code, input the medical image to be certified into a pre-trained deep hash network, and extract multi-scale features of the medical image; Multi-scale features are fused across scales and sparse attention is enhanced to obtain lesion perception enhancement features, which specifically includes the following steps; The cross-scale attention similarity between the current scale features and the adjacent scale features is calculated within a local window, and a dual Top-K sparse attention mechanism is introduced to highlight the lesion-related discrimination region and weaken the background redundant region, thus obtaining sparse attention-enhanced features. Cross-scale fusion also includes local control enhancement processes: Gating weights are generated by depthwise separable convolution for the current scale features and the adjacent scale features respectively. Local modulation is then performed on the current scale features and the adjacent scale features according to the gating weights to obtain local gating features. By fusing localized lesion control features with sparse attention enhancement features, lesion perception enhancement features are obtained; The lesion perception enhancement features are input into a hash mapping network to obtain a continuous hash representation, and a binary hash code to be authenticated is generated through a symbol quantization function. The specific steps include the following: Adaptive average pooling is applied to the lesion perception enhancement features and they are expanded into a one-dimensional feature vector. By inputting a one-dimensional feature vector into a hash mapping network consisting of a nonlinear projection layer and a hash constraint layer, a continuous hash representation is obtained. The continuous hash representation is converted into the binary hash code to be authenticated through a symbolic quantization function; wherein, during the training phase, a pass-through estimator is used to approximate the gradient of the symbolic quantization function; Generate a hash bit weight vector based on the authentication key, and use the hash bit weight vector to calculate the key-weighted hash distance between the binary hash code to be authenticated and the base hash code. The specific steps include the following: A pseudo-random sequence with the same length as the hash code is generated based on the authentication key. The pseudo-random sequence is then subjected to non-negative normalization to obtain the hash bit weight vector. Calculate the cosine similarity between the binary hash code to be authenticated and the base hash code under the weighting of the hash bit weight vector, and determine the key weighted hash distance based on the cosine similarity; Based on the comparison between the key weighted hash distance and the preset authentication threshold, it is determined whether the medical image to be authenticated has been tampered with.

2. The anti-interference medical image tampering detection method based on deep hashing according to claim 1, characterized in that, Extracting multi-scale features from medical images includes the following steps: The first-level scale features in the multi-scale feature set are used as shallow texture features, the second-level and third-level scale features are used as mid-layer lesion structure features, and the fourth-level scale features are used as deep anatomical semantic features.

3. The method for detecting anti-interference medical image tampering based on deep hashing according to claim 2, characterized in that, The deep hashing network uses an improved MobileNetV3-Small backbone network as a multi-scale feature extraction module. The first layer convolution of the improved MobileNetV3-Small backbone network is changed from a three-channel input structure to a single-channel input structure to adapt to medical grayscale images.

4. The method for detecting interference-resistant medical image tampering based on deep hashing according to claim 1, characterized in that, The training process for a deep hashing network includes: Construct a training sample of quadruples containing original medical images, content-preserving transformed images, lesion-modified images, and differentially expressed medical images; Based on the training samples of quadruples, the key-weighted hash distance between the original medical image and the content-preserving transformed image, the lesion-modified image, and the differential medical image in the training samples of quadruples is calculated respectively. Set the intra-class target distance and inter-class target distance, and construct the robustness loss, tamper sensitivity loss and uniqueness loss based on the key-weighted hash distance, intra-class target distance and inter-class target distance; Based on robustness loss, tamper sensitivity loss, and uniqueness loss, a key-weighted multi-objective loss function is constructed, and the key-weighted multi-objective loss function is used to perform end-to-end optimization of the deep hash network.

5. The anti-interference medical image tampering detection method based on deep hashing according to claim 4, characterized in that, The hyperparameters of the key-weighted multi-objective loss function are determined through an adaptive hyperparameter optimization strategy, which includes: Using the area under the receiver operating characteristic curve calculated on the validation set as the optimization objective, a Bayesian optimization method based on the tree-structured Parzen estimator is used to search for hyperparameters; During the training experiment of each set of candidate hyperparameters, if the area under the receiver operating characteristic curve (AUC) of the current training experiment on the validation set is lower than the median AUC of the completed historical training experiments at the same training progress, the current training experiment is terminated early.

6. A deep hash-based anti-interference medical image tampering detection system, characterized in that, The system is applied to the deep hash-based anti-interference medical image tampering detection method as described in any one of claims 1 to 5, and the system comprises: The multi-scale feature encoding module is used for: Obtain the medical image to be certified and its corresponding baseline hash code, input the medical image to be certified into a pre-trained deep hash network, and extract multi-scale features of the medical image; The lesion perception hash generation module is used for: Cross-scale fusion and sparse attention enhancement are performed on multi-scale features to obtain enhanced lesion perception features; The lesion perception enhancement features are input into the hash mapping network to obtain continuous hash representations, and a binary hash code to be authenticated is generated through a symbol quantization function. The key-weighted authentication module is used for: A hash bit weight vector is generated based on the authentication key, and the key-weighted hash distance between the binary hash code to be authenticated and the base hash code is calculated using the hash bit weight vector. The tamper detection output module is used for: Based on the comparison between the key weighted hash distance and the preset authentication threshold, it is determined whether the medical image to be authenticated has been tampered with.

Citation Information

Patent Citations

  • Medical image robust watermarking algorithm based on re-parameterized efficient attention network

    CN120953034A

  • Medical image diagnosis auxiliary system based on deep learning

    CN121601220A