Papers
Topics
Authors
Recent
Search
2000 character limit reached

XiNet: Online Training & Pruning in Deep RL

Updated 6 July 2026
  • XiNet is a framework that enables simultaneous online training and pruning in deep reinforcement learning by incorporating stochastic Bernoulli gates.
  • It employs DenseNet-style OFENet feature extractors and cost-aware regularization to balance performance with computational efficiency.
  • XiNet optimizes both network weights and gate parameters in a unified training loop, resulting in compact models that outperform smaller networks trained from scratch.

XiNet is a framework for online training and pruning in deep reinforcement learning that integrates stochastic unit-wise gating into reinforcement learning networks enhanced by the Online Feature Extractor Network (OFENet). It was introduced to address the compute and memory growth that accompanies scaling neural networks in reinforcement learning, particularly when DenseNet-style feature extractors are used to improve representation quality and downstream policy and value learning. Rather than applying pruning post hoc, XiNet jointly optimizes the network weights and the parameters of variational Bernoulli gates that can deactivate units during training, yielding compact deterministic networks at convergence (Guenter et al., 16 Jul 2025).

1. Problem setting and conceptual scope

The immediate setting for XiNet is deep reinforcement learning with OFENet-enhanced agents. OFENet augments reinforcement learning by learning high-dimensional feature representations zz from observations and state-action pairs, which can stabilize training and support larger policy and value networks. The same scaling, however, increases parameter counts and FLOPs substantially because DenseNet-style concatenation propagates earlier features into later layers, and the enlarged downstream reinforcement learning networks inherit the increased feature dimensionality. XiNet is designed to preserve the advantages of starting from large models while reducing their eventual computational footprint (Guenter et al., 16 Jul 2025).

The central objective is simultaneous training and pruning. Let θ\theta denote trainable network weights and ϕ\phi denote the parameters of variational Bernoulli gates. XiNet optimizes

J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),

where LRLL_{\mathrm{RL}} encapsulates the reinforcement learning losses under a sampled gate realization ξ\xi, and R(ϕ)R(\phi) is a sparsity-inducing regularizer. The stochastic formulation is intended to drive the variational parameters of low-utility units toward zero; once a gate parameter falls below a pruning threshold, the corresponding structure is rendered permanently inactive and removed.

Within this formulation, XiNet is not a compression method appended after training. Its defining property is that sparse structure discovery is part of the learning problem itself. This distinction matters because the reported results compare online-pruned large networks not only to unpruned large networks, but also to smaller networks trained from scratch.

2. Architecture and gating mechanism

XiNet is defined over OFENet-enhanced reinforcement learning architectures. OFENet consists of two DenseNet-style multilayer perceptrons: a state feature extractor ϕo\phi_o, which maps observations oto_t to features zot=ϕo(ot)z_{o_t}=\phi_o(o_t), and a state-action feature extractor θ\theta0, which maps θ\theta1 to features θ\theta2. DenseNet-style connectivity concatenates the gated output of each block with a pass-through of its previous input. This redundancy is useful for scaling, but it also magnifies downstream cost (Guenter et al., 16 Jul 2025).

XiNet introduces binary random gates at unit granularity. Each gate vector θ\theta3 multiplies a layer’s activation vector element-wise. For the observation pathway,

θ\theta4

and the block output concatenates θ\theta5 with a pass-through term θ\theta6, where θ\theta7 is diagonal. The state-action pathway is analogous, with

θ\theta8

The use of diagonal pass-through scalers θ\theta9 in place of a literal identity is intended to improve pruning efficiency. The activation functions satisfy ϕ\phi0, and batch normalization is part of each dense block.

The gates are variational Bernoulli random variables:

ϕ\phi1

The distribution factorizes across layers and units, and the optimized quantities are the per-unit Bernoulli parameters ϕ\phi2. XiNet applies the same unit-wise gating principle not only inside OFENet but also at each hidden layer of the policy, value, and critic networks.

3. Stochastic objective, auxiliary training, and regularization

XiNet adopts a stochastic optimization perspective in which both weights and gate parameters are optimized. In the generic form reused per batch in reinforcement learning, the objective is

ϕ\phi3

where

ϕ\phi4

Under the flattening hyperprior, the gate regularizer is

ϕ\phi5

with ϕ\phi6. Its derivative is constant in ϕ\phi7, so it provides a flat tunable push toward zero.

A key structural identity is the linearity of ϕ\phi8 in each gate parameter:

ϕ\phi9

Here J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),0 and J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),1 are the expected losses conditioned on J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),2 or J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),3. The difference J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),4 is the unit’s marginal “usefulness” in the loss.

For the reinforcement learning component, XiNet uses Soft Actor-Critic (SAC). The actor loss is

J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),5

with J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),6 in sampling mode during training and J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),7 in evaluation mode. The critic losses are

J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),8

where

J(θ,ϕ)=Eξq(ξ;ϕ) ⁣[LRL(θ,ξ)]+R(ϕ),J(\theta,\phi)=\mathbb{E}_{\xi\sim q(\xi;\phi)}\!\left[L_{\mathrm{RL}}(\theta,\xi)\right]+R(\phi),9

The temperature loss is

LRLL_{\mathrm{RL}}0

If a value network is used, its loss is also defined explicitly in the formulation.

OFENet is trained concurrently through a one-step next-state prediction auxiliary task:

LRLL_{\mathrm{RL}}1

The corresponding auxiliary objective is

LRLL_{\mathrm{RL}}2

For the reinforcement learning networks LRLL_{\mathrm{RL}}3, XiNet adds

LRLL_{\mathrm{RL}}4

and the total reinforcement learning loss is

LRLL_{\mathrm{RL}}5

The overall design therefore couples policy optimization, representation learning, and model compression within a single training process.

4. Cost-aware sparsity and expected complexity

A distinctive feature of XiNet is that the sparsity regularization is matched to expected computational cost, rather than being an undifferentiated penalty on gate activations. Because the gates are Bernoulli random variables, the expected active width of a layer is the LRLL_{\mathrm{RL}}6 norm of its gate-parameter vector. This makes it possible to write explicit expected-complexity expressions for OFENet, its auxiliary predictor, and the downstream policy and value networks (Guenter et al., 16 Jul 2025).

For the observation feature extractor LRLL_{\mathrm{RL}}7, with observation dimension LRLL_{\mathrm{RL}}8,

LRLL_{\mathrm{RL}}9

For the state-action extractor ξ\xi0, with action dimension ξ\xi1,

ξ\xi2

The ξ\xi3 terms account for batch normalization and bias operations, and the ξ\xi4 terms account for the diagonal pass-through ξ\xi5.

The predictor cost is

ξ\xi6

For any downstream reinforcement learning network ξ\xi7, the first-layer input dimension depends on the OFENet output width, and the corresponding input-stage cost is

ξ\xi8

XiNet then aggregates these terms into a weighted OFENet complexity:

ξ\xi9

where R(ϕ)R(\phi)0 discounts training-only costs. Setting R(ϕ)R(\phi)1 emphasizes deployment compactness, R(ϕ)R(\phi)2 emphasizes training-time savings, and intermediate values interpolate between those objectives.

The cost-aware scheme chooses flattening hyperparameters so that the gate regularizer matches expected complexity:

R(ϕ)R(\phi)3

and for each feed-forward reinforcement learning network R(ϕ)R(\phi)4,

R(ϕ)R(\phi)5

This construction is meant to remove much of the manual per-layer hyperparameter tuning that would otherwise accompany sparsity-inducing priors. A plausible implication is that XiNet’s regularization is not only sparsity-promoting but also topology-sensitive, since it penalizes units in proportion to their effect on the larger DenseNet-style computation graph.

5. Optimization procedure and pruning dynamics

Gate parameters are updated with a straight-through (ST) estimator. At each training step, XiNet samples gate realizations for the gated layers, performs forward and backward propagation on the instantiated subnetwork, updates the weights by standard backpropagation, and then updates the gate parameters by projected gradient descent:

R(ϕ)R(\phi)6

The marginal usefulness term is approximated by

R(ϕ)R(\phi)7

For the flattening regularizer, R(ϕ)R(\phi)8; for cost-matched regularization R(ϕ)R(\phi)9, the derivative becomes ϕo\phi_o0 (Guenter et al., 16 Jul 2025).

The ST estimator is described as biased but low variance and computationally efficient. Concrete or Gumbel-Softmax relaxations and REINFORCE are identified as possible alternatives, but they were not required in the reported experiments. The ST approximation is also given an analytical interpretation as a first-order Taylor approximation.

The training loop interleaves data collection, OFENet updates, SAC updates, and pruning. During data collection, the agent computes ϕo\phi_o1 and samples ϕo\phi_o2 in evaluation mode, using ϕo\phi_o3 rather than sampled ϕo\phi_o4 to avoid additional exploration noise. Transitions are stored in a replay buffer. OFENet updates then sample minibatches, sample ϕo\phi_o5 and ϕo\phi_o6, optimize ϕo\phi_o7, update ϕo\phi_o8, ϕo\phi_o9, and oto_t0, and project oto_t1 back to oto_t2. SAC updates sample gates for the network currently being updated, augment its loss with the corresponding regularizer, update its weights and gates, and update target Q networks as in SAC.

Pruning is triggered when a gate parameter satisfies oto_t3. Units may be pruned immediately or after a brief grace period, after which their incident weights are removed from the computational graph. In practice, the gate parameters are often initialized to 1 and held fixed during an initial warmup of 200k steps. During the final 20% of training, any non-converged gate parameters are rounded to oto_t4 or oto_t5, producing deterministic pruned networks. Because gating occurs before DenseNet concatenation and because pass-through connections are reweighted by diagonal oto_t6, zeroed gates remove a unit’s future contribution without invalidating the concatenation structure.

The paper further states that, with multilinear cost-matched regularization and the linear-in-oto_t7 objective structure, the gate subproblem’s minimizer lies at a vertex of the hypercube oto_t8, so oto_t9 in supervised settings. In reinforcement learning, where the data distribution is nonstationary, the same deterministic convergence is reported empirically rather than as a general theorem.

6. Experimental results, interpretation, and limitations

The reported evaluation uses MuJoCo continuous-control tasks via Gymnasium: HalfCheetah-v2, Ant-v2, Hopper-v2, and Walker2D-v2. The reinforcement learning agent is Soft Actor-Critic. Baseline SAC uses two hidden layers with 256 units; SAC-Big uses two hidden layers with 1024 units. OFE uses zot=ϕo(ot)z_{o_t}=\phi_o(o_t)0 and zot=ϕo(ot)z_{o_t}=\phi_o(o_t)1 DenseNets with 6 layers for Ant, Hopper, and Walker2D, 8 layers for HalfCheetah, and 32 units per OFE layer, together with SAC networks of width 256. OFE-Big increases OFE layers to 128 units and SAC networks to width 512. The pruning experiments start from OFE-Big scale and prune both OFENets and SAC networks online; three regularization settings, Prune-A, Prune-B, and Prune-C, vary zot=ϕo(ot)z_{o_t}=\phi_o(o_t)2, zot=ϕo(ot)z_{o_t}=\phi_o(o_t)3, and zot=ϕo(ot)z_{o_t}=\phi_o(o_t)4 to explore performance-complexity trade-offs (Guenter et al., 16 Jul 2025).

Training uses Adam with learning rates zot=ϕo(ot)z_{o_t}=\phi_o(o_t)5 and zot=ϕo(ot)z_{o_t}=\phi_o(o_t)6. Gate parameters are initialized to 1 and held for 200k steps; in the final 20% of training, they are rounded to zot=ϕo(ot)z_{o_t}=\phi_o(o_t)7. Total environment steps are zot=ϕo(ot)z_{o_t}=\phi_o(o_t)8 for Ant, Hopper, and Walker2D, and zot=ϕo(ot)z_{o_t}=\phi_o(o_t)9 for HalfCheetah. The replay buffer is warm-started with θ\theta00 random-policy steps, followed by short OFENet pretraining on those samples.

On HalfCheetah-v2, the reported return and deployment/train parameter counts are: SAC 12757 with 74k/289k; SAC-Big 15534 with 1081k/4300k; OFE 16609 with 174k/821k; OFE-Big 17299 with 1286k/6276k; Prune-A 16774 with 152k/1466k; Prune-B 16033 with 28k/390k; and Prune-C 13593 with 21k/236k. On Ant-v2, SAC achieves 4974 with 100k/389k, SAC-Big 6345 with 1182k/4695k, OFE 7161 with 187k/799k, OFE-Big 7608 with 1057k/5114k, Prune-A 7229 with 242k/1111k, Prune-B 6517 with 73k/576k, and Prune-C 5829 with 41k/266k.

On Hopper-v2, SAC achieves 3197 with 71k/280k, SAC-Big 3534 with 1069k/4264k, OFE 3548 with 139k/651k, OFE-Big 3699 with 924k/4573k, Prune-A 3659 with 55k/556k, Prune-B 3515 with 15k/246k, and Prune-C 3470 with 8k/102k. On Walker2D-v2, SAC achieves 3998 with 74k/289k, SAC-Big 4976 with 1081k/4301k, OFE 5468 with 143k/663k, OFE-Big 5490 with 934k/4613k, Prune-A 5679 with 361k/2187k, Prune-B 5152 with 67k/586k, and Prune-C 4803 with 50k/389k.

The reported interpretation is that starting large and pruning online produces compact agents with minimal performance loss, and that in several tasks Prune-B and Prune-C remain close to OFE or OFE-Big while using far fewer parameters for both deployment and training. A common misconception is that pruning a large network during training is equivalent to training a small network from scratch; the reported comparisons do not support that equivalence, since pruned models often achieve higher returns at similar or lower parameter counts than baseline SAC, with Hopper-v2 and Walker2D-v2 given as examples.

The paper also reports structure-level pruning patterns. The OFENet state extractor θ\theta01 is pruned heavily across tasks, whereas θ\theta02 exhibits task-dependent patterns: later layers remain wider in Ant, earlier layers remain wider in Walker2D, and Cheetah is more uniform. This suggests that the cost-aware regularization allocates sparsity nonuniformly across the DenseNet hierarchy where it most reduces downstream cost.

Several limitations are identified. Performance-sparsity trade-offs depend on θ\theta03, and θ\theta04; overly aggressive regularization can over-prune and reduce returns, while weak regularization leaves large models. Stochastic gating early in training introduces additional noise that can interact with SAC exploration and occasionally cause evaluation spikes, with Cheetah cited as an example. Early OFENet layers are particularly delicate because they influence many concatenations and downstream input dimensions, so non-cost-aware pruning can become imbalanced. Proposed extensions include convolutional layers, other reinforcement learning algorithms such as TD3 and PPO, additional auxiliary tasks, adaptive θ\theta05, and combinations of unit-level with block-level or layer-level gates.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to XiNet.