text string | source string |
|---|---|
ρ= 0.99999 .The high correlation ρ= 0.99999 ensures that the analytic score function ∇xlogpMoG(x)remains well-defined, despite the near-singular covariance. The physical constraint is defined as: F(x) =|x0−x1|2= 0. (17) Baselines. DPS and ECI both integrate the analytical score using 1000-step Euler discretization over (0,1). DPS applies constraint guidance via gradient descent on F(x)at each step, using a loss weight of300. ECI enforces the constraint by directly projecting the posterior mean to satisfy F(x) = 0 . PIDDM. A teacher diffusion model is constructed using a probability-flow ODE with 100-step Euler integration, leveraging the analytic score. It generates 50,000 training pairs (ε,x0)which are used to train a one-step student model, a ReLU-activated MLP with two hidden layers (100 neurons each) via the loss: Ltrain=1 NNX i=1|dθ(εi)−x0,i|2+λtrainF(dθ(εi)), λ train= 1. (18) Training uses Adam optimizer (lr = 10−3, batch size = 2048). During inference, latent noise εis optimized via 80 steps of LBFGS with strong-Wolfe line search, learning rate 3×10−3, and gradient tolerance 10−7, with λinfer= 1. Results. Figure 5(a) shows that all methods recover the bimodal structure of x1. However, as shown in Figure 5(b), DPS fails to fully satisfy the constraint, with x0−x1spread over ±10−2, while ECI enforces it exactly but distorts the marginal distribution. In contrast, PIDDM maintains both constraint satisfaction (standard deviation ≈2×10−3) and distributional fidelity. (a) Marginal distribution over x1 (b) Constraint deviation x0−x1 Figure 5: Constraint satisfaction on correlated MoG. Comparison of generated samples using DPS, ECI, and PIDDM. PIDDM closely matches the target distribution while satisfying constraints. 23 | https://arxiv.org/abs/2505.22391v1 |
arXiv:2505.22411v1 [cs.LG] 28 May 2025Mitigating Overthinking in Large Reasoning Models via Manifold Steering Yao Huang1, Huanran Chen2, Shouwei Ruan1, Yichi Zhang2, Xingxing Wei1∗, Yinpeng Dong2∗ 1Institute of Artificial Intelligence, Beihang University, Beijing 100191, China 2College of AI, Tsinghua University, Beijing 100084, China :{y_huang, xxwei}@buaa.edu.cn, dongyinpeng@mail.tsinghua.edu.cn Abstract Recent advances in Large Reasoning Models (LRMs) have demonstrated remark- able capabilities in solving complex tasks such as mathematics and coding. How- ever, these models frequently exhibit a phenomenon known as overthinking during inference, characterized by excessive validation loops and redundant deliberation, leading to substantial computational overheads. In this paper, we aim to mitigate overthinking by investigating the underlying mechanisms from the perspective of mechanistic interpretability. We first showcase that the tendency of overthinking can be effectively captured by a single direction in the model’s activation space and the issue can be eased by intervening the activations along this direction. How- ever, this efficacy soon reaches a plateau and even deteriorates as the intervention strength increases. We therefore systematically explore the activation space and find that the overthinking phenomenon is actually tied to a low-dimensional mani- fold, which indicates that the limited effect stems from the noises introduced by the high-dimensional steering direction. Based on this insight, we propose Manifold Steering , a novel approach that elegantly projects the steering direction onto the low-dimensional activation manifold given the theoretical approximation of the in- terference noise. Extensive experiments on DeepSeek-R1 distilled models validate that our method reduces output tokens by up to 71% while maintaining and even improving the accuracy on several mathematical benchmarks. Our method also exhibits robust cross-domain transferability, delivering consistent token reduction performance in code generation and knowledge-based QA tasks. Code is available at: https://github.com/Aries-iai/Manifold_Steering. 1 Introduction Building on the versatility of Large Language Models (LLMs) in text generation, particularly their emergent ability in chain-of-thought (CoT) reasoning [ 37], the field is now undergoing a transition toward Large Reasoning Models (LRMs). Exemplified by the OpenAI o-series [ 25] and the DeepSeek- R1 series [ 12], LRMs acquire internal capabilities for long-horizon reasoning through reinforcement learning with verifiable rewards. These models are able to explore diverse solution paths, reflect on potential errors, refine intermediate steps, and validate final outputs, mimicking the process of human problem-solving by scaling inference-time computations [ 25]. As a result, they excel in domains such as mathematics [ 1,20,35] and coding [ 24,38,39]. This makes them well-suited for tasks that demand deep logical analysis and paves the way for their applications in more complex scenarios, including web search [16] and research assistance [43]. However, despite the remarkable reasoning capabilities, LRMs often suffer from a critical efficiency issue known as overthinking [31], where they generate excessive and unnecessary reasoning steps, even for simple questions. For example, when tasked with a straightforward calculation, like “ 2 + 3 ” ∗Corresponding Authors Preprint. Under review. [8], an LRM might redundantly validate its approach or explore irrelevant alternatives, significantly increasing the computation overloads. This overthinking not only impacts inference latencies, posing great challenges for time-critical applications, but also risks degrading performance by entangling the model | https://arxiv.org/abs/2505.22411v1 |
in repetitive verification loops or unproductive reasoning paths [ 8,14,36]. To mitigate such overthinking in LRMs, several approaches [ 3,7,14,19] have recently been proposed. They often utilize external mechanisms to regulate reasoning and prevent overthinking, which can incur additional computational overhead for probing [ 14] or be susceptible to performance degradation due to the reliance on external models [ 19]. While these methods address overthinking from external and behavioral perspectives – relying on human-designed workflows and interventions, the underlying mechanism remains underexplored, posing significant challenges to achieving intrinsic mitigation. In this paper, we address the overthinking problem of LRMs through mechanistic interpretability [ 44], based on an in-depth analysis of their internal states. Specifically, we attribute this phenomenon to the distinctive activation patterns in the deeper layers of the model and identify a single, interpretable direction by comparing the differences in the activations between overthinking and concise reasoning. By manipulating the activations along this direction, we can effectively steer the model away from overthinking tendencies. However, this intervention is insufficient to fully resolve the problem. As in Fig. 2(a), the reduction in output tokens does not consistently scale with increasing intervention strength. This suggests that the computed steering direction is not accurate enough and introduces unintended interference noise . To address this issue, we further analyze the model’s activation patterns and find that the overthinking phenomenon is intrinsically tied to a low-dimensional manifold, which can be well approximated by a linear subspace. This result sheds light on why high-dimensional steering directions often introduce noises, as they fail to align with the underlying structure of model activations. To more effectively mitigate overthinking, we introduce a Manifold Steering method to align the steering direction with the reconstructed low-dimensional manifold. We first theoretically derive a linear approximation of the amplitudes of the interference noise and then project the steering direction by nullifying this approximated term. In this way, we can effectively purify the steering direction and better mitigate the overthinking issue with larger intervention strength, as depicted in Fig. 2(a). Extensive experiments on multiple DeepSeek-R1 distilled models [ 12] of different sizes verify the effectiveness of our manifold steering method. We first test it on mathematical datasets of varying difficulty, including GSM8K [ 9], Math500 [ 17], AMC2023 [ 21], and AIME2024 [ 22]. Our method achieves up to 71% tokens reduction while consistently maintaining or improving accuracy. Moreover, it exhibits robust cross-domain transferability, delivering consistent mitigation effects in tasks such as LiveCodeBench [ 15] (code generation) and Diamond-GPQA [ 29] (knowledge-based QA), surpassing existing methods in both overthinking mitigation and accuracy preservation. 2 Related Work Mechanistic Interpretability. Mechanistic interpretability [ 5,10,23,26,28,30,33,44] seeks to reverse-engineer the internal computations of LLMs to uncover the causal mechanisms underlying their behavior, offering fine-grained insights into learned representations and decision processes. A key technique within this framework involves identifying steering directions [26,30,33] – linear vectors in the activation space that correspond to specific model behaviors. By manipulating these directions during inference, researchers can precisely control outputs, such as ablating refusal behav- iors in safety-critical scenarios [ 2,40]. Similarly, Cao | https://arxiv.org/abs/2505.22411v1 |
et al. [ 6] proposed Bi-directional Preference Optimization (BiPO), leveraging steering vectors derived from contrasting human preference pairs to customize attributes like truthfulness and hallucination. These approaches highlight the versatility of steering directions in manipulating models’ behaviors. Our work extends this paradigm to address overthinking in LLMs [ 8,14,31], a phenomenon characterized by redundant or divergent reasoning trajectories. By analyzing the latent space, we identify a steering direction that encapsulates over- thinking and further propose manifold steering , a novel method that projects this direction onto a low-dimensional manifold to mitigate interference noise, thereby improving its performance. Overthinking Mitigation. Efforts [ 3,7,14,19,27] to mitigate overthinking in LRMs have gained traction as a means to enhance inference efficiency and output quality. Among them, the training- based method [ 27] tend to modify the reward function for length control in reinforcement learning. However, these incur significant computational costs and are orthogonal to inference-time interven- 2 tions like ours, thus warranting no direct comparison in this work. Existing training-free methods mainly rely on external mechanisms to regulate reasoning. For instance, Dynasor [ 14] employs periodic monitoring to detect and halt redundant reasoning, incurring computational overhead, while Thought Manipulation [ 19] uses auxiliary models to guide inference, limited by the external model’s performance. These shortcomings suggest that a more fundamental solution lies in understanding and modifying the model’s internal reasoning processes. Though some concurrent works [ 3,7] have tried to leverage mechanistic interpretability for achieving it, they only partially reduce overthinking, quickly encountering bottlenecks due to interference noise in high-dimensional steering directions. In contrast, we propose manifold steering to project the steering direction onto a low-dimensional manifold, effectively eliminates interference noise, achieving superior overthinking mitigation and substantial token reductions across diverse tasks, as demonstrated in Sec. 5.2. 3 Mechanistic Analysis of Overthinking In this section, we investigate the phenomenon of overthinking within the activation space of Large Reasoning Models (LRMs) and identify a general mechanism by which ablating a single direction in the activation space can reduce redundant reasoning steps to some extent. 3.1 Background Transformers. Decoder-only transformer language models [ 18,34] map an input token sequence x= [x1, . . . , x T]to a probability distribution over the vocabulary for next-token prediction. Each token xiis associated with a sequence of residual stream activations h(l)(xi)∈Rdacross Llayers, initialized by the token embedding h(0)(xi) = Embed (xi). At each layer l∈ {1, . . . , L }, the residual stream h(l)(xi)is updated by combining the previous layer’s activation h(l−1)(xi)with two components: (i) a multi-head self-attention mechanism, which computes a(l)(x1:i)by attending to prior tokens {xj:j≤i}using a causal mask to enforce autoregressive context flow; and (ii) a multi-layer perceptron (MLP), which applies non-linear transformations to the post-attention state h(l−1)(xi) +a(l)(x1:i)and produces m(l)(xi). The whole update is expressed as follows: h(l)(xi) =h(l−1)(xi) +a(l)(x1:i) +m(l)(xi),m(l)(xi) =MLP(h(l−1)(xi) +a(l)(x1:i)).(1) Through autoregressive aggregation, each h(l)(xi)aggregates context from prior tokens, with the final token’s residual stream h(l)(x) :→h(l)(xT)encapsulating the entire input’s context. Large Reasoning Models. LRMs are tailored for complex problem-solving and instruction-following, which leverage structured templates to handle user inputs: <|begin_of_sentence|><|User|>{instruction}<|Assistant|><think>\n where the | https://arxiv.org/abs/2505.22411v1 |
content following <think>\n comprises the model’s reasoning process and final answer, separated by </think> . Despite the excellent reasoning capabilities of these models, they often exhibit the overthinking phenomenon [ 8,11] during the reasoning process, characterized by repetitive validation or redundant deliberation. As a high-level cognitive phenomenon, overthinking may manifest in the model’s residual stream activations, similar to other abstract concepts such as safety [5] and honesty [ 44], as widely studied from the perspective of mechanistic interpretability. This suggests that overthinking and concise reasoning exhibit distinct activation patterns. In the next section, we systematically examine this hypothesis and investigate whether these activation differences are sufficient to identify a specific direction that characterizes overthinking – one that, if isolated, could be ablated to improve reasoning efficiency. 3.2 Extracting and Ablating an Overthinking Direction Before extracting an overthinking direction, we first investigate whether the residual stream activations corresponding to redundant and concise reasoning are separable in the model’s activation space, as this is a necessary condition for identifying a meaningful and controllable direction. Drawing on [ 14], we also focus on mathematical problems, where the overthinking phenomenon is particularly pronounced. To construct representative data, we first randomly sample questions from the OpenMathInstruct-2 3 Figure 1: Visualization of residual stream activations h(l)(x)forDredundant andDconcise across different layers of DeepSeek-R1-Distill-Qwen-7B (R1-7B). Early layers show considerable overlap between redundant and concise data, while middle-to-late layers exhibit distinct separation. training set [ 32]. For each model, five responses per question are independently generated. Based on these responses, we construct two model-specific datasets2as follows: •Redundant set Dredundant : consists of questions for which all five responses exceed 16k tokens and contain hesitation keywords (e.g., “ wait”, “alternatively ”, etc.) surpassing a specified number. •Concise set Dconcise : consists of questions for which all five responses are under 1k tokens and contain none of the hesitation keywords. As demonstrated in Fig. 1, we visualize the distribution of residual stream activations h(l)(x)for both Dredundant andDconcise across different layers of R1-7B. We observe that, while early layers exhibit substantial overlap between the two distributions, the middle-to-late layers display clear separation. This separation indicates that the overthinking phenomenon is more prominent in specific layers and provides empirical support for identifying a meaningful overthinking direction. We use the difference-in-means technique [ 4] for extracting the steering direction, which computes the mean difference in residual stream activations between the redundant and concise data for each layer l. The overthinking direction r(l)is then defined as: r(l)=1 |Dredundant |X x∈Dredundanth(l)(x)−1 |Dconcise|X x∈Dconciseh(l)(x), (2) where h(l)(x)denotes the residual stream activation of the final token of input xat layer l. The direction r(l)is normalized to unit length, i.e., r(l)=r(l)/∥r(l)∥2. Following [2], we also select the single most effective direction r(l∗)and apply it for intervention across all layers. Finally, to further explore the role of the overthinking direction r(l∗)in the model’s computations, we ablate the component aligned with r(l∗)each residual stream activation h. Specifically, the modified activation h′is computed as: h′=h−α×r(l∗)(r(l∗))⊤h, (3) where αcontrols the intervention strength. We apply this ablation to every activation h(l)(xi), across all layers land token | https://arxiv.org/abs/2505.22411v1 |
positions i. The parameter αallows adapting the extent of overthinking mitigation, balancing the reduction of redundant reasoning with the problem-solving accuracy. 4 Manifold Steering for Robust Intervention Following our mechanistic analysis in Sec. 3, which identifies a single direction capturing overthinking in the model’s activation space, we proceed to explore whether increasing the intervention strength α further reduces redundant reasoning, as expected. 4.1 Low-Dimensional Manifold Analysis To rigorously evaluate the effect of increasing intervention strength αfor the direction r(l∗), derived via Eq. (2), we test R1-7B’s performance on the Math500 dataset [ 17], a diverse mathematical test set, different from the anchor dataset used in Sec. 3.2. Formulation of Interference Noise. As illustrated in Fig. 2(a), increasing the intervention strength αinitially reduces the token count. However, beyond a certain threshold, the token count ceases 2Details on data selection and dataset composition are provided in the Appendix A. 4 to decrease, and as αcontinues to increase beyond 1.5, it rebounds, even nearly returning to levels observed without intervention. This suggests that the intervention direction r(l∗)may be imprecise and introduces unintended noise in the model’s activation space, which is defined as interference noise . Meanwhile, we confirm the model collapse caused by interference noise, as below: Instruction: What power of 4 is equal to 8? Express your answer. Response: 10000000000000000000000 ··· Thus, we can hypothesize that the r(l∗), computed via the difference-in-means method in Rd, com- prises both the overthinking direction roverthinking and an orthogonal interference component rother, such that r(l∗)=roverthinking +rother. The Eq. (3) actually modifies the activation as follows: h′(l)(xi) =h(l)(xi)−α (roverthinking )⊤h(l)(xi)roverthinking| {z } overthinking component+ (rother)⊤h(l)(xi)rother| {z } interference component .(4) Therotherterm perturbs h′(l)(xi), potentially disrupting unrelated capabilities such as normal expres- sion, especially for large α. This interference explains the token count rebound beyond α= 1.5, as the intervention affects dimensions irrelevant to overthinking. 3477 29352768 27322840 28423491 3824 3276 2239 876 858 835 831 824 05001000150020002500300035004000 0 0.1 0.3 0.5 0.7 0.9 1.5 2Direct Steering Manifold-aligned Steering αTokens (a) Performance on Math500 0.729 0.10.20.30.40.50.60.70.80.9 0 5 10 15 20 25 30 35 40Layer 1 Layer 5 Layer 10 Layer 15 Layer 20 Layer 25 Layer 27 Number of Principal Components (k)Cumulative Variance Ratio (b) Cumulative Variance Ratio of Activation Space Figure 2: (a) Performance of R1-7B with varying αfor di- rect and manifold steering on Math500. (b) Cumulative vari- ance ratio of R1-7B’s activation space on Dredundant across differ- ent hidden layers.Linear Low-Dimensional Manifold Verification. As shown above, the direct computation of difference in high-dimensional activation space leads to noisy estimation due to the existence of the interference part rother. A straightforward solution is to estimate the amplitude of rotherand remove its influence from the steering direction r(l∗). However, it is orthogonal to the overthink- ing direction roverthinking and is decided by the space of roverthinking . Inspired by prior work [ 13] that the activations in LLMs reside on a low-dimensional manifold M ⊂ Rd, it is reasonable to as- sume that roverthinking , representing the shift between activations of redundant and concise reasoning paths, also falls | https://arxiv.org/abs/2505.22411v1 |
into this mani- fold. To verify this, we employ a simple linear method – Principal Component Analysis (PCA), on the activations from the complete reasoning dataset Dreasoning =DredundantSDconcise at layer l. Let A(l)= [h(l)(x1), . . . ,h(l)(xN)]∈Rd×Ndenote the matrix of activation vectors h(l)(xi)∈Rdfor inputs xi∈Dreasoning . We compute the covariance matrix and its eigendecomposition as: C(l)=1 N−1A(l)(A(l)−¯A(l))⊤,C(l)=U(l)Λ(l)(U(l))⊤, (5) where ¯A(l)=1 NPN i=1h(l)(xi),U(l)∈Rd×dcontains the prin- cipal components, Λ(l)=diag(λ(l) 1, . . . , λ(l) d), and VR(k) = Pk i=1λ(l) iPd i=1λ(l) iis the variance ratio. As Fig. 2(b) shows, the top k= 10 components account for over 70% of the variance, indicating that the effective dimension of M, denoted deff, is significantly smaller than the ambient dimension d. This confirms the low-dimensional structure of M. This also suggests that the linear manifold composed by the orthogonal basis effec- tively captures the activations of reasoning trajectories and therefore overthinking direction roverthinking can be estimated using simple linear dimensionality reduction in this subspace. Eventually, this finding supports our earlier hypothesis (Eq. (2)) that the steering direction r(l∗)=roverthinking +rother includes an orthogonal interference component rother, which falls into M⊥. 4.2 Theoretical Analysis of Interference Noise As discussed in Sec. 4.1, the overthinking phenomenon is tied to the low-dimensional manifold structure of the activation space. The overthinking direction r(l∗), computed via Eq. (2), introduces an orthogonal interference component rotherdue to computation in high-dimensional spaces. When the 5 activation dimension dfar exceeds the sample size N(d≫N), interference noise even accumulates inM⊥, inflating rotherand disrupting the model’s other normal abilities. To further clarify the potential effects, we quantify this interference noise in the following theorem. Theorem 4.1. (Proof in Appendix B) Let PM=U(l)[:,1 :k](U(l)[:,1 :k])⊤be the projection ma- trix onto the low-dimensional manifold M, where U(l)[:,1 :k]contains top- kprincipal components of the activation covariance C(l)forDredundant (Eq. (5)). The expected noise norm of rotheris: E[∥rother∥2 2] =tr (I−PM)Σ(l) noise ,Σ(l) noise=C(l) |Dredundant |+C(l) |Dconcise|. (6) Ford≫k, the trace is significant, indicating that the interference noise is substantial and is greatly likely to disrupt the model’s normal abilities. The significant noise norm of rother, as established in Theorem 4.1, suggests that interventions using r(l∗)introduce considerable perturbations in M⊥. Moreover, these perturbations can propagate through layers, amplified by attention mechanisms, non-linear activations, and residual connections, leading to more substantial shifts in the activation distribution. To understand this, we further analyze the mean activation shift and its layer-wise amplification in the following theorem. Theorem 4.2. (Proof in Appendix B) Let r(l∗)androtherbe as in Theorem 4.1, and let the intervention be applied as in Eq. (4). The mean activation shift at layer land its amplification through layers are: ∆µ(l)=−α1 NNX i=1[(r(l∗))⊤h(l)(xi)]r(l∗),∥∆µ(l)∥2∝α∥rother∥2, (7) ∥∆µ(l+1)∥2≥γ∥∆µ(l)∥2+αγattnγσσmin(W(l+1))|(rother)⊤h(l)(xi)|∥rother∥2, (8) where αis the intervention strength, h(l)(xi)is the activation at layer l,W(l+1)denotes the combined MLP and attention weights, γattnandγσare the minimum amplification factors of the attention softmax and GeLU non-linearities, σmin(W(l+1))is the minimum singular value of the weights, and γ >1is the layer-wise amplification factor. Ford≫k, the shift in M⊥is significant and grows through layer-wise propagation, driven by attention and non-linear transformations, severely disrupting the model’s other normal abilities. | https://arxiv.org/abs/2505.22411v1 |
4.3 Manifold Steering The interference direction rother, quantified in Theorem 4.1, causes activation shifts that amplify through transformer layers and disrupt reasoning (Theorem 4.2). To eliminate this interference, a simple but effective approach is to set I−PMin Eq. (6) to 0. Based on this insight, we propose Manifold Steering , which projects the direction r(l∗)ontoMto mitigate rother. Formally, let U(l) eff∈Rd×kdenote the top- kprincipal components of the activation covariance in Eq. (5), spanning M. The manifold direction is obtained by: r(l∗) overthinking =PMr(l∗)=U(l) eff(U(l) eff)⊤r(l∗),r(l) overthinking =r(l) overthinking ∥r(l) overthinking ∥2, (9) where PM=U(l) eff(U(l) eff)⊤is the projection matrix onto M. Since r(l) overthinking ∈ M , where PM=I, the interference norm E[∥rother∥2 2] =tr (I−PM)Σ(l) noise =0, successfully eliminating perturbations in M⊥. The final intervention is then formulated as: h′(l)(x) =h(l)(x)−α×r(l) overthinking (r(l) overthinking )⊤h(l)(xi). (10) The performance of manifold steering is shown in Fig. 2(b) and Sec. 5.2, where we find that, unlike the original paradigm, our manifold steering enables a sustained reduction in token count. 6 Table 1: Performance of Manifold Steering compared to Vanilla, Dynasor, and SEAL on GSM8K, MATH500, AMC2023, and AIME2024 for varied LRMs. Metrics include Pass@1 (↑) and #Tokens (↓). Changes relative to Vanilla are shown in yellow for Pass@1 and blue for #Tokens. GSM8k MATH500 AMC2023 AIME2024Model MethodsPass@1 ( ↑, %) #Tokens ( ↓) Pass@1 ( ↑, %) #Tokens ( ↓) Pass@1 ( ↑, %) #Tokens ( ↓) Pass@1 ( ↑, %) #Tokens ( ↓) Vanilla 76.7 2035 76.4 4762 70.0 7089 26.7 11352 Dynasor 77.1 (+0.4) 1035 (-49%) 77.2 (+0.8) 3694 (-22%) 72.5 (+2.5) 6505 (-8%) 26.7 (+0.0) 10564 (-7%) SEAL 76.9 (+0.2) 1076 (-47%) 77.8 (+1.4) 3721 (-22%) 70.0 (+0.0) 6418 (-10%) 26.7 (+0.0) 10437 (-8%)R1-1.5B Ours 77.2 (+0.5) 593 (-71%) 78.6 (+2.2) 3458 (-27%) 72.5 (+2.5) 6236 (-12%) 30.0 (+3.3) 10134 (-11%) Vanilla 87.5 1143 88.2 3824 87.5 5871 50.0 10784 Dynasor 87.6 (+0.1) 732 (-36%) 88.2 (+0.0) 2723 (-29%) 85.0 (-2.5) 5121 (-13%) 46.7 (-3.3) 9864 (-9%) SEAL 87.7 (+0.2) 829 (-32%) 87.8 (-0.4) 2651 (-34%) 85.0 (-0.0) 4750 (-19%) 46.7 (-3.3) 9394 (-13%)R1-7B Ours 87.6 (+0.1) 440 (-62%) 88.4 (+0.2) 2239 (-42%) 87.5 (+0.0) 4440 (-24%) 53.3 (+3.3) 8457 (-22%) Vanilla 82.7 1217 87.8 4009 85.0 5723 33.3 11278 Dynasor 82.9 (+0.2) 826 (-32%) 88.0 (+0.2) 3171 (-21%) 82.5 (-2.5) 5019 (-12%) 46.7 (+13.4) 9901 (-12%) SEAL 82.7 (+0.0) 749 (-38%) 87.4 (-0.4) 3091 (-23%) 85.0 (+0.0) 4731 (-17%) 46.7 (+13.4) 9789 (-13%)R1-8B Ours 82.8 (+0.1) 542 (-55%) 88.0 (+0.2) 2873 (-29%) 85.0 (+0.0) 4400 (-23%) 50.0 (+16.7) 9457 (-16%) Vanilla 93.2 742 92.8 3496 90.0 5484 66.7 9986 Dynasor 93.4 (+0.2) 596 (-20%) 92.6 (-0.2) 3233 (-8%) 92.5 (+2.5) 4817 (-12%) 63.3 (-3.4) 8941 (-11%) SEAL 93.6 (+0.2) 583 (-21%) 92.8 (+) 3139 (-10%) 87.5 (-2.5) 4470 (-18%) 60.0 (-6.7) 8563 (-14%)R1-14B Ours 93.6 (+0.4) 438 (-41%) 92.8 (+0.0) 2074 (-41%) 90.0 (+0.0) 4061 (-26%) 63.3 (-3.4) 8132 (-19%) Tokens TokensAccuracy (%) Accuracy (%) LiveCodeBench GPQA -Diamond12% 27%13% 19%13% 15% 13% 17% 0.5%1.0%2.0%2.0% 1.3%3.5%0.5% Figure 3: Cross-domain performance of Manifold Steering for overthinking mitigation on Live- CodeBench (code | https://arxiv.org/abs/2505.22411v1 |
generation) and GPQA-Diamond (disciplinary knowledge). 5 Experiments 5.1 Experimental Setups We begin by briefly outlining the baseline methods, target LRMs, evaluation datasets, and metrics. For more detailed descriptions of the experimental settings, please refer to Appendix A. Baseline Methods. We compare our manifold steering with two latest baselines, including Dyna- sor [14] and SEAL [ 7], both chosen for their ability to maintain the model’s original accuracy. For their settings, we both adopt its official setting. To be aware, Dynasor’s early stopping often omits the problem-solving process in the final answer, which is impractical for real-world applications. Thus, we require the model to provide a complete solution upon stopping. Target LRMs. For a comprehensive evaluation, we select the DeepSeek-R1-Distilled series [ 12], comprising models of varying scales and architectures: DeepSeek-R1-Distill-Qwen (R1-1.5B, R1- 7B, R1-14B) and DeepSeek-R1-Distill-Llama-8B (R1-8B). All models use recommended settings: temperature of 0.6, top-p of 0.95, and a maximum token limit of 16,384. Evaluation Datasets & Metrics. To evaluate the effectiveness of Manifold Steering, we include mathematical datasets of varying difficulty: GSM8K [ 9], MATH500 [ 17], AMC2023 [ 21], and AIME2024 [ 22]. To further verify the transferability, we use LiveCodeBench [ 15] for code generation and GPQA-Diamond [ 29] for expert-level disciplinary knowledge. All datasets are evaluated using Pass@1 as the task-solving metric and the average token count ( #Tokens ) for overthinking mitigation. Implementation Details. The data for computing steering directions is filtered using the method outlined in Sec. 3 on the OpenMathInstruct2 dataset [ 32]. For each model, the layer used for steering direction computation and the intervention strength αare as follows: R1-1.5B (layer 27, α= 0.7), R1-7B (layer 27, α= 0.3), R1-8B (layer 31, α= 0.5), and R1-14B (layer 47, α= 0.3). 5.2 Performance of Manifold Steering in Overthinking Mitigation We conduct experiments on four mathematical datasets of varying difficulty using four LRMs with different parameter sizes and architectures. Table 1 presents the results, where models are evaluated for accuracy and redundancy reduction. Based on Table 1, we draw the following observations: 7 “ Convert the point 0,3 in rectangular coordinates to polar coordinates. Enter your answer in the form 𝑟,𝜃, where 𝑟 > 0 and 0 ≤𝜃< Τ𝟐𝝅. ” Token s: 1475 “ Okay, so I need to convert the rectangular coordinate (0,3) to polar coordinates. Hmm ,I remember that polar coordinates…... But wait , I also remember that sometimes…… Wait a second, just to double -check , sometimes people use different notations…… So, I'm pretty confident that (3, π/2) is the correct polar coordinate representation of the point (0,3). ” Token s: 538 “ First , I need to determine the polar coordinates (r, θ) for the rectangular point (0, 3). To find r , I‘ll use the…… Next, I’ll calculate the angle…… To convert the rectangular coordinate…… Combining the values of r and θ : (r, θ) = (3, π/2). Final Answer…… ”Standard α = 0.3 α = - 0.3 Token s: 1708 “ Alright, so I need to convert the rectangular coordinates (0, 3) to polar coordinates. Hmm, okay, I remember…… | https://arxiv.org/abs/2505.22411v1 |
Hmm, arctan(3/0). Wait, division by zero is undefined. Hmm, that might be a problem……. Wait, is that correct? Let me double -check …… Wait, another way to think about it: if I were to draw a line…… But just to be extra sure, let me recall the conversion formulas …... Wait, just to make sure I didn‘t mix up anything , let me recall another way to find θ…… I think I’m confident that the polar coordinates are (3, π/2). Wait, just another thought. If I were to plot this…… Thus, the polar coordinates are: (3, π/2). ” α = - 0.5 Token s: 2284 “ Alright, so I need to convert the point (0, 3) from rectangular (or Cartesian) coordinates to polar coordinates. Hmm, okay. Let me recall what polar coordinates are…… But wait, in this case, x is 0. So…… Hmm, so I can‘t just plug in 0…… But let me think about it a bit more to make sure I’m not making a mistake. So, in the formula…... Alternatively, if the point were on the negative y -axis……Wait, let me check if there‘s another way to compute…… Alternatively, I can think of the unit circle ……. Hmm, that seems straightforward . But just to make sure I didn’t make any mistakes , let me recall another way to…… Okay, so I think I‘ve double -checked that …… Wait, just to be thorough ,let me think about another way to convert…… Thus, the polar coordinates are: (3, π/2). ”“ First , I need to determine the…… Next, I'll calculate the angle…… To convert the rectangular coordinates…… Combining the values of r and θ, the polar coordinates are (3, π/2). ”α = 0.5 Token s: 501Figure 4: An example of steering overthinking in model outputs. Forward steering yields concise, confident responses, eliminating hesitant phrases, while reverse steering induces verbose outputs. Manifold steering achieves the best performance across all models and datasets. Our method consistently outperforms baselines on four out-of-distribution mathematical datasets, with particularly strong results on GSM8K, where it achieves token reduction of 41% ∼71% while preserving accuracy. This is reasonable, as unlike Dynasor, which relies on external monitoring of the model’s certainty, our method modifies model outputs at the more fundamental feature level to mitigate overthinking behavior. Moreover, Dynasor’s reliance on external monitoring brings extra computational overhead. We include a comparison of average time cost to demonstrate this drawback in Appendix D, while our method incurs nearly no latency. Compared to SEAL, our manifold steering effectively reduces interference noise, yielding a more precise direction. Additionally, we observe that the overthinking phenomenon diminishes to some extent as model parameter size increases, which is expected, as some overthinking stems from models’ inability to solve complex problems. Overthinking is more pronounced in simpler problems. As presented in Table 1, all methods exhibit more effective overthinking mitigation on simpler datasets, with GSM8K and MATH500 ( ∼ 40%) showing greater token reduction compared to the more complex AMC2023 and AIME2024 datasets ( ∼20%). This suggests that overthinking is more pronounced in simpler problems, which is | https://arxiv.org/abs/2505.22411v1 |
reasonable, as complex problems inherently require larger token budgets and may exceed the models’ internal capabilities, thereby constraining mitigation effectiveness. 5.3 Cross-Domain Transferability for Overthinking Mitigation To further investigate the transferability of manifold steering for overthinking mitigation, we assess its performance across two distinct domains: code generation and discipline-specific knowledge, both separate from the mathematical domain used for steering direction extraction. We utilize two representative datasets: 1) LiveCodeBench [15], a benchmark of coding challenges that probe algorithmic and programming expertise, and 2) GPQA-Diamond [29], a carefully curated dataset of challenging multiple-choice questions targeting expert-level disciplinary knowledge across various fields. As shown in Fig. 3, our manifold steering achieves token reduction of 12% ∼27% across both datasets while maintaining accuracy, demonstrating the generalizability of manifold steering to diverse domains. This cross-domain effectiveness offers multiple benefits: it incurs no additional computational overhead, adapts seamlessly to varied problem structures, and effectively mitigates overthinking without requiring domain-specific fine-tuning. 5.4 Directional Analysis and Hyperparameter Tuning In this section, we first explore the precise impact of the direction computed by manifold steering on model outputs through case studies, analyzing how steering and its reversal affect response characteristics to better understand directionality’s role. Then, we conduct hyperparameter tuning. 8 Directional Analysis. As shown in Fig. 4, applying the steering direction for overthinking mitigation leads to model outputs that are significantly more concise and confident. Specifically, overthinking behaviors, such as hesitant phrases (e.g., “wait”), frequent shifts in reasoning (e.g., “alternatively”), and repetitive self-checking, are largely eliminated. The model generates streamlined responses with clear, focused reasoning, delivering direct outputs. This effect strengthens as the intervention strength increases to 0.5. In contrast, when reverse steering is applied, the model becomes markedly more hesitant, often repeatedly checking. This leads to verbose outputs filled with excessive caution. Thus, it is crucial to underscore the role of directionality for overthinking. 88.2 89.4 88.4 71.0 66.4 66.4 3824 3276 2239 876 858835 010002000300040005000 0.020.040.060.080.0100.0 0 0.1 0.3 0.5 0.7 0.9Accuracy TokensAccuracy (%)Tokens 𝛼 Figure 5: Hyperparameter tun- ing for strength αin R1-7BHyperparameter Tuning. We use R1-7B model on MATH500 for this analysis, with results for other models in Appendix C. As shown in Fig. 5, our manifold steering direction demonstrates ef- ficacy at a much lower strength of α= 0.1. Asαincreases, token counts continue to decrease, with a remarkable 77.1% reduction observed at α= 0.5. This substantial token reduction highlights the purity and effectiveness of our steering direction in mitigating overthinking. However, excessively rapid reasoning, induced by intervention strengths, can hinder the model’s ability to thoroughly address complex problems, a phenomenon also observed in human cognition, leading to a decline in accuracy. To balance the trade- off between overthinking mitigation and maintaining accuracy, we select an intervention strength of α= 0.3as the optimal value for robust performance. 5.5 Cross-Task Transferability of Manifold Steering 0 240646874 04547296 100 020406080100 0 0.4 0.8 1.2 1.6 2Baseline Ours αJSR (%) Figure 6: JSR of baseline and ours on Advbench.In this section, we investigate the applicability of manifold steering to tasks beyond overthinking mitigation, such as refusal feature ab- lation, | https://arxiv.org/abs/2505.22411v1 |
to assess its cross-task transferability. Prior studies [ 2,40] demonstrate that while steering directions can suppress refusal fea- tures in models, some instances persist unless intervention strength is increased, which risks model collapse. Here, we apply our man- ifold steering method using the Qwen2.5-7B-Instruct as the target LLM, computing the steering direction with the same data as in [ 2]. As shown in Fig. 6, our method achieves a 100% jailbreak success rate (JSR) on AdvBench [ 45] while the baseline [ 2] obtains a JSR of 74% ( α= 2.0), with all responses verified as valid through manual check, which further validates the robust transferability of manifold steering across diverse tasks and underscores the urgent need for enhanced safety alignment efforts [ 41,42] to ensure responsible AI. 6 Discussion and Limitations Our proposed manifold steering method has demonstrated robust effectiveness in mitigating overthink- ing, as evidenced by significant token reductions across varying LRMs. However, its applicability to multi-modal large language models remains unexplored. Additionally, while our approach excels in controlling overthinking with minimal accuracy trade-offs, its interaction with highly specialized tasks, such as domain-specific reasoning, e.g., legal or medical analysis, warrants further investiga- tion. Moreover, the sensitivity of our method to varying intervention strengths suggests potential for optimizing dynamic steering strategies, where the strength adapts to task complexity in real-time. 7 Conclusion In this work, we propose manifold steering, a novel method to address overthinking in LRMs while preserving task performance without additional computational cost. Specifically, by aligning the steering direction with the low-dimensional activation manifold, our approach effectively eliminates the interference noise based on theoretical analysis. Extensive experiments across diverse models and datasets confirm substantial token reductions and robust cross-task transferability. These findings underscore the potential of manifold steering to enhance model efficiency and adaptability, opening new avenues for improving LRMs. 9 References [1]Janice Ahn, Rishu Verma, Renze Lou, Di Liu, Rui Zhang, and Wenpeng Yin. Large language models for mathematical reasoning: Progresses and challenges. arXiv preprint arXiv:2402.00157 , 2024. [2]Andy Arditi, Oscar Balcells Obeso, Aaquib Syed, Daniel Paleka, Nina Rimsky, Wes Gurnee, and Neel Nanda. Refusal in language models is mediated by a single direction. In The Thirty-eighth Annual Conference on Neural Information Processing Systems , 2024. [3]David D Baek and Max Tegmark. Towards understanding distilled reasoning models: A representational approach. arXiv preprint arXiv:2503.03730 , 2025. [4]Nora Belrose. Diff-in-means concept editing is worst-case optimal: Explaining a result by Sam Marks and Max Tegmark, 2023. https://blog.eleuther.ai/diff-in-means/ , 2023. Accessed: May 20, 2024. [5]Leonard Bereska and Efstratios Gavves. Mechanistic interpretability for ai safety–a review. arXiv preprint arXiv:2404.14082 , 2024. [6]Yuanpu Cao, Tianrong Zhang, Bochuan Cao, Ziyi Yin, Lu Lin, Fenglong Ma, and Jinghui Chen. Personalized steering of large language models: Versatile steering vectors through bi-directional preference optimization. Advances in Neural Information Processing Systems , 37:49519–49551, 2024. [7]Runjin Chen, Zhenyu Zhang, Junyuan Hong, Souvik Kundu, and Zhangyang Wang. Seal: Steer- able reasoning calibration of large language models for free. arXiv preprint arXiv:2504.07986 , 2025. [8]Xingyu Chen, Jiahao Xu, Tian Liang, Zhiwei He, Jianhui Pang, Dian Yu, Linfeng Song, Qiuzhi Liu, Mengfei Zhou, | https://arxiv.org/abs/2505.22411v1 |
Zhuosheng Zhang, et al. Do not think that much for 2+ 3=? on the overthinking of o1-like llms. arXiv preprint arXiv:2412.21187 , 2024. [9]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168 , 2021. [10] Arthur Conmy, Augustine Mavor-Parker, Aengus Lynch, Stefan Heimersheim, and Adrià Garriga-Alonso. Towards automated circuit discovery for mechanistic interpretability. Advances in Neural Information Processing Systems , 36:16318–16352, 2023. [11] Alejandro Cuadron, Dacheng Li, Wenjie Ma, Xingyao Wang, Yichuan Wang, Siyuan Zhuang, Shu Liu, Luis Gaspar Schroeder, Tian Xia, Huanzhi Mao, et al. The danger of overthinking: Examining the reasoning-action dilemma in agentic tasks. arXiv preprint arXiv:2502.08235 , 2025. [12] DeepSeek-AI. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning, 2025. [13] Joshua Engels, Isaac Liao, Eric J Michaud, Wes Gurnee, and Max Tegmark. Not all language model features are linear. arXiv e-prints , pages arXiv–2405, 2024. [14] Yichao Fu, Junda Chen, Siqi Zhu, Zheyu Fu, Zhongdongming Dai, Aurick Qiao, and Hao Zhang. Efficiently serving llm reasoning programs with certaindex. arXiv preprint arXiv:2412.20993 , 2024. [15] Naman Jain, King Han, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Ar- mando Solar-Lezama, Koushik Sen, and Ion Stoica. Livecodebench: Holistic and contamination free evaluation of large language models for code. arXiv preprint arXiv:2403.07974 , 2024. [16] Xiaoxi Li, Jiajie Jin, Guanting Dong, Hongjin Qian, Yutao Zhu, Yongkang Wu, Ji-Rong Wen, and Zhicheng Dou. Webthinker: Empowering large reasoning models with deep research capability. arXiv preprint arXiv:2504.21776 , 2025. 10 [17] Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step. arXiv preprint arXiv:2305.20050 , 2023. [18] Peter J Liu, Mohammad Saleh, Etienne Pot, Ben Goodrich, Ryan Sepassi, Lukasz Kaiser, and Noam Shazeer. Generating wikipedia by summarizing long sequences. arXiv preprint arXiv:1801.10198 , 2018. [19] Yule Liu, Jingyi Zheng, Zhen Sun, Zifan Peng, Wenhan Dong, Zeyang Sha, Shiwen Cui, Weiqiang Wang, and Xinlei He. Thought manipulation: External thought can be efficient for large reasoning models. arXiv preprint arXiv:2504.13626 , 2025. [20] Haipeng Luo, Qingfeng Sun, Can Xu, Pu Zhao, Jianguang Lou, Chongyang Tao, Xiubo Geng, Qingwei Lin, Shifeng Chen, and Dongmei Zhang. Wizardmath: Empowering mathematical rea- soning for large language models via reinforced evol-instruct. arXiv preprint arXiv:2308.09583 , 2023. [21] Mathematical Association of America. American mathematics competitions (amc) 10 and 12, 2023. Problems and Answer Keys, 2023. [22] Mathematical Association of America. American invitational mathematics examination (aime) i and ii, 2024. Problems and Answer Keys, 2024. [23] Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, and Jacob Steinhardt. Progress measures for grokking via mechanistic interpretability. arXiv preprint arXiv:2301.05217 , 2023. [24] Ansong Ni, Miltiadis Allamanis, Arman Cohan, Yinlin Deng, Kensen Shi, Charles Sutton, and Pengcheng Yin. Next: Teaching large language models to reason about code execution. arXiv preprint arXiv:2404.14662 , 2024. [25] OpenAI. Learning to reason with LLMs, 2024. [26] Nina Panickssery, Nick Gabrieli, Julian Schulz, Meg Tong, Evan | https://arxiv.org/abs/2505.22411v1 |
Hubinger, and Alexander Matt Turner. Steering llama 2 via contrastive activation addition. arXiv preprint arXiv:2312.06681 , 2023. [27] Xiao Pu, Michael Saxon, Wenyue Hua, and William Yang Wang. Thoughtterminator: Bench- marking, calibrating, and mitigating overthinking in reasoning models. arXiv preprint arXiv:2504.13367 , 2025. [28] Daking Rai, Yilun Zhou, Shi Feng, Abulhair Saparov, and Ziyu Yao. A practical review of mech- anistic interpretability for transformer-based language models. arXiv preprint arXiv:2407.02646 , 2024. [29] David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Dirani, Julian Michael, and Samuel R. Bowman. GPQA: A graduate-level google-proof q&a benchmark. In First Conference on Language Modeling , 2024. [30] Nishant Subramani, Nivedita Suresh, and Matthew E Peters. Extracting latent steering vectors from pretrained language models. arXiv preprint arXiv:2205.05124 , 2022. [31] Yang Sui, Yu-Neng Chuang, Guanchu Wang, Jiamu Zhang, Tianyi Zhang, Jiayi Yuan, Hongyi Liu, Andrew Wen, Shaochen Zhong, Hanjie Chen, et al. Stop overthinking: A survey on efficient reasoning for large language models. arXiv preprint arXiv:2503.16419 , 2025. [32] Shubham Toshniwal, Wei Du, Ivan Moshkov, Branislav Kisacanin, Alexan Ayrapetyan, and Igor Gitman. Openmathinstruct-2: Accelerating ai for math with massive open-source instruction data. arXiv preprint arXiv:2410.01560 , 2024. [33] Alexander Matt Turner, Lisa Thiergart, Gavin Leech, David Udell, Juan J Vazquez, Ulisse Mini, and Monte MacDiarmid. Steering language models with activation engineering. arXiv preprint arXiv:2308.10248 , 2023. 11 [34] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems , 30, 2017. [35] Yiming Wang, Pei Zhang, Jialong Tang, Haoran Wei, Baosong Yang, Rui Wang, Chenshu Sun, Feitong Sun, Jiran Zhang, Junxuan Wu, et al. Polymath: Evaluating mathematical reasoning in multilingual contexts. arXiv preprint arXiv:2504.18428 , 2025. [36] Yue Wang, Qiuzhi Liu, Jiahao Xu, Tian Liang, Xingyu Chen, Zhiwei He, Linfeng Song, Dian Yu, Juntao Li, Zhuosheng Zhang, et al. Thoughts are all over the place: On the underthinking of o1-like llms. arXiv preprint arXiv:2501.18585 , 2025. [37] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems , 35:24824–24837, 2022. [38] Dayu Yang, Tianyang Liu, Daoan Zhang, Antoine Simoulin, Xiaoyi Liu, Yuwei Cao, Zhaopu Teng, Xin Qian, Grey Yang, Jiebo Luo, et al. Code to think, think to code: A survey on code-enhanced reasoning and reasoning-driven code intelligence in llms. arXiv preprint arXiv:2502.19411 , 2025. [39] Dian Yu, Baolin Peng, Ye Tian, Linfeng Song, Haitao Mi, and Dong Yu. Siam: Self- improving code-assisted mathematical reasoning of large language models. arXiv preprint arXiv:2408.15565 , 2024. [40] Lei Yu, Virginie Do, Karen Hambardzumyan, and Nicola Cancedda. Robust LLM safeguarding via refusal feature adversarial training. In The Thirteenth International Conference on Learning Representations , 2025. [41] Yichi Zhang, Zihao Zeng, Dongbai Li, Yao Huang, Zhijie Deng, and Yinpeng Dong. Realsafe- r1: Safety-aligned deepseek-r1 without compromising reasoning capability. arXiv preprint arXiv:2504.10081 , 2025. [42] Yichi Zhang, Siyuan Zhang, Yao Huang, Zeyu Xia, Zhengwei Fang, | https://arxiv.org/abs/2505.22411v1 |
Xiao Yang, Ranjie Duan, Dong Yan, Yinpeng Dong, and Jun Zhu. Stair: Improving safety alignment with introspective reasoning. arXiv preprint arXiv:2502.02384 , 2025. [43] Yuxiang Zheng, Dayuan Fu, Xiangkun Hu, Xiaojie Cai, Lyumanshan Ye, Pengrui Lu, and Pengfei Liu. Deepresearcher: Scaling deep research via reinforcement learning in real-world environments. arXiv preprint arXiv:2504.03160 , 2025. [44] Andy Zou, Long Phan, Sarah Chen, James Campbell, Phillip Guo, Richard Ren, Alexander Pan, Xuwang Yin, Mantas Mazeika, Ann-Kathrin Dombrowski, et al. Representation engineering: A top-down approach to ai transparency. arXiv preprint arXiv:2310.01405 , 2023. [45] Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models. arXiv preprint arXiv:2307.15043 , 2023. 12 A Implement Details In this section, we will introduce the implementation details of our approach, focusing on the data selection process for computing the steering direction to mitigate overthinking in each model and the specific configurations of the baseline methods used for comparison. A.1 Data Selection for Direction Computation To construct representative datasets for computing the steering direction to mitigate overthinking, we begin by randomly sampling 20k questions from the OpenMathInstruct-2 training set [ 32]. For each model, we generate five independent responses per question using the official sampling configuration: a temperature of 0.6, top-p of 0.95, and a maximum length of 16k tokens. These responses form the basis for constructing two model-specific datasets, the Redundant set (Dredundant ) and the Concise set(Dconcise ), as described below: •Redundant set ( Dredundant ):This dataset includes questions where all five responses exceed 16k tokens without terminating and contain more than 20 times of hesitation keywords (e.g., “wait”, “alternatively”, etc.). To capture meaningful overthinking behavior, we process the responses using the following template, truncating the response at the occurrence of the hesitation keyword: <|begin_of_sentence|><|User|>{instruction}<|Assistant|><think>\n {partial_response}{hesitation keyword} The truncation at a hesitation keyword is reasonable because overthinking typically emerges after a certain point in the response, rather than immediately upon encountering the question. Moreover, through activation visualization, we observe no significant differences in the activation patterns of different hesitation keywords. Thus we choose “wait” as a consistent marker here. •Concise set ( Dconcise ):This dataset includes questions where all five responses are under 1k tokens and contain none of the hesitation keywords. The template for these responses includes only the instruction without the response, as they inherently represent concise and focused outputs: <|begin_of_sentence|><|User|>{instruction}<|Assistant|><think>\n These selection criteria ensure that Dredundant captures responses exhibiting excessive verbosity and hesitation, while Dconcise represents efficient and direct responses, providing a clear contrast for computing the steering direction representing overthinking. To ensure high-quality data, we retain only 500 samples for each dataset after applying the selection criteria and double checking. For computing the steering direction, we follow [ 44] to sample 100 samples from each dataset and employ the IsolationForest algorithm to filter out outliers. For manifold subspace estimation, we utilize the entire set of 500 samples from each dataset to capture the full representational structure. A.2 Baseline Methods As stated in Sec. 5.1, we select two latest baselines, Dynasor [ 14] | https://arxiv.org/abs/2505.22411v1 |
and SEAL [ 7], for their ability to preserve the original accuracy in reasoning tasks. Below, we detail the specific settings for them: General Setting. All large reasoning models adopt the official recommended settings with a temperature of 0.6, top-p of 0.95, and a maximum length of 16k tokens. Dynasor. We adopt the official settings for Dynasor. The configuration probes the model every 32 tokens with a “Probe-In-The-Middle” technique and injects a “Final Answer” prompt at each iteration to ensure complete solutions upon early termination. Generation stops when the Certaindex metric (˜H) exceeds a predefined confidence threshold. To be aware, Dynasor’s early stopping often omits the problem-solving process in the final answer, which is impractical for real-world applications. Thus, we require the model to provide a complete solution in the final answer upon stopping. SEAL. We adopt the official settings for SEAL [ 7], using 1k training samples from the Math dataset [ 17] to extract the reasoning steering vector. Reasoning processes are segmented into thoughts using “\n\n” delimiters, classified as execution, reflection, or transition via keyword-based rules 13 (e.g., “Alternatively” for transition, “Wait” for reflection). The steering vector is computed at layer 20 as S=¯HE−¯HRT, where ¯HEand¯HRTare average representations of execution and reflection/transition thoughts, respectively. During greedy decoding, hidden states of “\n\n” tokens at layer 20 are adjusted as ˜H=H+ 1.0·S. B Proofs B.1 Proof of Theorem 4.1 Proof. We derive the expected noise norm of the interference component rother, the part of the overthinking direction r(l∗)in the orthogonal complement M⊥of the low-dimensional manifold M. The theorem states: E[∥rother∥2 2] =tr (I−PM)Σ(l) noise ,Σ(l) noise=C(l) |Dredundant |+C(l) |Dconcise|, where PM=U(l)[:,1 :k](U(l)[:,1 :k])⊤, andU(l)[:,1 :k]are the top- kprincipal components of the activation covariance C(l). We build on prior findings that Mis low-dimensional, identified via PCA on Dreasoning =Dredundant ∪Dconcise , with k= 10 capturing over 70% of the variance, validating the linear manifold assumption. Step 1: Define the overthinking direction r(l∗).Per Eq. (2), r(l∗)=roverthinking +rother, where roverthinking ∈ M captures the shift between redundant and concise reasoning, and rother∈ M⊥is interference. We model: r(l∗)=1 |Dredundant |X xi∈Dredundanth(l)(xi)−1 |Dconcise|X xi∈Dconciseh(l)(xi). Assume activations h(l)(xi)∼ N(µset,C(l)), with µredundant orµconcise for each dataset, and C(l) estimated over Dreasoning . The covariance is: E[r(l∗)r(l∗)⊤] =C(l) |Dredundant |+C(l) |Dconcise|. Step 2: Define Mand derive I−PM.The manifold Mis spanned by the top- keigenvec- tors of C(l)=1 N−1A(l)(A(l)−¯A(l))⊤, where A(l)= [h(l)(x1), . . . ,h(l)(xN)], and ¯A(l)= 1 NPN i=1h(l)(xi). The eigendecomposition C(l)=U(l)Λ(l)(U(l))⊤yields U(l)[:,1 :k], and: PM=U(l)[:,1 :k](U(l)[:,1 :k])⊤. The projection onto M⊥isI−PM, as it removes the M-component. Since U(l)[:,1 :k]is orthonormal, PMis idempotent and symmetric, so: (I−PM)2=I−PM,(I−PM)⊤=I−PM. PCA’s linear basis ensures M⊥captures the d−kdimensions of noise, critical when d≫k. Step 3: Define rother.Since roverthinking ∈ M , the interference is: rother= (I−PM)r(l∗). This isolates noise in M⊥, which disrupts normal abilities due to high-dimensional computation. Step 4: Compute the squared norm. Calculate: ∥rother∥2 2= [(I−PM)r(l∗)]⊤(I−PM)r(l∗)=r(l∗)⊤(I−PM)r(l∗), using the idempotence of I−PM. Step 5: Take the expectation. Compute: E[∥rother∥2 2] =E[r(l∗)⊤(I−PM)r(l∗)] =tr((I−PM)E[r(l∗)r(l∗)⊤]). 14 Substitute: E[r(l∗)r(l∗)⊤] =Σ(l) noise=C(l) |Dredundant |+C(l) |Dconcise|. Thus: E[∥rother∥2 2] =tr (I−PM)Σ(l) noise . Step 6: Analyze for | https://arxiv.org/abs/2505.22411v1 |
d≫k.With k= 10 ,I−PMprojects onto d−k≈ddimensions. The trace: tr((I−PM)C(l)) =dX i=k+1λ(l) i, scaled by1 |Dredundant|+1 |Dconcise|, sums the eigenvalues in M⊥. Since 30% of the variance remains in d−kdimensions, and d≫N, the trace is large, indicating significant noise in rother. B.2 Proof of Theorem 4.2 Proof. We derive the mean activation shift ∆µ(l)at layer ldue to the intervention along the over- thinking direction r(l∗), showing its norm is proportional to α∥rother∥2, and establish the layer-wise amplification of the shift at layer l+ 1. The theorem builds on Theorem 4.1, where rother∈ M⊥ introduces significant noise when d≫k, and the intervention is applied as in Eq. (4). Step 1: Derive the mean activation shift. The intervention at layer lis: h(l)′(xi) =h(l)(xi)−α[(r(l∗))⊤h(l)(xi)]r(l∗), withα >0. The mean activation before intervention is: µ(l)=1 NNX i=1h(l)(xi), and post-intervention: µ(l)′=1 NNX i=1h(l)′(xi) =1 NNX i=1 h(l)(xi)−α[(r(l∗))⊤h(l)(xi)]r(l∗) . Compute: µ(l)′=µ(l)−α1 NNX i=1[(r(l∗))⊤h(l)(xi)]r(l∗). The mean shift is: ∆µ(l)=µ(l)′−µ(l)=−α1 NNX i=1[(r(l∗))⊤h(l)(xi)]r(l∗), matching Eq. (7). Step 2: Compute the norm of the mean shift. Let: s=1 NNX i=1[(r(l∗))⊤h(l)(xi)]. Then: ∆µ(l)=−αsr(l∗),∥∆µ(l)∥2=α|s|∥r(l∗)∥2. Since r(l∗)=rM+rother, and Theorem 4.1 shows rotherdominates when d≫k, we approximate: ∥r(l∗)∥2=q ∥rM∥2 2+∥rother∥2 2≈ ∥rother∥2, as∥rother∥2 2≫ ∥rM∥2 2fork≪d. Assume h(l)(xi)∼ N (µset,C(l)). The projection (r(l∗))⊤h(l)(xi)has non-zero expectation due to r(l∗)’s alignment with activation differences, so |s| is a positive constant depending on the variance. Thus: ∥∆µ(l)∥2∝α∥rother∥2. 15 Step 3: Derive the layer-wise amplification. For layer l+ 1, the activation is: h(l+1)(xi) =σ W(l+1)Attn(h(l)(xi)) , and post-intervention: h(l+1)′(xi) =σ W(l+1)Attn(h(l)′(xi)) , where W(l+1)combines MLP and attention weights, Attn is the attention mechanism, and σis GeLU. The mean shift is: ∆µ(l+1)=µ(l+1)′−µ(l+1),µ(l+1)′=1 NNX i=1h(l+1)′(xi),µ(l+1)=1 NNX i=1h(l+1)(xi). To compute the norm, linearize the perturbation. The single-input shift at layer lis: ∆h(l)(xi) =h(l)′(xi)−h(l)(xi) =−α[(r(l∗))⊤h(l)(xi)]r(l∗). Its norm is: ∥∆h(l)(xi)∥2=α|(r(l∗))⊤h(l)(xi)|∥r(l∗)∥2≈α|(rother)⊤h(l)(xi)|∥rother∥2, sincer(l∗)≈rother. Propagate to layer l+ 1: ∆h(l+1)(xi) =h(l+1)′(xi)−h(l+1)(xi)≈σ′ W(l+1)Attn′(h(l)(xi))∆h(l)(xi) , where Attn′andσ′are the Jacobians of attention and GeLU. The attention softmax and GeLU have minimum amplification factors γattn, γσ>0, and the linear transformation by W(l+1)satisfies: ∥W(l+1)x∥2≥σmin(W(l+1))∥x∥2. Thus: ∥∆h(l+1)(xi)∥2≥γattnγσσmin(W(l+1))∥∆h(l)(xi)∥2. Substitute: ∥∆h(l+1)(xi)∥2≥γattnγσσmin(W(l+1))α|(rother)⊤h(l)(xi)|∥rother∥2. The mean shift norm is: ∥∆µ(l+1)∥2= 1 NNX i=1∆h(l+1)(xi) 2. By the triangle inequality’s converse (mean norm bound relaxed for lower bound): ∥∆µ(l+1)∥2≥1 NNX i=1∥∆h(l+1)(xi)∥2≥1 NNX i=1γattnγσσmin(W(l+1))α|(rother)⊤h(l)(xi)|∥rother∥2. Since ∆µ(l)=−αsr(l∗), its norm is: ∥∆µ(l)∥2=α|s|∥r(l∗)∥2≈α 1 NNX i=1(rother)⊤h(l)(xi) ∥rother∥2. Assume the layer-wise propagation amplifies the previous shift by γ >1, reflecting attention and non-linear effects across layers. Thus: ∥∆µ(l+1)∥2≥γ∥∆µ(l)∥2+αγattnγσσmin(W(l+1)) 1 NNX i=1(rother)⊤h(l)(xi) ∥rother∥2. The theorem uses the single-input projection |(rother)⊤h(l)(xi)|, approximated by the average for large N. Step 4: Analyze for d≫k.When d≫k,∥rother∥2is large per Theorem 4.1, causing significant perturbations in M⊥. The amplification factors γ >1,γattn, γσ>0, and non-zero σmin(W(l+1)) ensure the shift grows across layers, disrupting the model’s normal abilities. 16 C Hyperparameter Tuning In this section, we present the results of tuning the intervention strength αacross four models: DeepSeek-R1-Distill-Qwen-1.5B, DeepSeek-R1-Distill-Qwen-7B, DeepSeek-R1-Distill-Llama-8B, and DeepSeek-R1-Distill-Qwen-14B on MATH500 [ 17]. As shown in Fig. 7, to achieve an optimal balance between efficiency and accuracy, we ultimately select α= 0.7for R1-1.5B, α= 0.3for R1-7B, α= 0.5for R1-8B, and α= 0.3for R1-14B. Accuracy (%) Tokens 88.289.488.4 7166.466.43824 3276 2239 876 858835 010002000300040005000 020406080100 0 0.10.30.50.70.9 AccuracyTokensAccuracy (%) Tokens Accuracy (%) Tokens | https://arxiv.org/abs/2505.22411v1 |
92.893.292.8 80.2 7271.83496 2930 20741670 961913 010002000300040005000 020406080100 0 0.10.30.50.70.9 AccuracyTokens 87.888.287.888 73.6 71.24008 3764 3428 2873 17611465 010002000300040005000 020406080100 0 0.10.30.50.70.9 AccuracyTokensAccuracy (%) Tokens R1-1.5B R1-7B R1-8B R1-14B 76.4 79.879.278.878.6 70.44762 432042763834 3458 2736 010002000300040005000 020406080100 0 0.10.30.50.70.9 AccuracyTokens Figure 7: Impact of intervention strength αon the token reduction and accuracy of R1-1.5B, R1-7B, R1-8B, and R1-14B on the MATH500 dataset D Time Latency Analysis In this section, we analyze the time latency for the DeepSeek-R1-Distill-Qwen-7B model on the Math500 dataset [ 17], comparing our approach with Dynasor [ 14] and SEAL [ 7]. All experiments are conducted on an Ubuntu 22.04 system with A800 GPUs. We find that Dynasor exhibits the significantly longest time latency, which is reasonable due to its frequent probing of intermediate states and its unsuitability for parallel processing of large reasoning models. For SEAL, although both SEAL and our method introduce negligible additional computational cost, SEAL’s token reduction is less effective than ours, resulting in higher time latency. Table 2: Average Time Latency on Math500 for different overthinking-mitigation methods in R1-7B. Methods Original Dynasor SEAL Ours Time Latency (s) 1.74 39.89 1.37 1.05 17 | https://arxiv.org/abs/2505.22411v1 |
Scaling Reasoning without Attention Xueliang Zhao♠⋆∗Wei Wu⋆†Lingpeng Kong♠† ♠The University of Hong Kong⋆Ant Group {xlzhao,lpk}@cs.hku.hk wuwei19850318@gmail.com Abstract Large language models (LLMs) have made significant advances in complex rea- soning tasks, yet they remain bottlenecked by two core challenges: architectural inefficiency due to reliance on Transformers, and a lack of structured fine-tuning for high-difficulty domains. We introduce PROMPT COT-M AMBA , an attention- free language model that addresses both issues through architectural and data- centric innovations. Built on the state space dual (SSD) layers of Mamba-2, our model eliminates the need for self-attention and key-value caching, enabling fixed- memory, constant-time inference. To train it for complex reasoning, we propose a two-phase curriculum fine-tuning strategy based on the PROMPT COTsynthe- sis paradigm, which generates pedagogically structured problems via abstract concept selection and rationale-guided generation. On benchmark evaluations, PROMPT COT-M AMBA -7B outperforms strong Transformer and hybrid models of comparable scale, and even surpasses the much larger Gemma3-27B by 2.6% on AIME 24, 0.6% on AIME 25, and 3.0% on Livecodebench. These results highlight the potential of state space models as efficient and scalable alternatives to attention-based architectures for high-capacity reasoning. github.com/inclusionAI/PromptCoT huggingface.co/xl-zhao/PromptCoT-Mamba-7B AIME 24 AIME 25 Livecodebench MATH-500 OlympiadBench HumanEval HumanEval+020406080100Accuracy (%)35.2 24.629.984.6 50.781.7 75.0 32.6 24.026.989.0 54.286.0 78.0 22.9 19.222.283.8 49.981.1 73.2 19.2 19.218.385.0 49.2 41.5 37.2 19.2 17.5 13.382.0 43.164.0 56.7 18.3 16.3 8.681.2 45.073.2 68.377.679.3 74.4 23.022.081.7 43.6PromptCoT-Mamba-7B Gemma3-27BGemma3-12B Sky-T1-7BS1.1-7B Bespoke-Stratos-7BNemotron-H-8B M1-3B Figure 1: Comparison of benchmark performance across models of varying architectures. PROMPT COT- MAMBA -7B, a pure attention-free Mamba model (orange), outperforms all Transformer (blue) and hybrid Mamba-Transformer (hatched) baselines of similar or larger scale on AIME 24, AIME 25, and Livecodebench, while remaining competitive across other math and code reasoning benchmarks. Bars represent pass@1 accuracy. ∗This work was done during an internship at Ant Group. †Corresponding authors. Preprint.arXiv:2505.22425v1 [cs.LG] 28 May 2025 1 Introduction Recent progress in large language models (LLMs) has enabled impressive capabilities in multi-step reasoning [Brown et al., 2020, Achiam et al., 2023], mathematical problem solving [Lewkowycz et al., 2022, Lightman et al., 2023], and code generation[Chen et al., 2021]. Despite these advances, a well-known limitation persists in the Transformer architecture that powers most state-of-the-art LLMs: their attention mechanism is memory-intensive and scales poorly with long input contexts. Transformer decoders require maintaining a growing key-value (KV) cache during autoregressive inference, resulting in linear memory growth and degraded throughput in long-context applications. This limitation has become increasingly problematic with the rise of long chain-of-thought reasoning paradigms popularized by models like OpenAI’s O1 [Jaech et al., 2024] and DeepSeek’s R1 [Guo et al., 2025], where extended reasoning paths are critical for complex problem solving. In this work, we propose PROMPT COT-M AMBA , an attention-free language model that delivers constant-time inference and fixed memory per token without maintaining a KV cache, yet outperforms strong Transformer and hybrid models of comparable scale—even surpassing the much larger Gemma3-27B [Team et al., 2025] by 2.6% on AIME 24, 0.6% on AIME 25, and 3.0% on Livecodebench. To achieve this, PROMPT COT-M AMBA builds upon Mamba-2’s selective state space architecture [Dao | https://arxiv.org/abs/2505.22425v1 |
and Gu, 2024], replacing traditional self-attention with state space dual (SSD) layers. This architectural choice delivers constant-time inference and fixed memory consumption while maintaining strong reasoning capabilities. We further enhance the model’s problem-solving abilities through a carefully designed two-phase curriculum fine-tuning framework based on the PROMPT COTsynthesis paradigm [Zhao et al., 2025]. This methodology systematically develops advanced reasoning skills by generating pedagogically structured problems through a principled process: first sampling abstract concepts and constructing expert-style rationales, then generating target problems conditioned on these structured rationales. This integration of architectural efficiency with structured supervision enables PROMPT COT-M AMBA to solve complex reasoning tasks effectively, while offering favorable inference characteristics com- pared to Transformer-based alternatives. Extensive experiments across math and code benchmarks show that our model outperforms strong open-source baselines of similar size, and even surpasses significantly larger Transformer models on high-difficulty domains such as AIME and Livecodebench. Contributions. This paper makes the following key contributions: •We introduce PROMPT COT-M AMBA , a fully attention-free language model that outperforms strong Transformer and hybrid baselines of comparable size—for instance, surpassing S1.1- 7B by 16.0% on AIME 24, 7.1% on AIME 25, and 16.6% on LiveCodeBench—establishing a new performance bar for pure Mamba-based architectures. •We propose a scalable two-phase curriculum fine-tuning pipeline based on the PROMPT COT synthesis paradigm, which enables the model to acquire expert-level reasoning capabilities through pedagogically structured supervision. •We demonstrate that the math-specialized variant PROMPT COT-M AMBA -MATH achieves state-of-the-art results on all math benchmarks, including +3.4% on MATH-500, +7.7% on AIME 24, and +6.2% on AIME 25 over the general PROMPT COT-M AMBA , illustrating the effectiveness of domain-focused adaptation. •We show that PROMPT COT-M AMBA delivers up to 3.66×higher throughput on 24GB memory and 1.69×on 72GB memory compared to strong Transformer baselines, confirming its suitability for efficient long-context inference in resource-constrained settings. 2 Method We introduce PROMPT COT-M AMBA , an attention-free language model that combines efficient state space modeling with curriculum fine-tuning based on the PROMPT COTsynthesis paradigm. The architecture is built on Mamba-2 [Dao and Gu, 2024], employing SSD layers as the core computational primitive in place of self-attention. We first describe the SSD layer formulation for both autoregressive inference and parallel training (§2.1), and then describe a two-phase curriculum strategy that scaffolds learning from foundational to advanced reasoning, using PromptCoT-guided synthesis to introduce high-complexity examples (§2.2). 2 2.1 State Space Dual Layers in Mamba-2 We adopt the SSD layer introduced by Dao and Gu [2024], which reformulates selective state-space models as recurrent architectures through a structured matrix representation. This section details both inference and training for a single SSD layer, which forms the core computational unit in our model. LetNdenote the hidden state dimension, Pthe intermediate projection dimension, and dthe input embedding dimension. The full architecture comprises multiple SSD layers composed sequentially, each maintaining its own hidden state trajectory. Inference. During autoregressive inference, the SSD layer maintains and updates a hidden state recurrently to compute the next token distribution, conditioned on the current token embedding. Let wt∈ V denote the input token at position t, and let | https://arxiv.org/abs/2505.22425v1 |
et∈Rddenote its corresponding embedding, where dis the embedding dimension. A shared projection generates all time-dependent parameters: [at,bt,ct,ut] =Linear (et), where at∈[0,1]is a scalar decay factor, bt,ct∈RNare the input and output kernel vectors, and ut∈RPis a projected feature vector. The core recurrence consists of a low-rank state update followed by a linear readout: Zt=ut⊗bt Ht=at·Ht−1+Zt (1) yt=c⊤ tH⊤ t Here,Zt∈RP×Nrepresents a low-rank input-dependent update to the hidden state, and Ht∈RP×N accumulates contributions over time via exponential decay. The output vector yt∈RPis produced by linearly projecting the hidden state with the output kernel ct. The output ytis mapped to vocabulary logits using a learned projection head, and the next token is sampled as wt+1∼Categorical(softmax( ℓt)), where ℓt=VocabProj (yt). The per-step complexity of this procedure is O(NP), owing to the outer product in the state update and the projection in the output computation. Unlike Transformer decoders, which require O(TN) operations per layer and maintain a growing key-value cache, SSD layers operate with fixed memory and constant computation per token. Training. During training, the SSD recurrence admits a parallel formulation using a series of structured contraction operations. Let E∈RT×ddenote the sequence of input embeddings, where T is the sequence length. A shared linear projection produces the time-dependent parameters: [a,B,C,U] =Linear (E), where a∈RTare decay scalars, B,C∈RT×Nare input and output kernels, and U∈RT×Pare projected features. We express the SSD training computation using a sequence of structured contractions over time. Let Sbe a symbolic contraction axis with S=T. To simplify notation, we denote rank-3 tensors such asZandHusing bold uppercase letters, with dimensionality made explicit through context. The forward computation consists of the following steps: Z=contract (S P,S N→S P N)( U,B) H=contract (T S,S P N→T P N)( M,Z) (2) Y=contract (T N,T P N →T P)(C,H) Here, Z∈RT×P×Nrepresents the low-rank update tensor, H∈RT×P×Nis the accumulated hidden state, and Y∈RT×Pcontains the output representations at each time step. The structured transition matrix M∈RT×Tencodes the recurrence dynamics, with entries defined by mj,i=(Qj k=i+1akifi≤j, 0 otherwise , 3 capturing the cumulative decay between positions iandj. This formulation is algebraically equivalent to the original recurrence (Eq. 1) while enabling efficient parallel execution using structured matrix operations. The total training-time complexity of a single SSD layer is O(TNP ), which is substantially more efficient than the O(T2N)cost of Transformer self-attention, especially in long-context scenarios. 2.2 Curriculum Fine-Tuning with P ROMPT COT To facilitate the acquisition of complex reasoning abilities, we adopt a two-phase curriculum learning strategy that progresses from simpler to more challenging objectives. This framework follows established principles in curriculum learning, in which training data is staged by complexity to improve optimization stability and efficiency. We initialize the training pipeline from Mamba Codestral [Team, 2024], and organize fine-tuning into aninitialization phase followed by an advanced phase . In the initialization phase, we continue fine- tuning the model on open-source datasets focused on fundamental reasoning tasks. Specifically, we employ OPENCODEREASONING [Ahmad et al., 2025] and OPENTHOUGHTS 2[Team, 2025b], which combine a small number of expert-authored problems from competitions such as Codeforces and the AIME mathematics contest, alongside a large collection of automatically synthesized | https://arxiv.org/abs/2505.22425v1 |
examples. The majority of training instances are generated using automatic synthesis pipelines based on NUMINA MATH [Li et al., 2024] and MAMMOTH [Yue et al., 2023, 2024], which produce high-quality examples spanning diverse reasoning domains. In the advanced phase, the core of our training strategy centers on data synthesized using PROMPT - COT[Zhao et al., 2025]. Although PromptCoT was originally developed for Olympiad-level math- ematical problem generation, we demonstrate that its methodology can be seamlessly adapted to other domains, including programmatic reasoning. PromptCoT formulates task synthesis as a two- stage, rationale-guided generation process: given a set of foundational concepts, it first generates a pedagogical rationale that reflects expert-level abstractions over concept composition and problem construction strategies. The final problem is then constructed conditioned on both the rationale and the concept set. PromptCoT jointly optimizes the likelihood of rationale generation and problem generation, resulting in examples that reflect expert-level abstraction and deductive depth. In our adaptation, we customize the prompt design and concept selection pipeline to produce challenging and pedagogically structured data for both mathematical and code-based tasks. This stage provides the most demanding problems in the training corpus and plays a central role in developing high-capacity reasoning behaviors. 3 Experiments 3.1 Benchmarks We evaluate our models across seven diverse benchmarks spanning mathematics and code generation. Each dataset targets a different aspect of reasoning or problem-solving: (1) MATH-500 [Lightman et al., 2023, Hendrycks et al., 2021] consists of 500 curated high-school competition problems from the original MATH dataset, assessing advanced mathematical reasoning and problem-solving skills. Problems span algebra, geometry, combinatorics, and number theory. (2,3) AIME 24 and 25 [AIME-2024] are annual high-school mathematics competitions from the American Mathematics Competitions (AMC) series. We use the latest publicly available AIME 24 and 25 problems, evaluating models under the avg@16 metric by sampling 16 generations per problem, following standard practices in prior work. (4) OlympiadBench [He et al., 2024] is a recently introduced benchmark containing 8,476 Olympiad- level mathematics and physics problems. We evaluate only on the mathematical subset and focus on the English problems, following the official evaluation protocol. (5) HumanEval [Chen et al., 2021] is a widely-used code synthesis benchmark that requires models to generate Python functions from docstrings. Each problem is evaluated by executing test cases to verify functional correctness. 4 (6) HumanEval+ [Liu et al., 2023] extends HumanEval with an 80 ×larger test suite per problem, exposing subtle bugs and testing deeper behavioral correctness. It reveals systematic overestimation in previous evaluation pipelines and improves robustness. (7) LiveCodeBench (v5) [Jain et al., 2024] is a live-updated benchmark that sources real-world coding problems from LeetCode, AtCoder, and CodeForces released between May 2023 and May 2024. To ensure contamination-free evaluation, we use the v5 split and report avg@8 , sampling 8 completions per problem following the benchmark’s protocol. 3.2 Evaluation Metrics We adopt pass@1 accuracy as the primary metric across all datasets. For math benchmarks, an output is considered correct if it exactly matches the ground-truth final boxed answer. For code synthesis tasks (HumanEval, HumanEval+, LiveCodeBench), correctness is determined by passing all functional unit tests | https://arxiv.org/abs/2505.22425v1 |
provided in the benchmark. For AIME 24 and 25, and LiveCodeBench, we report avg@k accuracy by sampling k= 16 andk= 8 generations respectively and averaging over the per-problem correctness. This protocol accounts for the inherent sampling variance in open-ended generation and aligns with practices from prior literature. 3.3 Baselines We compare our approach against a set of competitive open-source models spanning both standard Transformer and hybrid Mamba-Transformer architectures. These baselines represent the current frontier in reasoning and code generation. (1) Sky-T1-7B [Team, 2025a] is a Transformer-based instruction-tuned model developed by NovaSky. It adopts a standard decoder-only Transformer architecture and is optimized for multi-step reasoning tasks. (2) S1.1-7B [Muennighoff et al., 2025] builds on Qwen2.5-7B and applies a targeted finetuning strategy to improve reasoning depth. The model retains a full Transformer architecture. (3) Bespoke-Stratos-7B [Labs, 2025] is a Transformer model trained using distillation from larger teacher models. It emphasizes long-form reasoning performance through curated training pipelines. (4,5) Gemma3-12B and Gemma3-27B [Team et al., 2025] are instruction-tuned Transformer models developed by Google DeepMind. They employ alternating local and global attention layers to support efficient long-context processing. (6) Nemotron-H-8B [Blakeman et al., 2025] adopts a hybrid Mamba-Transformer architecture, replacing most attention layers with Mamba-2 blocks while preserving a small number of attention layers for global context modeling. This design improves efficiency while maintaining strong accuracy. (7) M1-3B [Wang et al., 2025] is a compact hybrid Mamba-Transformer model trained via cross- architecture distillation. It achieves strong performance under compute-efficient conditions. 3.4 Implementation Details All experiments are conducted on a single node equipped with 8 ×A100 80GB GPUs using DeepSpeed ZeRO Stage 2 for distributed training and memory optimization. We adopt a two-stage curriculum learning approach where the initialization stage employs 1.88M prompt-completion pairs, com- prising 735k samples from OpenCodeReasoning and 1.14M samples from OpenThoughts2, with completions generated using state-of-the-art reasoning models (Deepseek-R1 [Guo et al., 2025] and QwQ [Team, 2025c]) to ensure high-quality reasoning traces. The advanced stage incorporates 256k prompt-completion pairs constructed via the PROMPT COTpipeline, augmented with 246k from OpenCodeReasoning and 232k from OpenMathReasoning to balance the difficulty of the training curriculum. Both stages utilize the AdamW optimizer with a learning rate of 5×10−6,β1= 0.9, β2= 0.95, and weight decay of 0.01, with warmup for the first 100 steps followed by a fixed learning rate schedule and a global batch size of 64. The initialization stage processes sequences of maximum length 16,384 tokens, while the advanced stage extends this to 20,480 tokens to accommodate longer 5 Table 1: Evaluation results on seven benchmarks. All values are reported as pass@1 accuracy. For AIME 24 and AIME 25, we report averaged pass@1 over 16 samples per problem (avg@16); for Livecodebench-v5, we report averaged pass@1 over 8 samples (avg@8). The best and second-best results are shown in bold andunderline , respectively. Transformer models are shaded in blue; hybrid Mamba-Transformer models are shaded in orange. Model MATH-500 AIME 24 AIME 25 OlympiadBench HumanEval HumanEval+ Livecodebench Sky-T1-7B 85.0 19.2 19.2 49.2 41.5 37.2 18.3 S1.1-7B 82.0 19.2 17.5 43.1 64.0 56.7 13.3 Bespoke-Stratos-7B 81.2 18.3 16.3 45.0 73.2 68.3 | https://arxiv.org/abs/2505.22425v1 |
8.6 Gemma3-12B 83.8 22.9 19.2 49.9 81.1 73.2 22.2 Gemma3-27B 89.0 32.6 24.0 54.2 86.0 78.0 26.9 Nemotron-H-8B 77.6 – – – 79.3 74.4 – M1-3B 81.7 23.0 22.0 43.6 – – – PROMPT COT-M AMBA -7B 84.6 35.2 24.6 50.7 81.7 75.0 29.9 Table 2: Ablation results on AIME 24, AIME 25, and Livecodebench-v5. “- PromptCoT” removes the curriculum synthesis stage. “- PromptCoT & OT” uses only OpenCodeReasoning (OCR). “- PromptCoT & OCR” uses only OpenThoughts (OT). All values are reported as avg@16 for AIME and avg@8 for Livecodebench. Model AIME 24 AIME 25 Livecodebench Full 35.2 24.6 29.9 - PromptCoT 11.7 8.3 5.3 - PromptCoT & OT 1.7 3.3 13.6 - PromptCoT & OCR 19.2 13.3 12.5 reasoning chains. During evaluation, we set the maximum generation length to 65,536 tokens to allow complete reasoning trace generation. 3.5 Main Results The results in Table 1 demonstrate the effectiveness of our proposed PROMPT COT-M AMBA -7B across diverse reasoning and code generation tasks. (1) PROMPT COT-M AMBA -7B outperforms all Transformer and hybrid Mamba-Transformer baselines with comparable parameter sizes, marking the first instance where a pure Mamba-based architecture exceeds the performance of similarly sized attention-based models across this range of benchmarks. This underscores the strength of structured state space modeling when paired with curriculum-oriented training; (2) In addition, PROMPT COT-M AMBA -7B outperforms significantly larger Transformer models, including Gemma3- 27B, on several of the most challenging tasks. It achieves new state-of-the-art results on AIME 24 (35.2%), AIME 25 (24.6%), and Livecodebench-v5 (29.9%), demonstrating strong reasoning and generalization; (3) These results reveal the growing potential of pure Mamba architectures as competitive and scalable alternatives to Transformer-based models. With careful training and data design, Mamba models can match or exceed the performance of larger attention-based systems, offering a compelling direction for efficient sequence modeling in high-complexity domains. 4 Discussions Beyond the comprehensive benchmark comparisons, we further analyze the behavior and charac- teristics of our method through targeted research questions. Specifically, we aim to answer: (1) RQ1: How do different training stages and data sources contribute to overall performance? (2) RQ2: Is it possible to strategically reduce code-related capabilities in favor of more specialized and extreme mathematical reasoning performance? (3) RQ3: How does the inference efficiency of the Mamba-based architecture compare to standard Transformers? These questions guide our ablation studies, performance trade-off analysis, and efficiency profiling, discussed in the following sections. 4.1 Ablation Study for RQ1 To evaluate the contribution of each training phase, we conduct an ablation study on AIME 24, AIME 25, and Livecodebench-v5, as shown in Table 2. We examine three variants of our method: (1) exclusion of the PromptCoT synthesis phase (“- PromptCoT”), which retains only the foundational finetuning stage using OpenThoughts and OpenCodeReasoning; (2) removal of both PromptCoT and OpenThoughts (“- PromptCoT & OT”), finetuning the model solely on OpenCodeReasoning; 6 Table 3: Comparison between the math-specialized ( PROMPT COT-M AMBA -MATH) and general ( PROMPT COT- MAMBA ) variants. Model MATH-500 AIME 24 AIME 25 OlympiadBench HumanEval HumanEval+ Livecodebench PromptCoT-Mamba-Math-7B 88.0 42.9 30.8 52.1 71.3 66.5 20.3 PromptCoT-Mamba-7B 84.6 | https://arxiv.org/abs/2505.22425v1 |
35.2 24.6 50.7 81.7 75.0 29.9 and (3) removal of both PromptCoT and OpenCodeReasoning (“- PromptCoT & OCR”), using only OpenThoughts. The results show that the full PROMPT COT-M AMBA -7B achieves the best performance across all benchmarks, underscoring the importance of curriculum-driven synthesis for high-complexity tasks. Removing PromptCoT causes substantial degradation, particularly on AIME 24/25, highlighting its role in teaching abstract multi-step reasoning. When both PromptCoT and OpenThoughts are removed, performance drops even further, revealing that OpenThoughts contributes harder, more diverse samples compared to OpenCodeReasoning. Conversely, removing OpenCodeReasoning but retaining OpenThoughts leads to modest recovery, confirming that both sources of supervision are complementary. Overall, the curriculum structure, progressing from basic to advanced supervision, is critical for effective reasoning generalization. 4.2 Mathematical Specialization for RQ2 To investigate whether domain specialization improves mathematical reasoning, we train a vari- ant of our model, PROMPT COT-M AMBA -MATH-7B, with a focus solely on math. Specifically, we replace OpenCodeReasoning and OpenThoughts in the initialization stage with OPENMATHREASON - ING[Moshkov et al., 2025], a curated corpus of mathematical tasks designed to provide high-quality foundational supervision. As shown in Table 3, this math-specialized model achieves significant gains on all math benchmarks: 88.0% on MATH-500, 42.9% on AIME 24, 30.8% on AIME 25, and 52.1% on OlympiadBench. These improvements confirm that narrowing the pretraining distribution allows the model to better internalize domain-specific patterns and abstractions. However, this specialization comes at the expense of generalization. On code-oriented tasks such as HumanEval (71.3%), HumanEval+ (66.5%), and Livecodebench-v5 (20.3%), the performance lags behind the full PROMPT COT-M AMBA -7B. This result illustrates a clear trade-off between general-purpose coverage and task-specific optimization, and highlights the flexibility of the Mamba architecture for targeted domain adaptation. 4.3 Inference Efficiency for RQ3 [8k,16k) [16k,24k) [24k,32k) [32k,40k) [40k,48k) [48k,56k) [56k,64k) Generation Length Range (Tokens)0500100015002000T okens per Second 1.69×Token Generation Throughput - 72 GB GPU PromptCoT-Mamba-7B s1.1-7B (a)72 GB GPU [8k,16k) [16k,24k) [24k,32k) [32k,40k) [40k,48k) [48k,56k) [56k,64k) Generation Length Range (Tokens)0500100015002000T okens per Second 3.66×Token Generation Throughput - 24 GB GPU PromptCoT-Mamba-7B s1.1-7B (b)24 GB GPU Figure 2: Token generation throughput (tokens/sec) of PROMPT COT-M AMBA -7B and S1.1-7B under different GPU memory configurations. Performance is measured across a range of generation lengths. We compare the inference efficiency of PROMPT COT-M AMBA -7B against a strong Transformer baseline, s1.1-7B [Muennighoff et al., 2025], using vLLM 0.7.3 on a single NVIDIA A100 80GB GPU. For each generation length interval [a, b), we set min_tokens =aandmax_tokens =bto mimic variable-length decoding workloads commonly encountered in practical deployments. 7 Figure 2 reports token generation throughput (tokens per second) across two hardware memory configurations: 24GB and 72GB. We restrict the accessible GPU memory accordingly to simulate inference scenarios at different deployment tiers. PROMPT COT-M AMBA -7B achieves consistently higher throughput across all lengths. Under the 24GB setting, it yields a 3.66×improvement over s1.1- 7B at the longest sequence range. Even under 72GB, where the Transformer baseline benefits from greater caching capacity, our model still achieves a 1.69×speedup. These results highlight the practical strengths of our proposed PROMPT COT-M AMBA , which enables efficient, | https://arxiv.org/abs/2505.22425v1 |
high-throughput inference under both memory-constrained and long-context conditions. The combination of architectural efficiency and curriculum-driven training positions it as a compelling alternative to attention-based models for scalable deployment in real-world scenarios. 5 Related Work 5.1 Reasoning with Large Language Models The study of reasoning in LLMs has evolved rapidly, driven by advances in both prompting strategies and data-centric methodologies. Early work demonstrated that reasoning behavior can be elicited through carefully designed prompts, such as chain-of-thought prompting [Wei et al., 2022], least-to- most decomposition [Zhou et al., 2022], and reflective self-correction [Shinn et al., 2024]. While these methods reveal the latent capabilities of pretrained models, they often rely on implicit reasoning heuristics and are sensitive to prompt design. Subsequent efforts have increasingly shifted toward training-time approaches, emphasizing dataset construction and model supervision [Wang et al., 2022, Zhao et al., 2023, 2024]. Recent works have introduced open-source corpora curated for high- quality mathematical and programmatic reasoning tasks [Ahmad et al., 2025, Moshkov et al., 2025], while synthesis pipelines such as NuminaMath [Li et al., 2024] and Mammoth [Yue et al., 2024] enable scalable generation of diverse and structured examples. In this context, PROMPT COT[Zhao et al., 2025] proposes a rationale-guided synthesis paradigm that produces abstract, compositional examples with expert-style intermediate reasoning. We adopt and extend this formulation across both mathematical and code-based domains in our approach. 5.2 Linear Sequence Modeling A growing body of work explores alternatives to attention mechanisms for improved efficiency in sequence modeling. Linearized attention architectures [Katharopoulos et al., 2020, Zheng et al., 2022, 2023, Yang et al., 2024], hardware-friendly designs such as GLA [Yang et al., 2023], and recurrence-based models including RWKV [Peng et al., 2023] and RetNet [Sun et al., 2023] have demonstrated promising results in language modeling tasks. State-space approaches like Mamba [Gu and Dao, 2023, Dao and Gu, 2024] further enhance modeling capacity through selective and structured recurrence. While these models achieve competitive performance in language modeling, they are not specifically designed for multi-step reasoning. Our work addresses this gap by developing a reasoning-centric framework for linear architectures, demonstrating that such models can match or surpass Transformer baselines on complex mathematical and code generation benchmarks. 6 Conclusion We present PROMPT COT-M AMBA , the first attention-free language model to match and exceed the performance of strong Transformer and hybrid baselines on challenging math and code tasks. Built on Mamba-2’s structured state space architecture, it delivers constant-time, fixed-memory inference, addressing key inefficiencies of attention-based models. Central to our approach is a two-phase curriculum fine-tuning pipeline based on the PromptCoT paradigm, which enables the model to learn complex reasoning skills from challenging data. Extensive results show that PROMPT COT-M AMBA not only outperforms comparably sized models but also surpasses larger Transformers in accuracy and throughput, especially under constrained or long-context settings. Our findings underscore the viability of attention-free architectures for efficient, high-performance language modeling. 8 References Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023. Wasi Uddin Ahmad, | https://arxiv.org/abs/2505.22425v1 |
Sean Narenthiran, Somshubra Majumdar, Aleksander Ficek, Siddhartha Jain, Jo- celyn Huang, Vahid Noroozi, and Boris Ginsburg. Opencodereasoning: Advancing data distillation for competitive coding. arXiv preprint arXiv:2504.01943, 2025. AIME-2024. https://huggingface.co/datasets/ai-mo/aimo-validation-aime. Aaron Blakeman, Aarti Basant, Abhinav Khattar, Adithya Renduchintala, Akhiad Bercovich, Alek- sander Ficek, Alexis Bjorlin, Ali Taghibakhshi, Amala Sanjay Deshmukh, Ameya Sunil Maha- baleshwarkar, et al. Nemotron-h: A family of accurate and efficient hybrid mamba-transformer models. arXiv preprint arXiv:2504.03624, 2025. Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances inneural information processing systems, 33:1877–1901, 2020. Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde De Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. Tri Dao and Albert Gu. Transformers are SSMs: Generalized models and efficient algorithms through structured state space duality. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, Proceedings of the41st International Conference onMachine Learning , volume 235 of Proceedings ofMachine Learning Research , pages 10041–10071. PMLR, 21–27 Jul 2024. URL https://proceedings. mlr.press/v235/dao24a.html . Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023. Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025. Chaoqun He, Renjie Luo, Yuzhuo Bai, Shengding Hu, Zhen Leng Thai, Junhao Shen, Jinyi Hu, Xu Han, Yujie Huang, Yuxiang Zhang, et al. Olympiadbench: A challenging benchmark for promoting agi with olympiad-level bilingual multimodal scientific problems. arXiv preprint arXiv:2402.14008, 2024. Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021. Aaron Jaech, Adam Kalai, Adam Lerer, Adam Richardson, Ahmed El-Kishky, Aiden Low, Alec Helyar, Aleksander Madry, Alex Beutel, Alex Carney, et al. Openai o1 system card. arXiv preprint arXiv:2412.16720, 2024. Naman Jain, King Han, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar-Lezama, Koushik Sen, and Ion Stoica. Livecodebench: Holistic and contamination free evaluation of large language models for code. arXiv preprint arXiv:2403.07974, 2024. Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In International conference onmachine learning, pages 5156–5165. PMLR, 2020. Bespoke Labs. Bespoke-stratos: The unreasonable effectiveness of reasoning distilla- tion. www.bespokelabs.ai/blog/bespoke-stratos-the-unreasonable-effectiveness-of-reasoning- distillation, 2025. Accessed: 2025-01-22. 9 Aitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Ra- masesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, et al. Solving quantitative reasoning problems with language models. Advances inNeural Information Processing Systems , 35:3843–3857, 2022. Jia Li, Edward Beeching, Lewis Tunstall, Ben Lipkin, Roman Soletskyi, Shengyi Huang, Kashif Rasul, Longhui Yu, Albert Q Jiang, Ziju Shen, et al. Numinamath: The largest public dataset in ai4maths with 860k pairs of competition math problems and solutions. Hugging Face repository | https://arxiv.org/abs/2505.22425v1 |
, 13:9, 2024. Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step. arXiv preprint arXiv:2305.20050, 2023. Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. Advances inNeural Information Processing Systems, 36:21558–21572, 2023. Ivan Moshkov, Darragh Hanley, Ivan Sorokin, Shubham Toshniwal, Christof Henkel, Benedikt Schif- ferer, Wei Du, and Igor Gitman. Aimo-2 winning solution: Building state-of-the-art mathematical reasoning models with openmathreasoning dataset. arXiv preprint arXiv:2504.16891, 2025. Niklas Muennighoff, Zitong Yang, Weijia Shi, Xiang Lisa Li, Li Fei-Fei, Hannaneh Hajishirzi, Luke Zettlemoyer, Percy Liang, Emmanuel Candès, and Tatsunori Hashimoto. s1: Simple test-time scaling. arXiv preprint arXiv:2501.19393, 2025. Bo Peng, Eric Alcaide, Quentin Anthony, Alon Albalak, Samuel Arcadinho, Stella Biderman, Huanqi Cao, Xin Cheng, Michael Chung, Matteo Grella, et al. Rwkv: Reinventing rnns for the transformer era.arXiv preprint arXiv:2305.13048, 2023. Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning. Advances inNeural Information Processing Systems, 36, 2024. Yutao Sun, Li Dong, Shaohan Huang, Shuming Ma, Yuqing Xia, Jilong Xue, Jianyong Wang, and Furu Wei. Retentive network: A successor to transformer for large language models. arXiv preprint arXiv:2307.08621, 2023. Gemma Team, Aishwarya Kamath, Johan Ferret, Shreya Pathak, Nino Vieillard, Ramona Merhej, Sarah Perrin, Tatiana Matejovicova, Alexandre Ramé, Morgane Rivière, et al. Gemma 3 technical report. arXiv preprint arXiv:2503.19786, 2025. Mistral Team. Codestral mamba. https://mistral.ai/news/codestral-mamba , 2024. Accessed: 2025-05-24. NovaSky Team. Sky-t1: Train your own o1 preview model within $450. https://novasky- ai.github.io/posts/sky-t1, 2025a. Accessed: 2025-01-09. OpenThoughts Team. Open Thoughts. https://open-thoughts.ai, January 2025b. Qwen Team. Qwq-32b: Embracing the power of reinforcement learning, March 2025c. URL https://qwenlm.github.io/blog/qwq-32b/ . Junxiong Wang, Wen-Ding Li, Daniele Paliotta, Daniel Ritter, Alexander M Rush, and Tri Dao. M1: Towards scalable test-time compute with mamba reasoning models. arXiv preprint arXiv:2504.10449, 2025. Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdh- ery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. arXiv preprint arXiv:2203.11171, 2022. Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824–24837, 2022. 10 Songlin Yang, Bailin Wang, Yikang Shen, Rameswar Panda, and Yoon Kim. Gated linear attention transformers with hardware-efficient training. arXiv preprint arXiv:2312.06635, 2023. Songlin Yang, Bailin Wang, Yu Zhang, Yikang Shen, and Yoon Kim. Parallelizing linear transformers with the delta rule over sequence length. arXiv preprint arXiv:2406.06484, 2024. Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. Mammoth: Building math generalist models through hybrid instruction tuning. arXiv preprint arXiv:2309.05653, 2023. Xiang Yue, Tuney Zheng, Ge Zhang, and Wenhu Chen. Mammoth2: Scaling instructions from the web. arXiv preprint arXiv:2405.03548, 2024. Xueliang Zhao, Xinting Huang, Wei Bi, and Lingpeng Kong. Sego: Sequential subgoal optimization for mathematical problem-solving. arXiv preprint arXiv:2310.12960, 2023. Xueliang Zhao, Lin Zheng, Haige Bo, Changran Hu, | https://arxiv.org/abs/2505.22425v1 |
Urmish Thakker, and Lingpeng Kong. Subgoalxl: Subgoal-based expert learning for theorem proving. arXiv preprint arXiv:2408.11172, 2024. Xueliang Zhao, Wei Wu, Jian Guan, and Lingpeng Kong. Promptcot: Synthesizing olympiad-level problems for mathematical reasoning in large language models. arXiv preprint arXiv:2503.02324 , 2025. Lin Zheng, Chong Wang, and Lingpeng Kong. Linear complexity randomized self-attention mecha- nism. In International conference onmachine learning, pages 27011–27041. PMLR, 2022. Lin Zheng, Jianbo Yuan, Chong Wang, and Lingpeng Kong. Efficient attention via control variates. arXiv preprint arXiv:2302.04542, 2023. Denny Zhou, Nathanael Schärli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, Claire Cui, Olivier Bousquet, Quoc Le, et al. Least-to-most prompting enables complex reasoning in large language models. arXiv preprint arXiv:2205.10625, 2022. 11 | https://arxiv.org/abs/2505.22425v1 |
arXiv:2505.22438v1 [cs.IT] 28 May 2025Synonymous Variational Inference for Perceptual Image Compression Zijian Liang1Kai Niu1 2Changshuo Wang1Jin Xu1Ping Zhang3 Abstract Recent contributions of semantic information the- ory reveal the set-element relationship between semantic and syntactic information, represented as synonymous relationships. In this paper, we propose a synonymous variational inference (SVI) method based on this synonymity viewpoint to re- analyze the perceptual image compression prob- lem. It takes perceptual similarity as a typical syn- onymous criterion to build an ideal synonymous set (Synset), and approximate the posterior of its latent synonymous representation with a paramet- ric density by minimizing a partial semantic KL divergence. This analysis theoretically proves that the optimization direction of perception im- age compression follows a triple tradeoff that can cover the existing rate-distortion-perception schemes. Additionally, we introduce synonymous image compression (SIC), a new image compres- sion scheme that corresponds to the analytical process of SVI, and implement a progressive SIC codec to fully leverage the model’s capabili- ties. Experimental results demonstrate compara- ble rate-distortion-perception performance using a single progressive SIC codec, thus verifying the effectiveness of our proposed analysis method. 1. Introduction Image compression is a typical topic for lossy source cod- ing, aiming to achieve the optimal tradeoff between recon- structed image quality and coding rate. Following the rate- distortion optimization instructed by Shannon’s classic in- formation theory (1948; 1959), traditional image compres- sion like JPEG (Wallace, 1991) and BPG (Bellard, 2015) 1Key Laboratory of Universal Wireless Communications, Min- istry of Education, Beijing University of Posts and Telecommuni- cations, Beijing, China2Peng Cheng Laboratory, Shenzhen, China 3State Key Laboratory of Networking and Switching Technol- ogy, Beijing University of Posts and Telecommunications, Beijing, China. Correspondence to: Kai Niu <niukai@bupt.edu.cn >. Proceedings of the 42ndInternational Conference on Machine Learning , Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).have pursued this goal with the peak signal-to-noise ratio (PSNR) and multi-scale structural similarity index (MS- SSIM) quality metrics through handcrafted algorithms in- cluding transform coding, quantization, and entropy coding. With the growing research in artificial intelligence, recent advancements in learned image compression (LIC) (Ball ´e et al., 2018; Minnen et al., 2018; Cheng et al., 2020; He et al., 2021; 2022a; Li et al., 2024) combine the optimization principles of traditional image coding with the capabilities of deep learning. Its basic optimization idea can be the- oretically analyzed using a variational inference method similar to that in the variational auto-encoder (Kingma & Welling, 2013), leading to a loss function in the form of a rate-distortion tradeoff (Ball ´e et al., 2017; 2018). These methods have demonstrated significant rate-distortion per- formance compared with conventional methods. As the inconsistency exists between “low distortion” and “high perceptual quality”, Blau and Michaeli explored the tradeoff between distortion and perception (2018). They fur- ther incorporated the perceptual constraint into compression limit analysis and explored the rate-distortion-perception tradeoff (Blau & Michaeli, 2019). Further theoretical analy- sis (Theis & Agustsson, 2021; Theis & Wagner, 2021; Yan et al., 2021; Qian et al., 2022; Theis, 2024; Hamdi et al., 2025) and empirical results (Agustsson et al., 2019; Mentzer et al., | https://arxiv.org/abs/2505.22438v1 |
2020; He et al., 2022b; Theis et al., 2022; Agustsson et al., 2023; Muckley et al., 2023; Hoogeboom et al., 2023; Xu et al., 2023; Careil et al., 2024) demonstrate the effec- tiveness of this new optimization direction and suggest that perceptual image compression (PIC) with high perceptual quality at low bitrates can be achieved with generative com- pression (Santurkar et al., 2018) empowered by generative adversarial networks (GAN) (Goodfellow et al., 2014) and diffusion models (Ho et al., 2020). The great success of the rate-distortion-perception trade-off has effectively shifted the focus from symbol-level accuracy in traditional image compression and tends more towards semantic information accuracy, which aligns with Shannon and Weaver’s discussion on communication problem levels (Weaver, 1953). However, these works adopt diverse em- pirical optimization approaches for perceptual optimization, such as Kullback-Leibler (KL) divergence, discriminator- based adversarial loss like Wasserstein divergence (Blau & Michaeli, 2019), or mixed with “perceptual” measure like 1 Synonymous Variational Inference for Perceptual Image Compression LPIPS (Zhang et al., 2018; Mentzer et al., 2020; Muckley et al., 2023) and DISTS (Ding et al., 2020). The diversity and inconsistency of these methods motivate us to establish a unified perspective for perceptual image compression with a well-established mathematical theoretical framework. In this paper, we model the perceptual image compression problem mathematically based on a semantic information theory viewpoint. Recent advancements in semantic infor- mation theory (Niu & Zhang, 2024) highlight a set-element relationship between semantic information (i.e., the mean- ing) and syntactic information (i.e., data samples), where one meaning can be expressed in diverse syntactic forms. Building on this synonymity perspective, manipulating a set of samples with the same meaning (referred as to a synony- mous set , abbreviated as “ Synset ”) should be considered as the principle of semantic information processing. This viewpoint has the potential to surpass the theoretical limits of classical information theory while relaxing symbol-level accuracy (i.e., distortion) requirements. We emphasize that although the concept of synonymity originates from text data, it is universal to various types of natural data. For ex- ample, in image data, perceptual similarity between different images can be seen as a typical synonymous relationship. On this basis, we re-analyze the optimization goal of percep- tual image compression and introduce a novel variational inference method to analyze its optimization direction, aim- ing to guide the design of an image compression scheme. The contributions of our paper are as follows: 1.We propose Synonymous Variational Inference (SVI), a novel variational inference method to analyze the optimization direction of perceptual image compres- sion. By building an ideal synset based on a typical criterion of perceptual similarity, it approximates the posterior of the corresponding latent synonymous rep- resentation with a parametric density by minimizing a partial semantic KL divergence. This method theoreti- cally proves that the optimization direction of percep- tual image compression is an expected rate-distortion- perception tradeoff form that covers the existing rate- distortion-perception schemes. To the best knowledge of the authors, our method is the first work that can theoretically explain the fundamental reason for the divergence measure’s existence in | https://arxiv.org/abs/2505.22438v1 |
existing percep- tual image compression schemes . 2.We establish Synonymous Image Compression (SIC), a new image compression scheme that corresponds to the analytical process of SVI. By solely encoding the latent synonymous representation partially, SIC inter- prets this information as an equivalent quantized latent synset. It reconstructs multiple images satisfying the synonymous relationship with the original image bymultiple sampling the detailed representations indepen- dently from this latent synset. 3.We implement a progressive SIC codec to validate the theoretical analysis result, fully leveraging the model’s capabilities. Experimental results demonstrate compa- rable rate-distortion-perception performance using a single neural progressive SIC image codec, thus veri- fying our method’s effectiveness. 2. Background 2.1. Rate-Distortion Theory and Variational Inference As one of the fundamental theorems in Shannon’s classical information theory, rate-distortion theory (Shannon, 1948; Shannon et al., 1959) aims to address the lossy compression problem. It provides a theoretical lower bound of the com- pression rate R(D)with a given distortion D, which can be characterized as a rate-distortion function (Thomas & Joy, 2006) R(D) = min p(ˆx|x)I X;ˆX s.t.Ex,ˆx∼p(x,ˆx)[d(x,ˆx)]≤D,(1) in which I X;ˆX represents mutual information between the source Xand the reconstructed ˆX, numerically equal to the average coding rate for compressing Xwith a given lossy codec; Dcan be any reference distortion measure satisfying the condition that d(x,ˆx) = 0 if and only if x= ˆx, typified by the mean squared error (MSE). To achieve this, learned image compression achieves op- timal rate-distortion performance through end-to-end op- timization training. While the ultimate optimization tar- get remains the rate-distortion tradeoff, aligning with the continuous changes in neural network model training, the optimization process is achieved through variational infer- ence for the generative model, specifically the variational auto-encoders (Kingma & Welling, 2013; Ball ´e et al., 2017; 2018). The core idea of variational inference is to build a parametric latent density q(˜y|x)and minimize the KL diver- gence, a standard measure in classical information theory, to approximate the true posterior p˜y|x(˜y|x), i.e., Ex∼p(x)DKL q||p˜y|x =Ex∼p(x)E˜y∼q :0 logq(˜y|x)−logpx|˜y(x|˜y)|{z } weighted distortion−logp˜y(˜y)|{z} rate +const.(2) As the first term equals 0 under the assumption of a uniform density on the unit interval centered on y, and the last term is a constant, the optimization simplifies to the sum of a weighted distortion and a coding rate, thereby achieving the optimal rate-distortion tradeoff. 2 Synonymous Variational Inference for Perceptual Image Compression 2.2. The Rate-Distortion-Perception tradeoff Since Blau and Michaeli demonstrated the apparent trade- off between perceptual quality and distortion measure that widely exists in various distortion measures (2018), they ex- tended the classic rate-distortion tradeoff to a triple tradeoff version (2019). Specifically, they define the perceptual qual- ity index dp(px, pˆx)based on some divergence between distributions of the source and reconstructed images, and build a new lower bound of compression rate R(D, P)with considerations of the perception index, i.e., R(D, P) = min p(ˆx|x)I X;ˆX s.t.Ex,ˆx∼p(x,ˆx)[d(x,ˆx)]≤D, dp(px, pˆx)≤P.(3) Building on this triple tradeoff relationship, the percep- tual image compression methods (Agustsson et al., 2019; Mentzer et al., 2020; He et al., 2022b; Agustsson et al., 2023; Muckley et al., 2023) typically optimize the | https://arxiv.org/abs/2505.22438v1 |
model using the following loss function form: LRDP =λr·I X;ˆX +λd·Ex,ˆx∼p(x,ˆx)[d(x,ˆx)] +λp·dp(px, pˆx). (4) 2.3. Semantic Information Theory As the optimization towards perceptual quality is more in- clined to the accuracy of conveying meaning (the semantic problem) instead of the symbol-level accuracy that classi- cal information theory focuses on (the technical problem) (Weaver, 1953), this paper considers analyzing the prob- lem of perceptual image compression based on semantic information theory. Research on semantic information theory has been ongo- ing since the 1950s, with various viewpoints such as log- ical probability (Carnap & Bar-Hillel, 1952; Bar-Hillel & Carnap, 1953; Barwise & Perry, 1981; Floridi, 2004; Bao et al., 2011) and fuzzy probability (De Luca & Termini, 1972; 1974; Al-Sharhan et al., 2001) employed to discuss the essence and measures of semantic information, but no consensus has been reached over time. Furthermore, these viewpoints provide limited theoretical guidance for the prac- tical coding of natural information sources. However, a recent contribution to semantic information the- ory (Niu & Zhang, 2024) presents a potential turning point in the field, which suggests understanding the semantic in- formation from a synonymity perspective. In this theory, semantic information is processed based on a fundamen- tal principle: considering a set of syntactic samples with the same meaning (referred to as a synset). Corresponding semantic information measures are also provided. As an im-portant foundation, a semantic variable ˚U1corresponds to various possible synsets Uis={ui|i∈ Nis}, where each sample uiis a possible value of the syntactic variable Uand shares the same semantic meaning with all the pos- sible values {uj|j∈ Nis}indexed in Nis. On this basis, the semantic entropy of ˚Uis defined by Hs ˚U =−X isX i∈Nisp(ui) log X i∈Nisp(ui) ,(5) in which the probability of the synset p(Uis)is defined as the sum of the probabilities of all the samples p(ui) within it. This directly leads to the inequality between the semantic entropy and the classical Shannon entropy, i.e.,Hs ˚U ≤H U , being apparently valid, since the uncertainty of syntactic samples is no longer the focus. As the foundation of the synonymous variational inference proposed in this paper, a new form of KL divergence needs to be introduced from (Niu & Zhang, 2024), referred to aspartial semantic KL divergence DKL,s[q||ps], which is defined as DKL,s[q||ps] =˜NX is=1X ui∈Uisq(ui) logq(ui) p(Uis),(6) which represents a divergence between a syntactic distribu- tionqand a semantic distribution ps.2Clearly, these two distributions emphasize different levels of information, i.e., the syntactic level and the semantic level. However, examin- ing the distance between these distributions holds significant physical meaning in perceptual image compression, which will be detailed in Section 3.2. 3. Synonymous Variational Inference: A Semantic Information Viewpoint 3.1. Overview Consider an image codec, in which the encoder captures the semantic information of the image, while the decoder reconstructs an image with the same semantics as the origi- nal instead of directly restoring the original image’s pixels. Obviously, in natural image data, there are typically mul- tiple images that share the same semantic information as the original image. For example, all images that exhibit certain perceptual similarities to | https://arxiv.org/abs/2505.22438v1 |
the original image can be 1Refer to as ˜Uin Niu and Zhang’s paper (2024). The ring hat symbol “˚”is appplied to distinguish it from the tilde hat symbol “˜” commonly used in variational inference. 2The relationship between the partial semantic KL diver- gence and the standard KL divergence satisfies DKL,s[q||ps]≤ DKL[q||p], which can be referred to as partial semantic relative entropy in Niu and Zhang’s paper (2024). 3 Synonymous Variational Inference for Perceptual Image Compression Data Space Latent Space Latent Distributions Towards Convergence Original Image Sample Quantized Representation ĀNoisyāRepresentation ĀNoisyāSynonymous Representation Ideal Synset Reconstructed Synset Ideal Latent Synset Quantized Latent Synset Figure 1. An illustration of the optimization directions of synonymous image compression. By continuously minimizing the partial semantic KL divergence DKL,s q||p˜ys|Xin latent space, the reconstructed synset ˆXgradually approaches the ideal synset Xuntil complete overlap occurs. At that point, every sample ˆxj∈ˆXis a “synonym” of the original image sample x. considered to convey the same meaning “to some extent” while retaining distinct detailed information.3Therefore, when placing these images in a synset, there must be a la- tent representation and the corresponding coding sequence capable of capturing the shared characteristics among all samples in this set, which should be learned by the semantic encoder. Using this representation, the semantic decoder can sample any image from the synset of the original image, which satisfies certain perceptual similarity with the source image if the synonymous judge criterion is the perceptual similarity criterion. When considering using a deep neural network to design the above codec, its continuous optimization problem can be analyzed using a similar idea to the variational autoen- coder, based on variational inference (Kingma & Welling, 2013). Figure 1 illustrates the optimization direction of this problem and provides a schematic representation of the achievable effects within the data space. Ideally, the source image xcan be considered as a sample in the ideal synset X, shown as the dashed circles in Figure 1. Correspondingly, there must be an ideal posterior p˜ys|X(˜ys|X)in the latent space to represent the latent synonymous representations ysthat capture the shared characteristics of all the samples {xi|xi∈X}. However, in practice, the ideal synset Xis unavailable, so we rely on the original image xto construct 3In practice, people may have varying judgments about whether two images have the same meaning, due to their varying judge criteria. Thus, samples in a synset based on a given synonymous criterion must share some specific semantic information but do not necessarily have completely identical meanings.a parametric latent density q(˜y|x)to approximate this pos- terior by minimizing the partial semantic KL divergence between these two distributions, i.e., minEx∼p(x)DKL,s q||p˜ys|X . (7) Once this distribution divergence is minimized, a generative model px|˜ys,ˆyϵ(x|˜ys,ˆyϵ)(i.e., the semantic decoder, in which ˆyϵis a sampling for details) can be finally optimized. On this basis, the reconstructed synset ˆxproduced by the semantic decoder can be considered as a sample of the ideal synset X, which ensures exhibiting certain perceptual similarities to the original image x. 3.2. Synonymous Variational Inference Unlike the usual variational inference, the two distribu- tions of (7)work at different levels: The parametric | https://arxiv.org/abs/2505.22438v1 |
density q(˜y|x)works at the syntactic level, while the true posterior p˜ys|X(˜ys|X)operates at the semantic level, represented in the form of synsets. However, since ˜ycan be decomposed into a combination or concatenation of a synonymous repre- sentation ˜ysand a detailed representation ˜yϵ, it is possible to effectively process the minimization of the partial semantic KL divergence. To distinguish from the existing variational inference methods, we give the following definition. Definition 3.1. Synonymous Variational Inference (SVI) is a generic variational inference method that approximates the true posterior of the synonymous representations with a parametric density at the syntactic level by minimizing the partial semantic KL divergence (7). 4 Synonymous Variational Inference for Perceptual Image Compression generative model (synthethis transform)Observed Data Random Variables Multi-samples Required to Construct Synsets Parametric Prior (Factorized / Hyperprior) Essential Dependence Non-essential Dependence inference model (analysis transform) Ideal Synset“Noisy ” Latent Synset Figure 2. Left: Representation of the proposed encoder as a synonymous variational inference model, and corresponding decoder as a generative Bayesian model. The latent representation ˜yis a merge of the synonymous representation ˜ysand the detailed representation ˜yϵ, achieved through some form of merging or splicing. A fully factorized (Ball ´e et al., 2017) or a hyperprior-like (Ball ´e et al., 2018; Minnen et al., 2018) entropy model can be employed in the “Parametric Prior” item. An autoregressive (Minnen et al., 2018) or a parallel (He et al., 2021) context model can also be utilized in θp. These two types of methods can be used for accurate probability estimations of ˜ysor predictions for ˆyϵ. Right: Illustrations for the equivalent relationship of the “noisy” latent synset ˜Yand the ideal synset X. By applying the proposed synonymous variational inference, the optimization direction of perceptual image compression can be determined. To facilitate the subsequent derivation, we first state the following lemma (the detailed proof can be found in Appendix A.1): Lemma 3.2. When the source considers the existence of an ideal synset Xand the decoder places the reconstructed sample in a reconstructed synset ˜X, the minimization of the expected negative log synonymous likelihood term minEx∼p(x)E˜y∼q −logpX|˜ys(X|˜ys) ⇐⇒ minλd·Ex∼p(x)E˜y∼qE˜xi∈˜X|˜ys[d(x,˜xi)] +λp·E˜y∼qE˜xi∈˜X|˜ysDKL[px||p˜xi],(8) in which λdandλpare the tradeoff factors for the expected distortion (typically expected means-squared error, i.e., E- MSE) term and the expected KL divergence (E-KLD) term, respectively. Based on this, we propose the following theorem: Theorem 3.3. For an image source x∼p(x) together with its bounded expected distortion Ex∼p(x)Eˆxi∈ˆX|ˆys[d(x,ˆxi)]and expected KL diver- gence Eˆxi∈ˆX|ˆysDKL[px||pˆxi], the minimum achievable rate of perceptual image compression is R(X) = min p(ˆX|x)I X;ˆ˚X s.t.Ex∼p(x)Eˆxi∈ˆX|ˆys[d(x,ˆxi)]≤D, Eˆxi∈ˆX|ˆysDKL[px||pˆxi]≤P,(9) where I X;ˆ˚X =Hsˆ˚X −Hsˆ˚X|X with semantic variableˆ˚Xcorresponds to the reconstructed synset ˆX.Proof. As stated in Figure 2, the model of synonymous image compression can be considered as a generalized vari- ational auto-encoder. By using the proposed SVI, i.e., mini- mizing the partial semantic KL divergence given in (7), Ex∼p(x)DKL,s q||p˜ys|X =Ex∼p(x)E˜y∼q :0 logq(˜y|x)−logpX|˜ys(X|˜ys)−logp˜ys(˜ys) +const.(10) The first term equals 0 under the assumption of a uniform density on the unit interval centered on y, and the last term is a constant for a determined xand corresponding ideal synset X. For the third term, with | https://arxiv.org/abs/2505.22438v1 |
a determined inference and generative model, the coding rate of the synonymous representation Ex∼p(x)E˜y∼q −logp˜ys(˜ys) is equal to I X;ˆ˚X , as stated in Appendix A.2. By Lemma 3.2, the minimization of the second term is equivalent to minimizing a weighted expected distortion Ex∼p(x)E˜y∼qE˜xi∈˜X|˜ys[d(x,˜xi)]plus a weighted E-KLD termE˜y∼qE˜xi∈˜X|˜ysDKL[px||p˜xi]. These weights can be considered as Lagrange multipliers to the rate term, which makes the optimization goal equivalent to minimizing I X;ˆ˚X with quantized bounded expected distortion and E-KLD constraints to obtain the optimal p(ˆX|x), shown as(9). This target corresponds to a Synonymous Rate- Distortion-Perception Tradeoff , which can be shown as LX=λr·Ex∼p(x) −logpˆys(ˆys) +λd·Ex∼p(x)Eˆxi∈ˆX|ˆys[d(x,ˆxi)] +λp·Eˆxi∈ˆX|ˆysDKL[px||pˆxi],(11) thus we finish the proof of the theorem. 5 Synonymous Variational Inference for Perceptual Image Compression (a)SamplingParametric Prior Latent Synset Reconstructed SynsetIdeal SynsetOriginal Image Sample (b)SamplingParametric Prior Shifting: Shifting: Latent Synset Reconstructed SynsetIdeal SynsetOriginal Image Sample Figure 3. Processing frameworks of SIC. (a): The general framework. (b): The progressive framework. Due to space limitations, only a brief outline of the proof is provided above. Please refer to Appendix A.2 for detailed proof. Additionally, we state that the existing rate-distortion- perception tradeoff (4)is a special case of (11) when there is only one sample ˆxin the reconstructed synset ˆX. More comprehensive discussions are provided in Appendix A.3. 4. Synonymous Image Compression According to Figure 2, the main difference between our proposed processing scheme and the general LIC method is that the generator only needs part of the accurate latent fea- tures, while the other part can be obtained through random sampling instead of accurate coding. Thus, the generator can obtain all the information required to reconstruct the image. To this end, we name this new image compression scheme Synonymous Image Compression (SIC). A general framework of SIC is given in Figure 3(a). The SIC codec requires an analysis transform ga x;ϕg and a synthesis transform gs ˆys,ˆyϵ,j;θg to achieve the bidi- rectional nonlinear mapping between the data space and the latent space. Only the synonymous representation ˆysis required to be coded, and this representation is equivalent to a quantized latent synset ˆYcontains all the samples with different detailed representations. With obtaining ˆys, the generative model can generate multiple images ˆX={ˆxj} by sampling diverse detailed representationsˆyϵ,j inˆY. A uniform noise with unit interval should be used for ys to achieve efficient continuous optimization, and an en- tropy model assisted by an arbitrary form of parametric prior should be employed to estimate the coding rate for ˆys, whereas both these two are not essential for yϵandˆyϵ. Although this aligns with the analytical process of synony- mous variational inference, it results in the SIC model’s capabilities being underutilized, as the details still have the potential to provide additional information. The progressive framework of SIC is proposed to solve this problem, as shown in Figure 3(b). It partition the latent fea-tureˆyintoLsynonymous levels, treating the first llevels as the synonymous representation ˆy(l) s, while the subsequent levels are considered as the detailed representation ˆy(l) ϵ. By varying lfrom 1toLand optimizing through the loss func- tion of the corresponding level in the training process, the SIC | https://arxiv.org/abs/2505.22438v1 |
model can be optimized for approaching different ideal synsets X(l). After training, synonymous representations at each level can be encoded progressively and fed to the decoder, making SIC a progressive image codec that can produce images at diverse synonymous levels (correspond- ing to varying coding rates) using a single generator. In our upcoming experiments, we implement a progressive SIC model to fully leverage the model’s capabilities, where the Llevels are equally slicing the channels CintoLgroups, shown as Figure 7 in Appendix C.1. The designing of the training loss for the progressive SIC model should take several practical issues into account. Firstly, while the loss function requires traversing samples in the reconstructed synset ˆX, this is not practical during the actual training process. Therefore, the real training loss function utilizes a small number of reconstructed samples and computes the arithmetic mean as a practical approxima- tion. Secondly, the training should also take into account the synonymous rate-distortion-perception trade-offs at each level, meaning that the trade-offs between levels are also re- quired to be balanced. To this end, we design a group of loss functions for the progressive SIC model that alternatively trains for the level l= 1,2,···, Lstep by step, i.e., L(l)=αL(l) X+(1−α)L(L) X+L(l) c, l= 1,2,···, L,(12) in which L(l) Xis represented by L(l) X=Ex∼p(x)h −λ(l) r·logpˆy(l) s ˆy(l) s + 1 MMX i=1 λ(l) d·MSE x,ˆx(l) i +λ(l) p·LPIPS x,ˆx(l) ii , (13) where the MSE is utilized as the distortion item, and the LPIPS (Zhang et al., 2018) is directly replaced by the KL 6 Synonymous Variational Inference for Perceptual Image Compression 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Bits Per Pixel (BPP)0.050.100.150.200.25DISTS (↓)CLIC2020 test 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.050.100.150.200.25DISTS (↓)DIV2K validation 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.10.20.3DISTS (↓)KodakBPG VTM HiFiC MS-ILLM MS-ILLM (No-GAN) Progressive SIC (Ours, M=1) Figure 4. Comparisons of methods using DISTS on different datasets. Each point on the HiFiC and MS-ILLM performance curves is from a single model, while our entire performance curves are achieved by a single progressive SIC model. divergence term since accurately calculating the KL diver- gence for image datasets is challenging; αis set between the llevel and the Llevel (equivalent to the conventional rate- distortion-perception tradeoff) to indirectly achieve multi- level tradeoffs; L(l) cis additional constraints in training, which detailed elaborated in Appendix C.1. Moreover, M denotes the number of reconstructed samples in training. Subsequent experimental results will show that with M= 1 the proposed method can achieve comparable rate-distortion- perception performance, while bigger Mwill perform ad- vantages in certain synonymous levels. 5. Experimental Illustration In this section, we examine the effectiveness of our proposed analytical theory through experimental results. 5.1. Implementation Setup and Comparison Schemes Model architecture: The analysis transform gaand the synthesis transform gsare implemented using the Swin Transformer (Liu et al., 2021), while the coding rate is es- timated using a joint autoregressive and hierarchical prior architecture (Minnen et al., 2018) based on deep convolu- tional neural networks, with structural adjustments made for our level partitioning | https://arxiv.org/abs/2505.22438v1 |
mechanism. We set the number of latent representation channels to C= 512 and the number of the equally partitioned synonymous levels to L= 16 , giving each synonymous level a channel dimension of 32. This allows a single progressive SIC codec to support 16 coding rates and their corresponding image quality levels. Model Training: We randomly select 100,000 images from the OpenImages V6 dataset (Kuznetsova et al., 2020) as the training data, resizing them to a uniform resolution of 256×256 using random crop and resized crop for the training process. We train our model for 1×106iterations with a batch size of 16, a learning rate of 1×10−4, and the AdamW optimizer with a weight decay of 5×10−5. We evaluateour models with the test set of CLIC2020 (Toderici et al., 2020), the validation set of DIV2K (Agustsson & Timofte, 2017), and the Kodak dataset4. Refer to Appendix C.1 for the hyperparameter settings and implementation details. Comparison schemes: The comparison schemes for tradi- tional image compression use BPG (Bellard, 2015) and the state-of-the-art VTM5to serve as the benchmarks for dis- tortion measures. The PIC schemes for comparison include HiFiC (Mentzer et al., 2020) and MS-ILLM (Muckley et al., 2023), including the No-GAN fine-tuning version of MS- ILLM. These two schemes use adversarial loss to optimize perceptual quality, serving as benchmarks for perceptual measures. As the pre-training model of MS-ILLM, the No-GAN scheme directly uses LPIPS, the same perception measure as our choice, which is the focus of comparison. Evaluation Metrics: PSNR is utilized for distortion mea- suring, while LPIPS and DISTS (Ding et al., 2020) are for perception measuring. It should be noted that the DISTS measure, due to its resampling tolerance, aligns more closely with the human understanding of perceptual similarity-typified synonymous relationships than LPIPS, thus as our focus in our following analysis. 5.2. Performance Analysis We first examine our progressive SIC model’s capabilities in the adaptation of full-rate perception qualities. Figure 4 compares the performance of our method and the compar- ison schemes under DISTS, in which our model is trained with sampling ˆyϵ,jonly once (i.e., M= 1), as this follows the common usage in existing generative model training. As shown in this figure, our scheme can achieve percep- tual quality adaptability across various rates using a single model, with the perceptual quality of the reconstructed im- 4Kodak PhotoCD dataset, URL http://r0k.us/graphics/kodak/. 5VVCSoftware VTM, URL https://vcgit.hhi.fraunhofer.de/ jvet/VVCSoftware VTM.git, Version 23.4. 7 Synonymous Variational Inference for Perceptual Image Compression 0.10 0.15 0.20 0.25 0.30 Bits Per Pixel (BPP)0.050.060.070.080.09DISTS (↓)CLIC2020 test 0.10 0.15 0.20 0.25 0.30 0.35 0.40 Bits Per Pixel (BPP)0.040.050.060.070.080.090.10DISTS (↓)DIV2K validation 0.1 0.2 0.3 0.4 0.5 Bits Per Pixel (BPP)0.040.060.080.100.120.14DISTS (↓)KodakProgressive SIC (Ours, M=1) Progressive SIC (Ours, M=5) Figure 5. Comparisons of our progressive SIC schemes with different sampling numbers in reconstructed ˆXon different datasets. age improving as the coding rate increases. For the concerned DISTS measure, our method surpasses the No-GAN MS-ILLM solution (also trained with LPIPS) in a large coding rate range. This performance is demon- strated under conditions where the PSNR quality contin- uously approaches and even exceeds | https://arxiv.org/abs/2505.22438v1 |
the comparison No- GAN schemes, and the LPIPS quality remains very similar, thus verifying a comparable rate-distortion-perception per- formance, shown as Figure 11 in Appendix C.2. This sur- passing reflects the advantage of incorporating the concept of synset in our proposed SVI. However, this advantage is modest compared to HiFiC and MS-ILLM guided by the GAN’s adversarial loss, since our loss directly uses LPIPS to replace the KL divergence. Therefore, utilizing discrim- inative mechanisms in SIC models with the synonymous viewpoint (i.e., replacing the E-KLD term) may further en- hance perceptual quality in future considerations. In addition, Figure 5 compares the DISTS qualities for re- construction sampling numbers M= 1 andM= 5 un- der identical hyperparameter settings. With M= 5, the expected distortion and perception loss are estimated via arithmetic mean, aligning more closely with theoretical op- timization directions. Results indicate that expanding the reconstructed synset ˆXby increasing ˆyϵ,jsamples during training offers slight performance advantages across various datasets in general. These advantages are especially evident in the low and medium rate range, while the intersections at relatively high rates are due to insufficient fine-tuning of the hyperparameter settings, which needs more precise exploration in future works. For further additional analysis and visualization results, please refer to Appendix C.2. 6. Limitations According to the above experimental results and analysis, the limitation of the implemented progressive SIC model mainly lies in using the LPIPS measure to replace thedivergence term in the loss function . Based on related PIC work, the GAN-based adversarial loss is suggested as a replacement for the KL divergence term to further improve model performance. To verify the impact of adversarial loss on performance, we build a discriminator based on HiFiC’s structure and fine- tune the synthesis transform gsof our M= 1andM= 5 models with non-saturating loss (Goodfellow et al., 2014) for2×105steps as supplementary experiments. Specif- ically, we use a single conditional discriminator (refer to Appendix D.1) to obtain the discriminative loss for recon- structed images at all synonymous levels, with the syn- onymous representation ˆy(l) sof each synonymous level l introduced as a separate condition. The non-saturating loss can be expressed as L(l) G=Ex,ˆx(l) ih −log D ˆx(l) i,ˆy(l) si , (14) L(l) D=Ex,ˆx(l) ih −log 1−D ˆx(l) i,ˆy(l) si +Ex∼p(x)h −log D x,ˆy(l) si ,(15) and thus the perception term in Equation (13) is required to be adjusted from solely the LPIPS term to the sum of the LPIPS term and the generative loss in Equation (14), i.e., LPIPS x,ˆx(l) i =⇒LPIPS x,ˆx(l) i +L(l) G.(16) Figure 6 shows the fine-tuned performance using DISTS as the evaluation measure, while other measures, including PSNR, LPIPS, and FID (Heusel et al., 2017), and visualiza- tion results are given in Appendix D.2. These results show that: •The perceptual quality (DISTS, FID) has improved . While LPIPS performance remains nearly unchanged, DISTS and FID show greater gains at higher bitrates, with DISTS gradually approaching that of MS-ILLM 8 Synonymous Variational Inference for Perceptual Image Compression 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Bits Per Pixel (BPP)0.050.100.150.20DISTS (↓)CLIC2020 test 0.0 0.1 0.2 0.3 0.4 | https://arxiv.org/abs/2505.22438v1 |
0.5 0.6 0.7 Bits Per Pixel (BPP)0.050.100.150.20DISTS (↓)DIV2K validation 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.050.100.150.200.25DISTS (↓)KodakHiFiC Progressive SIC (With GAN, M=1)MS-ILLM (with GAN) Progressive SIC (No-GAN, M=5)MS-ILLM (No-GAN) Progressive SIC (With GAN, M=5)Progressive SIC (No-GAN, M=1) Figure 6. Comparisons of methods using DISTS on different datasets (supplemented fine-tuned model performance). Each point on the HiFiC and MS-ILLM performance curves is from a single model, while our entire performance curves are achieved by a single progressive SIC model. (with GAN). This means that the fine-tuning loss with the adversarial loss is closer to the ideal optimization direction, which can make better perceptual qualities of the reconstructed images. Besides, while DISTS and FID values change little at low rates (bpp <0.10), the visual qualities improve significantly. •The improvement of DISTS is relatively obvious, while the enhancement in FID remains limited . This is a noteworthy phenomenon since it is absent in the non-sampling schemes , as confirmed by the experi- mental results in the MS-ILLM paper (Muckley et al., 2023). Unlike DISTS’ resampling tolerance, FID fo- cuses on the consistency of the distribution between the original and reconstructed image groups. This suggests that our implementation is still insufficient in optimiz- ing the distribution of reconstructed images, especially in our detailed sampling mechanism. •The gap compared to HiFiC and MS-ILLM is still obvious, especially on FID . In addition to the reason of the detailed sampling mechanism, this issue may also be due to insufficient fine-tuning with multiple synonymous layers battling against each other, or in- efficient perceptual loss is chosen. Besides, to address the limited improvement at low bit rates (bpp <0.10), another solution is to find a better mechanism than equal channel slicing for synonymous level partition- ing. •The distortion (PSNR) has degraded , which can ver- ify the distortion-perception tradeoff as mentioned in (Blau & Michaeli, 2018). Based on the above analyses, the current SIC framework still has limitations but shows potential for further exploration and offers belief directions for future research on perceptual image compression.7. Relevant Thoughts on Semantic Information Theory As an extension to synonymity-based semantic informa- tion theory, our work provide guidance for practical image coding designs. In Appendix B, we further discuss the rela- tionships with existing conclusions in semantic information theory, including the semantic entropy and the down seman- tic mutual information proposed in (Niu & Zhang, 2024). 8. Conclusions In this paper, we consider the perceptual image compres- sion problem from the perspective of synonymity-based semantic information theory. Specifically, we propose a syn- onymous variational inference (SVI) method to re-analyze the optimization direction of perceptual image compression. Based on this analysis method, we theoretically prove that the optimization direction of perceptual image compres- sion is a triple tradeoff, i.e., synonymous rate-distortion- perception tradeoff, which is compatible with the existing rate-distortion-perception tradeoff empirically presented by previous works. Additionally, we propose a new perceptual image compression scheme, namely synonymous image compression, corresponding to the SVI analytical process, and implement a rough progressive SIC model to fully lever- age the model’s capabilities. Experimental | https://arxiv.org/abs/2505.22438v1 |
results demon- strate full-rate rate-distortion perception performance and notable advantages on DISTS, thereby verifying the effec- tiveness of our proposed analysis method. Software and Data We will upload code for reproducing our results to the repos- itory at https://github.com/ZJLiang6412/ SynonymousImageCompression . 9 Synonymous Variational Inference for Perceptual Image Compression Acknowledgements This work was supported by the National Natural Science Foundation of China (No. 62293481, No. 62471054). Impact Statement Our work makes a significant contribution to semantic infor- mation processing. A key challenge in semantic information theory is the lack of a unified viewpoint, as many perspec- tives fail to effectively guide coding design. Guided by the synonymity of semantic information, this paper demon- strates the fundamental theoretical reason why the distribu- tion distance, used to measure perceptual quality in percep- tual image compression empirically, appears in the optimiza- tion objective. Moreover, our theoretical analysis provides consistent and universal guidance for designing image com- pression approaches, regardless of whether compression is considered for perceptual quality. To summarize, our contri- bution links semantic information theory to practical image coding problems, which paves the way for a more unified viewpoint of semantic information theory. References Agustsson, E. and Timofte, R. Ntire 2017 challenge on single image super-resolution: Dataset and study. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops , July 2017. Agustsson, E., Tschannen, M., Mentzer, F., Timofte, R., and Gool, L. V . Generative adversarial networks for extreme learned image compression. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) , October 2019. Agustsson, E., Minnen, D., Toderici, G., and Mentzer, F. Multi-realism image compression with a conditional gen- erator. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) , pp. 22324–22333, June 2023. Al-Sharhan, S., Karray, F., Gueaieb, W., and Basir, O. Fuzzy entropy: a brief survey. In 10th IEEE international confer- ence on fuzzy systems.(Cat. No. 01CH37297) , volume 3, pp. 1135–1139. IEEE, 2001. Ball´e, J., Laparra, V ., and Simoncelli, E. P. End-to-end opti- mized image compression. In International Conference on Learning Representations (ICLR) , 2017. Ball´e, J., Minnen, D., Singh, S., Hwang, S. J., and Johnston, N. Variational image compression with a scale hyperprior. InInternational Conference on Learning Representations (ICLR) , 2018.Ball´e, J., Chou, P. A., Minnen, D., Singh, S., Johnston, N., Agustsson, E., Hwang, S. J., and Toderici, G. Nonlinear transform coding. IEEE Journal of Selected Topics in Signal Processing , 15(2):339–353, 2020. Bao, J., Basu, P., Dean, M., Partridge, C., Swami, A., Le- land, W., and Hendler, J. A. Towards a theory of semantic communication. In 2011 IEEE Network Science Work- shop , pp. 110–117. IEEE, 2011. Bar-Hillel, Y . and Carnap, R. Semantic information. The British Journal for the Philosophy of Science , 4(14):147– 157, 1953. Barwise, J. and Perry, J. Situations and attitudes. The Journal of Philosophy , 78(11):668–691, 1981. Bellard, F. BPG image format, 2015. URL https:// bellard.org/bpg . Blau, Y . and Michaeli, T. The perception-distortion tradeoff. InProceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) , June 2018. | https://arxiv.org/abs/2505.22438v1 |
Blau, Y . and Michaeli, T. Rethinking lossy compression: The rate-distortion-perception tradeoff. In Chaudhuri, K. and Salakhutdinov, R. (eds.), Proceedings of the 36th International Conference on Machine Learning (ICML) , pp. 675–685. PMLR, 2019. Careil, M., Muckley, M. J., Verbeek, J., and Lathuili `ere, S. Towards image compression with perfect realism at ultra- low bitrates. In The Twelfth International Conference on Learning Representations (ICLR) , 2024. Carnap, R. and Bar-Hillel, Y . An outline of a theory of semantic information. 1952. Cheng, Z., Sun, H., Takeuchi, M., and Katto, J. Learned image compression with discretized gaussian mixture likelihoods and attention modules. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) , June 2020. De Luca, A. and Termini, S. A definition of a nonprobabilis- tic entropy in the setting of fuzzy sets theory. Information and Control , 20(4):301–312, 1972. De Luca, A. and Termini, S. Entropy of L-fuzzy sets. Infor- mation and Control , 24(1):55–73, 1974. Ding, K., Ma, K., Wang, S., and Simoncelli, E. P. Image quality assessment: Unifying structure and texture simi- larity. IEEE transactions on pattern analysis and machine intelligence , 44(5):2567–2581, 2020. Floridi, L. Outline of a theory of strongly semantic informa- tion. Minds and machines , 14:197–221, 2004. 10 Synonymous Variational Inference for Perceptual Image Compression Goodfellow, I. J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y . Generative adversarial nets. In Advances in Neural In- formation Processing Systems (NIPS) . Curran Associates, Inc., 2014. Hamdi, Y ., Wagner, A. B., and Gunduz, D. The rate- distortion-perception trade-off with algorithmic realism, 2025. He, D., Zheng, Y ., Sun, B., Wang, Y ., and Qin, H. Checker- board context model for efficient learned image compres- sion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) , pp. 14771–14780, June 2021. He, D., Yang, Z., Peng, W., Ma, R., Qin, H., and Wang, Y . ELIC: Efficient learned image compression with unevenly grouped space-channel contextual adaptive coding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) , pp. 5718–5727, June 2022a. He, D., Yang, Z., Yu, H., Xu, T., Luo, J., Chen, Y ., Gao, C., Shi, X., Qin, H., and Wang, Y . PO-ELIC: Perception- oriented efficient learned image coding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops , pp. 1764–1769, June 2022b. Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., and Hochreiter, S. GANs trained by a two time-scale update rule converge to a local nash equilibrium. In Guyon, I., Luxburg, U. V ., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems (NIPS) . Curran Associates, Inc., 2017. Ho, J., Jain, A., and Abbeel, P. Denoising diffusion proba- bilistic models. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural In- formation Processing Systems (NeurIPS) , pp. 6840–6851. Curran Associates, Inc., 2020. Hoogeboom, E., Agustsson, E., Mentzer, F., Versari, L., Toderici, G., and Theis, L. High-fidelity | https://arxiv.org/abs/2505.22438v1 |
image compres- sion with score-based generative models. arXiv preprint arXiv:2305.18231 , 2023. Kingma, D. P. and Welling, M. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114 , 2013. Kuznetsova, A., Rom, H., Alldrin, N., Uijlings, J., Krasin, I., Pont-Tuset, J., Kamali, S., Popov, S., Malloci, M., Kolesnikov, A., et al. The open images dataset v4: Uni- fied image classification, object detection, and visual re- lationship detection at scale. International journal of computer vision , 128(7):1956–1981, 2020.Li, C., Luo, J., Dai, W., Li, C., Zou, J., and Xiong, H. Spatial-channel context-based entropy modeling for end- to-end optimized image compression. In 2020 IEEE International Conference on Visual Communications and Image Processing (VCIP) , pp. 222–225, 2020. Li, H., Li, S., Dai, W., Li, C., Zou, J., and Xiong, H. Frequency-aware transformer for learned image com- pression. In The Twelfth International Conference on Learning Representations (ICLR) , 2024. Liu, Z., Lin, Y ., Cao, Y ., Hu, H., Wei, Y ., Zhang, Z., Lin, S., and Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) , pp. 10012–10022, October 2021. Mentzer, F., Toderici, G. D., Tschannen, M., and Agusts- son, E. High-fidelity generative image compression. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Pro- cessing Systems (NeurIPS) , pp. 11913–11924. Curran Associates, Inc., 2020. Minnen, D., Ball ´e, J., and Toderici, G. D. Joint autoregres- sive and hierarchical priors for learned image compres- sion. In Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems (NeurIPS) . Cur- ran Associates, Inc., 2018. Muckley, M. J., El-Nouby, A., Ullrich, K., Jegou, H., and Verbeek, J. Improving statistical fidelity for neural image compression with implicit local likelihood models. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), Proceedings of the 40th Inter- national Conference on Machine Learning (ICML) , pp. 25426–25443. PMLR, 2023. Niu, K. and Zhang, P. A mathematical theory of semantic communication. Journal on Communications , 45(6): 7–59, 2024. URL https://www.joconline. com.cn/en/article/doi/10.11959/j.issn. 1000-436x.2024111/ . Qian, J., Zhang, G., Chen, J., and Khisti, A. A rate- distortion-perception theory for binary sources. In In- ternational Zurich Seminar on Information and Commu- nication (IZS 2022). Proceedings , pp. 34–38. ETH Zurich, 2022. Santurkar, S., Budden, D., and Shavit, N. Generative com- pression. In 2018 Picture Coding Symposium (PCS) , pp. 258–262, 2018. Shannon, C. E. A mathematical theory of communication. The Bell system technical journal , 27(3):379–423, 1948. 11 Synonymous Variational Inference for Perceptual Image Compression Shannon, C. E. et al. Coding theorems for a discrete source with a fidelity criterion. IRE Nat. Conv. Rec , 4(142-163): 1, 1959. Theis, L. Position: What makes an image realistic? In Pro- ceedings of the 41st International Conference on Machine Learning (ICML) , 2024. Theis, L. and Agustsson, E. On the advantages of stochastic encoders. In Neural Compression: From Information Theory to Applications – Workshop @ ICLR 2021 , 2021. Theis, L. and Wagner, A. B. | https://arxiv.org/abs/2505.22438v1 |
A coding theorem for the rate- distortion-perception function. In Neural Compression: From Information Theory to Applications – Workshop @ ICLR 2021 , 2021. Theis, L., Salimans, T., Hoffman, M. D., and Mentzer, F. Lossy compression with gaussian diffusion. arXiv preprint arXiv:2206.08889 , 2022. Thomas, M. and Joy, A. T. Elements of information theory . Wiley-Interscience, 2006. Toderici, G., Theis, L., Johnston, N., Agustsson, E., Mentzer, F., Ball ´e, J., Shi, W., and Timofte, R. CLIC 2020: Challenge on learned image compression, 2020, 2020. Wallace, G. K. The JPEG still picture compression standard. Communications of the ACM , 34(4):30–44, 1991. Weaver, W. Recent contributions to the mathematical theory of communication. ETC: a review of general semantics , pp. 261–281, 1953. Xu, T., Zhang, Q., Li, Y ., He, D., Wang, Z., Wang, Y ., Qin, H., Wang, Y ., Liu, J., and Zhang, Y .-Q. Conditional perceptual quality preserving image compression. arXiv preprint arXiv:2308.08154 , 2023. Xu, T., Zhu, Z., He, D., Li, Y ., Guo, L., Wang, Y ., Wang, Z., Qin, H., Wang, Y ., Liu, J., and Zhang, Y .-Q. Idempo- tence and perceptual image compression. In The Twelfth International Conference on Learning Representations (ICLR) , 2024. Yan, Z., Wen, F., Ying, R., Ma, C., and Liu, P. On perceptual lossy compression: The cost of perceptual reconstruction and an optimal training framework. In Meila, M. and Zhang, T. (eds.), Proceedings of the 38th International Conference on Machine Learning (ICML) , pp. 11682– 11692. PMLR, 2021. Zhang, R., Isola, P., Efros, A. A., Shechtman, E., and Wang, O. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) , June 2018. 12 Synonymous Variational Inference for Perceptual Image Compression A. The Proof of the Key Theoretical Results In the main text, we present Lemma 3.2 and provide a brief proof of the optimization direction of SIC in Theorem 3.3, based on this lemma. In this appendix section, we first provide detailed proofs of Lemma 3.2 and Theorem 3.3, and briefly discuss their relationships with the existing image compression theories. A.1. The Proof of Lemma 3.2 Lemma 3.2. When the source considers the existence of an ideal synset Xand the decoder places the reconstructed sample in a reconstructed synset ˜X, the minimization of the expected negative log synonymous likelihood term minEx∼p(x)E˜y∼q −logpX|˜ys(X|˜ys) ⇐⇒ minE˜y∼qE˜xi∈˜X|˜ys λd·Ex∼p(x)[d(x,˜xi)] +λp·DKL[px||p˜xi] , (17) in which λdandλpare the tradeoff factors for the expected distortion term and the expected KL divergence term, respectively. Proof. According to the generative model presented in Figure 2, any sample xiin the ideal synset Xis expected to be capable of being generated using a synonymous representation ˜ysand a detailed sample ˆyϵ,j, in which the detailed sample ˆyϵ,jis sampled based on a specific prior pˆyϵ|˜ys(ˆyϵ|˜ys;ψ,θp). It should be noted that ˆyϵ,j̸=˜yϵsince the detailed representation ˜yϵis not required to be coded and transmitted to the decoder end. Additionally, according to the semantic information theory based on synonymity (Niu & Zhang, 2024), the probability of a synset is equal to the sum of the | https://arxiv.org/abs/2505.22438v1 |
probability or the integral of the density of each sample within the set. Herein, we consider the integral form because image samples within an ideal synset can typically be transformed into one another through continuous changes. Based on the above factors, we can expand the expression on the left side of (17) as follows: Ex∼p(x)E˜y∼q −logpX|˜ys(X|˜ys;θg) (a)=Ex∼p(x)E˜y∼q" −logZ ˆyϵ,jpX|˜ys,ˆyϵ,j X|˜ys,ˆyϵ,j;θg ·pˆyϵ,j|˜ys ˆyϵ,j|˜ys;ψ,θp dˆyϵ,j# (b)=Ex∼p(x)E˜y∼qn −logEˆyϵ,j|˜ys∼pˆyϵ,j|˜ysh pX|˜ys,ˆyϵ,j X|˜ys,ˆyϵ,j;θgio (c)=Ex∼p(x)E˜y∼q −logEˆyϵ,j|˜ys∼pˆyϵ,j|˜ysZ xi∈Xpxi|˜ys,ˆyϵ,j xi|˜ys,ˆyϵ,j;θg dxi (d)=Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ysZ xi∈Xpxi|˜xj(xi|˜xj)dxi ,(18) where (a)is achieved by introducing ˆyϵ,jinto the conditional probability with a corresponding integral; (b)is according to the definition of mathematical expectation; (c)is according to the integral relationship between the probability of the ideal synset and its samples as stated before; (d)is based on a determined generator θgwhich can definitely map the input ˜ysand ˆyϵ,jto the output ˜xj, i.e., ˜xj=gs ˜ys,ˆyϵ,j;θg . It should be noted that in the equation (d), the reconstructed sample ˜xj is not required to be completely aligned with the source synonymous sample xibut for the overall ideal synset X, which is why two subscripts, i.e., iandj, are used here. By minimizing this term, we can use the synonym representation ˆysto obtain the reconstructed synset ˆX, bringing it closer to the ideal synset X, thus achieving the optimization objective shown in Figure 1. Since the above results only involve the sample xifrom the ideal synset centered by the original image xand the reconstructed sample ˜xjobtained by the SIC codec, the influence of the original image sample xhas not directly involved. To this end, we consider to rewrite (18) as Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ysZ xi∈Xpxi|˜xj(xi|˜xj)dxi (a)=Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ysZ xi∈Xp˜xj|xi(˜xj|xi)·pxi(xi) p˜xj(˜xj)dxi (b)=Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ysZ xi∈Xp˜xj|xi(˜xj|xi)·px(x) p˜xj(˜xj)·p˜xj(˜xj) px(x)·pxi(xi) p˜xj(˜xj)dxi ,(19) 13 Synonymous Variational Inference for Perceptual Image Compression in which (a)is by the Bayes’ theorem, and (b)is achieved by introducing the reciprocal termspx(x) p˜xj(˜xj)andp˜xj(˜xj) px(x). Furthermore, since any sample xiin the ideal synset (including the original image sample x) shares the same synonymous representation ˜ysby the ideal parametric SIC encoder with ϕ∗ g, the posterior term in the (19) satisfy the following equations: p˜xj|xi(˜xj|xi) =p˜xj|˜ys(˜xj|˜ys) =p˜xj|x(˜xj|x). (20) Therefore, the result of (19) can be further derived as Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ysZ xi∈Xp˜xj|xi(˜xj|xi)·px(x) p˜xj(˜xj)·p˜xj(˜xj) px(x)·pxi(xi) p˜xj(˜xj)dxi (a)=Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ysZ xi∈X p˜xj|x(˜xj|x)·px(x) p˜xj(˜xj) ·p˜xj(˜xj) px(x)·pxi(xi) p˜xj(˜xj)dxi (b)=Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ysZ xi∈Xpx|˜xj(x|˜xj)·p˜xj(˜xj) px(x)·pxi(xi) p˜xj(˜xj)dxi =Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ys px|˜xj(x|˜xj)·p˜xj(˜xj) px(x)·Z xi∈Xpxi(xi) p˜xj(˜xj)dxi (c)=Ex∼p(x)E˜y∼q −logE˜xj∈˜X|˜ys px|˜xj(x|˜xj)·p˜xj(˜xj) px(x)·1 |X|Z xi∈Xpxi(xi) p˜xj(˜xj)dxi · |X| (d) ≤Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys −logpx|˜xj(x|˜xj) + logpx(x) p˜xj(˜xj)−log1 |X|Z xi∈Xpxi(xi) p˜xj(˜xj)dxi−log|X| (e) ≤Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys −logpx|˜xj(x|˜xj) + logpx(x) p˜xj(˜xj)−1 |X|Z xi∈Xlogpxi(xi) p˜xj(˜xj)dxi−log|X| ,(21) where (a)replaces p˜xj|xi(˜xj|xi)withp˜xj|x(˜xj|x)using (20);(b)is derived by the Bayes’ theorem in reverse; (c) introduces |X|and its reciprocal, in which |X|denotes the size of the ideal synset X, and can be used to express an arithmetic mean along with the followed integral over X; (d) and (e) can be scaled based on the Jensen’s inequalities, respectively, since −log (·)is a convex function. Next, we examine the result of (21) separately. 1.The Derivation of the First Term. Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys −logpx|˜xj(x|˜xj) denotes an expected distortion which averaged on the source images and the corresponding samples of the reconstructed synsets. As a typical case, when the likelihood probability px|˜xj(x|˜xj)follows a Gaussian distribution N x|˜xj, σ2Id (in which ddenotes | https://arxiv.org/abs/2505.22438v1 |
the dimension of the original image x), this term will be equivalent to Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys −logpx|˜xj(x|˜xj) =1 2σ2·Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys||x−˜x||2+d 2log 2πσ2 ,(22) in which the σ2is the variance term of the set Gaussian distribution, i.e., the power of the quantization noise. In this case, the term can be considered as a weighted Expected Mean Squared Error (E-MSE) loss (instead of the Mean Squared Error (MSE) loss) plus a constant. In typical LIC methods (Ball ´e et al., 2017; 2018), the multiplier1 2σ2is often replaced with a hyperparameter λas the tradeoff factor to the MSE loss to the balance with the coding rate. However, in SIC, if E-MSE is used as the distortion loss term, it is incomplete to define the physical meaning of the hyperparameter as1 2σ2alone: The effect of scaling, due to the inequality in (21)(d), should be also considered. Therefore, we summarize the analysis results as λd·Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys||x−˜xj||2+const, (23) in which λd=αd ˜X ·1 2σ2. The multiplier αd ˜X is a scaling factor influenced by the size of the reconstructed synset ˜X, and it can be implicitly incorporated into the value of the hyperparameter λdthus it does not need to be 14 Synonymous Variational Inference for Perceptual Image Compression explicitly assigned. It should be noted that when the equality condition of Jensen inequality (21)(d) is satisfied or the reconstructed synset contains only one sample, the multiplier αd ˜X = 1, and the analysis result will be degraded intoλ·Ex∼p(x)E˜y∼q||x−˜x||2+const. When other distortion measures (such as Expected MS-SSIM, abbreviated as E-MS-SSIM) are used instead of E-MSE, the situation is similar and will not be discussed further. Herein, we give a general analysis result as λd·Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys[d(x,˜xj)] + const, (24) in which d(·)denotes any distortion measure between the original image xand the reconstructed sample ˜xj. 2.The Derivation of the Second Term and the Third Term. These two terms should be firstly considered together due to their linkage, which can be derived as Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys logpx(x) p˜xj(˜xj)−1 |X|Z xi∈Xlogpxi(xi) p˜xj(˜xj)dxi =Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys1 |X|Z xi∈X logpx(x) p˜xj(˜xj)−logpxi(xi) p˜xj(˜xj) dxi =Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys1 |X|Z xi∈Xlogpx(x) p˜xj(˜xj)·p˜xj(˜xj) pxi(xi)dxi =Ex∼p(x)1 |X|Z xi∈Xlogpx(x) pxi(xi)dxi =1 |X|Z xi∈XEx∼p(x) logpx(x) pxi(xi) dxi =1 |X|Z xi∈XDKL[px||pxi]dxi=f(x,X),(25) i.e., the arithmetic mean of the KL divergence between the original sample xand the synonymous sample xi, which is a non-negative function f(x,X)of the original sample xand the ideal synset X. If these two factors at the source are determined, the result of the function will be constant. For a special case, when Xcontains only one sample, i.e., the original image x, this constant will be equal to 0 since the two distributions reduce to only one distribution px. Despite the foregoing facts, if it is treated as a constant, the existence of the ideal synset on the source will lose its meaning during the minimization process, and no samples with perceptual similarity to the source image will be available to provide a reference for the reconstructed samples. Therefore, we need to consider the second and third terms separately to determine the meaning of the constant value in the optimization process: • For the second term Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys logpx(x) p˜xj(˜xj) , it | https://arxiv.org/abs/2505.22438v1 |
can be further derived as Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys logpx(x) p˜xj(˜xj) =E˜y∼qE˜xj∈˜X|˜ys Ex∼p(x)logpx(x) p˜xj(˜xj) =E˜y∼qE˜xj∈˜X|˜ysDKL px||p˜xj ,(26) i.e., an Expected KL Divergence (E-KLD) between the distribution of the original image pxand the distribution of the reconstructed sample p˜xjthat averaged on the reconstructed synset ˜X. •As for the third term, i.e., Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys −1 |X|Z xi∈Xlogpxi(xi) p˜xj(˜xj)dxi , although it has a similar form to KL divergence, it cannot be called KL divergence because it uses the arithmetic mean instead of the mathematical expectation, thus lacking the non-negative properties of KL divergence. It should be noted that the outer mathematic expectations Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ysis actually calculated the expectation value according to the conditional probability p˜xj|x(˜xj|x)instead of p˜xj(˜xj), thus the result cannot be regarded as KL divergence from this perspective neither. In spite of this, we can intuitively find the conditions under which this term equals 0, which can be expressed as Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys −1 |X|Z xi∈Xlogpxi(xi) p˜xj(˜xj)dxi = 0 ⇐⇒ pxi(xi) =p˜xj(˜xj)∀i, j (27) 15 Synonymous Variational Inference for Perceptual Image Compression i.e., for arbitrary sample pair (xi,˜xj), the probabilities of both samples are equal. To facilitate subsequent analysis, we label this term as −δp. Based on the above analysis, we obtain the following equation relationship: E˜y∼qE˜xj∈˜X|˜ysDKL px||p˜xj −δp=1 |X|Z xi∈XDKL[px||pxi]dxi=f(x,X). (28) From this formula, we can see that although f(x,X)is a constant when xandXare determined, we can ap- proximate it by minimizing the E-KLD term E˜xj∈˜X|˜ysDKL px||p˜xj . For a special case, by forcing δp= 0 with equal probability sampling for ˜xj, the E-KLD term E˜xj∈˜X|˜ysDKL px||p˜xj is equal to the arithmetic mean term 1 |X|R xi∈XDKL[px||pxi]dxi. Similar to the first term, considering the effect of scaling in (3.2)(d), we summarize the analysis results as λp·E˜y∼qE˜xj∈˜X|˜ysDKL px||p˜xj , (29) in which λp= 1|X|̸=1 X ·αp ˜X is also a scaling factor influenced by the size of the ideal synset Xand the reconstructed synset ˜X, and 1|X|̸=1is a indicated function of the size of the ideal synset |X|. Similar to the first term, we discuss the following two special cases: •When the equality condition of Jensen inequality (21)(e) is satisfied, or the ideal synset is considered with multiple samples while the reconstructed synset contains only one, the multiplier 1|X|̸=1 X = 1andαp ˜X = 1, and the analysis result will be degraded into E˜y∼qDKL[px||p˜x]. •When the ideal synset contains only one sample, i.e., the original image x, the multiplier 1|X|̸=1(|X|) = 0 , which makes the analysis result equal to 0. 3.The Derivation of the Fourth Term. With the determination of the ideal synset Xfor the original image x, the term −log|X|is a constant that cannot be optimized. To summarize, by consolidating the above analysis results, we complete the proof of Lemma 3.2, that is, minEx∼p(x)E˜y∼q −logpX|˜ys(X|˜ys) = minn λd·Ex∼p(x)E˜y∼qE˜xj∈˜X|˜ys[d(x,˜xi)] + consto +n λp·E˜y∼qE˜xj∈˜X|˜ysDKL px||p˜xjo +const ⇔minE˜y∼qE˜xi∈˜X|˜ys λd·Ex∼p(x)[d(x,˜xi)] +λp·DKL[px||p˜xi] .(30) A.2. The Proof of Theorem 3.3 Theorem 3.3. For an image source x∼p(x)together with its bounded expected distortion Ex∼p(x)Eˆxi∈ˆX|ˆys[d(x,ˆxi)] and expected KL divergence Eˆxi∈ˆX|ˆysDKL[px||pˆxi], the minimum achievable rate of perceptual image compression is R(X) = min p(ˆX|x)I X;ˆ˚X s.t.Ex∼p(x)Eˆxi∈ˆX|ˆys[d(x,ˆxi)]≤D, Eˆxi∈ˆX|ˆysDKL[px||pˆxi]≤P,(31) where I X;ˆ˚X =Hsˆ˚X −Hsˆ˚X|X with | https://arxiv.org/abs/2505.22438v1 |
semantic variableˆ˚Xcorresponds to the reconstructed synset ˆX. Proof. The key point to prove this problem is to consider an ideal scenario, in which there are multiple image samples xiat the source with similar perceptual similarities to the original image x. In this scenario, each sample can be assumed to be potentially generated by the ideal perceptual image decoder. To this end, it is necessary to assume the existence of an ideal 16 Synonymous Variational Inference for Perceptual Image Compression synset Xat the source which can encompass these samples (including the original image x). These samples must share the same synonymous representations which can be represented as ˜ysin the latent space, while the unique detailed features of each sample should be represented as ˜yϵin the latent space. Based on this assumption, there should be an ideal image codec, in which the encoder ensures that any sample within the ideal synset Xobtains the same synonymous representation ˜ysafter encoding, while the decoder, upon receiving only the synonymous representation ˜ys, can generate different samples xiwithin the ideal synset Xthrough sampling ˆyϵ,j. The optimization process leading to this ideal encoder-decoder pair can be modeled as a variational auto-encoder model, which can be achieved by minimizing the partial semantic KL divergence based on the idea of the proposed synonymous variational inference (SVI), that is, Ex∼p(x)DKL,s q||p˜ys|X =Ex∼p(x)E˜y|x∼q logq(˜y|x) p˜ys|X(˜ys|X) =Ex∼p(x)E˜y|x∼q logq(˜y|x) pX,˜ys(X,˜ys)/pX(X) =Ex∼p(x)E˜y|x∼q logq(˜y|x) pX|˜ys(X|˜ys)·p˜ys(˜ys)/pX(X) =Ex∼p(x)E˜y|x∼q logq(˜y|x)−logpX|˜ys(X|˜ys)−logp˜ys(˜ys) + log pX(X)(32) Next, We examine the result of (32) term by term. 1.For the first term logq(˜y|x), since the noisy latent representation ˜ycan be separated into two parts, i.e., a synonymous representation ˜ysand a detailed representation ˜yϵ, it can be expanded to logq ˜y|x;ϕg = log q ˜ys,˜yϵ|x;ϕg = log q ˜ys|x;ϕg + log q ˜yϵ|x,˜ys;ϕg . (33) Since both ˜ysand˜yϵare determined based on a parametric inference model ga x;ϕg and uniform density on the unit interval centered on ysandyϵ, this term equals a constant 0. 2.For the second term −logpX|˜ys(X|˜ys), with the outside expectations Ex∼p(x)E˜y|x∼q, the minimization of this term can be equivalent to minimizing an weighted expected distortion Ex∼p(x)E˜y∼qE˜xi∈˜X|˜ys[d(x,˜xi)]plus an weighted E-KLD term E˜y∼qE˜xi∈˜X|˜ysDKL[px||p˜xi], by Lemma 3.2. 3.For the third term −logp˜ys(˜ys), it is the coding rate of the synonymous representations. With the outside expectations, it is also equivalent to the semantic entropy of semantic variable˜˚Ycorresponding to a latent synset ˜Y. This can be derived by Ex∼p(x)E˜y|x∼q −logp˜ys(˜ys) =Ex∼p(x)E˜y|x∼q" −logZ ˜yϵp˜ys(˜ys,˜yϵ)d˜yϵ# =Ex∼p(x)E˜y|x∼q −logZ ˜y∈˜Yp˜y(˜y)d˜y (a)=Hs˜˚Y ,(34) in which (a)is achieved based on the definition of semantic entropy in Niu and Zhang’s paper (2024), with the help of the weak law of large numbers. Additionally, considering the determined codec, the semantic entropy Hs˜˚Y is equivalent to single-side semantic mutual information, i.e., Hs˜˚Y(a)=Hs˜˚X(b)=Hs˜˚X −Hs˜˚X|X(c)=I X;˜˚X , (35) where (a)is by giving a determined decoder to map the latent synset ˜Yto the reconstructed synset ˜X;(b)is achieved by a determined encoder, which makes logq ˜X|x = log q(˜ys|x) = 0 with a uniform density on the unit interval centered on ys;(c)is by the definition of this single-side semantic mutual information. 17 Synonymous Variational Inference for Perceptual Image Compression 4.For the fourth term −logpX(X), with the determination | https://arxiv.org/abs/2505.22438v1 |
of the ideal synset Xfor the original image x, it is a constant that cannot be optimized. To summarize, the minimization of (32) is equivalent to the following optimization directions LX=λd·Ex∼p(x)E˜y∼qE˜xi∈˜X|˜ys[d(x,˜xi)] +λp·E˜y∼qE˜xi∈˜X|˜ysDKL[px||p˜xi] +Ex∼p(x)E˜y∼q −logp˜ys(˜ys) .(36) At the convergence point, when the minimum value of the loss function is achieved, the model effectively minimizes the single-side semantic mutual information with the quantized form ofˆ˚Xunder the constraints of bounded quantized expected distortion and E-KLD, as follows in (31). The weights λdandλpcan be considered as Lagrange multipliers to the rate term. So we conclude this theorem. From the proof of Lemma 3.2 and Theorem 3.3 above, we can see that the differences between the proposed SVI and conventional variational inference in guiding image compression tasks mainly include: •The Analysis Method for the Likelihood Term: Conventional variational inference treats the likelihood term −log (x|˜y)in usual LIC methods as a weighted distortion (Ball ´e et al., 2017; Blau & Michaeli, 2018), primar- ily because the synonymous relationship emphasized in this paper is not incorporated in these works. In our proposed SVI, since the synonymous relationship is considered, the likelihood term primarily focuses on the mapping relationship between the latent synset and the ideal synset, which is formed by −logpX|˜ys(X|˜ys). Lemma 3.2 states that the minimization of the expected synonymous likelihood term is equivalent to the minimization of a tradeoff function with weighted expected distortion and weighted E-KLD term. Additionally, the analytical process of Lemma 3.2 emphasizes that the fundamental reason for the expected KL divergence term’s existence is due to the consideration of the ideal synset Xcentered by the original image x. Once the ideal synset is unconsidered (equal to the ideal synset only contains the original image, i.e., X={x}), the expected KL divergence term will disappear in the analysis result, which means the degradation to solely the weighted distortion term. Therefore, we can give the following statement: To the best knowledge of our authors, our method is the first work that can theoretically explain the fundamental reason for the divergence measure’s existence in perceptual image compression, which stems from considering the ideal synset as the reconstruction reference. •The Considerations on Coding Rates: Conventional variational inference considers performing entropy coding for all latent representations, whose coding rate can be represented as −logp(˜y). In our proposed SVI, only a partial of the latent representation is required to be encoded, whose coding rate is expressed as−logp(˜ys). We emphasize that the other partial, i.e., the detailed representation, is not required to be coded: it can also be sampled from the latent synset ˜Yby the decoder, which is not necessary to keep consistency with it at the encoder end. This stems from the change in optimization direction from the original sample-oriented to the ideal synset-oriented, which allows the decoder to generate any samples that can exist in the ideal synset. Since the detailed representation can be obtained by sampling at the receiving end and is allowed to contribute effective information for image reconstruction, encoding only the synonymous representation part theoretically improves coding efficiency compared to traditional methods. From the perspective of | https://arxiv.org/abs/2505.22438v1 |
mutual information, this can be expressed as I X;ˆ˚X ≤I X;ˆX , in which the condition for the inequality to hold as equality is that the reconstruction of the synonym set is restricted to producing only one sample, meaning the decoder is not allowed to sample ˆyϵ,j, nor is it permitted to use ˆyϵ,jas input to the generator. A.3. Discussions on the Relationships with Existing Image Compression Theories From Lemma 3.2, Theorem 3.3, and their respective proof processes, it is evident that the optimization objective derived in this paper through synonymous variational inference is compatible with the optimization objectives of existing image compression theories: 18 Synonymous Variational Inference for Perceptual Image Compression •Compatibility with Existing Rate-Distortion-Perception Tradeoff: According to the triple tradeoff shown as (31), when the reconstructed synset is not considered (equal to the reconstructed synset contains only one sample, represented asˆX={ˆx}), the optimization objective will be degraded into the existing rate-distortion-perception tradeoff. This relationship can be expressed by R(X) = min p(ˆX|x)I X;ˆ˚X s.t.Ex∼p(x)Eˆxi∈ˆX|ˆys[d(x,ˆxi)]≤D, Eˆxi∈ˆX|ˆysDKL[px||pˆxi]≤P,ˆX={ˆx}= = = = =⇒R(D, P) = min p(ˆx|x)I X;ˆX s.t.Ex∼p(x)[d(x,ˆx)]≤D, DKL[px||pˆx]≤P,(37) in which the KL divergence DKL[px||pˆx]is a typical measure of the divergence between distributions, i.e., dp(px, pˆx) in(3), as stated in (Blau & Michaeli, 2019). In view of this, the existing rate-distortion-perception tradeoff (4)is a special case of (11) when there is only one sample ˆxin the reconstructed synset ˆX. •Compatibility with Traditional Rate-Distortion Tradeoff: Based on the analytical process of Lemma 3.2, when the ideal synset is not considered (equal to the ideal synset contains only the original image, represented as X={x}), the expected synonymous likelihood term will be degraded into the usual likelihood term, i.e., Ex∼p(x)E˜y∼q −logpX|˜ys(X|˜ys)X={x}= = = = =⇒Ex∼p(x) −logpx|˜y(x|˜y) , (38) in which the minimization of the usual likelihood term Ex∼p(x)E˜y∼q −logpx|˜y(x|˜y) is equivalent to the minimiza- tion of a weighted distortion λEx∼p(x)E˜y∼q[d(x,˜x)], makes the existence of the KL divergence term unnecessary. Additionally, X={x}will also implicitly makes the existence of ˆyϵ,junnecessary, which results in ˆX={ˆx}. Therefore, the relationship with the traditional rate-distortion tradeoff can be represented by R(X) = min p(ˆX|x)I X;ˆ˚X s.t.Ex∼p(x)Eˆxi∈ˆX|ˆys[d(x,ˆxi)]≤D, Eˆxi∈ˆX|ˆysDKL[px||pˆxi]≤P,X={x}= = = = = = ⇒ (ˆX={ˆx})R(D) = min p(ˆx|x)I X;ˆX s.t.Ex∼p(x)[d(x,ˆx)]≤D.(39) In view of this, we state that the traditional rate-distortion tradeoff is also a special case of (11), where the condition is that the ideal synset Xalways contains only a single sample, i.e., the original x. Therefore, we demonstrate that the foundational theories underlying existing image compression methods can be viewed as special cases of our analysis viewpoint. In other words, our theoretical analysis provides consistent and universal guidance for designing image compression approaches, regardless of whether compression is considered for perceptual quality. It should be noted that, although the E-KLD term in the above analysis represents the optimal distribution distance selection based on minimizing the partial semantic KL divergence, accurately calculating the E-KLD between two image sets may be unrealistic due to the complexity of the image source. Therefore, we can refer to existing empirical practices in perceptual image compression, such as using metrics that tend to be subjective, like LPIPS or | https://arxiv.org/abs/2505.22438v1 |
DISTS, instead of the KL divergence calculation, or using adversarial losses in the GAN training process, such as Wasserstein loss, as a substitute for KL divergence. B. Relevant Thoughts on Semantic Information Theory In this appendix section, we will briefly provide relevant thoughts on semantic information theory based on our analytical results. We emphasize that the semantic information theory referenced here specifically pertains to the synonymity-based semantic information theory, primarily derived from Niu and Zhang’s paper (Niu & Zhang, 2024). B.1. Relationships with Existing Conclusions in Semantic Information Theory •Semantic Entropy: Given a semantic variable ˚U, whose possible values are the synset Uis={ui|i∈ Nis},, is= 1,2, ..., N , andNisis the set of ordinal numbers of all syntactic symbols ui∈ Uis, the semantic entropy of the semantic 19 Synonymous Variational Inference for Perceptual Image Compression variable is expressed as: Hs ˚U =−NX is=1p(Uis) logp(Uis) =−NX is=1X i∈Nisp(ui) log X i∈Nisp(ui) , (40) in which the probability a single semantic symbol corresponds to the synset Uisis the sum of the probability of each syntactic value ui, i∈ Nis, i.e., p(Uis) =P i∈Nisp(ui). Additionally, the semantic source coding theorem in (Niu & Zhang, 2024) states that, for a semantic source ˚Uwith its corresponding syntactic source Uand its determined synonymous mapping between these two types of sources (which results in the determined synsets Uis={ui|i∈ Nis},is= 1,2, ..., N ), the achievable coding rate for semantic lossless rate is R≥Hs ˚U without the necessity to focus on symbol-level accuracy. In our work, we point out that the ultimate goal of synonymous variational inference is to construct an ideal synset X corresponding to the original image xby finding a synonymous mapping rule and encoding the shared latent features of the ideal synset ˆysas the coding sequences. In the ideal scenario where model training has converged, the reconstructed synset ˆXat the SIC decoder can perfectly overlap with the ideal synset X. Under such conditions, the average coding rate of the synonymous representation ˆysin the latent space can approach the semantic entropy of the semantic variable corresponding to the ideal synset, i.e., Ex∼p(x)[−logp(ˆys)](a)=Hsˆ˚Y(b)=Hsˆ˚X(c)=I X;ˆ˚X(d)=Hs ˚X , (41) in which the established conditions of (a)∼(c)is the same as the conditions in (34) and(35), and (d)is achieved by the ideal SIC codec. At this point, the found synonymous mapping rule is determined by the bounded expected distortion and the bounded E-KLD, i.e., Ex∼p(x)Eˆxi∈ˆX|ˆys[d(x,ˆxi)]≤D,Eˆxi∈ˆX|ˆysDKL[px||pˆxi]≤P. •Down Semantic Mutual Information: The down semantic mutual information is a measure defined as Is ˚U;˚V =Hs ˚U +Hs ˚V −H U, V , (42) which is proved to be the minimum coding rate in semantic lossy source coding when the “semantic distortion” (denoted asds ˚X,ˆ˚X in concept) satisfying ds ˚X,ˆ˚X ≤Ds, using an extended joint asymptotic equipartition property (AEP) analysis called Semantically Joint AEP . In our work, since the ideal synset is not explicitly constructed in practice, directly determining the overlap degree between the reconstructed synset and the ideal synset is challenging. Consequently, the model obtained after training convergence may still function as a semantic lossy coding model. We propose that the coding rate of the | https://arxiv.org/abs/2505.22438v1 |
SIC model should also serve as an upper bound for the lower semantic mutual information, expressed as: Ex∼p(x)[−logp(ˆys)](a)=Hsˆ˚Y(b)=Hsˆ˚X(c)=Hsˆ˚X −Hsˆ˚X|X (d)=H X +Hsˆ˚X −Hs X,ˆ˚X (e) ≥Hs ˚X +Hsˆ˚X −H X,ˆX =Is ˚X;ˆ˚X ,(43) in which the established conditions of (a)∼(c)is the same as the conditions in (34) and(35),(d)is achieved by the equation Hsˆ˚X|X =Hs X,ˆ˚X −H X , and (e)can be proved by a scaling process according to H X ≥Hs ˚X andHs X,ˆ˚X ≤H X,ˆX , which follows the fundamental properties of semantic variables stated in (Niu & Zhang, 2024). 20 Synonymous Variational Inference for Perceptual Image Compression Linear Embedding Swin Transformer Block Patch Merging Swin Transformer Block Patch Merging Swin Transformer Block Patch Merging Swin Transformer BlockPatch Division Swin Transformer BlockPatch Division Swin Transformer BlockPatch Division Swin Transformer BlockPatch Division Swin Transformer BlockConv 3×3 c=3 Patch Partition Channel Slicing Quantizing SamplingStage 1 Stage 2 Stage 3 Stage 4 Stage 1 Stage 2 Stage 3 Stage 4Analysis Transform Synthesis Transform Figure 7. The implementation details of the auto-encoder framework designed for the progressive SIC model. B.2. Extended Thinking: About Synonymous Idempotence Constraints As discussed earlier, since the ideal synset is not explicitly constructed, directly determining the overlap between the reconstructed synset and the ideal synset is infeasible. However, since the ideal synset directly corresponds to the synonymous representation ˆysin the latent space, the distance between the two synsets in the data space can be evaluated by first re-encoding the samples from the reconstructed synset, then obtaining the new synonymous representation ˆy′ s, and finally calculating the distance between ˆysandˆy′ s. This idea can be directly integrated into the training process. By incorporating constraints into the loss function, the SIC codec can be explicitly guided to optimize toward maximizing the overlap between the reconstructed synset and the ideal synset during the optimization process, i.e., Lsynset c= ˆy′ s−ˆys 2, (44) in which the adopted distance measure is based on the MSE function in our model optimization. Additionally, if sufficient diversity among the samples in the reconstructed synset should be ensured, the following constraints can be incorporated into the loss function: Ldetail c= ˆy′ ϵ,j−ˆyϵ,j 2. (45) It refers to re-feeding the reconstructed image into the encoder, computing the difference between the new detailed representation ˆy′ ϵ,jand the original detail representation ˆyϵ,j, and incorporating it into the optimization process of the SIC codec. When both of the above constraints are equal to 0, the idempotence property of the reconstructed image samples is effectively satisfied (in which idempotence “refers to the stability of image code to re-compression”, as stated in Xu’s paper (2024)). Here, we term the above constraint as the synonymous idempotence constraint and incorporate it into the loss function for the neural SIC model implemented in this paper. Please refer to Appendix C.1 for specific training details. 21 Synonymous Variational Inference for Perceptual Image Compression EC EDContext Model SamplingEC EDFactorized Entropy ModelBitsBits Entropy Parameters Figure 8. The joint autoregressive and hierarchical prior architecture of the progressive SIC model. C. Experimental Illustrations: Implementations and Supplementary Results In this section, we provide implementation details | https://arxiv.org/abs/2505.22438v1 |
of the progressive SIC model and supplementary results for Section 5. C.1. Implementation details The auto-encoder architecture, including an analysis transform as the encoder and a synthesis transform as the decoder, is implemented based on the Swin Transformer (Liu et al., 2021). The implementation details are shown in Figure 7. Both the analysis transform and the synthesis transform perform a 4-stage nonlinear processing, in which each layer includes a dimension adjustment module (Linear Embedding, Patch Merging, and Patch Division) and a Swin Transformer module. For the analysis transform, the image xwith the resolution of h×w×3is first partitioned into patches with the resolution of2×2. Then, the patches are fed into the Linear Embedding module at stage 1 for dimension expansion, and the features are further extracted using a followed Swin Transformer Block. The following processing stages all use the Patch Merging block and several Swin Transformer blocks to extract deeper features. Finally, the analysis transform outputs a feature map with a dimension ofh 16×w 16×512, in which the channel dimension C= 512 . To support multiple synonymous level partitioning, we perform equal slicing along the channel dimension of the latent representation. We set the number of the synonymous levels L= 16 , thus the latent representations are partitioned along the channel dimension into 16groups. Each synonymous group contains a sub-feature map with the size ofh 16×w 16×32. When the l-th synonymous level is selected, the synonymous representations yscontains the first lgroups of the sub-feature map with the full size ofh 16×w 16×32l, thus makes the remaining levels serve as detailed representations yϵ. For the synthesis transform, the quantized synonymous representations ˆysand sampled detailed representations ˆyϵare as input. Then, four upsampled Swin Transformer stages and a final convolutional layer are applied to the input to integrate the global information of the image, in which each stage increases the input resolution through the corresponding number of Swin Transformer modules in the analysis transform and a Patch Division module. Finally, a convolutional layer outputs the reconstructed image ˆyj. For rate estimation, the progressive SIC model adopts a joint autoregressive and hierarchical prior architecture based on (Minnen et al., 2018) as shown in Figure 8. All these modules in this architecture are implemented based on convolutional neural networks represented by Figure 9, in which Qrepresents the quantization model using the round function. In this architecture, the hyperprior haandhsare performed for both the distribution estimation for the synonymous representation ˆysand the sampling for the detailed representation. The hyperprior performs the “forward adaptation” to estimate µh s,σh sandµh ϵ,σh ϵbased on the side information ˆz, while the context model performs the “backward adaptation” to estimate µc s,σc sbased on the already-coded synonymous representations, in which the expressions “forward adaptation” 22 Synonymous Variational Inference for Perceptual Image Compression LeakyReLUConvConv LeakyReLU Conv ConvConvConv LeakyReLU LeakyReLUConv Conv ConvLeakyReLU LeakyReLUMasked-Conv Context Model Entropy ParametersHyperprior Analysis Hyperprior Synthesis Figure 9. The implementation details of the modules in the joint autoregressive and hierarchical prior architecture. and “backward adaptation” are stated in (Ball ´e et al., 2020). For the synonymous representations ˆys, an Entropy Parameters modules | https://arxiv.org/abs/2505.22438v1 |
are employed to integrate the input µh s,σh sandµc s,σc sto an output accurate estimation µs,σs. And for the detailed representation ˆyϵ, a uniform sampling based on the following equation is utilized: ˆyϵ,j=Q µh ϵ+U(−2,2) , (46) in which the uniform distribution U(−2,2)is set empirically. We realize that this sampling method cannot fit the ideal conditional distribution in vector form :The SVI theoretical analysis provides an ideal detail sampling principle that follows a conditional distribution pˆyϵ,j|˜ysin vector form (stated in the Equation (18)), which guides the prediction of the samples vector ˆyϵ,jconditioned on synonymous representations ˜ys. However, the current unideal sampling mechanism cannot ensure reasonable contextual structure in the details of the reconstructed images , which may affect the distribution consistency focused by measures like FID. We argue that sampling the detailed representation to match the ideal conditional distribution in vector form is challenging, especially when multiple distinct samples (i.e., M > 1). Although we are still exploring effective solutions to this problem, adopting a simple yet suboptimal sampling method is currently a necessary compromise. This will be a key breakthrough direction for our future research. To support the multiple synonymous level partitioning mechanism, we modify the masked convolutional layer of the spatial context autoregressive model in (Minnen et al., 2018) to a spatial-channel context autoregressive model like (Li et al., 2020), in which the 3D mask for the masked Context Model is presented by Figure 10. The core mechanism is to estimate the current feature’s probability distribution by conditioning on encoded spatial and channel features. This spatial-channel context autoregressive module is implemented based on a 5×5convolutional layer, in which the spatial context autoregressive process within the single group of sub-latent feature map ckis achieved by the left matrix shown in Figure 10, and the channel context autoregressive process from the coded groups of sub-latent feature map to the current group is achieved by the full 1matrix shown as the right matrix in Figure 10. Additionally, for the Entropy Parameters module, all the estimations of µsandσsacross diverse synonymous levels share the same module. To achieve this, each convolutional layer in the Entropy Parameters module assigns a group parameter of l, enabling the layer to process lindependent groups in parallel. These groups perform the estimation processes separately for each sub-feature map, and their outputs are concatenated to form µsandσs. Before model training, hyperparameter values for the loss function (12) and(13) must be specified before model training. Table 1 presents these hyperparameters of our progressive SIC model, which are configured empirically. Since multiple sub-feature maps are partitioned in the channel dimension to build different synonymous levels l= 23 Synonymous Variational Inference for Perceptual Image Compression 3D-Mask for Masked-Conv Figure 10. The 3D mask for the masked convolutional layer in the context model. Table 1. Hyperparameters Configurations for progressive SIC model training. l 1 2 3 4 5 6 7 8 α 0.5 λ(l) r 128 256 384 512 640 768 896 1024 λ(l) d 239/8238/8237/8236/8235/8234/8233/8232/8 λ(l) p 245/8242/8239/8236/8233/8230/8227/8224/8 l 9 10 11 12 13 14 15 16 α 0.5 λr 1152 1280 1408 1536 | https://arxiv.org/abs/2505.22438v1 |
1664 1792 1920 2048 λ(l) d 231/8230/8229/8228/8227/8226/8225/8224/8 λ(l) p 221/8218/8215/8212/829/826/823/820/8 1,2,···, L, each synonymous level lneeds to learn different levels of information during model training. However, due to the limitations of computing resources during training, it is not possible to cover all synonymous levels in each forward process, and we can only use the loss functions of different synonymous levels alternately for training. This alternating training between layers can lead to some layers losing the ability to extract effective information early in training, causing the coding rate of the corresponding sub-feature map to approach 0 in the subsequent training process and in the final model. To avoid this, an effective trick is to introduce the following constraints into the loss function during the warming-up phase, ensuring that each sub-feature map learns valid information: Lwarming c =a·logp˜yl(˜yl) +b·std −logp˜y1(˜y1),···,−logp˜yL(˜yL) , (47) in which the former term is the minus coding rate estimation of the current sub-feature map corresponds to the synonymous levell; the latter term, i.e., std(·)is a standard deviation function, which calculates the standard deviation of the coding rates of each sub-feature map; aandbare the corresponding tradeoff factors. This constraint increases the coding rate estimation of the sub-feature map land limits the standard deviation of all the sub-feature maps’ coding rate estimation, allowing each sub-feature map to learn a certain amount of effective information during the warm-up stage without excessive learning. We empirically set a= 4, b= 64 in this constraint. Combining the synonymous constraints discussed at the end of Appendix B.2, the constraints in the training loss function in the warming-up process can be summarized as L(l) c=Lsynset c+Ldetail c+Lwarming c , (48) After the warming-up phase, the constraints will be modified to L(l) c=Lsynset c +Ldetail c. (49) 24 Synonymous Variational Inference for Perceptual Image Compression 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Bits Per Pixel (BPP)303540PSNR[dB] (↑)CLIC2020 test 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)25.027.530.032.535.0PSNR[dB] (↑)DIV2K validation 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)25.027.530.032.535.0PSNR[dB] (↑)Kodak 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Bits Per Pixel (BPP)0.000.050.100.150.200.25LPIPS (↓)CLIC2020 test 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.000.050.100.150.200.25LPIPS (↓)DIV2K validation 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.000.050.100.150.200.25LPIPS (↓)KodakBPG VTM HiFiC MS-ILLM MS-ILLM (No-GAN) Progressive SIC (Ours, M=1) Figure 11. Comparisons of methods using PSNR and LPIPS on different datasets. Each point on the HiFiC and MS-ILLM performance curves is from a single model, while our entire performance curves are achieved by a single progressive SIC model. During training, we treat the first 12500 iterations as the warming-up phase, and the subsequent iterations are for the formal training process. In performance validation, for each input image at each synonymous level, we randomly select a single sample ˆxjfrom the reconstructed synset ˆXas the resulting image. Then we compare this result with the baseline methods by calculating the average coding rate, PSNR (distortion quality), and LPIPS and DISTS (perceptual quality) across the dataset. C.2. Supplementary Results Figure 11 provides the supplementary PSNR and LPIPS quality | https://arxiv.org/abs/2505.22438v1 |
results for Figure 4, which are quality assessment measures corresponding to the distortion and perceptual terms in the training loss function. As shown in the figure, for the distortion evaluation measure PSNR, as the coding rate increases, PSNR progressively approaches the performance of No-GAN MS-ILLM and even that of BPG. For the perceptual quality evaluation measure LPIPS, our solution reaches near the LPIPS quality of the perceptual solution at full rate. Even for the Kodak dataset, at low rates, our method outperforms the No-GAN MS-ILLM scheme. In this case, even without applying DISTS to the loss function for optimization, our method still demonstrates performance gains under most DISTS rates, shown as the results in Figure 4. This indicates that our method aligns better with the resampling tolerance emphasized by DISTS. Consequently, our method achieves comparable rate-distortion-perception performance using a single progressive SIC model, which demonstrates our advantages in variable-rate support. Besides, the visualization results are presented from Figure 12 to Figure 17, which can be divided in two groups: 1.The first group illustrates the process of improving the reconstructed image as the synonymous level lincreases, which includes Figure 12, Figure 13, and Figure 14, corresponding to the test image from CLIC2020 test, DIV2K validation, and the Kodak dataset, respectively. We captured the effects of reconstructed images at specific synonymous levels to clearly demonstrate how switching synonymous levels impacts the quality of the reconstructed images: At low synonymous levels, the coding rate for the synonymous representation is relatively low. As a result, the reconstructed image is sampled from a larger synset, capturing only the global semantic content of the image, with limited pixel-level detail accuracy. As the synonymous level increases, the coding rate rises, which reduces the size of the reconstructed synset. This allows for more accurate 25 Synonymous Variational Inference for Perceptual Image Compression Original0.0495 bpp 0.0619 bpp0.0774 bpp 0.0917 bpp0.1400 bpp 0.1990 bpp0.2495 bpp 0.3930 bpp Figure 12. Visualization results of reconstructed images at different synonymous levels using progressive SIC ( M= 1). Image from the CLIC2020 test set. Original 0.0532 bpp 0.0664 bpp0.0766 bpp 0.0863 bpp0.1243 bpp 0.1927 bpp0.2450 bpp 0.3859 bpp Figure 13. Visualization results of reconstructed images at different synonymous levels using progressive SIC ( M= 1). Image from the DIV2K validation set. Original 0.0661 bpp 0.0795 bpp0.0936 bpp 0.1055 bpp0.1502 bpp 0.2259 bpp0.2868 bpp 0.4466 bpp Figure 14. Visualization results of reconstructed images at different synonymous levels using progressive SIC ( M= 1). Image from the Kodak validation set. 26 Synonymous Variational Inference for Perceptual Image Compression Original Rate = 0.0976 bpp / DISTS = 0.0818 Rate = 0.0961 bpp / DISTS = 0.0783 Figure 15. Visualization comparison of reconstructed images at synonymous level l= 5using progressive SIC with M= 1andM= 5. Image from the CLIC2020 test set. Original Rate = 0.2158 bpp / DISTS = 0.0501 Rate = 0.2156 bpp / DISTS = 0.0492 Figure 16. Visualization comparison of reconstructed images at synonymous level l= 6using progressive SIC with M= 1andM= 5. Image from the DIV2K validation set. Original Rate = 0.3600 bpp / DISTS = | https://arxiv.org/abs/2505.22438v1 |
0.1021 Rate = 0.3281 bpp / DISTS = 0.0935 Figure 17. Visualization comparison of reconstructed images at synonymous level l= 7using progressive SIC with M= 1andM= 5. Image from the Kodat dataset. 27 Synonymous Variational Inference for Perceptual Image Compression Conv12 LRelu NN Ė16 Conv64Ę2-4×4 Lrelu Conv128Ę2-4×4 Lrelu Conv256Ę2-4×4 Lrelu Conv512Ę2-4×4 Lrelu Conv1-1×1 Sigmoid ConcatDifferent Conditional Model for Different Synonymous LevelShared Main Architecture Figure 18. Employed Discriminator Architecture in our finetuning attempts. semantic information and progressively enhances the details in the reconstructed image. These visualization results demonstrate that the progressive SIC model we implemented can effectively leverage the switching of synonymous levels to adjust to different coding rates, enabling the accuracy of the reconstructed image to improve as the coding rate increases, while ensuring a smooth enhancement of perceptual quality. 2.The second group presents a visualized quality comparison of the reconstructed images corresponding to specific synonymous levels, with the number of detailed representations ˆyϵ,jset to M= 1 andM= 5 during training. It includes Figure 15, Figure 16, and Figure 17, corresponding to the test image from CLIC2020 test, DIV2K validation, and the Kodak dataset, respectively. The perceptual quality is evaluated using the DISTS measure. These visualization results demonstrate certain advantages of increasing the sampling number of ˆyϵ,jin perceptual qualities at certain synonymous levels, since more sampling results in effective learning of the shared characteristics within the reconstructed synset ˆX. We state that the results presented in this article are some of our preliminary results. Currently, our investigations on the perceptual loss (i.e., the divergence term) utilization, synonymous level partition mechanisms, sampling numbers, and hyperparameter settings on progressive SIC schemes are still insufficient. These factors may contribute to the issues observed in Figure 4 and Figure 5. Future works are needed to explore these aspects in more detail. D. Limitations: Implementation Details and Supplementary Results In this section, we present the implementation details and results of the supplementary experiments in Section 6, focusing on the primary concern of using GAN-based adversarial loss to replace the divergence term in the loss function of Equation (11). D.1. Implementation Details As described in Section 6, we use GAN-based adversarial loss to replace the divergence term in the loss function and improve the performance of our implemented SIC model. Hence, the auto-encoder architecture remains consistent with those in Appendix C.1. This section mainly details the discriminator design. The utilized conditional discriminator is a convolutional neural network with two input branches—the original image x / reconstructed image ˜x(l) jas a main branch and the synonymous representation ˜y(l) sas a condition branch—and outputs the probability that the input image is judged as real. Besides, the discriminator model consists of two parts, i.e., a group of conditional models and a main architecture. The conditional branch is first upsampled by 16 times, concatenated with the main branch in the channel dimension, and then fed into the main architecture to estimate the output probability. We fine-tune the synthesis transform gs(i.e., the generator) with a single discriminator model, using a corresponding conditional model for each synonymous level land sharing the main architecture across | https://arxiv.org/abs/2505.22438v1 |
all synonymous levels. 28 Synonymous Variational Inference for Perceptual Image Compression D.2. Supplementary Results Figure 19 shows the performance of the fine-tuned model (labeled as “with GAN”) using PSNR, LPIPS, DISTS, and FID, compared with the original model (labeled as “no-GAN”) and other comparison schemes across different datasets. It should be noted that calculating FID on the Kodak dataset is unavailable as this dataset has only 24 images to yield the useful metrics, which is also stated in (Muckley et al., 2023). These results show that introducing adversarial loss improves perceived quality, indicating its optimization direction is closer to the optimal divergence than metrics like LPIPS. However, unlike in classical perceptual compression methods (Muckley et al., 2023), we observe that while DISTS—more tolerent to resampling—improves significantly, FID—which measures distribution distance—shows limited gains. This suggests our empirical detail sampling leads to a suboptimal reconstructed image distribution, likely because it does not follow the ideal probability distribution of the detail representations in vector form, which verifies our statements in Appendix C.1. Therefore, solving this problem is also one of the key research directions of our future work. Figure 20 compares reconstructed images before and after fine-tuning with adversarial loss at synonymous level l= 1, using samples from different datasets. Although DISTS and FID show limited numerical improvement at this level, the perceptual improvement can be visibly enhanced, which confirms that adversarial loss improves generation quality across synonymous levels (i.e., across different rate ranges). Although we acknowledge a performance gap between our method and state-of-the-art approaches, we also need to clarify once again the advantages of our approach. That is, our implementation scheme—unlike schemes that require separate models for each rate—offers much easier deployment by achieving acceptable perceptual qualities using one single model when we set different synonymous levels. We have identified its current limitations and proposed potential solutions; addressing these could enable SIC to approach the theoretically optimal scheme instructed by SVI and thus potentially surpass existing methods in future works. 29 Synonymous Variational Inference for Perceptual Image Compression 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Bits Per Pixel (BPP)27.530.032.535.037.5PSNR[dB] (↑)CLIC2020 test 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)253035PSNR[dB] (↑)DIV2K validation 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)253035PSNR[dB] (↑)Kodak 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Bits Per Pixel (BPP)0.000.050.100.150.200.25LPIPS (↓)CLIC2020 test 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.000.050.100.150.200.25LPIPS (↓)DIV2K validation 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.000.050.100.150.200.25LPIPS (↓)Kodak 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Bits Per Pixel (BPP)0.050.100.150.20DISTS (↓)CLIC2020 test 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.050.100.150.20DISTS (↓)DIV2K validation 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)0.050.100.150.200.25DISTS (↓)Kodak 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Bits Per Pixel (BPP)212325FID (↓)CLIC2020 test 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Bits Per Pixel (BPP)2325FID (↓)DIV2K validationHiFiC Progressive SIC (With GAN, M=1)MS-ILLM (with GAN) Progressive SIC (No-GAN, M=5)MS-ILLM (No-GAN) Progressive SIC (With GAN, M=5)Progressive SIC (No-GAN, M=1) Figure 19. Comparisons of methods using PSNR, LPIPS, | https://arxiv.org/abs/2505.22438v1 |
arXiv:2505.22441v1 [cs.CV] 28 May 2025Can NeRFs See without Cameras? Chaitanya Amballa1Sattwik Basu1∗Yu-Lin Wei1∗ Zhijian Yang2Mehmet Ergezer2Romit Roy Choudhury1,2 1University of Illinois Urbana-Champaign2Amazon Abstract Neural Radiance Fields (NeRFs) have been remarkably successful at synthesizing novel views of 3D scenes by optimizing a volumetric scene function. This scene function models how optical rays bring color information from a 3D object to the camera pixels. Radio frequency (RF) or audio signals can also be viewed as a vehicle for delivering information about the environment to a sensor. However, unlike camera pixels, an RF/audio sensor receives a mixture of signals that contain many environmental reflections (also called “multipath”). Is it still possible to infer the environment using such multipath signals? We show that with redesign, NeRFs can be taught to learn from multipath signals, and thereby “see” the environment. As a grounding application, we aim to infer the indoor floorplan of a home from sparse WiFi measurements made at multiple locations inside the home. Although a difficult inverse problem, our implicitly learnt floorplans look promising, and enables forward applications, such as indoor signal prediction and basic ray tracing. 1 Introduction NeRFs [ 24,37,2,39] have delivered impressive results in solving inverse problems, resulting in 3D scene rendering. While NeRFs have mostly used pictures (from cameras or LIDARs) to infer a 3D scene, we ask if the core ideas can generalize to the case of wireless signals (such as RF or audio). Unlike camera pixels that receive line-of-sight (LoS) rays, a wireless receiver (e.g., a WiFi antenna on a smartphone) would receive a mixture of LoS and many reflections, called multipath . If the receiver moves, it receives a sequence of Nmeasurements. Using these Nwireless measurements, is it possible to learn a representation of the scene, such as the floorplan of the user’s home? An optical NeRF understandably fails since it is not equipped to handle multipath. This paper is focused on redesigning NeRFs so they can learn to image the environment, thereby solving the inverse problem from ambient wireless signals. A growing body of work [ 3,25,41,21,22,18] is investigating connections between NeRFs and wireless. While none have concentrated on imaging, NeRF2 [ 41] and NeWRF [ 21] have augmented NeRFs to correctly synthesize WiFi signals at different locations inside an indoor space. However, correct synthesis is possible without necessarily learning the correct signal propagation models. We find that NeRFs with adequate model complexity can overfit a function to correctly predict signals at test locations, but this function does not embed the true behavior of multipath signal propagation. We re-design the NeRF’s objective function so that it learns the environment through line-of-sight (LoS) paths and reflections. This teaches the NeRF an implicit representation of the scene, which can then be utilized for various forward tasks, including WiFi signal prediction and ray tracing. In our model, EchoNeRF , each voxel is parameterized by its opacity δ∈[0,1]and orientation ω∈[−π, π]. When trained perfectly, free-space air voxels should be transparent ( δ= 0), wall voxels should be opaque ( δ= 1), and each opaque voxel’s orientation should match its wall’s orientation. | https://arxiv.org/abs/2505.22441v1 |
As measurements, we use the received signal power . Thus, the input to our EchoNeRF model is the transmitter ( Tx) location, a sequence of known receiver ( Rx) locations, and the signal power measured at each Rxlocation. The output of EchoNeRF is an (implicitly learnt) floorplan of the indoor space. We expect to visualize the floorplan by plotting the learnt voxel opacities. ∗Equal contribution. Preprint. Under review. Figure 1: LoS and correct multi- path reflections. Figure 2: (a) Fitting signal power using virtual Txs. (b) Ideally, virtual Txs should be located on wall surfaces. (c) Sparse virtual Txs learnt by NeWRF shown in black/gray dots. (d) Dense virtual Txs learnt by NeRF2. Neither correspond to the true (red) floorplan. Learning floorplans requires modeling the correct reflections (see Fig. 1) since these reflections help reveal where the walls are. However, without knowledge of the walls, the reflections are difficult to model, leading to a type of chicken and egg problem. Additionally, the number of wireless measurements is relatively sparse compared to the number of pixels measured in image-trained NeRFs. Finally, measured signals will have “blind spots”, meaning that rays that bounced off certain regions of the walls may not have arrived at any of the Rxlocations. This leaves gaps or holes in the floorplan and NeRF’s interpolation through these gaps will produce error or blur. EchoNeRF approaches this problem by modeling the received signal power as a combination of the LoS power and the power from first order reflections. The LoS model is inherited from classical NeRFs. The main departure from past work is in modeling the reflections. Since opaque voxels are unknown during training, the reflection surfaces are not known; hence, the reflection power at the Rxis modeled as an aggregate over all plausible reflections. Given the planar structure of walls, the plausible set of reflections can be heavily pruned to reduce the optimization complexity. Reflections aggregated over this plausible set models the total (LoS + reflection) power at a receiver Rx. EchoNeRF trains to minimize the loss between the modeled and measured power across all Rx locations, and in the process, learns the voxel’s opacities that best explain the measured dataset. Some regularization is necessary to cope with sparse measurements and to ensure smoothness of walls. Lastly, to handle some gradient imbalance issues, EchoNeRF freezes the LoS model once it converges, and uses this intermediate state to partly supervise the reflection model. To evaluate EchoNeRF , we train on 2.4GHz WiFi signals from NVIDIA’s Sionna simulator [ 14], with floorplans from the Zillow’s Indoor Dataset (ZIND) [9]. Results show consistent improvement over baselines in terms of the estimated floorplan’s IoU and F1 score. Qualitative results show visually legible floorplans without any post-processing. Applying forward functions on the floorplan, EchoNeRF can predict the received signal power for new ⟨Tx, Rx ⟩locations (outperforming existing baselines). Lastly, basic ray tracing explains the predictions, offering interpretability to its results. 2 Related Work and Research Scope Wireless (WiFi) channel prediction using NeRFs. NeWRF [21] and NeRF2 [41] are recent papers that have used NeRFs to | https://arxiv.org/abs/2505.22441v1 |
predict the wireless channel impulse response (CIR) [ 35] at unknown locations inside a room. Drawing a parallel to optical NeRFs, a voxel’s color in optics becomes a voxel’s transmit power in wireless. The voxel’s density in optics remains the same in wireless, modeling how that voxel attenuates signals passing through it. NeRF2 and NeWRF assign transmit power and attenuation to each voxel such that they best explain the measured CIR. The authors explain that voxels assigned non-zero transmit power will be called virtual transmitters ; these voxels represent the reflection points on the walls. However, many assignments are possible that fit the CIR training data, especially when the data is sparse. Fig. 2(a,b) illustrates 2 possible assignments. While the predicted CIRs could achieve low error for all such assignments, only one of the assignments will model the true reflections, forcing the virtual transmitters to be located on the wall surfaces (Fig. 2(b)). We have plotted NeRF2 andNeWRF ’s assignment of voxel densities (see Fig. 2(c,d)) to confirm that the high accuracy in CIR prediction is not an outcome of correctly learning the wall layout. Our goal is to repair this important issue, i.e., assign voxel densities that obey the basic physics of wall reflections. Correct voxel assignment leads to the correct layouts, which then makes the (forward) CIR prediction easy. 2 Neural radiance fields for audio. Another active line of research focuses on predicting room impulse response (RIR) for audio [ 22,33,18,6]. Neural Acoustic Field (NAF) [ 22] extended the classical NeRF to train on RIR measurements in a room and predict the RIR (magnitude and phase) at new ⟨Tx, Rx ⟩locations. NAF identified the possibility of overfitting to the RIR and proposed to learn, jointly, the local geometric features of the environment (as spatial latents) and the NAF parameters. The spatial latents embed floorplan information but a decoder needs to be trained using the partial floorplan data. EchoNeRF requires no floorplan supervision, and secondly, relies entirely on signal power (less informative than RIR) to estimate the floorplan. Follow up work are embracing more information about the surroundings (pictures [ 19,33,18,23], LIDAR scans [ 26], meshes and optical NeRFs [ 6]), to boost RIR accuracy. Results are steadily improving, however, this sequence of ideas is unaligned with solving the core inverse problem. Our goal is to first invert the signal power to a floorplan, which can then enable CIR/RIR predictions. Modeling reflections in optical NeRFs Optical NeRFs have tackled reflections [ 10,38,31] for synthesizing glossy surfaces and mirrors, and for re-lighting [ 30,34]. NeRFRen [ 12] proposes to decompose a viewed image into a transmitted and a reflected component. Ref-NeRF [ 36] also focuses on reflections through a similar decomposition of the transmitted and reflected color, however, the reflected color is modeled as a function of the viewing angle and the surface-normal, resulting in accurate models of specular reflection. Several other papers have developed similar ideas [ 5,40] and the core insight centers around solving a two-component decomposition problem. EchoNeRF faces the challenge of not knowing the number of rays adding | https://arxiv.org/abs/2505.22441v1 |
up from all possible directions in the environment. Hence, EchoNeRF must solve a many-component decomposition problem by leveraging the physics of multipath signal propagation. 3EchoNeRF Model Setup and Overview. At aRxlocation, we model the received signal power ψas ψ=ψLoS+ψref1+···+ψrefn where ψLoSis the power from the direct line-of-sight (LoS) path, and ψrefkis the aggregate power from all kthorder reflections (i.e., all signal paths that underwent exactly kreflections before arriving at the Rx)2. We assume Mfixed transmitters and move the RxtoNknown locations and measure ψat each of them. EchoNeRF accepts M×Nmeasurements as input and outputs the 2D floor-plan F, a binary matrix of size L×L, where Ldenotes the maximum floorplan length. We train EchoNeRF on the measured data using our proposed objective function. This function only models the LoS and the first order reflections. We disregard the higher orders since they are very complex to model and contribute, on average, <6%of the total power (see statistics in Appendix C). The NeRF model we use is a remarkably simple MLP designed to predict the density δ∈[0,1]and orientation ω∈[−π, π]of a specified voxel in the indoor scene. The orientation aids in modeling reflections. The proposed objective function – parameterized by voxel attributes ⟨δ, ω⟩ and the ⟨Tx, Rx ⟩locations – models an approximation of the received power ψat that Rxlocation. Minimizing L2loss of this power across all Rxlocations trains the MLP. Plotting out all the voxel densities in 2D gives us the estimated floorplan F. 3.1 The LoS Model Friss’ equation [ 1] from electromagnetics models the free-space received power as Pr=K d2where dis the distance of signal propagation, and Kis a product of transmit-power, wavelength, and antenna-related constants [ 1]. We model this free-space (LoS) behavior in the NeRF framework through the following equation. ψLoS=KY {i|vi∈LoS}(1−δi) d2(1) 2This model is an approximation since it relies on averaging measurements as explained in Appendix B. However, for this sensing application involving moving receivers, and when using wideband-multipath systems such as WiFi, this approximation holds well 3 where Kcan be empirically measured, and dis the known distance between the ⟨Tx, Rx ⟩.The numerator includes the product of voxel densities over all voxels along the LoS ray from Txto Rx(with an abuse of notion, we write this as vi∈LoS). This models occlusions. When the LoS path is completely free of any occlusions (i.e., δi= 0,∀iwhere {i|vi∈LoS}), we expect the received power to only be attenuated by the pathloss factor d2(in the denominator). Eq. 1 has a slight difference to classical NeRF’s volumetric scene function. In our case, voxels along the ray do not contribute to the received power (whereas in NeRF, each voxel’s color is aggregated to model the final pixel color at the image). In other words, we have modeled a single transmitter in Eq. 1. 3.2 The Reflection Model To model reflections, consider a voxel vj. Whether vjreflects a ray from the Txtowards Rxdepends on (1) vj’s density δjand orientation ωj, (2) the ⟨Tx, Rx ⟩locations, and (4) whether the path from Txtovj, and from vjtoRxare both occlusion-free. Parameterized by these, Eq. 2 models ψref(vj), which is | https://arxiv.org/abs/2505.22441v1 |
the received power at Rxdue to the signal that reflected off voxel vj. ψref(vj) =δjf(θ, β)Y k∈{Rx:vj}(1−δk)Y l∈{vj:Tx}(1−δl) dTx:vj+dvj:Rx2(2) Let us explain this equation briefly. The leading δjensures that voxel vjis not a reflector when δj= 0. The f(θ, β)term models the wave-surface interactions, i.e., how signals get attenuated as a function of the incident angle θand how signals scatter as a function of the offset angle β(which is the angle between the reflected ray and the direction of the Rxfromvj). The next two product terms ensure that for the Rxto receive this reflection, the voxels along the 2segments ( Txtovjandvjto Rx) must be non-opaque; if any δkorδlequals 1, that reflection path is blocked, producing no power contribution via this voxel vjto the receiver Rx. Finally, the denominator is the squared distance from Txtovj, and from vjtoRx, modeling signal attenuation. To compute the full reflection power, the natural question is: which voxels are contributing to the received power? Geometrically, any opaque voxel can be a plausible reflection point between any ⟨Tx, Rx ⟩pair. This is because, for triangle formed by Tx,vj, and Rx, the voxel orientation ωjcan be assigned a direction that bisects the angle at vj. For this ωj, the reflected ray will perfectly arrive at theRx. Thus, without the knowledge of orientation and density, the total first order reflection power at the Rxshould be modeled as the sum of reflections on all voxels. This makes the optimization problem excessively under-determined. We address this by modeling ωjas a discrete value, i.e., ωj∈ {1,2. . . K ω}. Larger Kωis needed when the environment has complex surface orientations; however, most floorplans exhibit perpendicu- lar walls [ 42,8,11] and Kω= 4is adequate. Once ωjbecomes discrete, the voxels that can produce plausible reflections become far fewer – we call this the “plausible set” V. Fig. 3 visualizes Vand shows 3out of many plausible reflections from voxels with ωj= 45◦. Eq. 3 sums up the power from all reflections that occur on the plausible set: ψref1=X {j|vj∈V}ψref(vj) (3) Thus, the final modeled power at a specific Rxlocation becomes ˜ψ=ψLoS+ψref1. 3.3 Gradient Issues during Training Training against a L2loss,L=∥˜ψ−ψ∗∥2 23, did not generate legible floorplans. We found that the ψLoSdominated the loss term, drowning the reflection model’s influence on learning. At a high level, the gradient of the LoS model (Eq. 1) w.r.t. δihas fewer terms in the numerator’s product, and a smaller d2in the denominator. The reflection model’s gradient w.r.t. δihas many more terms since the reflection path is much longer; the denominator is also larger. Since (1−δj)≤1, their products force the gradient to decrease geometrically with more terms, causing the reflection gradient to be 3Here,ψ∗denotes the ground truth signal power 4 Figure 3: Colored stripes define the man- ifold from which reflections are plausible between ⟨Tx, Rx ⟩. V oxels located on the manifold form the plausible set V. Dashed lines show plausible reflections. Figure 4: EchoNeRF ’s two-stage training approach: In Stage 1, the LoS model is trained using known Rx locations and signal power. This provides a warm-start to the reflection | https://arxiv.org/abs/2505.22441v1 |
model in Stage 2 which refines the learned voxel densities and orientation. much smaller compared to LoS. We formalize this explanation below by considering the LoS and reflection losses individually4. LLoS= ˜ψLoS−ψ∗ LoS 2 2,Lref= ˜ψref−ψ∗ ref 2 2 Consider the gradient of LLoSw.r.t the density of vi. ∇δiLLoS= 2( ˜ψLoS−ψ∗ LoS)X {n|i∈LoS(n)}∇δiψ(n) LoS where ∇δiψ(n) LoS=−K d(n)2Y j∈LoS(n) j̸=i(1−δj) (4) where LoS(n)is the n-th LoS path passing through voxel vi. The gradient of Lrefhas a nearly identical expression with the only difference being many more product terms and that ∇δiψ(n) refdepends on where viis present in the n-th set of reflection path voxels (denoted by Ref(n)). For example, ∇δiψ(n),Tx ref=−CY j∈Ref(n) Tx:v j̸=i(1−δj)Y k∈Ref(n) v:Rx(1−δk) (5) C=δ(n)f(n)(θ, β) (d(n) Tx:v+d(n) v:Rx)2 here∇δiψ(n),Tx refdenotes the gradient when viis between Txto the reflection point v. Finally, since the modeled power approximates the measured power, the residual error will remain non-zero even if the floorplan is accurately learnt. As a result, the optimization is biased towards voxels of higher gradients, i.e., voxels on the LoS path, suppressing the importance of reflections. To address this, we train EchoNeRF in2stages. 3.4 Multi-stage Training Stage 1: We first use the LoS model against the measured ground truth power ψ∗(see Fig. 4). This converges quickly because the network easily learns the transparent voxels ( δ=0) located along LoS 4For the ease of explanation, we use ψ∗ LoSandψ∗ refto denote the ground truth LoS and reflection powers, respectively. We do not need to know these terms in practice. 5 paths. For LoS paths that are occluded, the network incorrectly learns excessive opaque voxels between the ⟨Tx, Rx ⟩, but this does not affect the LoS error since the path is anyway occluded. Hence, the outcome is a crude floorplan but a near-perfect LoS power estimate ˜ψLoS. We utilize this ˜ψLoSin stage 2(discussed soon). As Stage 1training progresses, some opaque voxels emerge, offering crude contours of some walls. We estimate a voxel’s spatial gradient, ∇δi, and use it to supervise the orientation ωiof that voxel. The intuition is that a voxel’s orientation – needed to model reflections in Stage 2– is essentially determined by the local surface around that voxel. The gradient ∇δioffers an opportunity for weak supervision. Thus, the loss for Stage 1is: Lstage 1=∥ψ∗−ψLoS∥2 2+L+(6) where L+=λ1X ∀j∥∇δj−ωj∥2 2+λ2Lreg (7) withλ1, λ2>0being tunable hyperparameters. The regularization term Lregwill be discussed soon. Finally, the near-perfect estimate of LoS power, denoted ˜ψLoS, is also carried over to Stage 2to ensure the reflection model is penalized when it veers away from this LoS estimate. Stage 2 focuses on training the reflection model using the following loss function. Lstage 2= ˜ψLoS−ψLoS 2 2+ ψ∗−˜ψLoS−ψref1 2 2+L+ The first term in the RHS ensures that the Stage 1’s LoS estimate is honored in Stage 2. The second term subtracts Stage 1’s LoS power from the measured power, ( ψ∗−˜ψLoS); this models the total power only due to reflections . Our (first order) reflection model ψref1is trained to match this aggregate power ( L2loss). The supervision on orientation and the regularization terms are the | https://arxiv.org/abs/2505.22441v1 |
same as in Stage 1. ■Regularization : Floorplans demonstrate significant local similarity in orientation, hence we penalize differences in orientation among neighbors, using a regularization (Eq. 8) similar to Total Variation [ 29]. This can be achieved without additional computational cost to the neural network by directly utilizing voxel orientations obtained from each ray. Lreg=1 nv(nr−1)nvX n=1nr−1X i=1∥ωn,i+1−ωn,i∥2 2(8) Here nvis the number of voxels queried from the plausible set Vandnris the number of voxels along the each ray. 4 Experiments Floor plan and Wireless Simulation Dataset. Floorplans are drawn from the Zillow Indoor Dataset [9]. In each floorplan, we use the A∗algorithm [ 13] to generate a walking trajectory that traverses all rooms. We use the NVIDIA Sionna RT [ 15,14] – a ray tracer for radio propagation modeling – to compute the ground truth signal power (also known as received signal strength index (RSSI)). We randomly place MTxs, one in each room, denoted as Tm. To simulate omnidirectional transmissions at2.4GHz from each Txlocation, we shoot 107rays into the given floorplan. For receiver locations, we sample the user trajectory at a fixed time interval to obtain NRxlocations, denoted as Rn. Sionna accounts for specular reflections and refraction when these rays interact with walls in the specified floor plan; we use the default materials for the walls. As with most WiFi simulators, Sionna does not model signal penetration through walls – this means that a TxandRxlocated on opposite sides of a wall will not receive any RSSI. Overall, we gather M×NRSSI measurements (Tm, Rn, ψm,n)that serve as input to EchoNeRF . Baselines used for comparison are: 1.NeRF2 [41]: Models WiFi reflections via virtual transmitters to predict channel impulse response (CIR). 6 2.Heatmap Segmentation [20]: Interpolates CIR across the whole floorplan and applies an image segmentation algorithm (on the interpolated RSSI heatmap) to isolate each room. Essentially, the algorithm identifies the contours of sharp RSSI change since such contours are likely to correspond to walls. Implementation details are included in the Appendix E.4. 3.MLP: Trains an MLP network to directly estimate the RSSI based on TxandRxlocations. 4.EchoNeRF _LoS: Reports EchoNeRF ’s result considering only LoS path (ablation study). Metrics. We evaluate using 3metrics: (A) Wall Intersection over Union (Wall_IoU) : This metric measures the degree to which the predicted walls and the true walls superimpose over each other in the 2D floorplan. The following equation defines the metric: Wall_IoU =WP∩WP∗ WP∪WP∗ where WP denotes the set of predicted wall pixels and WP∗denotes the true wall pixels. This is a harsh metric given wall pixels are a small fraction of the total floorplan; if a predicted wall is even offset by one pixel from the true wall, the Wall_IoU drops significantly. IoU [ 28] has often been defined in terms of room pixels (instead of wall pixels); this is an overestimate in our opinion, since predicting even an empty floorplan results in an impressively high IoU. (B) F1 score [32]: Defined as F1 =2×P×R P+R, where Pis the precision andRis the recall of the bitmap. PandRare defined based on wall pixels, similar as above. | https://arxiv.org/abs/2505.22441v1 |
(C) RSSI Prediction Error (RPE) : We split all Rxlocations into a training and test set. RPE reports the average median RSSI error over all the test locations across floorplans. 4.1 Overall Summarized Results Table 1 reports comparative results between EchoNeRF and baselines, averaged over 20different experiments, using all 3metrics. The number of measurements are sparse ( N= 2000 andN= 1000 ), given that apartment sizes in our dataset are more than 250,000pixels. Mean and standard deviation are reported in the table. EchoNeRF outperforms all models in terms of Wall_IoU andF1 Score . Compared to EchoNeRF _LoS,EchoNeRF demonstrates visible improvements, highlighting the advantage of modeling reflections. The absolute Wall_IoU values are understandably low because the metric penalizes small errors. NeRF2 is unable to predict the floor plan (opaque voxels) well and is only able to achieve better RPE than EchoNeRF _LoS.EchoNeRF outperforms both EchoNeRF _LoSandNeRF2 . Interestingly, MLP incurs a lower RPE than NeRF2 suggesting that RSSI is amenable to interpolation, and NeRF2 ’s implicit representation may not be an advantage for this interpolation task. 2000 receiver locations 1000 receiver locations Method Wall_IoU ↑ F1 Score ↑ RPE↓Wall_IoU ↑ F1 Score ↑ RPE↓ MLP - - 1.03 - - 0.65 Heatmap Seg. 0.12±0.03 0.21±0.05 1.32 0.09±0.02 0.16±0.04 1.46 NeRF2 0.14±0.02 0.24±0.03 4.36 0.12±0.02 0.21±0.04 4.2 EchoNeRF _LoS 0.27±0.07 0.42±0.10 9.12 0.25±0.04 0.39±0.06 10.86 EchoNeRF 0.38±0.06 0.55±0.06 3.56 0.32±0.06 0.48±0.05 4.32 Table 1: Performance Results for Wall_IoU, F1 Score, and RPE 4.2 Qualitative Results: Visual floorplans, RSSI heatmap, and basic ray tracing ■Visual floorplans. Figure 5 presents visualization from all baselines and a comparison with our LoS-only model (as ablation). All the floorplans use N= 2000 receiver locations. We make the following observations. (1) Heatmap Segmentation leverages the difference of RSSI on opposite sides of a wall, however, reflections pollute this pattern, especially at larger distances between Tx andRx. Further, signals leak through open doors, injecting errors in the room boundaries. (2) NeRF2 performs poorly since its MLP learns one among many possible assignments of virtual transmitters to fit the RSSI training data. The virtual transmitters hardly correlate to the walls of the environment. (3)EchoNeRF _LoScan infer the position of inner walls. However, these walls are thick and slanted 7 Ground Truth Heatmap Seg. NeRF2 EchoNeRF LoS EchoNeRF Figure 5: Qualitative comparison of ground truth floorplans against baselines. The bottom two rows show floorplans learnt by EchoNeRF _LoSandEchoNeRF with sharper walls and boundaries. because while EchoNeRF _LoScan identify occlusions between a ⟨Tx, Rx ⟩pair, it cannot tell the shape and pattern of these occlusions. Crucially, EchoNeRF _LoSalso cannot infer the boundary walls since no receivers are located outside the house. (4) EchoNeRF outperforms the baselines, sharpens the inner walls compared to EchoNeRF _LoS, and constructs the boundary walls well. Shortcomings: Recall that some parts of the floorplan are in the “blind spots” of our dataset since no reflection arrives from those parts to any of our sparse Rxlocations (e.g., see bottom left corner of the 1stfloorplan; no signals reflect off this region to arrive at any of the Rxlocations). Hence, EchoNeRF is unable | https://arxiv.org/abs/2505.22441v1 |
to construct the bottom of the left wall in this floorplan. Finally, note that areas outside the floorplan (e.g., the regions on the right of 6thfloorplan) cannot be estimated correctly since no measurements are available from those regions (hence, those voxels do not influence the gradients). ■RSSI prediction. Figure 6 visualizes and compares predicted RSSI. The top row shows predictions at new Rxlocations with the Txheld at the trained location; the bottom row shows predictions when bothTxandRxare moved to new locations. Two key observations emerge: (1) EchoNeRF is limited by Sionna’s inability to simulate through-wall signal penetration; NeRF2 has access to an expensive license for a through-wall simulation and shows better predictions inside the rooms. However, in areas that EchoNeRF can "see" (e.g., corridors in the top row), the awareness of reflecting surfaces leads to significantly better predictions. (2) When the Txlocation differs from that used in training, EchoNeRF ’s improvement over NeRF2 is significant. This is the core advantage of first solving the inverse problem and then leveraging it for the (forward) RSSI prediction. ■Learning reflected rays. For a given ⟨Tx, Rx ⟩pair, we examine the points in the plausible set V that contribute to the reflections. Fig. 7 compares the ray-tracing results from the NVIDIA Sionna simulator (we pick only first order reflections). EchoNeRF captures many of the correct reflections. Of course, some are incorrect – a false positive occurs in the bottom right room since some wall segment is missing in our estimate; false negatives also occur in the top right room where again some parts of the wall are missing. 8 Figure 6: Heatmaps highlighting EchoNeRF ’s ability to learn signal propagation. (Top row) Inferred RSSI heatmaps with Tx(red star) as used in training. (Bottom row) A new Tx(green star) degrades NeRF2 andMLPwhile EchoNeRF shows accurate predictions. Figure 7: (a) Tracing re- flections on the learnt floorplan. (b) True re- flections from Sionna. 4.3 Relaxing Assumptions & Sensitivity Study ■Transmitter’s location. We assumed knowledge of Txlocations, however, we relax this by applying maximum likelihood estimation on observed RSSI power, ψ∗(see Appendix D). On average, the estimated Txlocation error is 2.08pixels in floorplans of sizes ≈512×512pixels. Error σ(m) 0 0.5 1 2 Wall_IoU 0.38 0.35 0.33 0.29 Table 2: Estimated Wall_IoU at various levels of injected noise σ Figure 8: EchoNeRF ’s floorplan inference with furniture in conference (left) and apart- ment (right) layouts.■Receiver location error. Table 2 shows EchoNeRF ’s sensitivity to Rxlocation errors. We inject Gaussian noise N(0, σ2I)to the Rxlocations; σ= 1 implies a physical error of 1m.Wall_IoU accuracy obviously drops with error but 0.5meter of error is tolerable without destroying the floorplan structure. Advancements in WiFi positioning systems have demonstrated robust sub-meter error. ■Effect of Furniture. Fig. 8 visualizes inferred floorplans when toy objects are scattered in open spaces ( Rxlocations remain N=2000 ).EchoNeRF is able to identify some of the object blobs but sharp- ening the small objects is challenging due to more higher order reflections from furniture. Follow up work is needed, either in modeling 2ndorder reflections or by imposing stronger regularizations. 5 | https://arxiv.org/abs/2505.22441v1 |
Follow ups and Conclusion Follow-ups. (1) The ability to model 2ndorder reflections will boost EchoNeRF ’s accuracy, allowing it to sharpen the scene and decode smaller objects. For short range applications, such as non-intrusive medical imaging, 2ndand3rdorder reflections would be crucial. This remains an important direction for follow-on research. (2) Extending EchoNeRF to 3D floorplans is also of interest, and since it is undesirable to increase the number of measurements, effective 3D priors, or 2D-to-3D post- processing, may be necessary. Such post-processing tools exist [ 7] but we have not applied them since our goal is to improve NeRF’s inherent inverse solver. (3) Finally, EchoNeRF floorplans can offer valuable spatial context to Neural RIR synthesizers like [ 41,21,6,18,19]. Synthesized RIR could in-turn aid EchoNeRF ’s floorplan inference, forming the basis for an alternating optimization strategy. We leave these ideas to follow-up research. Conclusion. In summary, we re-design the NeRF framework so it can learn to "see" its environment through line-of-sight (LoS) paths and reflections. This work takes a step towards neural wireless imaging with room for further research and varied downstream applications. 9 References [1]Constantine A. Balanis. Antenna Theory: Analysis and Design . John Wiley & Sons, 3rd edition, 2016. [2]Jonathan T Barron, Ben Mildenhall, Matthew Tancik, Peter Hedman, Ricardo Martin-Brualla, and Pratul P Srinivasan. Mip-nerf: A multiscale representation for anti-aliasing neural radiance fields. In Proceedings of the IEEE/CVF international conference on computer vision , pages 5855–5864, 2021. [3]Amartya Basu and Ayon Chakraborty. Specnerf: Neural radiance field driven wireless coverage mapping for 5g networks. In Proceedings of the Twenty-Fifth International Symposium on Theory, Algorithmic Foundations, and Protocol Design for Mobile Networks and Mobile Com- puting , MobiHoc ’24, page 440–445, New York, NY , USA, 2024. Association for Computing Machinery. [4]Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432 , 2013. [5]Mark Boss, Raphael Braun, Varun Jampani, Jonathan T Barron, Ce Liu, and Hendrik Lensch. Nerd: Neural reflectance decomposition from image collections. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 12684–12694, 2021. [6]Amandine Brunetto, Sascha Hornauer, and Fabien Moutarde. Neraf: 3d scene infused neural radiance and acoustic fields. arXiv preprint arXiv:2405.18213 , 2024. [7] Cedreo. Convert 2d floor plan to 3d, 2025. Accessed: 2025-03-01. [8]James M Coughlan and Alan L Yuille. Manhattan world: Compass direction from a single image by bayesian inference. In Proceedings of the seventh IEEE international conference on computer vision , volume 2, pages 941–947. IEEE, 1999. [9]Steve Cruz, Will Hutchcroft, Yuguang Li, Naji Khosravan, Ivaylo Boyadzhiev, and Sing Bing Kang. Zillow indoor dataset: Annotated floor plans with 360deg panoramas and 3d room layouts. InProceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 2133–2143, 2021. [10] Wenhang Ge, Tao Hu, Haoyu Zhao, Shu Liu, and Ying-Cong Chen. Ref-neus: Ambiguity- reduced neural implicit surface learning for multi-view reconstruction with reflection. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 4251–4260, 2023. [11] Haoyu Guo, Sida Peng, Haotong Lin, Qianqian Wang, Guofeng Zhang, Hujun Bao, and Xiaowei Zhou. Neural | https://arxiv.org/abs/2505.22441v1 |
3d scene reconstruction with the manhattan-world assumption. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) , pages 5511–5520, June 2022. [12] Yuan-Chen Guo, Di Kang, Linchao Bao, Yu He, and Song-Hai Zhang. Nerfren: Neural radiance fields with reflections. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) , pages 18409–18418, June 2022. [13] Peter E Hart, Nils J Nilsson, and Bertram Raphael. A formal basis for the heuristic determination of minimum cost paths. IEEE transactions on Systems Science and Cybernetics , 4(2):100–107, 1968. [14] Jakob Hoydis, Fayçal Aït Aoudia, Sebastian Cammerer, Merlin Nimier-David, Nikolaus Binder, Guillermo Marcus, and Alexander Keller. Sionna rt: Differentiable ray tracing for radio propagation modeling. In 2023 IEEE Globecom Workshops (GC Wkshps) , pages 317–321. IEEE, 2023. [15] Jakob Hoydis, Sebastian Cammerer, Fayçal Ait Aoudia, Avinash Vem, Nikolaus Binder, Guillermo Marcus, and Alexander Keller. Sionna: An open-source library for next-generation physical layer research. arXiv preprint arXiv:2203.11854 , 2022. 10 [16] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. InInternational Conference on Learning Representations , 2017. [17] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2017. [18] Susan Liang, Chao Huang, Yapeng Tian, Anurag Kumar, and Chenliang Xu. Av-nerf: Learning neural fields for real-world audio-visual scene synthesis. Advances in Neural Information Processing Systems , 36:37472–37490, 2023. [19] Susan Liang, Chao Huang, Yapeng Tian, Anurag Kumar, and Chenliang Xu. Neural acoustic context field: Rendering realistic room impulse response with neural fields. arXiv preprint arXiv:2309.15977 , 2023. [20] Dingding Liu, Bilge Soran, Gregg Petrie, and Linda Shapiro. A review of computer vision segmentation algorithms. Lecture notes , 53, 2012. [21] Haofan Lu, Christopher Vattheuer, Baharan Mirzasoleiman, and Omid Abari. Newrf: A deep learning framework for wireless radiation field reconstruction and channel prediction. In Forty-first International Conference on Machine Learning , 2024. [22] Andrew Luo, Yilun Du, Michael Tarr, Josh Tenenbaum, Antonio Torralba, and Chuang Gan. Learning neural acoustic fields. Advances in Neural Information Processing Systems , 35:3165– 3177, 2022. [23] Sagnik Majumder, Changan Chen, Ziad Al-Halah, and Kristen Grauman. Few-shot audio- visual learning of environment acoustics. Advances in Neural Information Processing Systems , 35:2522–2536, 2022. [24] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoor- thi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. Communications of the ACM , 65(1):99–106, 2021. [25] Tribhuvanesh Orekondy, Pratik Kumar, Shreya Kadambi, Hao Ye, Joseph Soriaga, and Arash Behboodi. WineRT: Towards neural ray tracing for wireless channel modelling and differentiable simulations. In The Eleventh International Conference on Learning Representations , 2023. [26] Zainab Oufqir, Abdellatif El Abderrahmani, and Khalid Satori. Arkit and arcore in serve to augmented reality. In 2020 International Conference on Intelligent Systems and Computer Vision (ISCV) , pages 1–7. IEEE, 2020. [27] Paolo Prandoni and Martin Vetterli. Signal Processing for Communications . CRC Press, Boca Raton, FL, 2008. [28] Hamid Rezatofighi, Nathan Tsoi, JunYoung Gwak, Amir Sadeghian, Ian Reid, and Silvio Savarese. Generalized intersection over union: A metric and a loss for bounding box regression, 2019. [29] Leonid | https://arxiv.org/abs/2505.22441v1 |
I. Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal algorithms. Physica D: Nonlinear Phenomena , 60(1):259–268, 1992. [30] Viktor Rudnev, Mohamed Elgharib, William Smith, Lingjie Liu, Vladislav Golyanik, and Christian Theobalt. Nerf for outdoor scene relighting. In European Conference on Computer Vision , pages 615–631. Springer, 2022. [31] Seunghyeon Seo, Yeonjin Chang, and Nojun Kwak. Flipnerf: Flipped reflection rays for few-shot novel view synthesis. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 22883–22893, 2023. [32] Marina Sokolova and Guy Lapalme. A systematic analysis of performance measures for classification tasks. Information Processing & Management , 45(4):427–437, 2009. [33] Kun Su, Mingfei Chen, and Eli Shlizerman. Inras: Implicit neural representation for audio scenes. Advances in Neural Information Processing Systems , 35:8144–8158, 2022. 11 [34] Marco Toschi, Riccardo De Matteo, Riccardo Spezialetti, Daniele De Gregorio, Luigi Di Stefano, and Samuele Salti. Relight my nerf: A dataset for novel view synthesis and relighting of real world objects. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 20762–20772, 2023. [35] David Tse and Pramod Viswanath. Fundamentals of Wireless Communication . Cambridge University Press, 2005. [36] Dor Verbin, Peter Hedman, Ben Mildenhall, Todd Zickler, Jonathan T. Barron, and Pratul P. Srinivasan. Ref-NeRF: Structured view-dependent appearance for neural radiance fields. CVPR , 2022. [37] Zian Wang, Tianchang Shen, Jun Gao, Shengyu Huang, Jacob Munkberg, Jon Hasselgren, Zan Gojcic, Wenzheng Chen, and Sanja Fidler. Neural fields meet explicit geometric representation for inverse rendering of urban scenes, 2023. [38] Zhiwen Yan, Chen Li, and Gim Hee Lee. Nerf-ds: Neural radiance fields for dynamic spec- ular objects. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 8285–8295, 2023. [39] Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelnerf: Neural radiance fields from one or few images. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 4578–4587, 2021. [40] Xiuming Zhang, Pratul P Srinivasan, Boyang Deng, Paul Debevec, William T Freeman, and Jonathan T Barron. Nerfactor: Neural factorization of shape and reflectance under an unknown illumination. ACM Transactions on Graphics (ToG) , 40(6):1–18, 2021. [41] Xiaopeng Zhao, Zhenlin An, Qingrui Pan, and Lei Yang. Nerf2: Neural radio-frequency radiance fields. In Proceedings of the 29th Annual International Conference on Mobile Computing and Networking , pages 1–15, 2023. [42] Chuhang Zou, Alex Colburn, Qi Shan, and Derek Hoiem. LayoutNet: Reconstructing the 3D Room Layout from a Single RGB Image . In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) , pages 2051–2059, Los Alamitos, CA, USA, June 2018. IEEE Computer Society. 12 Appendix for “Can NeRFs See without Cameras?” A Background on Channel Impulse Response When a wireless signal propagates, it is typically influenced by multipath effects such as reflections and scattering, as well as attenuation caused by the surrounding environment—collectively referred to as the channel. The overall impact of these phenomena on the signal is characterized by a linear model known as the Channel Impulse Response (CIR) [27]. Mathematically, the CIR is expressed as a sum of scaled | https://arxiv.org/abs/2505.22441v1 |
and delayed impulses as shown in Eqn 9. h(t) =NX i=1aiejϕiδ(t−τi), (9) where Nis the number of multipath components, aidenotes the amplitude (attenuation factor) of the i-th path, ϕirepresents the phase shift of the i-th path, and τiis the delay of the i-th path. For an input signal x(t)transmitted through the channel h(t), the output signal measured at a Rx, y(t)is obtained by the convolution: y(t) =x(t)∗h(t) +w(t), (10) where w(t)represents zero-mean additive noise. For a simple two-path channel with a line of sight (LoS) path and one reflected path, the CIR h(t)is given as h(t) =a1δ(t) +a2ejϕ2δ(t−τ2), (11) The received signal y(t)would then be: y(t) =x(t)∗ a1δ(t) +a2ejϕ2δ(t−τ2) +w(t) (12) B Modelling Wideband Multipath Signal Power This section shows how received power in multipath scenarios can be approximated as a sum of powers of LoS and all other multipaths. In frequency domain, the received signal y(t)at a particular receiver can be expressed as Y(fk) =H(fk)X(fk) +W(fk) (13) Here, X(fk)andW(fk)represent the discrete Fourier transforms of the signal x(t)and the additive noise w(t)at subcarrier frequency fkwith k∈ {0,1, ..., K}. The channel can be written as H(fk) =PL l=0alkexp(−j2πfkτl)where l∈ {1,2, ..., L}is an index over separate multipaths. Here, alkandτlrepresents the attenuation and phase of the l-th multipath component at subcarrier k. We assume that the channel H(fk)and the signal X(fk)are independent. The received power at each frequency kis given by ψYk=E[|Y(fk)|2]. E[|Y(fk)|2] =E[|H(fk)X(fk) +W(fk)|2] (14) =E[|H(fk)|2|X(fk)|2] +E[|W(fk)|2] + 2 Re{E[H(fk)X(fk)W(fk)]} =E[|H(fk)|2]E[|X(fk)|2] +E[|W(fk)|2] + 2 Re{E[H(fk)X(fk)]E[W(fk)]} =E[|H(fk)|2]E[|X(fk)|2] +E[|W(fk)|2],∵E[W(fk)] = 0 =ψXkE[|H(fk)|2] +ψWk where ψXk=E[|X(fk)|2]andψWk=E[|W(fk)|2]. Next, 13 E[|H(fk)|2] =E[H(fk)H∗(fk)]5 =E" LX l=0alkexp (−j2πfkτl)! LX m=0a∗ mkexp (j2πfkτm)!# =E" LX l=0LX m=0alka∗ mkexp (−j2πfk(τl−τm))!# =E LX l=0|alk|2+LX l=0LX m=0 m̸=lalka∗ mkexp (−j2πfk(τl−τm)) =E"LX l=0|alk|2# +LX l=0LX m=0 m̸=lE[alka∗ mk] exp (−j2πfk(τl−τm)) =E"LX l=0|alk|2# We used the fact that channel gains between different multipaths l, m withl̸=mhave vanishingly small correlation. Therefore, the total received power ψcan be computed by summing all individual subcarrier powers. ψ=KX k=1ψYk =KX k=1ψXkE"LX l=0|alk|2# +ψWk =LX l=0KX k=1E ψXk|alk|2 +ψWk Here, we separate outPK k=1E ψXk|a0k|2 =ψLoS, to represent the LoS power over all subcarriers andPK k=1E ψXk|alk|2 =ψrefl,1≤l≤L, to denote the power of l-th order reflections. C Approximating Channel with First-Order Reflections EchoNeRF models the total received power at the Rxas the combination of the LoS power EchoNeRF _LoS, and the contributions from all the first-order reflections. To validate the contri- bution of the achievable power from EchoNeRF when compared to the total received power ψ, we evaluate the relative contributions of these signals to the total power using the NVIDIA Sionna simulator [ 15]. To this end, we compute the ratios of the LoS signal ψLoS, LoS with the first order reflections ψLoS+ψref1, and LoS with the first two orders of reflections ψLoS+ψref1+ψref2. These are compared to the total received power ψ, which is approximated as the sum of the LoS power and the power from the first ten reflections. Fig 9 shows path power contribution ratio from different paths in histogram. While the ψLoSpower alone only accounts for approximately 70% of the total received power and is | https://arxiv.org/abs/2505.22441v1 |
more spread out, ψLoS+ψref1accounts to 95% of the total power, with a reduced spread. Moreover, secondary reflections ψref2only contribute to less than 3% of the total power. Hence, EchoNeRF models the first-order reflections along with the line-of-sight. 5We use * to denote complex conjugate 14 Figure 9: Histograms illustrating the contribution ratios from line-of-sight (LoS), LoS combined with first-order reflections, and LoS combined with first- and second-order reflections. The orange graph highlights the significant contribution of first-order reflections to the total power, supporting EchoNeRF ’s approach of modeling only the first reflection alongside the LoS power. D Relaxing TxAssumptions We relax the assumption that Txlocations are known. Given the set of receiver locations {Rxi}and the signal powers {ψi}, the goal is to estimate the transmitter location Tx= (Txx,Txy). To achieve this, we apply a maximum likelihood estimate (MLE). Briefly, among all the measured signal powers {ψi}from a given Txwe identify the Pstrongest signal powers and their corresponding received locations. The rationale behind selecting the strongest powers is that they are significantly influenced by the LoS component, allowing us to model them effectively only using the Friss’ equation [ 1]. We assume independence among the measurements since the received LoS power across locations, for a given a Txlocation, are independent. So, the likelihood equation for all these Pmeasurements can be written as: p(ψ1, ψ2, . . . , ψ P|Tx) =PY i=1p(ψi|Tx) We approximate that the ψiis normally distributed with a mean modeled by the line-of-sight power K d2 iand variance σ2where di=||Tx−Rxi||is the distance between TxandRxi. The likelihood function for each observation ψiis thus given by: p(ψi|Tx) =1√ 2πσ2exp −(ψi−K d2 i)2 2σ2! Maximizing log-likelihood Lof{ψi} ∀i∈ {1, . . . , P } logL(Tx) =PX i=1log 1√ 2πσ2exp −(ψi−K d2 i)2 2σ2!! logL(Tx) =−P 2log(2πσ2)−1 2σ2PX i=1 ψi−K d2 i2 Minimizing the second term gives the optimal Tx∗as: Tx∗= argmin TxPX i=1 ψi−K ∥Tx−Rxi∥2 22 15 We use Scipy’s ‘minimize’ with the BFGS method to numerically solve for Tx∗. Fig 13. visualizes the ground truth and the estimated Txlocations across 6 floorplans. The estimated Txpositions closely match the ground truth, and we report the Txlocation error to be 2.08 pixels. Fig 10. demonstrates the performance of EchoNeRF _LoSandEchoNeRF using the estimated Txlocations for the 6 floorplans in Fig 13. Performance is comparable to that achieved with ground truth Txlocations, highlighting robustness. Ground Truth EchoNeRF LoS EchoNeRF Figure 10: Qualitative comaprison of EchoNeRF _LoSandEchoNeRF when Txlocations are unknown, and are estimated. The top row shows the ground truth floorplan, Rxlocations along with the estimated Txs in blue. The second and third row displays the performance of EchoNeRF _LoSandEchoNeRF respectively. Despite the Txlocations being unknown, our methods accurately estimate them, leading to performance comparable to the case where Txlocations are known. E Details on Model Training The signal power measured at the receiver is typically represented in a logarithmic scale. RSSI values generally range from -50 dB to -120 dB, where a higher value (e.g., -50 dB) corresponds to a stronger signal. Fig 11 illustrates a typical input to EchoNeRF where measurements have | https://arxiv.org/abs/2505.22441v1 |
been collected from approximately 2000 Rxs positioned in the floorplan, with data gathered from five Txs. E.1 Linear-Scale RSSI Loss: For the training of EchoNeRF , we optimize on the linear-scale RSSI values. Linear loss ensures that the receivers that capture stronger signals are given more importance during training. We partition our dataset into an 80-20 split, using 80% of the data for model training, including baselines. ForEchoNeRF ’s network, we employ a simple 8-layer MLP with a hidden dimension of 256 units. For each voxel vj, the outputs from the final layer are passed through a sigmoid activation to obtain the opacity δ, and through a Gumbel softmax [ 16] layer to sample the output normal ωfrom one of the possible Kωorientations. This sampled orientation is then used in the subsequent stages of training, such as for calculating the direction of the reflected signal M. For the learnable baselines, such as MLPandNeRF2 , we adopt the same architecture as used in EchoNeRF . E.2 Supervising Voxel Orientations EchoNeRF leverages the spatial gradient of a voxel’s opacity, ∇δ, to supervise its orientation during the multi-stage training process. To compute this gradient, we evaluate the opacities of neighboring 16 Figure 11: Observed signal power at the Rxs . The top left figure shows the positions of the Rxs and Txs, followed by the power at the receivers from each of the five transmitters. The colormap ranges from red showing stronger signals to blue for weaker signals. Figure 12: An incoming ray from a transmitter Txreflecting around voxel vjand arriving at receiver Rx. The incoming ray makes an incident angle θwith the normal ωjto the reflecting surface. The ray after reflection passes a receiver Rxat a certain distance making an angle β. voxels along each of the Kωdirections and apply finite difference methods. We found that this approach yielded superior results compared to using the gradient available via autograd. In general, the power from reflections depends not only on the total distance traveled but also on the angle at which the reflection occurs at the voxel vj, and whether the reflected ray reaches the receiver (Rx). We model this behavior through θandβrespectively which parameterize a nonlinear function f. The incidence angle θmeasures the angle between the Txand the orientation ωj, and βdenotes the angle Rxmakes with the reflected ray M(see fig 12). Note that if vj∈ V, and if ωjis correct, β= 0. The reflected ray Mcan be computed as shown in Eqn 15. M= (vj−Tx)−2 [(vj−Tx).ωj]ωj (15) Here ωjis a unit vector. E.3 Detailed network parameters We assume the floorplan is an unknown shape inside a 512×512grid. For any ray or ray segment, we uniformly sample nr= 64 voxels on it. We choose λ1=λ2= 0.01for LoS training followed by λ1=λ2= 0.1for training the EchoNeRF model. We find that discretized opacity values to {0,1} improve our LoS model. We use the straight-through estimator [4] to avoid the unavailability of the gradient at the discretization step. To help optimization and to encourage sparsity of the number of reflections, we use only the top- kcontributions ( | https://arxiv.org/abs/2505.22441v1 |
k=10) while training the reflection model. We use the ADAM optimizer [ 17] with 1.0−4learning rate. We train our models on NVIDIA A100 GPUs. 17 Figure 13: Comparison of Ground truth Txlocations indicated in red in the first column with the estimated Txlocations shown in blue from starting from column two. The Rxpositions used for the estimation are marked in green. E.4 Heatmap Segmentation Implementation Details The raw trajectory signal power values are first interpolated to obtain a heatmap that provides a smoother representation of the input measurements. Of course, interpolating for regions without any data can lead to incorrect results, especially in larger unseen areas. A rule-based classifier is then applied for segmentation, using two criteria: (1) RSSI values above a threshold to identify potential room areas, and (2) smoothness of the RSSI signal, assessed through the second-order derivative, to ensure continuity within rooms. The initial segmentation is refined using morphological operations (via dilation and erosion) with a 3x3 kernel to smooth rough edges and eliminate small components. Overlapping regions are resolved by comparing gradient magnitudes, followed by additional morphological processing and connected component analysis to obtain the final, refined segmentation. Code: We plan to release our code, data, and baselines upon acceptance of the paper to ensure reproducibility. In the meantime, Section E provides sufficient details to allow readers to reproduce our results, especially since our network components are simple MLPs. 18 F Evaluation on Additional Floorplans Ground Truth Heatmap Seg. NeRF2 EchoNeRF LoS EchoNeRF EchoNeRF Signal Predic- tion Figure 14: Qualitative comparison of Ground Truth floorplans against those inferred by baselines Heatmap Segmentation andNeRF2 . We note that while NeRF2 is unable to predcit any reasonable floorplan, Heatmap Segmentation ´s shape is limited by the (convex hull of the) trajectory data (see bottom left of the second row, first column). Additionally, it fails to capture critical details, such as door openings. The 4th and 5th rows show floorplans by our proposed models EchoNeRF _LoSand EchoNeRF .EchoNeRF _LoScaptures the rough shape of the floorplan, especially the interior walls, while EchoNeRF further improves these walls by adjusting their thickness and accurately correcting their shape. EchoNeRF also correctly identifies the floorplan boundary, as evidenced in the last column, where the exact boundary is captured just from the reflections. To understand the signal propagation captured by EchoNeRF , we place one Txin each floor plan randomly (that is not present in the training data) and evaluate the signal power at discrete receivers. These Rxs are placed on a 2D grid at equal intervals and the predicted signal power is converted into a heatmap. The bottom row shows these inferred signal power heatmaps with the brightest point indicating the Tx location (as theRxclosest to the Txreceives the highest power). EchoNeRF is not only able to predict the signals well across the floorplan, but also capture the propagation paths i.e., LoS signal and the first-order reflections. For instance, in the first column, the left portion of the center hall receives power only due to the wall reflection from the left wall. 19 Ground Truth Heatmap | https://arxiv.org/abs/2505.22441v1 |
Seg. NeRF2 EchoNeRF LoS EchoNeRF EchoNeRF Signal Predic- tion Figure 15: Additional qualitative comparisons of Ground Truth floorplans against those inferred by baselines Heatmap Segmentation andNeRF2 . The 4th and 5th rows show floorplans by our proposed models EchoNeRF _LoSandEchoNeRF with clearly identified walls and boundaries. The bottom row shows inferred signal power heatmaps demonstrating EchoNeRF ’s capability to learn accurate signal propagation. G Societal Impact Statement We acknowledge that NeRFs hold significant potential for positive societal impact. Applications span AR/VR, medical imaging, airport security, and education, where accurate 3D reconstructions can greatly enhance functionality and understanding. However, our work on EchoNeRF also introduces potential risks. In particular, the ability to infer detailed spatial layouts from limited sensory input could be misused to access private or sensitive floorplan information. We emphasize the importance of responsible use. 20 | https://arxiv.org/abs/2505.22441v1 |
arXiv:2505.22442v1 [cs.LG] 28 May 2025SOReL and TOReL: Two Methods for Fully Offline Reinforcement Learning Mattie Fellows∗,1Clarisse Wibault∗,1,2 Uljad Berdica1Johannes Forkel1Jakob N. Foerster1Michael A. Osborne2 1Foerster Lab for AI Research (FLAIR)2Machine Learning Research Group Department of Engineering Science University of Oxford matthew.fellows@eng.ox.ac.uk, clarisse.wibault@eng.ox.ac.uk Abstract Sample efficiency remains a major obstacle for real world adoption of reinforcement learning (RL): success has been limited to settings where simulators provide access to essentially unlimited environment interactions, which in reality are typically costly or dangerous to obtain. Offline RL in principle offers a solution by exploiting offline data to learn a near-optimal policy before deployment. In practice, however, current offline RL methods rely on extensive online interactions for hyperparameter tuning, and have no reliable bound on their initial online performance. To address these two issues, we introduce two algorithms. Firstly, SOReL: an algorithm forsafeoffline reinforcement learning. Using only offline data our Bayesian approach infers a posterior over environment dynamics to obtain a reliable estimate of the online performance via the posterior predictive uncertainty. Crucially, all hyperparameters are also tuned fully offline. Secondly, we introduce TOReL: a tuning for offline reinforcement learning algorithm that extends our information rate based offline hyperparameter tuning methods to general offline RL approaches. Our empirical evaluation confirms SOReL’s ability to accurately estimate regret in the Bayesian setting whilst TOReL’s offline hyperparameter tuning achieves competitive performance with the best online hyperparameter tuning methods using only offline data . Thus, SOReL and TOReL make a significant step towards safe and reliable offline RL, unlocking the potential for RL in the real world. Our implementations are publicly available: https://github.com/CWibault/sorel_torel. 1 Introduction Offline RL [ 41,44,49] promises to unlock the potential for agents to act autonomously, successfully, and safely from the moment they are deployed into an environment. However, existing offline RL methods [ 65,38,34,75] are yet to fulfil this promise; they require many online samples to carry out the extensive hyperparameter tuning required to achieve high performance [ 76,30], and there is no way of knowing whether the deployed policy will achieve good performance when initially deployed. Technically, current methods offer no reliable offline method to estimate true online regret, i.e. the difference between expected returns of an optimal policy and a policy trained using offline data. As we sketch in Fig. 1a, these factors result in cycles of training offline, deployment, failure online, further hyperparameter tuning, re-training offline and redeployment until the online performance of the agent is acceptable. Typically, online environment interactions are expensive, incorrect behaviour may be dangerous, and users need some guarantee of optimality within a fixed timeframe of deployment. This is concerning from an AI safety perspective, as without a reliable regret bound, we cannot deploy agents into the real world where agent failure presents a serious hazard to human life. In this paper, we develop two methods to address these two key issues of high online sample complexity andlack of online performance guarantees in offline RL. ∗Equal Contribution Preprint. Under review. Offline Data Bank World ModelLearn Environment Dynamics Learn Behavioural Policy Agent FailsUse More Data Retune/ Change Model Deploy Agent | https://arxiv.org/abs/2505.22442v1 |
O F F L I N E(a) Existing Model-Based Offline RL Offline Data Bank Bayesian World ModelPosterior over Environment Dynamics Approximate Regret Low Enough? Agent Succeeds Predictive Regret Number of Datapoints0 10-0101102103104Learn Behavioural Policy Retune/ Change model Use More Data O F F L I N E Deploy Agent YESNO (b) SOReL (Our Approach) Figure 1: Existing model-based offline approaches rely on online interactions for hyperparameter tuning and verifying accurate model learning before they can achieve good performance, leading to poor online sample efficiency. In contrast, in SOReL, model tuning and world model learning is carried out fully offline until a safe level of approximate regret is attained. Only then is the agent trained and deployed. Created in BioRender. Fellows, M. (2025) https://BioRender.com/gsdfdoz andhttps://BioRender. com/d3mgdw4 To address these issues, we develop a Bayesian framework where the posterior (conditioned on the offline data) is used as a prior for a Bayesian RL problem [ 48,21]. Our analysis reveals that the regret of the corresponding Bayes-optimal policy is controlled by the posterior information loss (PIL) - that is the expected posterior KL divergence between the model and true dynamic. The change in PIL, known as the information rate , measures how much information the model has gained from an incremental amount of offline data. Crucially, the PIL can be estimated and tracked during offline training, allowing us to monitor performance and tune hyperparameters completely offline. For our first method, we develop SOReL, a theoretically grounded framework for model-based safe offline reinforcement learning which tackles both key issues. Our analysis also reveals that by using offline data to infer a posterior over environment dynamics, we can approximate regret using the predictive variance and median of policy rollouts prior to deployment . As we show in Fig. 1b, if the PIL, and therefore regret is not falling fast enough, any issues involving hyperparameter tuning and model choice can be resolved offline. Only then is the trained agent deployed safely, making SOReL (to the authors’ knowledge) the first fully offline RL approach with reliable performance guarantees once deployed. Our first experiment supports this claim empirically, showing that in the standard offline RL MuJoCo control tasks [ 74,34,5,47,62,58], SOReL’s offline regret approximation accurately tracks the true regret once deployed online. For less conservative applications where accurate regret estimation is not required, we extend SOReL’s offline hyperparameter tuning methods to existing model-free and model-based offline RL approaches [74,34,5,47,62,65,58]. Using this insight, we develop TOReL, an algorithm for tuning offline reinforcement learning that tracks a regret metric correlated to the true regret. To test our method, we apply TOReL to IQL [ 38], ReBRAC [ 65], MOPO [ 74] and MOReL [ 34] to carry out hyperparameter tuning in the standard offline RL MuJoCo control tasks. Using only offline data, TOReL achieves similar performance to existing methods that carry out online hyperparameter tuning. Notably, when combined with ReBRAC, TOReL consistently finds a hyperparameter combination with near-zero regret, outperforming all hyperparameters for all other algorithms. When comparing TOReL’s offline hyperparameter tuning to a recent online UCB approach [ 30], we see | https://arxiv.org/abs/2505.22442v1 |
that UCB typically requires about a dataset’s worth of online samples to match TOReL’s performance. We summarise our key contributions: I In Section 4, we develop a Bayesian framework for model-based offline RL; IIIn Section 5 we carry out a regret analysis for our framework, demonstrating regret is controlled by the PIL and providing a strong frequentist justification for our Bayesian approach; IIIIn Section 6.1 we develop SOReL, a method for approximating true regret using predictive uncertainty, which can achieve a desired and safe level of true regret once deployed; 2 IVIn Section 6.2 we introduce TOReL, adapting SOReL’s offline hyperparameter tuning approach to general offline model-based and model-free RL; VIn Section 7.1 we empirically confirm SOReL’s regret approximation as an accurate proxy for true regret; VIIn Section 7.2, we also evaluate TOReL in the standard MuJoCo offline RL control tasks. Our approach achieves competitive performance with the best online hyperparameter tuning methods using only offline data, and achieving near-zero regret when combined with ReBRAC. 2 Preliminaries 2.1 Mathematical Notation LetXbe aX ⊆Rn-valued random variable. We denote a distribution as PXwith density (if it exists) asp(x). We denote the set of all distributions over XasP(X). We introduce the notation G(p)to represent the geometric distribution and AG(p)to represent the arithmetico-geometric distribution, with probability mass functions: PG(i):= (1−p)piandPAG(i):= (1−p)2pi(i+ 1) respectively, fori∈N+ 0and parameter p∈[0,1). We denote the uniform distribution over {0,1, . . . i}asUiand the multivariate normal distribution with mean vector µand covariance matrix ΣasN(µ,Σ). 2.2 Offline Reinforcement Learning For our offline RL setting, an agent is tasked with solving the learning problem in an infinite-horizon, discounted Markov decision process [ 10,11,63,54,64]:M⋆:=⟨S,A, P0, P⋆ S(s, a), P⋆ R(s, a), γ⟩, with state space S, action space Aand discount factor γ. At time t= 0 , an agent starts in an initial state allocated according the the initial state distribution: s0∼P0. At every timestep t, an agent in state sttakes an action according to a policy at∼π(ht)2, receives a scalar reward rt∼P⋆ R(st, at)and transitions to a new state st+1∼P⋆ S(st, at)where ht:= {s0, a0, r0, s1, a1, r1, . . . a t−1, rt−1, st} ∈ H tis the observed a history of interactions with the envi- ronment. Here Ht:=S ×(A ×R× S)×tdenotes the corresponding product space. We assume rewards are bounded with rt∈[rmin, rmax]⊂Rwhere rminandrmaxdenote the minimum and maximum reward values respectively. For convenience, we often write the joint state transition- reward distribution as P⋆ R,S(s, a). We denote the distribution over history htasP⋆ t,π. The goal of an agent is to learn an optimal policy π⋆∈Π⋆where Π⋆:= arg maxπJπ(M⋆)is the set of policies that maximise the expected discounted return Jπ(M⋆) :=Eh∞∼P⋆∞,πP∞ i=0γiri . It suffices to consider only optimal policies that condition only on the most recent state (i.e. π⋆(st)) as, in a fully observable MDP, any optimal history-conditioned policy will never take an action that cannot be taken by an optimal policy that conditions only on most recent state. In the learning setting, the true state transition distribution P⋆ S(s, a)and reward distribution P⋆ R(s, a) are assumed unknown | https://arxiv.org/abs/2505.22442v1 |
a priori. Once deployed, the agent is faced with the exploration/exploitation dilemma in that it must balance exploring to learn about the unknown environment dynamics with exploiting. In offline RL [ 41,44,49], an agent has access to a dataset of histories of various lengths collected from the true environment. The policies used to collect the data may vary and not be optimal. In the zero-shot model-based offline RL setting [ 30], the dataset is used to learn the unknown environment dynamics from which a policy is trained prior to any interaction with the environment. The agent is then deployed at test time t= 0 and its performance evaluated. The goal of offline RL is to take advantage of offline data so that the deployed policy will be near-optimal from the outset. 3 Related Work Developing reliable model-based offline RL algorithms remains an open challenge for several reasons. In addition to our key issues of high online sample complexity and lack of online performance guarantees, i)the performance of approaches is particularly dependent on the ability to accurately model transition dynamics as errors in a dynamics model can compound over several timesteps for the long-horizon problems encountered in RL (see also our analysis in Section 5.2); ii)many datasets used to benchmark methods contain missing datapoints in critical regions of state-action space, which poses an additional orthogonal generalisation challenge. Most existing offline RL methods focus 2Policies condition on history as we work within a Bayesian paradigm, using methods such as RNN-PPO [57] 3 on tackling issue ii)by introducing a form of reward pessimism based on the model uncertainty [74,34,40,75,24,38,3,5,47,62,65,58]. Unifloral [ 30] is a recent framework that unites these offline RL approaches into a single algorithmic space with lightweight and high-performing implementations, as well as providing a clarifying benchmarking protocol. Our implementations and evaluation methods follow this framework. Only limited attention has been given to the two aforementioned issues of high online sample complexity and lack of performance guarantees: Paine et al. [52] introduce a method for estimating online value and partial hyperparameter tuning of offline model-free algorithms, however their method neither approximates regret, nor is an accurate proxy for true value, resulting in significant overestimation in most domains. As noted by Smith et al. [60], their approach relies on offline policy evaluation, which is a challenging and provably difficult problem [ 71] whose hyperparameters require tuning online. Moreover, as noted by Jackson et al. [30], their framework is limited to behavioural cloning and two model-free critic-based methods that have since been outperformed by modern algorithms. Smith et al. [60] introduce a method for offline hyperparameter tuning, but are limited to the model-free imitation learning setting and offer no regret estimation. Finally, Wang et al. [70] introduce a method for offline hyperparameter tuning to pre-select hyperparameters for online methods, but do not learn optimal policies offline or provide regret approximation. In contrast to all of these approaches, to the authors’ knowledge, our method is the first offline RL method to reliably approximate regret and carry out all hyperparameter tuning for general methods using only offline | https://arxiv.org/abs/2505.22442v1 |
data. Finally, understanding of offline RL from a Bayesian perspective is limited. To the authors’ knowledge, only Chen et al. [15] have framed solving offline model-based RL as solving a BAMDP, however no regret analysis of the Bayes-optimal policy is carried out, a continuous BAMCP [ 28] approximation is used to learn behavioural policies and the algorithm still suffers from a lack of regret approximation, hence relying on online data for tuning and data integration. 4 Bayesian Offline RL We now introduce our framework for safe offline RL (SOReL), which constitutes first learning an (approximate) posterior from offline data before solving a Bayesian RL problem with the posterior acting as the prior. We provide an introductory primer on Bayesian RL in Appendix B. 4.1 Learning a Posterior with Offline Data A Bayesian epistemology characterises the agent’s uncertainty in the MDP through distributions over any unknown variable [ 48,21]. We first specify a parametric model p(rt, st+1|st, at, θ), PR,S(st, at, θ),θ∈Θ⊂Rd, over the unknown state transitions and reward distributions, with each θ∈Θ⊆Rdrepresenting a hypothesis about the MDP M⋆. As we show in Section 5.1, our results can easily be generalised to non-parametric methods like Gaussian process regression [55,72,39]. A prior distribution over the parameter space PΘis specified, which represents the initial a priori belief in the true value of P⋆ R,S(s, a)before the agent has observed any transitions. We denote an offline dataset of Nstate-action-state-reward transition observations as: DN= {(si, ai, s′ i, ri)}N−1 i=0, all collected from a single MDP M⋆. Datapoints may be collected from several policies and non-Markovian sampling. Given the dataset DN, the prior PΘwith density p(θ)is updated to posterior PΘ(DN)with density p(θ|DN), using Bayes’ rule: p(θ|DN) =p(DN|θ)p(θ) p(DN)=QN−1 i=0p(ri, s′ i|si, ai, θ)p(θ)R ΘQN−1 i=0p(ri, s′ i|si, ai, θ)p(θ)dθ. (1) The posterior represents the agent’s belief in the unknown environment dynamics once DNhas been observed. We now detail how a Bayes-optimal policy is learned using the posterior as the initial belief in the environment dynamics. 4.2 Learning a Bayes-optimal Policy It is well known that solving a Bayesian RL problem exactly is intractable for all but the simplest models [ 48,21,26,27,77,22]. Inferring the posterior in Eq. (1) is typically infeasible for dynamics models of interest (for example, nonlinear Gaussian world models). This is because there is no analytic solution for the posterior density and the cost of carrying out integration required to evaluate the evidence p(DN)grows exponentially in parameter dimensions d. Fortunately, there exist tractable methods to learn an approximate posterior ˆPΘ(DN)≈PΘ(DN); in this paper we use randomised priors [ 50,51,16] (RP) and provide details in Appendix F.2. In addition, a planning problem must be 4 solved for every conceivable history that an agent could encounter. In our offline RL setting, we ease intractability by replacing the prior PΘwith a highly informative posterior PΘ(DN), significantly reducing the hypothesis space in the Bayesian RL problem. LetP∞,π(θ)denote the corresponding model distribution over h∞for policy π(ht). To obtain an (approximately) Bayes-optimal policy, we use the Bayesian RL objective in the meta-learning form [77,9] (i.e. as an expectation using ˆPΘ(DN)) so | https://arxiv.org/abs/2505.22442v1 |
that a simple RL2[20] style algorithm can be applied: Jπ Bayes(ˆPΘ(DN)):=Eθ∼ˆPΘ(DN)" Eh∞∼P∞,π(θ)"∞X i=0γiri## . (2) Solving Eq. (2) is known as solving a Bayes-adaptive MDP (BAMDP) [ 21]. We optimise the objective in Eq. (2) by sampling a hypothesis environment from the approximate posterior θ∼ˆPΘ(DN)then rolling out the policy in the sampled environment dynamics. The Bayes-optimal policy π⋆ Bayes∈ arg maxπJπ Bayes(ˆPΘ(DN))is learned using RNN-PPO [ 57] as a BAMDP solver on the rollouts. Complete implementation details can be found in Appendix F. In addition to having excellent exploration/exploitation properties, a Bayesian approach affords access to epistemic uncertainty in the returns via the variance of predictive rollouts. Uncertainty estimation is essential for tackling our two keys issues; firstly, as we show in Section 7.1, the predictive variance and predictive median of policy returns can be used to estimate the true regret at test time. Secondly, monitoring the decay of predictive variance and regret is a powerful tool for diagnosing issues offline; if not decaying, the practitioner can fix any issues with model choice, hyperparameter tuning or the prior PΘbefore deployment , eliminating the need for online samples. Finally, we remark that a Bayesian approach is relatively simple compared to existing model-based approaches in Section 3 as it does not rely on hand-crafted heuristics tailored to specific problem settings. 5 Regret Analysis We carry out a frequentist regret analysis for Bayesian offline RL. The goal of this analysis is to characterise how the rate of regret decreases for a Bayes-optimal policy using an easy to estimate quantity known as the posterior information loss (PIL). All proofs for all theorems can be found in Appendix D. 5.1 Controlling Regret with the PIL For ease of exposition, we assume the real MDP is parametrised by some θ⋆∈Θ. According to the Bernstein-von Mises theorem [ 18,42,68], as the posterior becomes more informative it concentrates around a smaller (and more tractable) subset of hypothesis space Θcentred on θ⋆. Not only does this ease the computational burden of solving the BRL objective in Eq. (2), but in the limit N→ ∞ , the Bayesian RL objective using the true posterior from Eq. (2) will approach the true expected discounted return for the MDP: Jπ(PΘ(DN))− − − − → N→∞Jπ(M⋆). In this limit, any Bayes-optimal policy will be an optimal policy for the true MDP, achieving the highest expected returns once deployed. For finite N, we can measure how far the performance of the Bayes optimal policy is from an optimal policy using the true regret , which is the difference between the expected return Jπ⋆ Bayes(M⋆,DN)of the Bayes-optimal policy π⋆ Bayes given a posterior PΘ(DN), all in the true MDP M⋆: Regret (M⋆,DN):=Jπ⋆(M⋆)−Jπ⋆ Bayes(M⋆,DN). Accurately approximating true regret is challenging and exact calculation is impossible unless the true environment dynamics M⋆are known. To make progress towards approximating regret, we bound it using the PIL, defined as: Iπ N:=Eθ∼PΘ(DN) Es,a∼ρ⋆π KL P⋆ R,S(s, a)∥PR,S(s, a, θ ) . (3) Hereρ⋆ π:=Ei∼AG (γ) Ej∼Ui P⋆ j,π is the arithemetico-geometric ergodic state-action distribution, which places mass over state-action pairs according to | https://arxiv.org/abs/2505.22442v1 |
how much errors in the model influence the regret at each state. Regions of state-action space that require more timesteps to reach from initial states are weighted significantly less than those that are encountered earlier and more frequently, as state errors encountered early accumulate in each prediction from that timestep onwards. 5 The PIL has an intuitive information-geometric interpretation: the inner expectation Es,a∼ρ⋆π KL P⋆ R,S(s, a)∥PR,S(s, a, θ ) measures the distance between the model and the true distribution in terms of the information lost when approximating P⋆ R,S(s, a)withPR,S(s, a, θ ), aver- aged across all states. The PIL thus measures how close the posterior’s belief is to the truth according to the average information lost under the posterior expectation. We observe that via Jensen’s inequal- ity, the PIL is an upper bound on the classic KL risk (sometimes known as expected relative entropy) from Bayesian asymptotics and regret analysis [1, 17, 37, 29, 7, 6, 73, 69, 4, 2, 12]. Theorem 1. LetRmax:=(rmax−rmin) 1−γdenote the maximum possible regret for the MDP . Using the posterior information distance in Eq. (3), the true regret is bounded as: Regret (M⋆,DN)≤2Rmax·sup πs 1−exp −Iπ N 1−γ (4) From Ineq. 4, we observe that the rate at which regret decreases with Nis governed by the rate at which the PIL decreases, which is known as the information rate , which measures how much information the model has gained from an incremental amount of data. Fast information rates imply highly informative posteriors can be learned using minimal data as regret will decrease at least as fast. How fast the information rate is depends on the exact model specification, prior and underlying MDP. Formulating our bound in terms of the PIL ties the regret to the KL divergence over the reward-state model: KL P⋆ R,S(s, a)∥PR,S(s, a,DN) . Not only is this mathematically more convenient, yielding a simpler bound, but the PIL is easy to estimate in practice meaning the information rate can be monitored offline to gauge online performance and carry out hyperparameter tuning. We observe that our results in Theorem 1 also apply for offline frequentist settings where an estimate, e.g. the maximum likelihood estimate ˆθMLE N:= arg maxθlogp(DN|θ), is calculated from the dataset DN. Here, the posterior is replaced with the point estimate PΘ(DN) =δ(θ=ˆθMLE N). 5.2 Frequentist Justification for Bayesian Offline RL Using Theorem 1, we can study the PIL Iπ Nfor different classes of models which allows us to under- stand how regret will evolve given the model choice. This also provides a frequentist justification for many Bayesian approaches. We now characterise the information rate for parametric models. Theorem 2. Let the data be drawn from the underlying true distribution DN∼P⋆ Data. Under standard local asymptotic normality assumptions (see Assumption 1 in Appendix D.3), there exists some constant 0< C < ∞such that for sufficiently large N: EDN∼P⋆ Data[Regret (M⋆,DN)]≤2Rmax·exp 1−s Cd (1−γ)N! . (5) 101103105107109 N0.00.20.40.60.81.0Regret (Normalised)Dimension, gamma 10.0, 0.97 100.0, 0.97 1000.0, 0.97 10000.0, 0.97 10.0, 0.1 10.0, 0.9 10.0, 0.99 Figure 2: Normalised Regret Curves for C= | https://arxiv.org/abs/2505.22442v1 |
1Theorem 2 applies to the Gaussian world model introduced in Section 5.3 with neural network mean functions with C2-continuous activations (tanh, identity, sigmoid, softplus, SiLU, SELU, GELU...) using a Gaussian or uniform prior truncated to a compact parameter space and similarly well-behaved parametric models. The O(d/N)information rate coincides with the op- timal ‘minimax’ convergence rate of frequen- tist parametric density estimators [ 73,12], pro- viding a strong frequentist justification for our Bayesian offline RL framework. The resulting differences in performance only arise from the choice of prior, model representability and cov- erage of dataset, which affect Bayesian and fre- quentist methods equally. Similar results for the information rate have been found for nonparametric models such a Gaussian processes [ 69]. We note that the bound in Ineq 5 is upper bounded as Op d/N , which relates our method to regret rates found in prior work [74, 34]. 6 Using our result in Theorem 2, we plot the normalised regret bound (i.e. taking Rmax= 0.5) in Ineq. 5 for increasing dimensionality (blue) and decreasing γ(copper) in Fig. 2. Our bound reveals an S-shaped curve with three distinct phases as number of data points Nincreases: an initial plateau, a sudden decrease in regret follow by a slow exponential decay towards a regret of zero. The plateau indicates that a minimum amount of data is needed before any benefit can be realised in terms of regret. This is to be expected because initially the only information about the parameter values is given by the prior, which has no guarantee of accuracy under our analysis. Once a threshold of data points has been reached, the data can start to overwhelm the prior, resulting in a sudden decrease in regret. The higher the dimensionality of the model, the greater this data limit is - represented in Fig. 2 by the plateau length increasing with greater d(blue curves). Due to overspecification in models, this limit is likely to be set by the effective dimension of the problem (which may be much lower than d) as many parameters will be redundant, however the effective dimension is typically not possible to ascertain a priori. Finally, we observe that increasing the discount factor γleads to a longer regret plateau (copper curves) due to any error in the model dynamics being compounded over a longer horizon at test time. 5.3 Gaussian World Models Many methods specify Gaussian reward and state transition models of the form: PR(s, a, θ ) =N(rθ(s, a), σ2 r(s, a)), P S(s, a, θ ) =N(s′ θ(s, a), Iσ2 s(s, a)), (6) with isotropic variance characterised by σ2 randσ2 s, mean reward function rθ(s, a)and mean state transition function s′ θ(s, a). Using a Gaussian world model, we find the PIL takes a convenient and intuitive form. Let r(s, a,DN):=Eθ∼PΘ(DN)[rθ(s, a)]ands′(s, a,DN):=Eθ∼PΘ(DN)[sθ(s, a)] denote the Bayesian mean reward and state transition functions and r⋆(s, a)ands⋆′(s, a)denote the true mean functions. We define the mean squared error between the true and Bayesian mean functions as: E(DN,M⋆):=E(s,a)∼ρ⋆π∥r(s, a,DN)−r⋆(s, a)∥2 2 2σ2r(s, a)+∥s′(s, a,DN)−s⋆′(s, a)∥2 2 2σ2s(s, a) ,(7) and | https://arxiv.org/abs/2505.22442v1 |
the predictive variance as: V(DN):=E(s,a)∼ρ⋆π Eθ∼PΘ(DN)∥r(s, a,DN)−rθ(s, a)∥2 2 2σ2r,(s, a)+∥s′(s, a,DN)−s′ θ(s, a)∥2 2 2σ2s(s, a) . (8) We now re-write the PIL for the Gaussian world model using these two terms: Proposition 1. Using the Gaussian world model in Eq. (6), it follows: Iπ N=E(DN,M⋆) +V(DN). (9) Eq. (9) shows that the PIL is governed by i) the mean squared error of the point estimate E(DN,M⋆), which characterises how quickly the Bayesian mean function converges to the true function; and ii) the predictive variance V(DN), which characterises the epistemic uncertainty in the model. For frequentist methods using point estimates like the MLE, there is no characterisation of epistemic uncertainty, meaning V(DN) = 0 . The PIL can easily be estimated by estimating E(DN,M⋆)using the empirical MSE with offline data and estimating V(DN)using posterior sampling. 6 From Theory to Practice Our frequentist analysis in Section 5 provides valuable intuition about how we might expect regret to change depending on the choice of model, however it cannot address the two key issues of online sample efficiency and performance guarantees from Section 1. This is because it cannot provide a precise answer to questions like ‘what will the regret of the deployed policy be?’ or ‘which hyperparameter has the lowest regret?’ as the results depend on constants that condition on M⋆, which is unknown a priori, and are characterised in terms of asymptotic limits of large data, often relying on Nbeing large enough with little qualification of what large enough means. These issues stem from the fact that a purely frequentist regret analysis treats the unknown distribution as true and data as random, thereby violating the conditionality principle [13,25]. Our Bayesian approach can bypass this issue, allowing for offline regret approximation and hyperparameter tuning by monitoring the PIL and predictive median and variance, which only condition on observed data. 7 6.1 SOReL We now introduce SOReL in Algorithm 1, our algorithm for reliable regret estimation and offline hyperparameter tuning. In our SOReL framework, there are three sets of hyperparameters: ϕIthe model (such as the architecture for a neural-network function approximator); ϕIIthe approximate inference method (such as the number of ensemble members for RP); and ϕIIIthe BAMDP solver (the hyper-parameters of a Bayesian meta-learning algorithm like RNN-PPO). Sets ϕIandϕIIare tuned jointly to both minimise the PIL and ensure a roughly even split between the predictive variance and MSE loss terms. Set ϕIIIis then tuned to minimise approximate regret based on the now-fixed model and approximate posterior: for each combination of hyper-parameters, we learn a policy using the BAMDP solver, and choose the combination whose policy leads to the lowest approximate regret. RDeploy denotes the desired level of regret of the deployed policy. Regret Approximation: A simple approach for bounding regret would be to estimate the PIL from the offline data using Eq. (9) and then apply our theoretical upper bound in Eq. (4). This is likely to be too conservative for most applications as it protects against the worst case MDP that the agent could encounter. In particular, it is very sensitive to errors | https://arxiv.org/abs/2505.22442v1 |
in the model, especially as γ→1, which is an artifact of model errors accumulating over all future timesteps in the regret analysis. Instead, we approximate the regret using the posterior predictive median: Regret (M⋆,DN)≈ˆRmax−ˆMθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)], (10) where ˆMθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)]denotes the median predictive return based on sampling from the (approximate) posterior and rolling out the Bayes-optimal policy and ˆRmaxis estimated from the maximum return in the offline dataset - full details and an overview of alternative metrics that can be derived from the posterior to approximate the regret with varying degrees of conservatism are found in Appendix C.2. We hypothesise that the sample median offers a good compromise: neither overly conservative nor overly susceptible to being skewed by a policy that performs well on only a subset of posterior samples. Our empirical evaluations support this hypothesis in Section 7.1. The posterior predictive median also allows us to tune hyperparameter set ϕIII, selecting hyperparameters to learn a policy that achieves the lowest approximate regret as shown in Algorithm 1. Algorithm 1 SOReL (PΘ,DN,RDeploy) RN←ˆRmax while RN>RDeploy do Hyperparameter tuning: ϕI, ϕII←arg minϕI,ϕIIPIL(ϕI, ϕII,DN) s.t.E(DN,M⋆)≈ V(DN) ϕIII←arg minϕIIIApproxRegret (ϕI, ϕII, ϕIII,DN) Policy Learning and Regret Approximation: π⋆ Bayes←SolveBAMDP (ϕI, ϕII, ϕIII,DN) RN←ApproxRegret (ϕI, ϕII, ϕIII,DN) end while return π⋆ BayesInformation Rate Monitoring: To tune sets ϕIandϕII, we moni- tor the information rate (recall, the change in PIL defined in Eq. (3)). Our goal is to select hyperparame- ters that minimises the PIL whilst ensuring the the MSE term (c.f. Eq. (7)) closely matches the pre- dictive variance term (c.f. Eq. (8)): E(DN,M⋆)≈ V(DN). Misalign- ment of predictive variance and MSE indicates either an overfit- ting/underfitting issue with model hyperparameters in set ϕIand/or an issue with uncertainty estimation due to approximate inference hyperparameters in set ϕII. Moreover, under/overestimating uncertainty will lead to poor regret estimation, which is why we tune sets ϕIandϕIIfirst in Algorithm 1. Our empirical evaluations in Section 7.1 confirm that when E(DN,M⋆)≈ V(DN), the approximate regret aligns strongly with true regret. 6.2 TOReL Algorithm 2 TOReL (PΘ,DN) ϕI, ϕII←arg minϕI,ϕIIPIL(ϕI, ϕII,DN) [s.t.E(DN,M⋆)≈ V(DN),(model-based )] ϕIII←arg minϕIIIRegretMetric (ϕI, ϕII, ϕIII,DN) π⋆ TOReL←ORL(ϕIII,DN), (model-free) ORL(ϕI, ϕII, ϕIII,DN),(model-based) return π⋆ TOReLSeveral aspects of SOReL’s offline hyperparameter tuning methods are directly applicable to general offline RL approaches. We now adapt these methods to derive a general tuning foroffline reinforcement learning approach called TOReL, shown in Algorithm 2. A policy is learned 8 offline using a planning algorithm, denoted by ORL. There thus exists a corresponding set of hyperparameters associated with ϕIIIthe offline planner. For model-based methods with uncertainty estimation like MOReL [ 34] and MOPO [ 74], we can exactly adapt SOREL’s PIL tuning method to the parameters associated with: ϕIthe dynamics model and ϕIIuncertainty estimation. For all other methods, we introduce and learn a dynamics model and an approximate inference method like in SOReL and jointly tune the corresponding hyperparameters ϕIandϕIIto minimise the PIL without requiring the even split between the predictive variance and MSE loss terms. Since the policy learned with ORL is typically neither Bayes-Optimal nor robust to model uncertainty, we expect that applying SOReL’s regret | https://arxiv.org/abs/2505.22442v1 |
approximation method to more general methods in TOReL will not yield an accurate estimate of the regret in terms of its absolute value . Instead, we treat the approximate regret in Eq. (10) as a regret metric that is positively correlated with true regret, and use this to tune ORL parameters ϕIII. Our empirical evaluations in Section 7.2 support this hypothesis. We note that in model-free methods, the dynamics model and an approximate inference method are not used in policy learning, only to aid regret metric calculation. 7 Experiments To validate our theoretical and algorithmic contributions, we first show how SOReL can be imple- mented as a safeORL algorithm, thereby validating SOReL’s upper bound and its approximate regret. We then show that TOReL consistently identifies hyperparameters with a lower regret than the average regret of randomly chosen hyperparameters in existing ORL algorithms, entirely offline. 7.1 SOReL is a Safe Algorithm for ORL Figure 3: A simplified version of SOReL applied to brax-halfcheetah-full-replay to identify when the policy can be deployed. Shaded red indicates where E(DN,M⋆)̸≈ V(DN)(for a threshold of 0.25), and hence the approximate regret may be unreliable. Mean and standard deviation given over 3 seeds. We demonstrate how SOReL can be implemented as a safeORL algorithm in 5 environments: two gymnax environments and three brax environments. Referring back to Fig. 1b, we progressively include more offline data to learn a policy until a safe level of approximate regret is achieved. For our implementation, we use a variation of the standard Gaussian world model presented in Section 5.3, randomised priors [ 51,16] for approximate inference and RNN-PPO [ 57] to solve the BAMDP. Since we do not use a prior on the model, the offline data must be diverse, including transitions from poor, medium and expert regions of performance. While the gymnax environments we test on are simple enough that collecting a random dataset is sufficient, for the brax environments we collect our own full-replay datasets to ensure that this is the case. Implementation and dataset details are found in Appendix F. In practice, each time additional offline data is incorporated, the model, approximate inference and BAMDP hyperparameters should be newly tuned. To avoid too high a computational burden in our experiments, we use fixed model and approximate inference hyperparameters, highlighting in red the region where the approximate regret may be unreliable, and only tune the BAMDP hyperparameters 9 using the approximate regret for one seed and offline dataset size (Fig. 6 in Appendix E.1). While we deploy each policy in the true environment to validate our approximate regret, in practice, the policy would only be deployed once the approximate regret is sufficiently low. Fig. 3, showing results for halfcheetah-full-replay, along with all other results found in Appendix E.1, confirm that SOReL’s approximate regret is a good proxy for the true regret , allowing for the safe deployment of the Bayes-optimal policy. Using the regret and PIL, all hyperparameters can be tuned entirely offline and the practitioner can identify any issues (whether with the offline-dataset, the approximate inference method, or the model) | https://arxiv.org/abs/2505.22442v1 |
prior to deployment. We also highlight the generalisability of our algorithm: while the policy used to collect the halfcheetah dataset achieves an expected episodic return of around 1800 (Fig. 11 in Appendix E), SOReL’s policy (learned on a subset of the offline dataset) achieves a normalised regret of around 0.28 in the true environment (bottom of Fig. 3), corresponding to an undiscounted episode return of just under 2500. As expected (Section 6.1), our experiments show that the utility of the upper bound depends critically on the model being accurate enough relative to the discount factor. More details on a non-trivial upper-bound, along with results for gymnax and the remaining brax environments and ablations of different ensemble metrics that can be used to approximate regret with varying degrees of conservatism are found in Appendix E. 7.2 TOReL is an Effective Offline Hyperparameter Tuner for ORL Figure 4: TOReL-selected hyperparameter regret versus mean hyperparameter regret (lower is better). We use TOReL to identify hyperparameters for ReBRAC [ 65] and IQL [ 38] (two model-free al- gorithms), and MOPO [ 74] and MOReL [ 34] (two model-based algorithms). Details are given in Appendix F.4. In Fig. 4 we compare the regret of the TOReL-selected hyperparameter combination to the true regret, which we define as the expected regret over all possible hyperparameter combi- nations, since no algorithm provides a method of offline hyperparameter tuning. We also compare against the oracle regret: the minimum regret achieved by any hyperparameter combination. We evaluate each algorithm on 6 offline datasets: 200K randomly sampled transitions from each of our three brax datasets, and in the D4RL [ 23] locomotion datasets suggested by Jackson et al. [30] (halfcheetah-medium-expert, hopper-medium and walker2d-medium-replay). 10 Figure 5: TOReL compared to UCB bandit-based online hyperparameter selection. The x-axis shows the additional samples required during online hyperparameter tuning. For reference, the size of the D4RL offline datasets are 1998K, 1000K and 302K (left to right). Shaded indicates the UCB 95th percentile confidence interval. Table 1 shows ReBRAC+TOReL as a consistently high-achieving combination, reaching near-oracle performance on every dataset. For two-thirds of the tasks and algorithms there is statistically significant ( p <0.05), strong ( r >|0.5|) positive ( r >0) Pearson correlation between the ensemble median regret metric and the true regret (Table 3 and Fig. 10 in Appendix E). Where no strong positive correlation is observed (possibly due to limited hyperparameter coverage) the average TOReL regret (0.433) is still lower than the corresponding true regret (0.458). Our final experiment analyses the number of samples saved using TOReL rather than the UCB bandit-based online hyperparameter selection algorithm proposed by [ 30]. We tune hyperparameters for ReBRAC, as ReBRAC achieves the lowest regret across all tasks and algorithms. Results for the D4RL and brax datasets are depicted in Fig. 5. TOReL offers significant savings in terms of sample complexity compared to existing online hyperparameter tuning methods: for the D4RL datasets, 20K to >200K additional online samples are spared, while for the brax datasets >200K are spared, essentially preventing a doubling of the size of the offline dataset. | https://arxiv.org/abs/2505.22442v1 |
Task Algo. Oracle TOReL Oracle Mean TOReL Mean True brax-halfcheetah-full-replay ReBRAC 0.089 0.089 0.262 0.264 0.417 brax-hopper-full-replay ReBRAC 0.070 0.070 0.193 0.209 0.554 brax-walker-full-replay ReBRAC 0.000 0.000 0.241 0.317 0.425 d4rl-halfcheetah-medium-expert-v2 ReBRAC 0.000 0.036 0.176 0.268 0.336 d4rl-hopper-medium-v2 ReBRAC 0.053 0.083 0.380 0.323 0.580 d4rl-walker2d-medium-replay-v2 ReBRAC 0.204 0.206 0.567 0.572 0.757 Table 1: TOReL Regret Summary Statistics (lower is better): bold indicates where TOReL is within 5% of the corresponding Oracle. Left: algorithm chosen if the Oracle can choose over both hyperparameters and algorithms; corresponding oracle regret and regret of the TOReL-chosen hyperparameters for that algorithm. Middle: oracle and TOReL regrets averaged over all algorithms. Right: true regret averaged over all algorithms. For these tasks, ReBRAC+TOReL is consistently the best. 11 8 Conclusion High online sample complexity and lack of performance guarantees of existing methods present a major barrier to the widespread adoption of offline RL. In this paper, we introduce SOReL and TOReL, two theoretically grounded approaches to tackle these core issues. For SOReL, we introduce a model- based Bayesian approach for offline RL and exploit predictive uncertainty to approximate regret. To tune hyperparameters and ensure accurate regret quantification, we minimise the PIL. In TOReL, we extend our fully offline hyperparameter tuning algorithm to general offline RL methods. Our empirical evaluations confirm SOReL is a reliable method for safe offline RL with accurate regret quantification and TOReL achieves near-oracle performance with offline data alone , resulting in significant savings in online samples for hyperparameter tuning without sacrificing performance. Acknowledgements Mattie Fellows and Johannes Forkel are funded by a generous grant from the UKRI Engineering and Physical Sciences Research Council EP/Y028481/1, while Clarisse Wibault is funded by the EPSRC Doctoral Training Partnership. Uljad Berdica is funded by the EPSRC Centre for Doctoral Training in Autonomous Intelligent Machines and the Rhodes Trust. Jakob Nicolaus Foerster is partially funded by the UKRI grant EP/Y028481/1 (originally selected for funding by the ERC). Jakob Nicolaus Foerster is also supported by the JPMC Research Award and the Amazon Research Award. References [1]J. Aitchison. Goodness of prediction fit. Biometrika , 62(3):547–554, 1975. ISSN 00063444, 14643510. URL http://www.jstor.org/stable/2335509 . 5.1 [2]Ahmed M. Alaa and Mihaela van der Schaar. Bayesian nonparametric causal inference: Information rates and learning algorithms. IEEE Journal of Selected Topics in Signal Processing , 12(5):1031–1046, 2018. doi: 10.1109/JSTSP.2018.2848230. 5.1 [3]Gaon An, Seungyong Moon, Jang-Hyun Kim, and Hyun Oh Song. Uncertainty-based offline reinforcement learning with diversified q-ensemble. In M. Ranzato, A. Beygelz- imer, Y . Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Infor- mation Processing Systems , volume 34, pages 7436–7447. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/ 3d3d286a8d153a4a58156d0e02d8570c-Paper.pdf . 3 [4]Mihaela Aslan. Asymptotically minimax bayes predictive densities. The Annals of Statistics , 34(6):2921–2938, 2006. ISSN 00905364. URL http://www.jstor.org/stable/ 25463538 . 5.1, D.3 [5]Philip J Ball, Cong Lu, Jack Parker-Holder, and Stephen Roberts. Augmented world models facilitate zero-shot dynamics generalization from a single offline environment. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pages 619–629. PMLR, 18–24 | https://arxiv.org/abs/2505.22442v1 |
Jul 2021. URL https://proceedings.mlr.press/v139/ball21a.html . 1, 3 [6]Andrew R Barron. Information-theoretic characterization of bayes performance and the choice of priors in parametric and nonparametric problems. In Bayesian Statistics 6: Proceedings of the Sixth Valencia International Meeting June 6-10, 1998 . Oxford University Press, 08 1999. ISBN 9780198504856. doi: 10.1093/oso/9780198504856.003.0002. URL https: //doi.org/10.1093/oso/9780198504856.003.0002 . 5.1, D.3 [7]A.R. Barron. The Exponential Convergence of Posterior Probabilities with Implications for Bayes Estimators of Density Functions . Department of Statistics, University of Illinois, 1988. URL https://books.google.co.uk/books?id=8raEnQAACAAJ . 5.1, D.3 [8]R.F. Bass. Real Analysis for Graduate Students , chapter 21. Createspace Ind Pub, 2013. ISBN 9781481869140. URL https://books.google.co.uk/books?id= s6mVlgEACAAJ . D.3, 2 12 [9]Jacob Beck, Risto Vuorio, Evan Zheran Liu, Zheng Xiong, Luisa Zintgraf, Chelsea Finn, and Shimon Whiteson. A survey of meta-reinforcement learning, 2024. URL https://arxiv. org/abs/2301.08028 . 4.2 [10] Richard Bellman. A problem in the sequential design of experiments. Sankhy ¯a: The Indian Journal of Statistics (1933-1960) , 16(3/4):221–229, 1956. ISSN 00364452. URL http: //www.jstor.org/stable/25048278 . 2.2 [11] Richard Bellman. Dynamic programming and stochastic control processes. Information and Control , 1(3):228–239, 1958. ISSN 0019-9958. doi: https://doi.org/10.1016/S0019- 9958(58)80003-0. URL https://www.sciencedirect.com/science/article/ pii/S0019995858800030 . 2.2 [12] Blair Bilodeau, Dylan J. Foster, and Daniel M. Roy. Minimax rates for conditional density estimation via empirical entropy. The Annals of Statistics , 2021. URL https://api. semanticscholar.org/CorpusID:237592759 . 5.1, 5.2 [13] Allan Birnbaum. On the foundations of statistical inference. Journal of the American Statistical Association , 57(298):269–306, 1962. doi: 10.1080/01621459.1962.10480660. URL https: //www.tandfonline.com/doi/abs/10.1080/01621459.1962.10480660 . 6 [14] J. L. Bretagnolle and Catherine Huber. Estimation des densités: risque minimax. Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete , 47:119–137, 1978. URL https: //api.semanticscholar.org/CorpusID:122597694 . D.1, 1 [15] Jiayu Chen, Wentse Chen, and Jeff Schneider. Bayes adaptive monte carlo tree search for of- fline model-based reinforcement learning, 2024. URL https://arxiv.org/abs/2410. 11234 . 3 [16] Kamil Ciosek, Vincent Fortuin, Ryota Tomioka, Katja Hofmann, and Richard Turner. Conser- vative uncertainty estimation by fitting prior networks. In Eighth International Conference on Learning Representations , 04 2020. 4.2, 7.1, C.1 [17] B.S. Clarke and A.R. Barron. Information-theoretic asymptotics of bayes methods. IEEE transactions on information theory , 36(3):453–471, 1990. ISSN 0018-9448. 5.1, D.3 [18] J. L. Doob. Application of the theory of martingales. In Le calcul des probabilités et ses appli- cations [The calculus of probabilities and its applications] , number 13 in CNRS International Colloquia, pages 23–27. Centre National de la Recherche Scientifique, Paris, 1949. (Lyon, France, 28 June–3 July 1948). MR:33460. Zbl:0041.45101. 5.1 [19] Alvin Drake. Observation of a markov process through a noisy channel. PhD Thesis , 1962. B [20] Yan Duan, John Schulman, Xi Chen, Peter Bartlett, Ilya Sutskever, and Peter Abbeel. Fast reinforcement learning via slow reinforcement learning. 1987. 4.2 [21] Michael O’Gordon Duff. Optimal Learning: Computational Procedures for Bayes-Adaptive Markov Decision Processes . PhD thesis, 2002. AAI3039353. 1, 4.1, 4.2, 4.2, B [22] Mattie Fellows, Brandon Kaplowitz, Christian Schroeder de Witt, and Shimon Whiteson. Bayesian exploration networks. In ICML , 2024. 4.2 [23] Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4rl: Datasets for deep data-driven reinforcement learning, 2020. 7.2 [24] Scott Fujimoto | https://arxiv.org/abs/2505.22442v1 |
and Shixiang (Shane) Gu. A minimalist approach to offline reinforcement learn- ing. In M. Ranzato, A. Beygelzimer, Y . Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems , volume 34, pages 20132–20145. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/ paper/2021/file/a8166da05c5a094f7dc03724b41886e5-Paper.pdf . 3 [25] Greg Gandenberger. A new proof of the likelihood principle. The British Journal for the Philosophy of Science , 66(3):475–503, 2015. doi: 10.1093/bjps/axt039. URL https://doi. org/10.1093/bjps/axt039 . 6 13 [26] Arthur Guez, David Silver, and Peter Dayan. Efficient bayes-adaptive reinforcement learn- ing using sample-based search. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Wein- berger, editors, Advances in Neural Information Processing Systems , volume 25. Curran Asso- ciates, Inc., 2012. URL https://proceedings.neurips.cc/paper/2012/file/ 35051070e572e47d2c26c241ab88307f-Paper.pdf . 4.2 [27] Arthur Guez, David Silver, and Peter Dayan. Scalable and efficient bayes-adaptive reinforcement learning based on monte-carlo tree search. Journal of Artificial Intelligence Research , 48:841– 883, 10 2013. doi: 10.1613/jair.4117. 4.2 [28] Arthur Guez, Nicolas Heess, David Silver, and Peter Dayan. Bayes-adaptive simulation-based search with value function approximation. In Z. Ghahramani, M. Welling, C. Cortes, N. Lawrence, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems , volume 27. Curran Associates, Inc., 2014. URL https://proceedings.neurips.cc/paper_files/paper/2014/file/ 74d863ca4a12ccca50a754a3b277dbf7-Paper.pdf . 3 [29] J. A. Hartigan. The maximum likelihood prior. The Annals of statistics , 26(6):2083–2103, 1998. ISSN 0090-5364. 5.1, D.3 [30] Matthew Thomas Jackson, Uljad Berdica, Jarek Liesen, Shimon Whiteson, and Jakob Nicolaus Foerster. A clean slate for offline reinforcement learning. arXiv preprint arXiv:2504.11453 , 2025. 1, 1, 2.2, 3, 7.2, 7.2, F.2, F.4 [31] A Jesson, C Lu, N Beltran-Velez, A Filos, J Foerster, and Y Gal. Relu to the rescue: Improve your on-policy actor-critic with positive advantages. 2024. 8 [32] Leslie Pack Kaelbling, Michael L. Littman, and Anthony R. Cassandra. Planning and acting in partially observable stochastic domains. Artif. Intell. , 101(1–2):99–134, may 1998. ISSN 0004-3702. B [33] Robert E Kass, Luke Thierney, and Joeseph B Kadane. The validity of posterior expansions based on laplace’s method. Bayesian and Likelihood Methods in Statistics and Economics , pages 473–488, 1990. URL https://www.stat.cmu.edu/~kass/papers/validity. pdf. D.3 [34] Rahul Kidambi, Aravind Rajeswaran, Praneeth Netrapalli, and Thorsten Joachims. Morel: Model-based offline reinforcement learning. In H. Larochelle, M. Ran- zato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems , volume 33, pages 21810–21823. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/ f7efa4f864ae9b88d43527f4b14f750f-Paper.pdf . 1, 1, 3, 5.2, 6.2, 7.2 [35] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 , 2014. F.2 [36] B.J.K. Kleijn and A.W. van der Vaart. The Bernstein-V on-Mises theorem under misspecification. Electronic Journal of Statistics , 6(none):354 – 381, 2012. doi: 10.1214/12-EJS675. URL https://doi.org/10.1214/12-EJS675 . D.3 [37] FUMIYASU KOMAKI. On asymptotic properties of predictive distributions. Biometrika , 83(2):299–313, 06 1996. ISSN 0006-3444. doi: 10.1093/biomet/83.2.299. URL https: //doi.org/10.1093/biomet/83.2.299 . 5.1, D.3 [38] Ilya Kostrikov, Ashvin Nair, and Sergey Levine. Offline reinforcement learning with implicit q- learning. CoRR , abs/2110.06169, 2021. URL https://arxiv.org/abs/2110.06169 . 1, 1, 3, 7.2 [39] Danie G. Krige. A statistical approach to some basic mine | https://arxiv.org/abs/2505.22442v1 |
valuation problems on the witwater- sand. Journal of the Chemical, Metallurgical and Mining Society of South Africa , 52:119–139, 1951. 4.1, B 14 [40] Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conserva- tive q-learning for offline reinforcement learning. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems , volume 33, pages 1179–1191. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/ 0d2b2061826a5df3221116a5085a6052-Paper.pdf . 3 [41] Sascha Lange, Thomas Gabel, and Martin Riedmiller. Batch Reinforcement Learning , pages 45–73. Springer Berlin Heidelberg, Berlin, Heidelberg, 2012. ISBN 978-3-642-27645-3. doi: 10.1007/978-3-642-27645-3_2. URL https://doi.org/10.1007/978-3-642- 27645-3_2 . 1, 2.2 [42] Lucien Le Cam. On some asymptotic properties of maximum likelihood estimates and related bayes’ estimates. volume 1, pages 277–300, 1953. 5.1, D.3 [43] Yann LeCun, Leon Bottou, Genevieve B Orr, and Klaus-Robert Mueller. Efficient backprop. In Neural Networks: Tricks of the Trade , pages 9–50. Springer, 1998. F.2 [44] Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems, 2020. URL https://arxiv.org/ abs/2005.01643 . 1, 2.2 [45] D. V . Lindley. Approximate bayesian methods. Trabajos de Estadistica Y de Investigacion Operativa , 31(1):223–245, 1980. D.3 [46] Chris Lu, Jakub Kuba, Alistair Letcher, Luke Metz, Christian Schroeder de Witt, and Jakob Foerster. Discovered policy optimisation. Advances in Neural Information Processing Systems , 35:16455–16468, 2022. F.3 [47] Cong Lu, Philip Ball, Jack Parker-Holder, Michael Osborne, and Stephen J. Roberts. Re- visiting design choices in offline model based reinforcement learning. In International Con- ference on Learning Representations , 2022. URL https://openreview.net/forum? id=zz9hXVhf40 . 1, 3 [48] J. J. Martin. Bayesian decision problems and Markov chains [by] J. J. Martin . Wiley New York, 1967. 1, 4.1, 4.2, B [49] Kevin Murphy. Reinforcement learning: An overview, 2024. URL https://arxiv.org/ abs/2412.05265 . 1, 2.2 [50] Ian Osband and Benjamin Van Roy. Why is posterior sampling better than optimism for reinforcement learning? In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning , volume 70 of Proceedings of Machine Learning Research , pages 2701–2710. PMLR, 06–11 Aug 2017. URL https://proceedings.mlr. press/v70/osband17a.html . 4.2 [51] Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31 , pages 8617– 8629. Curran Associates, Inc., 2018. URL http://papers.nips.cc/paper/8080- randomized-prior-functions-for-deep-reinforcement-learning.pdf . 4.2, 7.1, C.1 [52] Tom Le Paine, Cosmin Paduraru, Andrea Michi, Çaglar Gülçehre, Konrad Zolna, Alexander Novikov, Ziyu Wang, and Nando de Freitas. Hyperparameter selection for offline reinforcement learning. CoRR , abs/2007.09055, 2020. URL https://arxiv.org/abs/2007.09055 . 3 [53] K. B. Petersen and M. S. Pedersen. The matrix cookbook, nov 2012. URL http: //localhost/pubdb/p.php?3274 . Version 20121115. 3 [54] Martin L. Puterman. Markov Decision Processes: Discrete Stochastic Dynamic Programming . John Wiley & Sons, Inc., USA, 1st edition, 1994. ISBN 0471619779. 2.2 15 [55] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning . The MIT Press, 2006. URL https://gaussianprocess.org/gpml/ . 4.1, B | https://arxiv.org/abs/2505.22442v1 |
[56] Gareth O. Roberts and Jeffrey S. Rosenthal. General state space Markov chains and MCMC algorithms. Probability Surveys , 1(none):20 – 71, 2004. doi: 10.1214/154957804100000024. URL https://doi.org/10.1214/154957804100000024 . D.3 [57] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. CoRR , abs/1707.06347, 2017. 2, 4.2, 7.1 [58] Anya Sims, Cong Lu, Jakob Nicolaus Foerster, and Yee Whye Teh. The edge-of-reach problem in offline model-based reinforcement learning. In The Thirty-eighth Annual Conference on Neu- ral Information Processing Systems , 2024. URL https://openreview.net/forum? id=3dn1hINA6o . 1, 3 [59] Richard D. Smallwood and Edward J. Sondik. The optimal control of partially observable markov processes over a finite horizon. Operations Research , 21(5):1071–1088, 1973. ISSN 0030364X, 15265463. URL http://www.jstor.org/stable/168926 . B [60] Matthew Smith, Lucas Maystre, Zhenwen Dai, and Kamil Ciosek. A strong baseline for batch imitation learning, 2023. URL https://arxiv.org/abs/2302.02788 . 3 [61] Bharath K. Sriperumbudur, Kenji Fukumizu, Arthur Gretton, Bernhard Scholkopf, and Gert R. G. Lanckriet. On integral probability metrics, ϕ-divergences and binary classification. arXiv: Information Theory , 2009. URL https://api.semanticscholar.org/CorpusID: 14114329 . D.1 [62] Yihao Sun, Jiaji Zhang, Chengxing Jia, Haoxin Lin, Junyin Ye, and Yang Yu. Model-Bellman inconsistency for model-based offline reinforcement learning. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett, editors, Proceedings of the 40th International Conference on Machine Learning , volume 202 of Pro- ceedings of Machine Learning Research , pages 33177–33194. PMLR, 23–29 Jul 2023. URL https://proceedings.mlr.press/v202/sun23q.html . 1, 3 [63] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction . The MIT Press, second edition, 2018. URL http://incompleteideas.net/book/the- book-2nd.html . 2.2 [64] Csaba Szepesvári. Algorithms for Reinforcement Learning. Synthesis Lectures on Artificial Intelligence and Machine Learning , 4(1):1–103, 2010. ISSN 1939-4608. doi: 10.2200/ S00268ED1V01Y201005AIM009. URL http://www.morganclaypool.com/doi/ abs/10.2200/S00268ED1V01Y201005AIM009 . 2.2 [65] Denis Tarasov, Vladislav Kurenkov, Alexander Nikulin, and Sergey Kolesnikov. Revisiting the minimalist approach to offline reinforcement learning. In Thirty-seventh Conference on Neural Information Processing Systems , 2023. URL https://openreview.net/forum?id= vqGWslLeEw . 1, 1, 3, 7.2 [66] Luke Tierney and Joseph B. Kadane. Accurate approximations for posterior moments and marginal densities. Journal of the American Statistical Association , 81(393):82–86, 1986. ISSN 0162-1459. D.3 [67] Luke Tierney, Robert E. Kass, and Joseph B. Kadane. Fully exponential laplace approximations to expectations and variances of nonpositive functions. Journal of the American Statistical Association , 84(407):710–716, 1989. ISSN 0162-1459. D.3 [68] A. W. van der Vaart. Bayes Procedures , page 138–152. Cambridge Series in Statistical and Proba- bilistic Mathematics. Cambridge University Press, 1998. doi: 10.1017/CBO9780511802256.011. 5.1, D.3 [69] Aad van der Vaart and Harry van Zanten. Information rates of nonparametric gaussian process methods. J. Mach. Learn. Res. , 12(null):2095–2119, July 2011. ISSN 1532-4435. 5.1, 5.2 16 [70] Han Wang, Archit Sakhadeo, Adam M White, James M Bell, Vincent Liu, Xutong Zhao, Puer Liu, Tadashi Kozuno, Alona Fyshe, and Martha White. No more pesky hyperparameters: Offline hyperparameter tuning for RL. Transactions on Machine Learning Research , 2022. ISSN 2835-8856. URL https://openreview.net/forum?id=AiOUi3440V . 3 [71] Ruosong Wang, Dean P. Foster, and Sham M. Kakade. What are the statistical limits of offline | https://arxiv.org/abs/2505.22442v1 |
rl with linear function approximation?, 2020. URL https://arxiv.org/abs/2010. 11895 . 3 [72] Norbert Wiener. Differential-space. Journal of Mathematics and Physics , 2(1-4):131–174, 1923. doi: https://doi.org/10.1002/sapm192321131. URL https://onlinelibrary.wiley. com/doi/abs/10.1002/sapm192321131 . 4.1, B [73] Yuhong Yang and Andrew Barron. Information-theoretic determination of minimax rates of convergence. The Annals of Statistics , 27(5):1564 – 1599, 1999. doi: 10.1214/aos/1017939142. URL https://doi.org/10.1214/aos/1017939142 . 5.1, 5.2 [74] Tianhe Yu, Garrett Thomas, Lantao Yu, Stefano Ermon, James Y Zou, Sergey Levine, Chelsea Finn, and Tengyu Ma. Mopo: Model-based offline policy optimization. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Informa- tion Processing Systems , volume 33, pages 14129–14142. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/ a322852ce0df73e204b7e67cbbef0d0a-Paper.pdf . 1, 3, 5.2, 6.2, 7.2 [75] Tianhe Yu, Aviral Kumar, Rafael Rafailov, Aravind Rajeswaran, Sergey Levine, and Chelsea Finn. Combo: Conservative offline model-based policy optimization. In M. Ranzato, A. Beygelz- imer, Y . Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Infor- mation Processing Systems , volume 34, pages 28954–28967. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/ f29a179746902e331572c483c45e5086-Paper.pdf . 1, 3 [76] Baohe Zhang, Raghu Rajan, Luis Pineda, Nathan Lambert, André Biedenkapp, Kurtland Chua, Frank Hutter, and Roberto Calandra. On the importance of hyperparameter optimization for model-based reinforcement learning. In Arindam Banerjee and Kenji Fukumizu, editors, Proceedings of The 24th International Conference on Artificial Intelligence and Statistics , volume 130 of Proceedings of Machine Learning Research , pages 4015–4023. PMLR, 13–15 Apr 2021. URL https://proceedings.mlr.press/v130/zhang21n.html . 1 [77] Luisa Zintgraf, Kyriacos Shiarlis, Maximilian Igl, Sebastian Schulze, Yarin Gal, Katja Hofmann, and Shimon Whiteson. Varibad: A very good method for bayes-adaptive deep rl via meta- learning. In International Conference on Learning Representations , 2020. URL https: //openreview.net/pdf?id=Hkl9JlBYvr . 4.2 [78] Åström, Karl Johan. Optimal Control of Markov Processes with Incomplete State Information I. 10:174–205, 1965. ISSN 0022-247X. doi: {10.1016/0022-247X(65)90154-X}. URL https://lup.lub.lu.se/search/files/5323668/8867085.pdf . B 17 A Broader Impact This paper presents work whose goal is to improve the safety and efficacy of offline RL. Our work therefore takes significant steps towards the development of safe offline RL methods with accurate regret guarantees that act in ways that are predictable. We also hope our paper helps to re-frame the discourse on offline RL to focus on safety, practical efficacy and sample efficiency. More generally, any advancement in RL should be seen in the context of general advancements to machine learning. Whilst machine learning has the potential to develop useful tools to benefit humanity, it must be carefully integrated into underlying political and social systems to avoid negative consequences for people living within them. A discussion of this complex topic lies beyond the scope of this work. B Primer on Bayesian RL A Bayesian epistemology characterises the agent’s uncertainty in the MDP through distributions over any unknown variable [ 48,21]. In our learning problem, a Bayesian first specifies a model PR,S(st, at)over the unknown state transition and reward distribution, representing a hypothesis space of possible environment dynamics. We focus on a parametric model: p(rt, st+1|st, at, θ)with eachθ∈Θ⊆Rdrepresenting a hypothesis about the MDP M⋆, however our results | https://arxiv.org/abs/2505.22442v1 |
can easily be generalised to non-parametric methods like Gaussian process regression [ 55,72,39]. A prior distribution over the parameter space PΘis specified, which represents the initial a priori belief in the true value of P⋆ R,S(s, a)before the agent has observed any transitions. Priors are a powerful aspect of Bayesian RL, allowing practitioners to provide the agent with any information about the MDP and transfer knowledge between agents and domains. Given a history ht, the prior is updated to a posterior PΘ(ht), representing the agent’s beliefs in the MDP’s dynamics once hthas been observed. For each history, the posterior is used to marginalise across all hypotheses according to the agent’s uncertainty, yielding the predictive state transition-reward distribution PR,S(ht, at) =Eθ∼PΘ(ht)[PR,S(st, at, θ)] which characterise the epistemic and aleatoric uncertainty in P⋆ R,S(st, at). Given PR,S(ht, at), we reason over counterfactual future trajectories using the predictive distribution over trajectories Pπ t and define the BRL objective as: Jπ Bayes(PΘ):=Eh∞∼Pπ∞"∞X i=0γiri# . LetΠHdenote the space of all history-conditioned policies. A corresponding optimal policy is known as a Bayes-optimal policy, which we denote as π⋆ Bayes(·)∈Π⋆ Bayes(PΘ):= arg maxπ∈ΠHJπ Bayes(PΘ). Unlike in frequentist RL, Bayesian variables depend on histories obtained through posterior marginal- isation; hence the posterior is often known as the belief state , which augments each ground state st like in a partially observable Markov decision process [ 19,78,59,32]. Analogously to the state- transition distribution in frequentist RL, we define a belief transition distribution PH(ht, at)using the predictive state transition-reward distribution, which yields Bayes-adaptive MDP (BAMDP) [ 21]: MBayes(PΘ):=⟨H,A, P0, PH(h, a), γ⟩. The BAMDP is solved using planning methods to obtain a Bayes-optimal policy, which naturally balances exploration with exploitation: after every timestep, the agent’s uncertainty is characterised via the posterior conditioned on the history ht, which includes all future trajectories to marginalise over. Via the belief transition, the BRL objective accounts for how the posterior evolves on every timestep, and hence any Bayes-optimal policy π⋆ Bayes is optimal not only according to the epistemic uncertainty of a fixed belief but accounts for how the epistemic uncertainty evolves at every future timestep, decaying according to the discount factor. C Derivations C.1 Negative Log Likelihood Loss Function with Approximate Inference Assume a dataset of Ninput-output pairs: DN:={(x0, y0),(x1, y1), . . .(xN−1, yN−1)}, and a multivariate Gaussian regression model: p(y|x, θ) =1 (2π)D 2|Σθ(x)|1 2exp −1 2(y−µθ(x))Σ−1 θ(y−µθ(x))T , 18 where Dis the number of dimensions. Here our model NNθ:X → P (Y)is a neural network parametrised by θ∈Θthat outputs a Gaussian distribution N(µθ,Σθ)overY. Assuming independent dimensions, such that the covariance matrix is diagonal: p(y|x, θ) =D−1Y d=01q 2πσ2 θd(x)exp −1 2σ2 θd(x)(yd−µθd(x))2! . We can then fit our model by minimising the negative log likelihood loss: L(NLL(θ)) :=−logp(DN|θ), =N−1X i=0 D 2log(2π) +1 2D−1X d=0 logσ2 θd(xi) +(yid−µθd(xi))2 σ2 θd(xi)!! , ="N−1X i=01 N D 2log(2π) +1 2D−1X d=0 logσ2 θd(xi) +(yid−µθd(xi))2 σ2 θd(xi)!!# , =Ei∼UN" D 2log(2π) +1 2D−1X d=0 logσ2 θd(xi) +(yid−µθd(xi))2 σ2 θd(xi)!# , c=Ei∼UN"D−1X d=0 logσ2 θd(xi) +(yid−µθd(xi))2 σ2 θd(xi)!# , where recall UNis the uniform distribution over | https://arxiv.org/abs/2505.22442v1 |
{0,1, . . . N −1}. Our final line means equality up to a constant, as we can ignore theD 2log(2π)term for optimisation because it is independent of θ. We use RP ensembles for our approximate posterior [ 51,16]; here an ensemble of Mseparate model weights {θ0, θi, . . . θ M−1}are randomly initialised and are optimised in parallel, summing over the corresponding negative log likelihoods. When training, we optimise the log-variance rather than the variance for numerical stability and to ensure that the variance remains positive. This allows us to simultaneously optimise maximum and minimum log-variance parameters for each dimension across the ensemble, which we use to soft-clamp the log-variances output by individual models, preventing any individual model becoming overly confident or too uncertain in one dimension. Our final loss function is then given by: L(θ,DN) =M−1X j=0 Ei∼UN D−1X d=0 ξθdj(xi) +(yid−µθdj(xi))2 exp ξθdj(xi) +c·D−1X d=0 ξθdmax−ξθdmin , where ξθdj=ξθdmin+h 1 + exp ξθdmax−h 1 + exp logσ2 θdj−ξθdmaxi −ξθdmini andξθdminand ξθdmaxare respectively the minimum and maximum log-variance parameters optimised across the ensemble, cis the log-variance difference coefficient used to control the clamping term, and Mis the number of models in the ensemble. L(θ,DN)can be minimised by using Monte Carlo minibatch gradient descent with a minibatch Mnofn < N samples drawn uniformly from DN. C.2 Regret Approximators Predictive Variance: We now show how the true regret can be approximated using the Bayesian predictive variance of returns. We start with the bound on from Ineq. 14. Defining the discounted return R(h∞):=P∞ i=0γiri: Jπ(M⋆)−Jπ Bayes(PΘ(DN)) = Jπ(M⋆)−Jπ Bayes(PΘ(DN)) , = Jπ(M⋆)−Eθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)] , = Eθ∼PΘ(DN),h∞∼Pπ∞(θ)[Jπ(M⋆)−R(h∞)] , =q Eθ∼PΘ(DN),h∞∼Pπ∞(θ)[Jπ(M⋆)−R(h∞)]2. 19 Applying Jensen’s inequality: Jπ(M⋆)−Jπ Bayes(PΘ(DN)) ≤r Eθ∼PΘ(DN),h∞∼Pπ∞(θ)h (Jπ(M⋆)−R(h∞))2i . (11) We now recognise that the mean squared error term in Eq. (11) relies on knowing the true MDP dynamics Jπ(M⋆). We can approximate this term using the using the predictive variance over returns: Eθ∼PΘ(DN),h∞∼Pπ∞(θ)h (Jπ(M⋆)−R(h∞))2i ≈Eθ∼PΘ(DN),h∞∼Pπ∞(θ)h Jπ Bayes(DN)−R(h∞)2i , =Vθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)], which can be estimated using the dataset DN, yielding: Jπ(M⋆)−Jπ Bayes(PΘ(DN)) ≤q Vθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)]. Finally, using Ineq. 14 this justifies our approximation for estimating the regret: Regret (M⋆,DN)≈2q Vθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)]. To improve the approximation, we conservatively upper-bound the regret based on alternate ensemble statistics with varying degrees of conservatism to prevent associating a low regret with a policy that performs equally poorly in all members of the ensemble: Regret (M⋆,DN)≈maxh 2q Vθ∼PΘ(DN),h∞∼Pπ ∞(θ)[R(h∞)], ˆRmax−ˆMθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)]i , for example, here ˆMθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)]denotes the median predictive returns based on sampling from the (approximate) posterior and rolling out the Bayes-optimal policy. ˆRmax is estimated from the maximum return in the offline dataset. In Fig. 7 and Fig. 9, we plot different ensemble statistics (the ensemble mean, median, maximum and minimum regrets) that can be used to inform the approximate regret: we shade the regret based on the range of these statistics in purple. As long as the true environment falls in the space spanned by the posterior (model ensemble), the true regret is guaranteed to lie within this range. By ensuring that the (normalised) predictive variance is at least as large as the (normalised) MSE in the | https://arxiv.org/abs/2505.22442v1 |
PIL, the space spanned by the approximate posterior via model ensemble is approximately large enough, relative to the model error. Below we order different ensemble statistics from least to most conservative: Regret (M⋆,DN)≈ˆRmax−ˆRθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)], ≤ˆRmax−ˆEθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)], ≈ˆRmax−ˆMθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)], ≤ˆRmax−ˆrθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)]. Here ˆRθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)], ˆEθ∼PΘ(DN),h∞∼Pπ∞(θ)[R(h∞)], and ˆrθ∼PΘ(DN),h∞∼Pπ ∞(θ)[R(h∞)], respectively denote the maximum, mean, and minimum pre- dictive returns based on sampling from the (approximate) posterior and rolling out the Bayes-optimal policy. We note that the minimum predictive return leads to the maximum predictive regret: "Ensemble Max" in Fig. 7 and Fig. 9 refer to the maximum predictive regrets rather than maximum predictive returns . Empirically, we find that the ensemble median alone is a good proxy for the true regret, being neither overly conservative, nor overly susceptible to being skewed by a policy that performs well on only a subset of posterior samples (as the mean might be). Using the variance, a policy with high variance but also high mean will be associated with a high approximate regret, which is the case for brax-hopper-full-replay (Fig. 9c), where the variance actually overestimates the regret. 20 D Proofs D.1 Primer on Total Variational Distance We measure distance between two probability distributions PXandQXusing the total variational (TV) distance, defined as: TV(PX∥QX):= sup E|PX(E)−QX(E)|. The TV distance takes the supremum over all events Eto find the event that gives rise to the maximum difference in probability between two distributions. A key property of the TV distance is:0≤TV(PX∥QX)≤1. IfTV(PX∥QX) = 0 , then PX=QXas there is no event that both distributions don’t assign the same probability mass to. If TV(PX∥QX) = 1 , then the distributions assign completely different mass to at least one event. The TV distance can be related to the Kullback-Leibler (KL) divergence using the Bretagnolle-Huber [ 14] inequality: TV(PX∥QX)≤p 1−exp (−KL(PX∥QX))≤1, which preserves the property that 0≤TV(PX∥QX)≤1. The TV distance can be shown [ 61] to be equivalent to the integral probability metric under the ∞-norm, which we will make use of in our theorems: TV(PX∥QX) =1 2sup f∈F:X→[−1,1]|Ex∼PX[f(x)]−Ex∼QX[f(x)]|, (12) In this form, the supremum is taken over the space of all functions that are bounded by unity, that is ∥f∥∞= 1. D.2 Proof of Theorem 1 Let the predictive distribution over history htusing the posterior PΘ(DN)bePt,π(DN), which has density: pπ(ht,DN):=p0(s0)t−1Y i=0π(ai|hi)p(ri|hi, ai,DN)p(si+1|hi, ai,DN). To make progress towards quantifying how much offline data we need to achieve an acceptable level of regret, we first relate the true regret Regret (M⋆,DN)to the TV distance between the true P⋆ i,π and predictive Pi,π(DN)history distributions: Lemma 1. LetRmax:=(rmax−rmin) 1−γdenote the maximum possible regret for the MDP . For a prior PΘ(DN), the true regret can be bounded as: Regret (M⋆,DN)≤2Rmax·sup πEi∼G(γ) TV P⋆ i+1,π∥Pπ i+1(DN) . (13) Proof. We start from the definition of the true regret: Regret (M⋆,DN):=Jπ⋆(M⋆)−Jπ⋆ Bayes(M⋆,DN). We now bound the difference between Jπ⋆(M⋆)andJπ⋆ Bayes(M⋆,DN)in terms of the difference between Jπ(M⋆)andJπ Bayes(DN): Regret (M⋆,DN) =Jπ⋆(M⋆)−Jπ⋆ Bayes(PΦ(DN)) +Jπ⋆ Bayes(PΦ(DN))−Jπ⋆ Bayes(M⋆,DN), ≤Jπ⋆(M⋆)−Jπ⋆ Bayes(PΦ(DN)) +Jπ⋆ Bayes Bayes(PΦ(DN))−Jπ⋆ Bayes(M⋆,DN), ≤sup π Jπ(M⋆)−Jπ Bayes(PΘ(DN)) + sup π Jπ Bayes(PΘ(DN))−Jπ(M⋆) , = 2 sup π Jπ(M⋆)−Jπ Bayes(PΘ(DN)) , (14) 21 where the second line follows | https://arxiv.org/abs/2505.22442v1 |
from Jπ⋆ Bayes(PΦ(DN))≤Jπ⋆ Bayes Bayes(PΦ(DN))by definition. Now our goal is to bound Jπ(M⋆)−Jπ Bayes(PΘ(DN)) : Jπ(M⋆)−Jπ Bayes(PΘ(DN)) = Eh∞∼P⋆∞,π"∞X i=0γiri# −Eh∞∼Pπ∞(DN)"∞X i=0γiri# , = ∞X i=0γiEhi+1∼P⋆ i+1,π[ri]−∞X i=0γiEhi+1∼Pπ i+1(DN)[ri] , = ∞X i=0γi Ehi+1∼P⋆ i+1,π[ri]−Ehi+1∼Pπ i+1(DN)[ri] , ≤∞X i=0γi Ehi+1∼P⋆ i+1,π[ri]−Ehi+1∼Pπ i+1(DN)[ri] . Using Ineq. 15 from Lemma 2, we now bound each difference Ehi+1∼P⋆ i+1,π[ri]−Ehi+1∼Pπ i+1(DN)[ri] in terms of total variational distance between P⋆ i+1,πand Pπ i+1(DN): Jπ(M⋆)−Jπ Bayes(PΘ(DN)) ≤(rmax−rmin)·∞X i=0γiTV P⋆ i+1,π∥Pπ i+1(DN) , =rmax−rmin 1−γ·∞X i=0(1−γ)γiTV P⋆ i+1,π∥Pπ i+1(DN) , =rmax−rmin 1−γ·Ei∼G(γ) TV P⋆ i+1,π∥Pπ i+1(DN) , =Rmax·Ei∼G(γ) TV P⋆ i+1,π∥Pπ i+1(DN) , where G(γ)is the geometric distribution. Finally, substituting into Ineq. 14 yields our desired result: Regret (M⋆,DN)≤2 sup π (Rmax·Ei∼G(γ) TV P⋆ i+1,π∥Pπ i+1(DN)) , = 2Rmax·sup πEi∼G(γ) TV P⋆ i+1,π∥Pπ i+1(DN)) . We remark that Lemma 1 holds for any general reward-transition model given bounded rewards. The bound in Ineq. 13 proves the true regret is governed by the geometric average of TV distances: Ei∼G(γ) TV P⋆ i+1,π∥Pπ i+1(DN)) . As each term TV P⋆ i+1,π∥Pπ i+1(DN)) measures the distance between the true and predictive distributions over history hiof length i, the discounting factor γ determines how much long term histories contribute to regret. Intuitively, the more mass the posterior places close to the true value θ⋆∈Θ⋆, the smaller each TV distance becomes, with regret tending to zero for Pi+1,π(DN)≈P⋆ i+1,π =⇒ TV P⋆ i+1,π∥Pπ i+1(DN)) ≈0. Conversely, a strong but highly incorrect prior will concentrate mass around MDPs whose dynamics oppose the true dynamics, yielding TV P⋆ i+1,π∥Pπ i+1(DN)) ≈1 for all i, achieving the highest possible regret: Rmax:=(rmax−rmin)/1−γ. The resulting Bayes-optimal policy would choose actions that encourage negative reward-seeking behaviour, being farthest from optimal in terms of expected returns. Our next lemma Lemma 2. For bounded reward functions: Ehi+1∼P⋆ i+1,π[ri]−Ehi+1∼Pπ i+1(DN)[ri] ≤(rmax−rmin)·TV P⋆ i+1,π∥Pπ i+1(DN) .(15) 22 Proof. We start by subtracting and addingrmax+rmin 2to the left hand side of Ineq. 15: |Ehi+1∼P⋆ i+1,π[ri]−Ehi+1∼Pπ i+1(DN)[ri]| = Ehi+1∼P⋆ i+1,π ri−rmax+rmin 2 −Ehi+1∼Pπ i+1(DN) ri−rmax+rmin 2 , = Ehi+1∼P⋆ i+1,π2ri−(rmax+rmin) 2 −Ehi+1∼Pπ i+1(DN)2ri−(rmax+rmin) 2 , =(rmax−rmin) 2· Ehi+1∼P⋆ i+1,π2ri−(rmax+rmin) rmax−rmin −Ehi+1∼Pπ i+1(DN)2ri−(rmax+rmin) rmax−rmin , =(rmax−rmin) 2· Ehi+1∼P⋆ i+1,π[rnorm(hi+1)]−Ehi+1∼Pπ i+1(DN)[rnorm(hi+1)] , (16) where: rnorm(hi+1):=2ri−(rmax+rmin) rmax−rmin. Now, as rnorm:Hi+1→[−1,1], we can bound Eq. (16) using the integral probability metric form of the TV distance (see Eq. (12)), yielding our desired result: |Ehi+1∼P⋆ i+1,π[ri]−Ehi+1∼Pπ i+1(DN)[ri]| ≤rmax−rmin 2· sup f∈F:Hi+1→[−1,1] Ehi+1∼P⋆ i+1,π[f(hi+1)]−Ehi+1∼Pπ i+1(DN)[f(hi+1)] , = (rmax−rmin)·TV P⋆ i+1,π∥Pπ i+1(DN) . We proved in Lemma 1 that the rate of convergence of the sum of discounted TV distances between the true and predictive history distributions governs the rate of decrease in regret decreases with increasing data. Using the Bretagnolle-Huber inequality (see Appendix D.1), we now relate the sum of discounted TV distances to a sum of KL divergences, allowing us to control the expected regret using the PIL. Theorem 1. Using the PIL in Eq. (3),the true regret is bounded as: Regret (M⋆,DN)≤2Rmax·sup πs 1−exp −Iπ N 1−γ Proof. Starting with the bounded derived in Ineq. 13 of Lemma 1, we apply the Bretagnolle-Huber inequality [14] (see Appendix D.1) to bound | https://arxiv.org/abs/2505.22442v1 |
the TV distance terms using the KL divergence: Regret (M⋆,DN)≤2Rmax·sup πEi∼G(γ) TV P⋆ i+1,π∥Pπ i+1(DN)) , ≤2Rmax·sup πEi∼G(γ)q 1−exp −KL P⋆ i+1,π∥Pπ i+1(DN)) .(17) We make two observations. Firstly, as the KL divergence is convex in its second argument and Pi+1,π(DN) =Eθ∼PΘ(DN) Pπ i+1(θ) , we can bound each KL divergence term using Jensen’s inequality as: KL P⋆ i+1,π∥Pπ i+1(DN)) ≤Eθ∼PΘ(DN) KL P⋆ i+1,π∥Pπ i+1(θ) . Secondly, as the function f(x) =p 1−exp(−x)is monotonically increasing in x, it follows that f(x)≤f(x′)for any x≤x′, hence:q 1−exp −KL P⋆ i+1,π∥Pπ i+1(DN)) ≤q 1−exp −Eθ∼PΘ(DN) KL P⋆ i+1,π∥Pπ i+1(θ) Applying this bound to Ineq. 17 yields: Ei∼G(γ)q 1−exp −KL P⋆ i+1,π∥Pπ i+1(DN)) ≤Ei∼G(γ)q 1−exp −Eθ∼PΘ(DN) KL P⋆ i+1,π∥Pπ i+1(θ) . 23 As the function f(x) =p 1−exp(−x)is concave in x, we can apply Jensen’s inequality, yielding: Ei∼G(γ)q 1−exp −KL P⋆ i+1,π∥Pπ i+1(DN)) ≤q 1−exp −Ei∼G(γ) Eθ∼PΘ(DN) KL P⋆ i+1,π∥Pπ i+1(θ) . (18) Examining the KL divergence term: KL P⋆ i+1,π∥Pπ i+1(θ) =Ehi+1∼P⋆ i+1,π" log d0(s0)Qi j=0π(aj|hj)p⋆(rj|sj, aj)p⋆(sj+1|sj, aj) d0(s0)Qi j=0π(aj|hj)p(rj|sj, aj, θ)p(sj+1|sj, aj, θ)!# , =Ehi+1∼P⋆ i+1,π" log Qi j=0p⋆(rj|sj, aj)p⋆(sj+1|sj, aj) Qi j=0p(rj|sj, aj, θ)p(sj+1|sj, aj, θ)!# , =Ehi+1∼P⋆ i+1,π"iX j=0 logp⋆(rj|sj, aj)−logp(rj|sj, aj, θ) + log p⋆(sj+1|sj, aj)−logp(sj+1|sj, aj, θ)# , =iX j=0Ehj∼P⋆ j,π" logp⋆(rj|sj, aj)−logp(rj|sj, aj, θ) + log p⋆(sj+1|sj, aj)−logp(sj+1|sj, aj, θ)# , =iX j=0Esj,aj∼P⋆ j,π" Erj,sj+1∼P⋆ R,S(sj,aj)" logp⋆(rj|sj, aj)−logp(rj|sj, aj, θ) + log p⋆(sj+1|sj, aj)−logp(sj+1|sj, aj, θ)## , =iX j=0Esj,aj∼P⋆ j,π" Erj,sj+1∼P⋆ R,S(sj,aj)" logp⋆(rj, sj+1|sj, aj) −logp(rj, sj+1|sj, aj, θ)## , =iX j=0Es,a∼P⋆ j,π KL(P⋆ R,S(s, a)∥PR,S(s, a, θ )) , 24 hence: Ei∼G(γ) Eθ∼PΘ(DN) KL P⋆ i+1,π∥Pπ i+1(θ) =Eθ∼PΘ(DN) Ei∼G(γ) iX j=0Es,a∼P⋆ j,π KL(P⋆ R,S(s, a)∥PR,S(s, a, θ )) , =Eθ∼PΘ(DN) ∞X i=0(1−γ)γiiX j=0Es,a∼P⋆ j,π KL(P⋆ R,S(s, a)∥PR,S(s, a, θ )) , =Eθ∼PΘ(DN) ∞X i=0(1−γ)γi(i+ 1)iX j=01 i+ 1Es,a∼P⋆ j,π KL(P⋆ R,S(s, a)∥PR,S(s, a, θ )) , =1 1−γEθ∼PΘ(DN)"∞X i=0(1−γ)2γi(i+ 1)Ej∼Uih Es,a∼P⋆ j,π KL(P⋆ R,S(s, a)∥PR,S(s, a, θ ))i# , =1 1−γEθ∼PΘ(DN)h Ei∼AG (γ)h Ej∼Uih Es,a∼P⋆ j,π KL(P⋆ R,S(s, a)∥PR,S(s, a, θ ))iii . (19) Now, as ρ⋆ π=Ei∼AG (γ) Ej∼Ui P⋆ j,π is the arithemetico-geometric ergodic state-action distribu- tion, we can simplify Eq. (19) to yield: Ei∼G(γ) Eθ∼PΘ(DN) KL P⋆ i+1,π∥Pπ i+1(θ) =1 1−γEDN∼PData Eθ∼PΘ(DN) Es,a∼ρ⋆π KL(P⋆ R,S(s, a)∥PR,S(s, a, θ )) , =1 1−γEDN∼PData Es,a∼ρ⋆π Eθ∼PΘ(DN) KL(P⋆ R,S(s, a)∥PR,S(s, a, θ )) , =1 1−γIπ N, hence, substituting into Ineq. 18, we obtain: Ei∼G(γ)q 1−exp −KL P⋆ i+1,π∥Pπ i+1(DN)) ≤s 1−exp −Iπ N 1−γ . Finally, substituting into Eq. (17) yields our desired result: Regret (M⋆,DN)≤2Rmax·sup π Ei∼G(γ)q 1−exp −KL P⋆ i+1,π∥Pπ i+1(DN)) , ≤2Rmax·sup πs 1−exp −Iπ N 1−γ . By substituting in our definition of the Gaussian world model, we now find a convenient form for the PIL: Proposition 2. Using the Gaussian world model in Eq. (6), it follows: Iπ N=E(DN,M⋆) +V(DN). 25 Proof. We substitute the Gaussian world model into the KL divergence to yield: KL P⋆ R,S(s, a)∥PR,S(s, a, θ ) =Er,s′∼P⋆ R,S(s,a) log exp −∥r⋆(s, a)−r∥2 2 2σ2r exp −∥s⋆′(s, a)−s′∥2 2 2σ2s −Er,s′∼P⋆ R,S(s,a) log exp −∥rθ(s, a)−r∥2 2 2σ2r exp −∥s′ θ(s, a)−s′∥2 2 2σ2s , =Er,s′∼P⋆ R,S(s,a)" | https://arxiv.org/abs/2505.22442v1 |
∥rθ(s, a)−r∥2 2− ∥r⋆(s, a)−r∥2 2 2σ2r +∥s′ θ(s, a)−s′∥2 2− ∥s⋆′(s, a)−s′∥2 2 2σ2s# , =Er,s′∼P⋆ R,S(s,a)" rθ(s, a)2−2rrθ(s, a)−r⋆(s, a)2+ 2rr⋆(s, a) 2σ2r +∥s′ θ(s, a)∥2 2−2s′⊤s′ θ(s, a)− ∥s⋆′(s, a)∥2 2+ 2s′⊤s⋆′(s, a) 2σ2s# , =rθ(s, a)2−2r⋆(s, a)rθ(s, a)−r⋆(s, a)2+ 2r⋆(s, a)2 2σ2r +∥s′ θ(s, a)∥2 2−2s⋆′(s, a)⊤s′ θ(s, a)− ∥s⋆′(s, a)∥2 2+ 2∥s⋆′(s, a)∥2 2 2σ2s, =rθ(s, a)2−2r⋆(s, a)rθ(s, a) +r⋆(s, a)2 2σ2r +∥s′ θ(s, a)∥2 2−2s⋆′(s, a)⊤s′ θ(s, a) +∥s⋆′(s, a)∥2 2 2σ2s. Now, taking expectations with respect to the posterior: Eθ∼PΘ(DN) KL P⋆ R,S(s, a)∥PR,S(s, a, θ ) =Eθ∼PΘ(DN)rθ(s, a)2−2r⋆(s, a)rθ(s, a) +r⋆(s, a)2 2σ2r +Eθ∼PΘ(DN)∥s′ θ(s, a)∥2 2−2s⋆′(s, a)⊤s′ θ(s, a) +∥s⋆′(s, a)∥2 2 2σ2s , =Eθ∼PΘ(DN) rθ(s, a)2 −2r⋆(s, a)r(s, a,DN) +r⋆(s, a)2 2σ2r +Eθ∼PΘ(DN) ∥s′ θ(s, a)∥2 2 −2s⋆′(s, a)⊤s′(s, a,DN) +∥s⋆′(s, a)∥2 2 2σ2s. Now, we use the variance identity for both the reward and state functions: Eθ∼PΘ(DN) rθ(s, a)2 = Vθ∼PΘ(DN)[rθ(s, a)] +rθ(s, a,DN)2andEθ∼PΘ(DN) ∥s′ θ(s, a)∥2 2 =Vθ∼PΘ(DN)[∥s′ θ(s, a)∥2] + 26 ∥s′(s, a,DN)∥2 2yielding: Eθ∼PΘ(DN) KL P⋆ R,S(s, a)∥PR,S(s, a, θ ) =Vθ∼PΘ(DN)[rθ(s, a)] +rθ(s, a,DN)2−2r⋆(s, a)r(s, a,DN) +r⋆(s, a)2 2σ2r +Vθ∼PΘ(DN)[∥s′ θ(s, a)∥2] +∥s′(s, a,DN)∥2 2−2s⋆′(s, a)⊤s′(s, a,DN) +∥s⋆′(s, a)∥2 2 2σ2s, =Vθ∼PΘ(DN)[rθ(s, a)] + ( rθ(s, a,DN)2−r⋆(s, a))2 2σ2r +Vθ∼PΘ(DN)[∥s′ θ(s, a)∥2] +∥s′(s, a,DN)−s⋆′(s, a)∥2 2 2σ2s, =Vθ∼PΘ(DN)[rθ(s, a)] 2σ2r+Vθ∼PΘ(DN)[∥s′ θ(s, a)∥2] 2σ2s +(rθ(s, a,DN)−r⋆(s, a))2 2σ2r+∥s′(s, a,DN)−s⋆′(s, a)∥2 2 2σ2s, =E(DN,M⋆) +V(DN), and hence: Iπ N=Eθ∼PΘ(DN) KL P⋆ R,S(s, a)∥PR,S(s, a, θ ) , =E(DN,M⋆) +V(DN). D.3 Proof of Theorem 2 We first introduce some simplifying notation for the expected cross entropy, log likelihood and corresponding gradients and Hessian: ℓ(θ):=Es,a∼ρ⋆π,r,s′∼P⋆ R,S(s,a)[logp(r, s′|s, a, θ )], ℓ⋆:= max θ∈Θℓ(θ) =Es,a∼ρ⋆π,r,s′∼P⋆ R,S(s,a)[logp⋆(r, s′|s, a)], ℓN(θ):=1 NN−1X i=0logp(ri, s′ i|si, ai, θ), g⋆ i,N:=√ N∇θℓN(θ) θ=θ⋆ i, H⋆ i:=∇2 θℓ(θ) θ=θ⋆ i. We now introduce key regularity assumptions for our parametric model that are required to derive the convergence rate for PIL. They are relatively mild and commonplace in the asymptotic statistics literature [42, 7, 17, 37, 29, 6, 4]. Assumption 1. We assume that: iThere exists at least one parametrisation that corresponds to the true environment dynamics with: Es,a∼ρ⋆π,r,s′∼P⋆ R,S(s,a)[logp⋆(r, s′|s, a)] <∞ and|ℓ⋆−ℓ(θ)|is bounded PΘ-almost surely. iiℓN(θ)andℓ(θ)areC2-continuous in θ. iii There are K <∞maximising points θ⋆ i: {θ⋆ 1, θ⋆ 2, . . . θ⋆ K}= arg max θ∈Θℓ(θ). For each maximiser θ⋆ i, there exists a small region Θ⋆ i:={θ∈Θ|∥θ⋆−θ∥ ≤ϵ}for some ϵ >0such that θ⋆ iis the unique maximiser in Θ⋆ i,θ⋆ iis in the interior of Θ⋆ i,∇2 θℓ(θ⋆ i)is negative definite, invertible and the regions are disjoint:TK i=1Θ⋆ i=∅. 27 iv The prior p(θ)is Lipschitz continuous in θwith support over Θ. vThe sampling regime ensures that the strong law of large numbers holds for all maximisers θ⋆ ifor the Hessian, and uniformly for θ∈Θfor the likelihood, that is: ℓN(θ)Unif.a.s.− − − − − → ℓ(θ),∇2 θℓN(θ⋆ i)a.s.− − → ∇2 θℓ(θ⋆ i). The central limit theorem applies to the gradient at each θ⋆ i, that is: √ N∇θℓN(θ⋆ i)d− → N (0,Σg i), where Σg i=Es,a∼ρ⋆π,r,s′∼P⋆ R,S(s,a) ∇θlogp(r, s′|s, a, θ⋆ i)∇θlogp(r, s′|s, | https://arxiv.org/abs/2505.22442v1 |
a, θ⋆ i)⊤ with ∥Σg i∥<∞. Our assumptions are mild. Assumption 1i is our strictest assumption, however our theory should not deviate from practice if the model space is slightly misspecified. Moreover, model capacity can always be increased and tuned if misspecification is affecting convergence. In addition to introducing irregular theoretical behaviour [ 36], significant model misspecification poses a serious safety risk for offline RL and should be avoided in practice. Assumption 1ii ensures that a second order Taylor series expansion can be applied to obtain an asymptotic expansion around the maximising points. Assumption 1iii is much more general than most settings, which only consider problems with a single maximiser. The invertibility of the matrix can easily be guaranteed in Bayesian methods by the use of a prior that can re-condition a low rank matrix that may results from linearly dependent data. Assumption 1iv ensures that the prior places sufficient mass on the true parametrisation. The sampling and model would need to be very irregular for Assumption 1v not to hold; stochastic optimisation methods used to find statistics like the MAP will fail if this assumption did not hold. Assumption 1v holds automatically if sampling is either i.i.d. from s, a∼ρ⋆ π(see e.g. Bass [8]) or from an aperiodic and irreducible Markov chain with stationary distribution ρ⋆ π(see e.g. Roberts and Rosenthal [56]). In both sample regimes, noting that Es,a∼ρ⋆π,r,s′∼P⋆ R,S(s,a)[∇θlogp(r, s′|s, a, θ⋆ i)] = 0 , it’s clear the (long run) covariance of ∇θlogp(r, s′|s, a, θ⋆ i)isΣg i. Our first lemma borrows techniques from Vaart [68, Chapter 10 ]. This approach is similar to asymptotic integral expansion approaches that apply Laplace’s method [ 45,66,67,33] except we expand around the global maximising values of ℓ(θ)rather than the maximising values of the likelihood ℓN(θ)to obtain an asymptotic expression for the posterior: Lemma 3. Under the notation introduced at the start of Theorem 2 and Assumption 1:R Θ⋆ i(ℓ⋆−ℓ(θ) exp ( NℓN(θ)))p(θ)dθ R Θ⋆ iexp (NℓN(θ))p(θ)dθ=O d−g⋆ i,N⊤H⋆ i−1g⋆ i,N N! , almost surely. Proof. We start by applying the transformation of variables θ′=f(θ):=√ N(θ−θ⋆ i)to integrals in the numerator and denominator with: θ=f−1(θ′) =θ⋆ i+1√ Nθ′, det∇θf−1(θ′) =N−d 2,Θ′:=f(Θ⋆ i), yielding:R Θ⋆ i(ℓ⋆−ℓ(θ)) exp ( NℓN(θ))p(θ)dθ R Θ⋆exp (NℓN(θ))p(θ)dθ =R Θ′ ℓ⋆−ℓ θ=θ⋆+1√ Nθ′ exp NℓN θ=θ⋆ i+1√ Nθ′ p′(θ′)dθ′ R Θ′exp NℓN θ=θ⋆ i+1√ Nθ′ p′(θ′)dθ′, (20) where p′(θ′):=p θ=θ⋆ i+1√ Nθ′ . Now and making a Taylor series expansion of ℓ(θ)about θ⋆ i: ℓ(θ) =ℓ⋆+∇θℓ(θ⋆ i)|{z} =0⊤(θ−θ⋆ i) + (θ−θ⋆ i)⊤H⋆ i(θ−θ⋆ i) +O ∥θ−θ⋆ i∥3 , =ℓ⋆+ (θ−θ⋆ i)⊤H⋆ i(θ−θ⋆ i) +O ∥θ−θ⋆ i∥3 , 28 hence: ℓ θ=θ⋆ i+1√ Nθ′ =ℓ⋆+1 Nθ′⊤H⋆ iθ′+O N−3 2 . Using the notation H⋆ N:=∇2 θℓN(θ) θ=θ⋆ iand making a Taylor series expansion of ℓN(θ)about θ⋆ i: ℓN(θ) =ℓN(θ⋆ i) +∇θℓN(θ⋆ i)⊤(θ−θ⋆ i) + (θ−θ⋆ i)⊤∇2 θℓN(θ⋆ i)(θ−θ⋆ i) +O ∥θ−θ⋆ i∥3 , hence: NℓN θ=θ⋆ i+1√ Nθ′ =NℓN(θ⋆ i) +√ N∇θℓN(θ⋆ i)⊤θ′+θ′⊤∇2 θℓN(θ⋆ i)θ′+O1√ N . Substituting into Eq. (20) yields: R Θ⋆(ℓ⋆−ℓ(θ)) exp ( Nℓ(θ))p(θ)dθR Θ⋆exp (Nℓ(θ))p(θ)dθ =−R Θ′θ′⊤H⋆ iθ′exp NℓN(θ⋆ i) +g⋆ i,N⊤θ′+θ′⊤H⋆ Nθ′+O 1√ N p′(θ′)dθ′ R | https://arxiv.org/abs/2505.22442v1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.