ELVIA.Evidence Atlas
ICML 2025ELVIA assessment Major

Inverse Reinforcement Learning with Switching Rewards and History Dependency for Characterizing Animal Behaviors

Jingyang Ke, Feiyang Wu, Jiyi Wang, Jeffrey Markowitz, Anqi Wu

ELVIA analysis

Independent review pending

Two demonstrated errors affect the published inference and learning derivation for SWIRL. The forward initialization omits the first action likelihood, yielding an incorrect sequence likelihood and terminal hidden-mode posterior in an admissible finite soft-MDP example. The printed M-step then descends a positive expected log joint that must be maximized; a legal initial-mode-prior subproblem gives a strict decrease even for a small step. Both findings support Major because they concern the central EM procedure. The inspected release includes the first emission and minimizes a negative expected log joint, which is explicit counterevidence against attributing these defects to the historical empirical results. Scientific adjudication remains pending.

Problem 1. The forward boundary omits the first action likelihood

Major
Evidence and reasoning

Problem statement

Kind: paraphrase.

Location: PDFp14 AppendixA2, forward definition, initialization and terminal formulas; jointp13.

Text: alpha_t is the joint through action t, but α1\alpha_1 is set to the initial mode prior alone.

Finite three-state, two-action, two-mode model; historyL1; γ=0.95;\gamma=0.95; temperature1. Initial state oo certain; mode prior(.5,.5,.5.5); identity mode kernel permitted by stated assumptions. oo:a->u,u,b−>v;b->v; u,u,vv absorb; state-only rewards rA=(0,d,0),rB=(0,0,d),d=(1−γ)ln⁡3/γ.r_A=(0,d,0),r_B=(0,0,d),d=(1-\gamma)\ln3/\gamma. Derived optimal soft policies give first action probabilities(.75,.75,.25.25) and terminal action probability.5.

Proof

Assessment: Major. Appendix A.2, p. 14, defines αt,z=p(s1:t,a1:t,zt=z∣θ^)\alpha_{t,z}=p(s_{1:t},a_{1:t},z_t=z\mid\widehat\theta) but initializes α1,z=p(z1=z∣θ^).\alpha_{1,z}=p(z_1=z\mid\widehat\theta). The recursion starts with the current action likelihood at t=2.t=2. The stated terminal likelihood is ∑zαT,z,\sum_z\alpha_{T,z}, and the terminal posterior uses βT,z=1.\beta_{T,z}=1.

By the displayed formula, the required initialization is α1,z=p(s1)p(z1=z)πz(a1∣s1L). \alpha_{1,z}=p(s_1)p(z_1=z)\pi_z(a_1\mid s_1^L). A common initial-state factor can be dropped from normalized mode posteriors if handled consistently, but a mode-dependent action probability cannot. The example below sets p(s1)=1,p(s_1)=1, eliminating that possible distraction.

Use three states S={o,u,v},S=\{o,u,v\}, two actions A={a,b},A=\{a,b\}, two modes {A,B},\{A,B\}, history length L=1,L=1, discount γ=0.95,\gamma=0.95, and entropy temperature one. The initial state is o,o, and the initial modes have probability 1/21/2 each. From o,o, action aa reaches uu deterministically and action bb reaches v.v. Both uu and vv are absorbing under either action. The hidden-mode kernel is the identity at every state.

This kernel is a valid state-independent special case of the stated state-conditioned model; no strict-positivity or irreducibility premise is imposed in the paper. It also makes the mode-specific policy optimal for the full process, removing any separate question about anticipated future mode changes.

Set d=1−γγlog⁡3,rA(o,u,v)=(0,d,0),rB(o,u,v)=(0,0,d).d=\frac{1-\gamma}{\gamma}\log3, \qquad r_A(o,u,v)=(0,d,0),\qquad r_B(o,u,v)=(0,0,d). Rewards are bounded, real and state-only. At an absorbing state s,s, entropy-regularized optimal value is Vz(s)=rz(s)+log⁡21−γ.V_z(s)=\frac{r_z(s)+\log2}{1-\gamma}. At o,o, the difference between the two mode-A action values is γd/(1−γ)=log⁡3,\gamma d/(1-\gamma)=\log3, with the opposite sign in mode B. The Boltzmann policy therefore has πA(a∣o)=34,πB(a∣o)=14,\pi_A(a\mid o)=\tfrac34,\qquad \pi_B(a\mid o)=\tfrac14, and each action at uu or vv has probability 1/21/2 in either mode. These emissions are derived from the paper’s soft-policy construction, rather than assigned arbitrarily.

The independent parent script constructs the soft values and action probabilities and checks their Bellman residuals. The reported maximum residual is zero at the used floating precision, below 10−12;10^{-12}; the auxiliary calculation independently confirms the construction.

Observe ξ=((o,a),(u,a)).\xi=((o,a),(u,a)). The environment transition factor is one. Exact joint weights are z2=Az2=Bz1=A3/160z1=B01/16\begin{array}{c|cc} &z_2=A&z_2=B\\ \hline z_1=A&3/16&0\\ z_1=B&0&1/16 \end{array} and hence p(ξ)=14,p(z2∣ξ)=(34,14).p(\xi)=\tfrac14,\qquad p(z_2\mid\xi)=(\tfrac34,\tfrac14). The printed initialization gives α1=(1/2,1/2).\alpha_1=(1/2,1/2). Even applying the subsequent recurrence correctly gives α2=(1/4,1/4),pprinted(ξ)=12,pprinted(z2∣ξ)=(12,12).\alpha_2=(1/4,1/4),\qquad p_{\rm printed}(\xi)=\tfrac12,\qquad p_{\rm printed}(z_2\mid\xi)=(\tfrac12,\tfrac12). Thus the sequence likelihood doubles and the terminal mode-A posterior differs by 1/4.1/4. This calculation uses only the unambiguous terminal condition; it does not depend on the separate problematic backward boundary expression on the same page.

With the displayed formula, α1=(3/8,1/8)\alpha_1=(3/8,1/8) and α2=(3/16,1/16),\alpha_2=(3/16,1/16), restoring the enumerated likelihood and posterior exactly. These fractions are independently evaluated with exact rational arithmetic in the independent output cited above.

The E-step posterior weights determine reward fitting, hidden-mode transition fitting, and the inferred behavioral segmentation in main Eqs. (1)–(4) and Appendix A.1 Eqs. (5)–(7). The printed recurrence therefore fails at a central inference step for an allowed model. This supports Major even though the omission is short and a correct intended factorization is available elsewhere.

A reinterpretation of α1\alpha_1 as a pre-emission message would require the recursion to multiply the first action before proceeding; the printed formulas do not do that. The joint on p. 13 is internal counterevidence about intended correctness, not a validation of the conflicting boundary formula.

The inspected release is correct on this point: `gw5/swirl/swirl_func.py`, lines 171171–182,182, initializes log-forward values as `log(pi0) + log_likes[0]`. Lines 184184–200200 use the next emission in the backward scan; lines 202202–224224 construct normalized marginals and wire the E-step. Analogous first-emission terms occur in the inspected labyrinth and spontaneous-behavior routes. No released or historical run is claimed to omit the first action.

A consistent backward recursion from the displayed formula is βt,z=P(st+1∣st,at)∑z′Pz(z′∣z,st)πz′(at+1∣st+1L)βt+1,z′,βT,z=1.\beta_{t,z} =P(s_{t+1}\mid s_t,a_t) \sum_{z'}P_z(z'\mid z,s_t) \pi_{z'}(a_{t+1}\mid s_{t+1}^L)\beta_{t+1,z'}, \qquad \beta_{T,z}=1. The printed p. 14 expression instead uses current-action and shifted state-conditioning indices, with a separate self-referential first-boundary line. Correcting all boundaries and indices to the joint resolves the specification. The forward correction is verified exactly on the finite case; no empirical performance repair or complete implementation rerun is certified.

□\square

Possible revision

Initialize with p(s1)p(z1)pi_z(a1|s1Ls_1^L); align backward indices with the joint.

Problem 2. The M-step descends a positive expected log joint

Major
Evidence and reasoning

Problem statement

Kind: paraphrase.

Location: PDFp12 Algorithm1 and AppendixA1 Eqs5–7; p13argmax.

Text: GG is expected log joint to maximize, but update is theta<-theta-eta gradG.

Positive step eta and nonzero gradient. Use exact E-step posteriorq=.75,.75, independent ofP1error. Initial mode prior sigmoid⁡(θ)\operatorname{sigmoid}(\theta) is learned parameter; other components heldfixed forscalarblock.

Proof

Assessment: Major. Appendix A.1, p. 12, defines GG with positive expected log-policy, log-prior and log-transition terms. Both prose and Algorithm 1 then prescribe gradient descent: θk+1=θk−ηk∇θG(θ,θk).\theta^{k+1}=\theta^k-\eta_k\nabla_\theta G(\theta,\theta^k). Appendix A.2, p. 13, correctly specifies the M-step target as arg⁡max⁡θG(θ,θk).\arg\max_\theta G(\theta,\theta^k). These directions conflict.

For g=∇θG(θk,θk)≠0g=\nabla_\theta G(\theta^k,\theta^k)\ne0 and sufficiently small positive η,\eta, G(θk−ηg,θk)=G(θk,θk)−η∥g∥2+O(η2).G(\theta^k-\eta g,\theta^k) =G(\theta^k,\theta^k)-\eta\|g\|^{2}+O(\eta^{2}). The printed step therefore decreases the maximization target. Even generalized EM seeks an increase rather than necessarily an exact maximizer; the sign does not implement that weaker requirement either.

Use the exact posterior in Problem Problem 1 (#prob:forward), so this finding is independent of its erroneous E-step. The paper includes p(z1)p(z_1) among the learned parameters. Holding the remaining model components fixed, parameterize p(z1=A)=σ(θ),p(z_1=A)=\sigma(\theta), where σ\sigma is logistic. For posterior qA=3/4,q_A=3/4, the varying part of GG is G(θ)=34log⁡σ(θ)+14log⁡(1−σ(θ)).G(\theta)=\tfrac34\log\sigma(\theta) +\tfrac14\log(1-\sigma(\theta)). At θ=0,\theta=0, G(0)=−log⁡2G(0)=-\log2 and G′(0)=1/4.G'(0)=1/4. The exact maximizer is θ=log⁡3.\theta=\log3. Parent independent arithmetic gives:

η∣G(−η/4),\eta | G(-\eta/4), printed descent | G(+η/4),G(+\eta/4), ascent

0.0050.005 | −0.6934598759∣−0.6928348759-0.6934598759 | -0.6928348759

0.10.1 | −0.6994753035∣−0.6869753035-0.6994753035 | -0.6869753035

11 | −0.7634394199∣−0.6384394199-0.7634394199 | -0.6384394199

Every descent value is below −0.6931471806,-0.6931471806, while ascent increases it. The small-step example avoids dependence on an excessive learning rate. The block calculation is one valid optimization subproblem, and the preceding differential argument supplies the general sign conclusion. Actual values and source bindings are in .

□\square

Possible revision

Use ascent onG or descent on explicitly defined-G.

Supporting record & provenance

Work status

Current version

Version 1

Minhao Liu · Initial report · Version 1

Independent review pending

Original claim and review scope

This work presents the first IRL model to incorporate history-dependent policies and rewards to advance our understanding of complex, naturalistic decision-making in animals.

{'label': 'PMLR 267 / ICML 2025 published proceedings version', 'publisher_publication_date': '2025/10/06', 'pages': '29608-29625', 'landing_url': 'https://proceedings.mlr.press/v267/ke25b.html', 'pdf_url': 'https://raw.githubusercontent.com/mlresearch/v267/main/assets/ke25b/ke25b.pdf', 'accessed_utc': '2026-10-24T14:10:19.850554+00:00'}; Abstract, PDF p. 1

Actual review scope

The recorded inspection concerns these source locations: Retained report, Problem 1: Problem 1 (The forward initialization omits a mode-dependent first emission).; Retained report, Problem 2: Problem 2 (Algorithm 1 descends the auxiliary function it must maximize).

Submit an author revisionContribute a review