Steganalysis of JPEG images using rich models

In this paper, we propose a rich model of DCT coefficients in a JPEG file for the purpose of detecting steganographic embedding changes. The model is built systematically as a union of smaller submodels formed as joint distributions of DCT coefficients from their frequency and spatial neighborhoods covering a wide range of statistical dependencies. Due to its high dimensionality, we combine the rich model with ensemble classifiers and construct detectors for six modern JPEG domain steganographic schemes: nsF5, model-based steganography, YASS, and schemes that use side information at the embedder in the form of the uncompressed image: MME, BCH, and BCHopt. The resulting performance is contrasted with previously proposed feature sets of both low and high dimensionality. We also investigate the performance of individual submodels when grouped by their type as well as the effect of Cartesian calibration. The proposed rich model delivers superior performance across all tested algorithms and payloads. 1. MOTIVATION Modern image-steganography detectors consist of two basic parts: an image model and a machine learning tool that is trained to distinguish between cover and stego images represented in the chosen model. The detection accuracy is primarily determined by the image model, which should be sensitive to steganographic embedding changes and insensitive to the image content. It is also important that it captures as many dependencies among individual image elements (DCT coefficients) as possible to increase the chance that at least some of these dependencies will be disturbed by embedding. By measuring mutual information between coefficient pairs, it has been already pointed out [9] that the strongest dependencies among DCT coefficients are between close spatial-domain (inter-block) and frequency-domain (intra-block) neighbors. This fact was intuitively utilized by numerous researchers in the past, who proposed to represent JPEG images using joint or conditional probability distributions of neighboring coefficient pairs [1,3,14,15,17,22] possibly expanded with their calibrated versions [8, 11]. In [9, 10], the authors pointed out that by merging many such joint distributions (co-occurrence matrices), substantial improvement in detection accuracy can be obtained if combined with machine learning that can handle high model dimensionality and large training sets. In this paper, we propose a complex (rich) model of JPEG images consisting of a large number of individual submodels. The novelty w.r.t. our previous contributions [9, 10] is at least three-fold: 1) we view the absolute values of DCT coefficients in a JPEG image as 64 weakly dependent parallel channels and separate the joint statistics by individual DCT modes; 2) to increase the model diversity, we form the same model from differences between absolute values of DCT coefficients; 3) we add integral joint statistics between coefficients from a wider range of values to cover the case when steganographic embedding largely avoids disturbing the first two models. Finally, the joint statistics are symmetrized to compactify the model and to increase its statistical robustness. This philosophy to constructing image models for steganalysis parallels our effort in the spatial domain [4]. We would like to point out that the proposed approach necessitates usage of scalable machine learning, such as the ensemble classifier that was originally described in [9] and then extended to a fully automatized routine in [10]. The JPEG Rich Model (JRM) is described in detail in Section 2. In Section 3, it is used to steganalyze six modern JPEG-domain steganographic schemes: nsF5 [5], MBS [19], YASS [21], MME [6], BCH, and BCHopt [18]. In combination with an ensemble classifier, the JRM outperforms not only low-dimensional models but also our previously proposed high-dimensional feature sets for JPEG steganalysis – the CC-C300 [9] and CF∗ [10]. Afterwards, in Section 4, we subject the proposed JRM to analysis and conduct a series of investigative experiments revealing interesting insight and interpretations. The paper is concluded in Section 5. E-mail: {jan.kodovsky, fridrich}@binghamton.edu; http://dde.binghamton.edu 2. RICH MODEL IN JPEG DOMAIN A JPEG image consists of 64 parallel channels formed by DCT modes which exhibit complex but short-distance dependencies of two types – frequency (intra-block) and spatial (inter-block). The former relates to the relationship among coefficients with similar frequency within the same 8 × 8 block while the latter refers to the relationship across different blocks. Although statistics of neighboring DCT coefficients were used as models in the past, the need to keep the model dimensionality low for the subsequent classifier training usually limited the model scope to co-occurrence matrices constructed from all coefficients in the DCT plane. Thus, despite their very different statistical nature, all DCT modes were treated equally. Our proposed rich model consists of several qualitatively different parts. First, in the lines of our previously proposed CF∗ features, we model individual DCT modes separately, collect many of these submodels and put them together. They will be naturally diverse since they capture dependencies among different DCT coefficients. The second part of the proposed JRM is formed as integral statistics from the whole DCT plane. The increased statistical power enables us to extend the range of co-occurrence features and therefore cover a different spectrum of dependencies than the mode-specific features from the first part. The features of both parts are further diversified by modeling not only DCT coefficients themselves, but also their differences calculated in different directions. 2.1 Notation and definitions Quantized DCT coefficients of a JPEG image of dimensions M ×N will be represented by a matrix D ∈ ZM×N . Let D xy denote the (x, y)th DCT coefficient in the (i, j)th 8 × 8 block, (x, y) ∈ {0, . . . , 7}2, i = 1, . . . , dM/8e, j = 1, . . . , dN/8e. Alternatively, we may access individual elements as Dij , i = 1, . . . , M , j = 1, . . . , N . We define the following matrices: Ai,j = |Dij |, i = 1, . . . , M, j = 1, . . . , N, (1) Ai,j = |Dij | − |Di,j+1|, i = 1, . . . , M, j = 1, . . . , N − 1, (2) Ai,j = |Dij | − |Di+1,j |, i = 1, . . . , M − 1, j = 1, . . . , N, (3) Ai,j = |Dij | − |Di+1,j+1|, i = 1, . . . , M − 1, j = 1, . . . , N − 1, (4) Ai,j = |Dij | − |Di,j+8|, i = 1, . . . , M, j = 1, . . . , N − 8, (5) A i,j = |Dij | − |Di+8,j |, i = 1, . . . , M − 8, j = 1, . . . , N. (6) Matrix A× consists of the absolute values of DCT coefficients, matrices A→, A↓, A↘ are obtained as intra-block differences, and A⇒, A represent inter-block differences. Individual submodels of the proposed JRM will be formed as 2D co-occurrence matrices calculated from the coefficients of matrices A, ? ∈ {×,→, ↓,↘,⇒, }, positioned in DCT modes (x, y) and (x + ∆x, y + ∆y). Formally, CT (x, y, ∆x, ∆y), ? ∈ {×,→, ↓,↘,⇒, }, are (2T + 1)2-dimensional matrices with elements ckl(x, y, ∆x, ∆y) = 1 Z ∑ i,j ∣∣∣∣{T(i,j) xy ∣∣∣∣T = truncT (A); T(i,j) xy = k; T x+∆x,y+∆y = l}∣∣∣∣ , (7) where the normalization constant Z ensures that ∑ k,l c ? kl = 1, and truncT (·) is an element-wise truncation operator defined as truncT (x) = { T · sign(x) if |x| > T, x otherwise. (8) In definition (7), we do not constrain ∆x and ∆y and allow (x + ∆x, y + ∆y) to be out of the range {0, . . . , 7}2 to more easily describe co-occurrences for inter-block coefficient pairs, e.g., T x+8,y ≡ T (i+1,j) xy . Assuming the statistics of natural images do not change after mirroring about the main diagonal, the symmetry of DCT basis functions w.r.t. the 8 × 8 block diagonal allows us to replace matrices CT with the more robust C̄T (x, y, ∆x, ∆y) , 1 2 ( CT (x, y, ∆x, ∆y) + C × T (y, x, ∆y, ∆x ) , (9) C̄T (x, y, ∆x, ∆y) , 1 2 ( CT (x, y, ∆x, ∆y) + C ↓ T (y, x, ∆y, ∆x) ) , (10) C̄T (x, y, ∆x, ∆y) , 1 2 ( CT (x, y, ∆x, ∆y) + C T (y, x, ∆y, ∆x) ) , (11) C̄T (x, y, ∆x, ∆y) , 1 2 ( CT (x, y, ∆x, ∆y) + C ↘ T (y, x, ∆y, ∆x) ) . (12) Because the coefficients in Ai,j are non-negative, most of the bins of C̄ × T are zeros and its true dimensionality is only (T + 1)2. The difference-based co-occurrences C̄T , ? ∈ {→,↘,⇒}, are generally nonzero, however, we can additionally utilize their sign symmetry (ckl ≈ c−k,−l) and define ĈT with elements ĉkl = 1 2 ( c̄kl + c̄−k,−l ) . (13) The redundant portions of ĈT can be removed to obtain the final form of the difference-based co-occurrences of dimensionality 1 2 (2T + 1) 2 + 2 , which we denote again Ĉ ? T (x, y, ∆x, ∆y), ? ∈ {→,↘,⇒}. The rich model will be constructed only using the most compact forms: C̄T , ĈT , Ĉ ↘ T , and Ĉ ⇒ T . We note that the co-occurrences C̄T evolved from the F∗ feature set proposed in [10]. The difference is that F∗ does not take absolute values before forming co-occurrences. Taking absolute values reduces dimensionality and makes the features more robust; it could be seen as another type of symmetrization. In Section 3, we compare the performance of the proposed rich model with the Cartesian calibrated CF∗set [10]. 2.2 DCT-mode specific components of JRM Depending on the mutual position of the DCT modes (x, y) and (x + ∆x, y + ∆y), the extracted co-occurrence matrices C ∈ {C̄T , ĈT , Ĉ ↘ T , Ĉ ⇒ T } will be grouped into ten qualitatively different submodels: 1. Gh(C) = {C(x, y, 0, 1)|0 ≤ x; 0 ≤ y; x + y ≤ 5}, 2. Gd(C) = {C(x, y, 1, 1)|0 ≤ x ≤ y; x + y ≤ 5} ∪ {C(x, y, 1,−1)|0 ≤ x < y; x + y ≤ 5}, 3. Goh(C) = {C(x, y, 0, 2)|0 ≤ x; 0 ≤ y; x + y ≤ 4}, 4. Gx(C) = {C(x, y, y − x, x− y)|0 ≤ x < y; x + y ≤ 5}, 5. God(C) = {C(x, y, 2, 2)|0 ≤ x ≤ y; x + y ≤ 4} ∪ {C(x, y, 2,−2)|0 ≤ x < y; x + y ≤ 5}, 6. Gkm(C) = {C(x, y,−1, 2)|1 ≤ x; 0 ≤ y; x + y ≤ 5}, 7. Gih(C) = {C(x, y, 0, 8)|0 ≤ x; 0 ≤ y; x + y ≤ 5}, 8. Gid(C) = {C(x, y, 8, 8)|0 ≤ x ≤ y; x + y ≤ 5}, 9. Gim(C) = {C(x, y,−8, 8)|0 ≤ x ≤ y; x + y ≤ 5}, 10. Gix(C) = {C(x, y, y − x, x