Manuscript Offprint
arXiv:2609.35684The Hidden Perception Constraint in Task-Aware Compression
ABSTRACT
With the recent advancements of neural compressors, explicitly incorporating perception constraints into the design of compression schemes has gained significant attention. Traditionally, these perception constraints ensure that the distribution of the reconstruction does not significantly deviate from the distribution of the source, thus attesting to the perceptual quality of the reconstruction. In this work, we uncover several perception constraints that are naturally present in task-aware compression. In particular, we consider a problem where the primary task is reconstruction and the secondary task is classification (i.e., a statistical test). We study this problem at varying levels of domain information available to us and discuss how to utilize the naturally emerging perception constraints to design rate-minimal compression schemes that also maximize the utility of our secondary task. We show that in this setting, if the decision boundaries of the classifier are ill-defined (mismatch) for our source distribution, then matching onto a target distribution enhances our classification accuracy.
1 INTRODUCTION
Rate distortion theory has been a widely pursued interest among information theorists ever since its first formulation by Shannon (Shannon, 1948). The rate-distortion (RD) problem involves finding the theoretical limit for compression such that the distortion between the reconstruction obtained from the compressed representation and the original source is within a pre-specified level. This constraint is formally known as the distortion constraint and numerous variations of this problem have been studied throughout literature by considering various distortion functions, availability of side information and for different network topologies (Wyner & Ziv, 1976; Yamamoto, 1981; Timo et al., 2011; MolavianJazi & Yener, 2016). With the recent advancements of neural compressors, a new constraint known as the perception constraint was identified in (Blau & Michaeli, 2019) as a necessary feature for modern compression schemes. While the distortion constraint ensures that our reconstruction is close to the original source, the perception constraint ensures that the distribution of the reconstruction is close to the source distribution. This results in more realistic reconstructions, which is a desired feature of modern compressors, but this comes at the expense of extra distortion.
This new problem of finding the optimal rate that simultaneously satisfies both the distortion and perception constraints is known as the rate-distortion-perception (RDP) problem and has gained significant attention recently. We refer to Section 2 for the recent advances on this problem. In this work, we study a practically motivated variant of the above problem. In here, we explore how to compress while simultaneously maximizing the utility of a given task. In particular, we focus on the following problem: Suppose we want to transmit a compressed representation of our data to a remote server which uses the reconstructed data for a certain task. For instance, suppose that our source is a random variable that may originate from several hypotheses, . We want to compress and transmit our observation of this source random variable X and form a reconstruction of it at the server (receiver) such that its distortion is within a pre-specified level. This is our primary goal. At the same time, suppose the server uses a generic or ill-defined statistical test (the test may be designed for a different data distribution or there may be a mismatch in prior distributions which was used to design the test) on the reconstructed data to identify the originating hypothesis. We want the error of this statistical test to be low as well. This is our secondary task.

Figure 1: Diagram of the system model.
In the context of machine learning, this can be viewed as using a pretrained classifier at the remote server to classify data coming from a distribution which is significantly different from the training distribution of the classifier. In here, the pretrained classifier can be considered as a third-party tool available at the sever which we use for our task. As a specific example, consider the presence (hypothesis ) and absence (hypothesis ) of a particular disease; and that the detector (classifier) has been trained with a data set that is dominated by a certain race; and that the new patient belongs to an underrepresented race. This paper tackles the problem of how to compress the data of the new patient with as few bits as possible, such that, the decompressed data at the detector ( ) has small distortion with the original data (X), and at the same time, the down-stream task of classification of the patient ( or ) using the decompressed data has small probability of error. Essentially, we are trying to compress the data in a way to leverage a generic classifier to our advantage.
We tackle the above problem by considering varying levels of domain knowledge available to us. In particular, we identify the following three levels of information availability:
• Level 1: We know the distributions of the individual hypotheses of the source random variable and the decision regions of the classifier at the receiver side.
• Level 2: We know the individual distributions for each hypothesis of the source random variable but we do not know the exact decision regions at the receiver side. However, in this scenario, we assume that we do know that the classifier works well for some known distribution (i.e., yields low probability of error on a known distribution). In the computer vision domain, this can be viewed as a generic image classifier which is known to have a good inference accuracy on a common dataset such as ImageNet.
• Level 3: We do not know the individual distributions for each hypothesis of the source random variable and we do not know decision regions of the classifier at the receiver. Again, we assume that the classifier works well for a known distribution.
Under the above three levels of information availability, we find the optimal compression rates that satisfy the primary task while maximizing the performance of the secondary task which is classification. We identify that perception is a hidden constraint within this problem setup and formulate the above problem as an equivalent RDP problem. We show that when the exact decision regions of the classifier is not known, a good strategy is to compress the data so that the reconstruction's distribution is as close as possible to a target distribution for which we know the test yields good results.
In our work, we are interested in matching the reconstruction distribution on to a target distribution that is different from the source distribution. This notion of perception has been studied in several other occasions. In (Akkoc et al.), this notion of perception was termed as deception where they found the optimal compression rates when the reconstruction should exhibit statistical characteristics significantly different from the original distribution. On a separate work in (Arda & Yener, 2025b), the rate distortion framework for text summarization introduced in (Arda & Yener, 2025a) was extended by introducing a perception constraint which measures the perceptual quality between the summaries and a reference distribution instead of the original text distribution.
In the domain of task-aware compression, there exist several works that fit our problem setting. A unified approach for incorporating classification accuracy into lossy image compression was introduced in (Zhang, 2023), where they introduced classification-distortion-perception (CDP) function and the rate-distortion-classification (RDC) function; the former corresponds to minimizing the classification error for a given distortion and perception constraint. whereas the latter corresponds to minimizing the rate given the constraints on the distortion and classification accuracy. The distinction between the RDP, RDC and rate-perception-classification (RPC) functions was highlighted in (Wang et al., 2024) by deriving closed-form expressions of the above functions for Bernoulli and Gaussian source distributions. In (Wang et al., 2025), the authors extended the RDC function by incorporating a perception constraint and multiple classification constraints measured via the entropy of classification labels given the reconstruction. However, here too the perception constraint was measured with respect to the source distribution. In (Nguyen et al., 2025), this entropy-based RDC function was studied in a setting with a universal encoder and multiple task-specific decoders.
The closest to our work is the work in (Nguyen et al., 2026), which considers the problem of minimizing distortion with a rate and perception constraint while using an entropy-based classification constraint. This is an extension of the cross-domain lossy compression framework introduced in (Liu et al., 2022). Here, they formulate the problem as an optimal transport problem where they consider the source distribution as a noisy version of a certain clean distribution. Therefore, perception in this case is measured between this noisy distribution and the clean distribution. They are interested in minimizing the expected distortion given a rate constraint, whereas we are interested in deriving the optimal compression rates for a given distortion in our setting. They solve the optimal transport problem by explicitly incorporating a perception constraint in addition to the entropy-based classification constraint, whereas we show that the perception constraint emerges naturally when realizing the constraint on classification accuracy, and that satisfying this naturally emerging perception constraint is sufficient to do well in terms of the classification accuracy.
3 PROBLEM FORMULATION
Suppose we have a total of hypotheses. Let be a random variable which is generated from hypothesis with probability following the distribution and let be the support of . The realization of random variable is then compressed and sent to a remote server which reconstructs it as . At the remote server, this reconstruction will be subjected to a statistical test (classification) which was designed for a random variable whose support is also , which
We assume that the distributions of all continuous random variables considered in this work are absolutely continuous with respect to the Lebesgue measure, and for discrete random variables the integrals over dx must be interpreted as summations with respect to the corresponding probability mass function.
originates from with probability following the distribution . In other words we will be using a statistical test designed with incorrect domain knowledge to classify our reconstructed data.
Suppose that came from the hypothesis . Then, based on the reconstruction , we will be generating an estimate of the original hypothesis , using the available test at the server. In particular, let be the decision regions of the predefined test at the server with for and . Then, if . Let be the probability of error of our test and let denote an integrable distortion function which measures how close our reconstruction is to our original random variable. Our goal is to compress the random such that reconstruction satisfies a constraint on the average distortion and the probability of error. In particular, we want our reconstruction to satisfy and , where and (see Fig. 1). Here, the distortion constraint ensures the semantic similarity between the original random variable and its reconstruction, and the constraint on the error probability ensures that we are simultaneously performing well at our task of interest which is to identify correctly the underlying hypothesis from which the random variable originated.
We will tackle the above problem at varying levels of domain knowledge that is available to us. To formally define the problem, we will start with a definition for achievability in this problem setting. In here, we will use to represent a collection i.i.d. realization of and we use to represent the th element of this collection.
Definition 1 The tuple is achievable if , , an encoding function , and a decoding function , such that , and satisfies,
where U is the common randomness independent of X available to both the encoder and decoder.
Next, to characterize the achievable region for a given distortion constraint and an error bound , we will define the rate-distortion-error (RDE) function as
Note that this function is not well-defined for every pair. This is because the decision regions at the server are suboptimal. For instance, suppose and we use the mean squared error (MSE) as the distortion metric, then even with infinite rate, we may not be able to achieve the desired error probability since s are not optimal decision regions for . Therefore, we will define this function only if , where , . However, Proposition 1 shows whenever a tuple is achievable, the function is well-defined.
Proposition 1 The tuple is achievable iff and .
The proof of Proposition 1 is given in Appendix A. Proposition 1 simply states that defines the minimum achievable compression rate satisfying a given distortion constraint and an error bound . Therefore, finding the minimum compression rate is equivalent to solving the RDE function over the set of stochastic mappings from to that are feasible under the given constraints. Now, given a stochastic mapping , the probability of error is
where .
Let be the decision regions of the optimal hypothesis test constructed for where for and . Let be the error probability of the optimal hypothesis test. Then, in Lemma 1, whose proof is given in Appendix B, we show that . Hence, the above problem is feasible only if .
Lemma 1 For any stochastic mapping , with equality iff almost everywhere,
Therefore, we will only consider values of . In the next section, we will focus on the setting where , and show that the above problem can be also formulated as an RDP problem.
4 COMPRESSION WITH OPTIMAL ERROR PROBABILITY
In this section, we will study the above problem under the special case where . We will call this setup the rate-distortion-minimum-error (RDME) problem. Therefore, our stochastic mappings must satisfy (4). Let us denote a stochastic map that satisfies these conditions by . Let be a discrete random variable which assumes if . Let and . Then, with probability . Here, will denote the estimate of if we carry out the optimal hypothesis test on . Note that, can be also represented using as where . Let be the reconstruction generated when . Now, under , we have that is fully deterministic given either or . Therefore,
Let . Then, for , the optimal compression rate will be given by , where
Therefore, in order to achieve the optimal error probability, our compression scheme must always send at least the bits necessary to represent our own estimate of the hypothesis (i.e., J) done at the transmitter side on X.
Next, note that, we can also represent the above optimization problem as an RDP problem as follows,
where is the distribution of and with , , and being our perception constraint. Note that, we have changed since the perception constraint ensures that any feasible stochastic mapping for the above problem must satisfy (4). Also, note that, as , the above optimization problem will converge to the original optimization problem for the RDME problem. Moreover, in this scenario, we have that , where .
5 COMPRESSION VIA DISTRIBUTION MATCHING
In Section 3, we formally defined the RDE function and in the previous section, we noticed how the RDME problem can be formulated as an RDP problem. However, both of these problem formulations required knowledge of the decision regions at the receiver (Level 1). These decision regions depend both on the exact distributions it was designed for and the particular test that is used (e.g., Neyman-Pearson or MAP). In a more general setting, if the task at hand is something more complex, such as image classification, these decision regions depend on both the structure of the classifier at the receiver as well as its training distribution. In this section, we discuss compression schemes designed without explicit knowledge about the decision regions of the test at the receiver. However, in this scenario, we assume that we know the test works well (low error probability) for some known distribution (Level 2). Let this test distribution be defined as follows: the input x to the statistical test is generated from with probability following the distribution . Now, Theorem 1 gives an important relationship between and the distributions .
Theorem 1 Let denote the probability of error for a known test distribution when using the statistical test at the receiver. Then, the following error bound is satisfied
where and is the total variation distance.
Corollary 1 The following error bound is satisfied,
where .
The proofs of Theorem 1 and Corollary 1 are given in Appendix C. In order to explicitly represent the probability of error, we needed to know the decision regions of the test at the receiver. Corollary 1 presents us with an alternative way to formulate the constraint on the probability of error. In particular, we can represent the optimal compression problem in (2) as,
where is a function of , e.g., if . However, since the perception constraint only forms an upper bound on the probability of error, we have that even when both of the problems are feasible. We further note that, if we are able to send to the receiver side, then the optimal compression problem becomes by replacing with . The above formulations represents Level 2 of our information availability.
Next, we look at the more general setting where we do not have any information about the individual distributions of the source random variable (Level 3). Here, we will only have access to the mixture distribution of X). In such a setting, one may try to formulate the optimal compression problem as follows,
where . Here, we would want to be as small as possible so that we are closer to a sample from the well-known distribution. Our experimental results suggest that the viability of this approach mainly depends on how informative the distortion measure is with respect to the source observation and how informative the mixture is with respect to the decision regions of the classifier.
6 NUMERICAL RESULTS
In this section, we present numerical results on discrete alphabets for a binary hypothesis test ( ). The exact derivations of our rate function for Bernoulli sources can be found in Appendix D. In here, we consider a quaternary alphabet with a binary hypothesis test and evaluate how our rate and error probability vary at different distortion levels measured using the Hamming distortion. For these experiments, we set and the prior probabilities to . The optimal decision regions at the transmitter side is obtained through MAP rule and we consider that the test at the receiver is also MAP but its decision regions are obtained following the distributions of
s. The distributions and for along with the corresponding decision regions are presented analytically in Appendix E.
In the first experiment, we consider information Level 1 and look at the RDME problem. Here, we consider how the rate varies with distortion at different perception levels enforced in (7). As illustrated in Fig. 2, as we increase the perception constraint P, the rate curves tend to converge and finally settle on the rate curve obtained by directly solving (6) as claimed. In the next experiment we operate at Level 2 and consider the following two scenarios: (i) We transmit the side information J losslessly and try to minimize the additional bits required for the specific reconstruction. (ii) We do not transmit J explicitly, but instead try to minimize the overall rate. For these two scenarios, we examine how the rate varies with distortion for different perception levels and how probability of error varies with perception at different distortion levels. Here, for simplicity, we use and for . This essentially means that we are matching to the training distribution of the test at the receiver. However, this does not mean that we know the decision regions at the receiver since the test could be different (e.g., Neyman-Pearson test instead of MAP). As depicted in Fig. 2a, transmitting J losslessly induces higher rates for a given perception and distortion level. However, as illustrated in Fig. 2b, transmitting J lowers the error probability as well. Moreover, it can be observed that for a given distortion level, as we lower the perception constraint, the probability of error approaches the limit of our bound (small ) in Corollary 1. This shows that for a given distortion level, it is better to operate at the tightest possible perception level that is feasible to minimize the classification error.
Next, we evaluate how rate and probability of error vary when we operate at Level 1 and Level 2. Here, the relationship between and is defined using . As shown in Fig. 3a and Fig. 3b, when we operate at Level 1, we obtain lower rates compared to Level 2. However, at Level 1, we observe that this lower rate is mostly achieved when the constraint on the probability of error is satisfied with equality thus resulting in higher error whereas in Level 2, we always observe that the obtained error probability is much smaller compared to that of Level 1. This is because at Level 2, we are using an upper bound on error probability to minimize the rate. Though this limits the feasible distortion levels, this is a viable approach when the exact decision regions are unknown. Additionally, it is interesting to see that the best error rate obtained in Level 2 is attained when the distortion constraint is not too tight so as to make the problem infeasible and when it is not too relaxed so as not to convey any useful information.
7 SIMULATIONS ON NEURAL CLASSIFIERS
In this section, we move from discrete alphabets to a setting where the test at the receiver is a neural classifier and the decision regions are not available in closed-form. This is precisely the situation described in Section 3 for which Level 2 was introduced: We do not know , but we know a distribution on which the test performs well.
We look at the digit classification problem and consider hypotheses corresponding to the ten digit classes. The source X is drawn from SVHN dataset (Netzer et al., 2011) and the distribution for which the receiver's test was designed is the distribution of MNIST images (LeCun et al., 1998) belonging to class i, both rendered as RGB images so that the two share common support . We set for all i, so that the domain mismatch is entirely a mismatch of the distributions within each class and not of the priors. The test at the receiver is a ResNet-9 classifier trained only on MNIST, its error on its own domain is . Since the transmitter has no access to this classifier, the decision regions are unknown to the compression scheme, and neither the classifier nor its gradients are ever used while designing the encoder and decoder. The estimate J of the hypothesis is produced at the transmitter by a second ResNet-9 classifier trained only on SVHN, whose accuracy is 0.921. This classifier plays the role of the optimal test at the transmitter and yields and . Details of both classifiers and of the compression architecture are given in Appendix F.
Two features of this setting are worth emphasizing before looking at the results. First, the mismatch is severe: Applying the receiver's test directly to X yields an error probability of 0.8930, which is close to . The decision regions of the receiver are therefore bad for the source, which is the regime in which Theorem 1 predicts that matching onto should help. Second, unlike the discrete examples of Section 3, here we cannot solve (10) directly. We therefore adopt the standard

Figure 2: Variation of vs distortion with varying perception levels P for the RDME problem.

(a) rate vs distortion
(b) vs perception
Figure 3: Variation of rate and when transmitting side information separately versus not transmitting .

(a) rate
(b)
Figure 4: Variation of rate and vs distortion at information Levels 1 and 2.
approach of (Blau & Michaeli, 2019) and trace the achievable region rather than impose a constraint: We fix the rate by construction and sweep the Lagrangian
where is a divergence estimated adversarially and selects an operating point on the distortion-perception tradeoff. The rate is fixed rather than penalized because the bottleneck is a vector quantizer with tokens over a codebook of codewords, which gives exactly bits per image irrespective of the weights. The side information costs bits when it is transmitted. Sweeping at each therefore produces a family of achievable tuples rather than a single constrained solution, and every point in the plots below is an operating point that was actually realized by a trained encoder-decoder pair. In this section, we opt to use the Wasserstein 1-distance instead of the total variation (TV) distance to quantify perception. This is because the distance can be expressed as a functional optimization problem using the Kantorovich-Rubenstein duality leading to the WGAN architecture which is well-known to work well for image generation tasks. Even though TV distance can be equivalently expressed as a functional optimization problem in the space of bounded functions, we see that the smoothness constraint enforced in the Kantrovich duality of the distance is necessary to generate good reconstructions from the target distribution.
To evaluate the interplay between distortion, perception and classification error, we consider the two configurations for Level 2 described in Section 3, where in the first configuration we send J losslessly and in the second we do not. As illustrated in Fig. 5 and Fig. 6, when the rate increases our rate distortion curves tend to move towards the low distortion and high perception regime for both configurations. Further, for both configurations, we see that the classification error decreases significantly when the distortion constraint is not too tight and when the perception constraint is binding. This aligns with our theoretical insights and further validates our claim that significant gains in terms of classification accuracy can be obtained when matching on to a target distribution rather than the source distribution in this setting. Moreover, we also see that transmitting J losslessly further enhances our classifications accuracy at the cost of only bits.

(a) perception vs distortion

(b) error vs distortion

(c) error vs perception
Figure 5: Variation of distortion, perception and classification error at different rates (true rate ) for Level 2 with lossless transmission of J.

(a) perception vs distortion

(b) error vs distortion

(c) error vs perception
Figure 6: Variation of distortion, perception and classification error at different rates for Level 2 without explicitly transmitting J.

(a) perception vs distortion

(b) error vs distortion
Figure 7: Variation of distortion, perception and classification error at different rates for Level 3.
Next, we consider the setting described in Level 3 where we try to match on to the mixture distribution. For this scenario, we see an interesting phenomenon: In Fig. 7, when the distortion constraint is not too tight, we see that lower perception values lead to lower classification error. However, when the distortion constraint becomes too relaxed, lower perception yields higher classification errors. This is due to the fact that when the distortion constraint is very relaxed, it does not convey any useful information. Therefore, the reconstruction is generated from the target distribution independent of the source image. The reconstructions for Levels 2 and 3 are presented in Appendix G.
8 CONCLUSIONS
In this work, we investigated rate-minimal compression schemes that simultaneously enable us to leverage an ill-trained classifier to our advantage. We showed that perception constraints naturally emerge out of the classification constraints defined in the problem. Through theory and extensive simulations, we showed that under this setting, matching on to a target distribution enhances classification accuracy as opposed to reconstructing similar to the source distribution.
AI USE STATEMENT
LLMs were used for literature review and as a programming assistant for implementing experimental code according to specifications and methodological choices provided by the authors. All AI-assisted outputs were reviewed and verified by the authors. LLMs were not used to derive or verify the proofs, generate synthetic datasets, or determine the scientific conclusions of the work. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.
REPRODUCIBILITY STATEMENT
Code, configurations and scripts that generate figures are available at https://anonymous.4open.science/r/Task-Aware-Compression.
Theory. All assumptions and the complete proofs which are in Appendixes are self-contained and no result relies on computation.
Discrete experiments (Section 6). The RDP functions are obtained by solving convex programs directly on the quaternary and binary alphabets, with scipy.optimize over a grid of pairs. The three problem builders differ only in the constraints. The source and test distributions and both sets of decision regions are given in Table 1, the priors are , and the distortion is the Hamming distance. We release the solver together with the Streamlit interface used to produce the figures, which shows the distributions, the distortion, the grid and the perception levels as controls and plots the curves.
Image experiments (Section 7). Both datasets are the standard torchvision distributions of SVHN and MNIST. Each run writes the achieved operating point of every trained config as a CSV rate, distortion, perception, , the two components of the distortion, and the constraints Section 7 is reproduced by:
python experiments.py --mode rate-sweep
--family digits_rgb --tx svhn --rx mnist
--resolution 32 --uniform-priors
--arch resnet9 --clf-epochs 100
--clf-batch 512 --clf-lr 0.002
--perception gan --distortion mse+feature
--feature-weight 1.0
--feature-source transmitter_classifier
--feature-layer deep
--lk-pairs "(8,32), (8,64), (16,16), (16,64), (32,16)"
--lambdaas "0,1,5,10,20,35,50,75,90,100,200,300"
--lambda-scaling balanced
--latent-dim 128 --n-down 2 --epochs-per-point 300
--batch 800 --eval-batch 800 --eval-critic-steps 300
--decoder-noise 0.5 --seeds 4
--configs sendJ_cond_PYj, sendJ_cond_PXj, noJ_cond_PYj, noJ_cond_PXj
--save-models --out results/
with the Level 3 configuration noJ_uncond_PY run separately. Every point is checkpointed as it completes, so the sweep resumes rather than restarts, and the two classifiers are trained once and reused across all configurations from a cache keyed by their configuration hash. The runs reported here used NVIDIA A100 GPU and took approximately 80 GPU-hours in total.
What is and is not deterministic. The data splits, the class sampling and all weight initializations are seeded (split_seed = 0, four compressor seeds per operating point), and the classifier cache makes and same across configurations. First, GPU output being non-deterministic means a rerun on different hardware will not reproduce the numbers exactly. We report the mean over four seeds and the figures show the mean points. Second, the perception term is an adversarial estimate and is therefore non-stationary. It depends on how well the critic has been trained, which is why the critic is trained at every step including and refit for a further 300 steps with the frozen weights before the value is recorded.
REFERENCES
S. Akkoc, S. Liyanaarachchi, S. Ulukus, and A. Yener. The rate-distortion-deception tradeoff. Available online at arXiv:2607.25997.
E. Arda and A. Yener. A rate-distortion framework for summarization. In IEEE ISIT, June 2025a.
E. Arda and A. Yener. Rate-distortion-perception trade-off in summarization. In Allerton Conference, September 2025b.
Y. Blau and T. Michaeli. Rethinking lossy compression: The rate-distortion-perception tradeoff. In ICML, June 2019.
I. Gulrajani, F. Ahmed, M. Arjovsky, V. Dumoulin, and A. C. Courville. Improved training of wasserstein gans. In NIPS, December 2017.
Y. Hamdi and D. Gündüz. The rate-distortion-perception trade-off with side information. In IEEE ISIT, June 2023.
Y. Hamdi, A. B. Wagner, and D. Gündüz. Rate-distortion-perception trade-off with strong realism constraints: Role of side information and common randomness. IEEE Transactions on Information Theory, 72(9):6401–6421, September 2026.
Y. LeCun, C. Cortes, and C. J. C. Burges. The mnist database of handwritten digits. Website, 1998. URL http://yann.lecun.com/exdb/mnist/.
C. T. Li and A. E. Gamal. Strong functional representation lemma and applications to coding theorems. IEEE Transactions on Information Theory, 64(11):6967–6978, November 2018.
H. Liu, G. Zhang, J. Chen, and A. Khisti. Cross-domain lossy compression as entropy constrained optimal transport. IEEE Journal on Selected Areas in Information Theory, 3(3):513–527, September 2022.
E. MolavianJazi and A. Yener. Two-way lossy compression via a relay with self source. In IEEE ISIT, July 2016.
Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning, December 2011. URL http://ufldl.stanford.edu/housenumbers/.
N. Nguyen, T. Nguyen, T. Nguyen, and B. Bose. Universal rate-distortion-classification representations for lossy compression. In IEEE ITW, September 2025.
N. Nguyen, T. Nguyen, and B. Bose. Cross-domain lossy compression via rate- and classification-constrained optimal transport. In ICLR, January 2026.
J. Qian, S. Salehkalaibar, J. Chen, A. Khisti, W. Yu, W. Shi, Y. Ge, and W. Tong. Rate-distortion-perception tradeoff for gaussian vector sources. IEEE Journal on Selected Areas in Information Theory, 6:1–17, November 2025.
C. E. Shannon. A mathematical theory of communication. The Bell System Technical Journal, 27(3):379–423, July 1948.
L. Theis and A. B. Wagner. A coding theorem for the rate-distortion-perception function. In ICLR Neural Compression Workshop, April 2021.
R. Timo, T. Chan, and A. Grant. Rate distortion with side-information at many decoders. IEEE Transactions on Information Theory, 57(8):5240–5257, August 2011.
A. B. Wagner. The rate-distortion-perception tradeoff: The role of common randomness. Available online at arXiv:2202.04147.
Y. Wang, Y. Wu, S. Ma, and Y-J. A. Zhang. Lossy compression with data, perception, and classification constraints. In IEEE ITW, November 2024.
Y. Wang, Y. Wu, S. Ma, and Y. A. Zhang. Task-oriented lossy compression with data, perception, and classification constraints. IEEE Journal on Selected Areas in Communications, 43(7):2635–2650, July 2025.
A. Wyner and J. Ziv. The rate-distortion function for source coding with side information at the decoder. IEEE Transactions on Information Theory, 22(1):1–10, January 1976.
H. Yamamoto. Source coding theory for cascade and branching communication systems. IEEE Transactions on Information Theory, 27(3):299–308, May 1981.
G. Zhang, J. Qian, J. Chen, and A. Khisti. Universal rate-distortion-perception representations for lossy compression. IEEE Transactions on Information Theory, 71(11):8633–8653, November 2025.
Y. Zhang. A Rate-Distortion-Classification approach for lossy image compression. Digital Signal Processing, 141, July 2023.
A PROOF OF PROPOSITION 1
The converse and achievability proofs follow similar to that of (Akkoc et al.). We have used common randomness in this setup to make the achievability proof simpler and to facilitate the use of stochastic encoders and decoders when perception constraints are involved.
A.1 CONVERSE
From (3), we have that the is linear with respect . Further, we have that is convex and is linear with respect to . Hence, the set is convex and is convex on . Additionally, the monotonicity of follows from the fact for and . Now, suppose is achievable and fix . Therefore, and functions and such that,
We can construct single-letter stochastic mappings that achieve the rate with distortion and probability of error , by isolating only the th term of the above encoder-decoder scheme defined using and . Therefore, based on the convexity of , we have that , where and . Hence, . Further, since and , it follows that and thereby . Now, from the convexity of , we have that
Since this is true for any , we have .
A.2 ACHIEVABILITY
The achievability follows from the strong function representation lemma (SFRL) (Li & Gamal, 2018). Suppose is well-defined and let . Then, there exists a mapping and thereby a such that the distortion and probability of error constraints are satisfied with
. Now, from SFRL there exists a random variable independent of and functions and such that , and
Therefore, by selecting n large enough such that , we have that
Therefore, any is achievable for any .
B PROOF OF LEMMA 1
Using (3), we have that
where . Now, note that in the region we have . Therefore, to minimize the error probability, our mapping must satisfy (4). Now, substituting these relations back on to (21), we obtain
C PROOFS OF THEOREM 1 AND COROLLARY 1
First, note that we can represent as
Further, note that
Now, error of the statistical test satisfies
where (33) follows from Pinsker's inequality and (35) follows from Cauchy-Schwarz inequality.
D RDE FUNCTION FOR A BERNOULLI SOURCE
We solve the RDE function
for a binary source. We assume
where . Conditioned on the hypothesis, let
Therefore, the marginal distribution of is also Bernoulli, where . We assume that , and that the fixed classifier at the receiver decides if and if . For a binary reconstruction alphabet,
where . The probability that the reconstruction equals one is . The mutual information is
where is the binary entropy function. Thus, the rate can be written directly as a function of and . We use Hamming distortion, . The average distortion is therefore
Hence, the distortion constraint becomes .
An error occurs under when , and under when . Hence, . For , . Similarly, . Therefore,
We write this as , where and . The probability of error constraint is therefore simply . Notice that both the distortion constraint and the probability of error constraint are linear in and . Substituting the previous expressions, the original optimization problem becomes
The mutual information is convex in the conditional distribution when the source distribution is fixed. Also, both constraints are linear. Therefore, this is a convex optimization problem. Let be the multiplier associated with the distortion constraint and let be the multiplier associated with the probability of error constraint. The Lagrangian is,
(46)
For the derivative calculation, we use natural logarithms, which only changes the scaling of and , and does not change the optimal and . Define and . Let . For , differentiating the Lagrangian with respect to gives ; and differentiation with respect to gives . Thus,
The multipliers also satisfy and .
ZERO RATE REGION
A possibility is . The mutual information vanishes if and only if and are independent. For the binary channel considered here, this means , . For such a channel, and . The distortion becomes . The classification error becomes . Since we obtain . Therefore, if and only if there exists a such that and .
In the absence of a distortion constraint, a zero-rate classifier can always choose a constant reconstruction corresponding to the more probable hypothesis. Hence, a zero-rate reconstruction satisfying only the error constraint exists whenever .
CASE 1: ONLY DISTORTION CONSTRAINT IS ACTIVE
Suppose , . The problem then reduces to the Bernoulli RD problem. For the optimal marginal is . The optimal and are
They satisfy . The corresponding rate is
This channel is also optimal for the RDE problem whenever it satisfies the classification-error constraint,
Thus, whenever (51) holds, . For , the Bernoulli RD function is zero.
CASE 2: ONLY PROBABILITY OF ERROR CONSTRAINT IS ACTIVE
Now, suppose , . Then, (48) become
Define and . Then,
Using the relation , we have
This expression applies whenever the denominator is nonzero and is in . In some cases where is not found, is obtained directly from the fixed-point equation . The Lagrange multiplier is selected so that the active error constraint satisfies . Thus, this case reduces to a one-dimensional equation in . The resulting solution is valid provided its distortion satisfies . Then, the rate is
As increases, the optimal probability of error is non-increasing. Hence, the appropriate value of can be determined numerically using a one-dimensional monotone search.
CASE 3: BOTH CONSTRAINTS ARE ACTIVE
Suppose , . Then the complementary slackness condition gives and . Equivalently and . Then, let , if , (48) has a unique solution
The corresponding reconstruction probability is , and therefore
Solution in (57) is admissible only if and . For an interior solution, the multipliers must also satisfy and . Define and . Then, and . Thus,
Therefore, the optimum solution is at the intersection of the constraint lines defined by and , as long as that intersecting point is inside the allowed 0 to 1 range and the multipliers are nonnegative. If , i.e., , the above constraint lines are parallel. If the equations and are inconsistent, the two constraints cannot be active simultaneously. If the two equations are proportional and consistent, the problem then reduces to minimizing the convex mutual information

Figure 8: Rate–distortion curves for different classification error constraints with , , and .
function along a single line segment. For example using the , we get . Then, we minimize
over the interval and . Since this is one dimensional convex optimization problem its minimum occurs either at unique stationary point or at an endpoint.
FINAL CHARACTERIZATION
For arbitrary where and where . The RDE function can be determined as follows. If and are not in the feasible set, the function is not defined. If there exists such that and then . Otherwise and the optimizer is obtained via
In all cases, once the optimal pair is found, the rate is
Thus, for arbitrary , the RDE function is characterized by a finite set of convex optimization branches. The distortion only and both active branches admit closed-form solutions, while the error-only branch reduces to a one-dimensional equation for the multiplier .
E EXPERIMENTAL SETUP FOR SECTION 6
In this section, we present the distributions and used for the binary hypothesis experiments discussed in Section 6. We consider a quaternary alphabet on and consider to be a skewed distribution concentrated on whereas is a skewed distribution concentrated on . MAP rule is applied on them to find the optimal decision regions . These optimal decision regions yield that . We consider that the statistical test used at the receiver is also MAP. However, it was designed for using distributions defined in Table 1. These decisions yield . As seen in Table 1, there is a clear mismatch between the optimal decision regions at the transmitter with that used at the receiver.
| Tx DR | Rx DR | |||||
|---|---|---|---|---|---|---|
| 0 | 0.68 | 0.02 | 0.01 | 0.3 | ||
| 1 | 0.2 | 0.1 | 0.95 | 0.01 | ||
| 2 | 0.1 | 0.2 | 0.03 | 0.4 | ||
| 3 | 0.02 | 0.68 | 0.01 | 0.29 |
Table 1: Distributions and decision regions (DR).
F ARCHITECTURE AND TRAINING PARAMETERS FOR THE EXPERIMENTS IN SECTION 7
F.1 DATASETS AND CLASSIFIERS
Both domains are rendered as RGB images: SVHN (Netzer et al., 2011) in its native resolution and MNIST (LeCun et al., 1998) replicated across the three channels and resized, so that and share the support required by the problem formulation. We use 8000 training, 1500 validation and 3000 test images per domain, resampled so that the realized class frequencies match the uniform priors .
The receiver's test and the transmitter's estimator are both ResNet-9 networks with base width 64 (6.57M parameters), trained with AdamW at a learning rate of , weight decay , batch size 512, cosine schedule with warmup, label smoothing 0.05, dropout 0.05, random-crop and flip augmentation, for at most 100 epochs with early stopping on validation accuracy (patience 8). Each is trained on its own domain only: on MNIST under , on SVHN under . Their accuracies are reported in Table 2. Neither network is ever placed in the computational graph of the encoder or decoder, is used only to evaluate after training, and is used only to produce and the feature space of the distortion measure described below.
| train | validation | test | |
|---|---|---|---|
| (SVHN) | 1.000 | 0.938 | 0.921 |
| (MNIST) | 1.000 | 0.993 | 0.992 |
Table 2: Accuracy of the transmitter's estimator and the receiver's test, each on its own domain.
F.2 ENCODER, DECODER AND RATE
The encoder and decoder are convolutional and are given in Table 3. The encoder maps a image to a 128-dimensional latent vector, which is split into tokens of dimension and quantized against a learned codebook of entries by nearest-neighbor assignment, with straight-through gradients and a commitment penalty of weight 0.25. The rate is therefore fixed by the geometry of the quantizer as bits per image and does not have to be estimated or penalized. When is transmitted, it is charged bits, which is added to the rates reported in Section 7. The four rate points used are listed in Table 4. The transmitted enters the network as a learned 32-dimensional embedding which modulates both the encoder and the decoder through FiLM layers whose output projection is initialized to zero, so that conditioning begins as the identity map. Following (Blau & Michaeli, 2019), uniform noise of half the code spacing is added to the quantized representation during training so that the decoder is stochastic, which is necessary for good perceptual quality at low rates.
F.3 DISTORTION MEASURE
We use the combination of squared error and a deep feature distance of (Blau & Michaeli, 2019, Eqn. (11)):
with . As in (Blau & Michaeli, 2019), the feature map is an intermediate layer of a trained classifier rather than a generic network, because the term is only meaningful if the feature space
| Encoder | Decoder |
|---|---|
| Conv , stride : | FC: |
| Conv , stride : | FiLM() |
| AvgPool: | FC: |
| FC: | ConvT , stride : |
| FiLM() | ConvT , stride : |
| FC: | Conv : , sigmoid |
| VQ: tokens, codewords |
Table 3: Encoder and decoder architecture.
| token dim. | ||||
|---|---|---|---|---|
| 8 | 8 | 16 | 24 | 27.32 |
| 8 | 16 | 16 | 32 | 35.32 |
| 16 | 32 | 8 | 80 | 83.32 |
| 32 | 64 | 4 | 192 | 195.32 |
Table 4: Rate points. The rate is exact by construction, .
carries semantic information. We take to be the next to last representation of the transmitter's estimator . We have two main reasons for doing this. First, is trained on the transmitter domain data that the transmitter owns, therefore, using it discloses nothing about the receiver's test and keeps the scheme within Level 2 and 3. Second, the depth of the layer matters more than the accuracy of the classifier since we observed that measuring the ratio of the mean squared feature distance between images of different classes to that between images of the same class. A feature space is useful in (63) only if the distance reflects class differences to choose the layer we measured, for each candidate ,
where and are drawn from the same class and and from different classes. The ratio is not interpretable on its own, since raw pixel distance already separates classes to some extent. The identity function is therefore measured on the same images as baseline, and what matters is the ratio relative to it. Table 5 shows the results for at 0.921 test accuracy. An early layer scores 1.003 against 0.099 for raw pixels, adding almost nothing over pixel distance, whereas the last layer representation scores 1.543. We therefore use the deepest convolutional representation.
| feature map | dimension | sep(Ψ) | relative to pixels |
|---|---|---|---|
| raw pixels (identity) | 3072 | 0.990 | 1.000 |
| , early | 65536 | 1.003 | 1.013 |
| , middle | 32768 | 1.041 | 1.051 |
| , penultimate (used) | 8192 | 1.528 | 1.543 |
Table 5: Class separation (64) of each candidate feature space.
F.4 PERCEPTION MEASURE
The divergence in (12) is the Wasserstein-1 distance, estimated as in (Blau & Michaeli, 2019) by a critic trained with gradient penalty (Gulrajani et al., 2017)
where is realized by the network in Table 6. A single critic serves all branches, the class embedding is projected onto the image features and added to the scalar output, in the manner of a projection discriminator, and the critic is trained on the pooled batch with the branch labels. We use 5 critic updates per generator update, a gradient penalty weight of 10, and Adam with learning rate

Figure 9: System architecture diagram.
and . The critic is trained at every step, including at where it does not influence the objective, and is refit for a further 300 steps with the encoder and decoder frozen before the perception index is reported, so that the values compared across are measured by critics at comparable convergence.
| Layer | Output |
|---|---|
| Input | |
| Conv , stride 2, LeakyReLU(0.2) | |
| Conv , stride 2, LeakyReLU(0.2) | |
| AvgPool, Flatten | 2048 |
| FC, LeakyReLU(0.2) | 256 |
| FC + class projection | 1 |
Table 6: Critic used to estimate the perception index.
F.5 TRAINING OF THE COMPRESSION SCHEME
Each operating point is a separate encoder-decoder pair trained for 300 epochs with Adam at a learning rate of and a batch size of 800, on the 8000 transmitter domain training images. The reference batches for the perception term are drawn from the receiver domain training split for the configuration and from the transmitter domain split for the control; the test split is never used during training.
Following the protocol of (Blau & Michaeli, 2019), for each rate, we first train the distortion-only model and every model is initialized from it and trained for the same number of further epochs. Asking an untrained codec to match a distribution while it is still learning to reconstruct rarely converges within a practical budget, and this warm start also removes the initialization as a source of variation between the points of a sweep.
Finally, we note that the numerical values of are not comparable across divergences unless the two terms of (12) are on a common scale. The distortion above is a per-pixel mean of order , whereas the critic estimate is of order 10, thus a literal would suppress the distortion term entirely. We therefore measure the magnitude of both terms over a short warmup and apply to their ratio, so that weights the two terms equally, the grid used is . Reported distortion and perception values are the achieved quantities and are unaffected by this convention.
G ADDITIONAL RESULTS
G.1 RDP SURFACE
Fig. 10a illustrates the tradeoff between rate, distortion and perception for Level 2 with lossless transmission of J. This surface was obtained by sweeping the Lagrangian described in Section 7. As illustrated, the classification error decreases towards the low perception and high distortion regime similar to our results with discrete alphabets. This trend is further highlighted in the error, distortion and perception curve depicted in Fig. 10b.
seed-averaged operating points
— measured rates bits

(a) rate

(b)
Figure 10: Variation of rate and error with distortion and perception (Level 2 Tx J).
G.2 RECONSTRUCTION RESULTS
Fig. 11 and Fig. 12 depict sample reconstructions obtained at Level 2 and Level 3, respectively. We see that by matching on to the MNIST data distribution, the decoder generated images resembling samples from the MNIST dataset that is close to our source sample from SVHN dataset. We see that in Level 2, the reconstructions that are obtained at higher values (i.e., tighter perception constraint) resembles samples that are closer to MNIST dataset and hence the decrease in error. However, for Level 3, we observe that the reconstructions at moderate values generate the best reconstructions from the MNIST dataset. This is because, as increases, our distortion constraint also increases, thus allowing the decoder to generate reconstructions independently of the actual source sample. Even though the basic features of the MNIST dataset is present in these reconstructions, they no longer contain any useful information from the source sample. Hence, the decrease in the accuracy in Level 3 at high values.
We also test how the classification accuracies would vary when we match on to the source distribution following the Level 2 configuration where we transmit J losslessly. Here, the divergence term in (12) was replaced with and the same training process described in Section 7 was carried out. Fig. 13 illustrates the reconstructions obtained using the above process. As seen, the reconstructions do resemble samples from the SVHN dataset. However, since the classifier was trained on the MNIST dataset, the error constantly remains around 0.90 regardless of the value that is used.

(a) Level 2 Tx J.

(b) Level 2 No J.
Figure 11: Reconstruction results for Level 2.

Figure 12: Reconstructions for Level 3.

Figure 13: Level 2, Tx J, match .