# Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learning

Shallow networks with SiLU units learn Tetris and Atari using on-policy traces

Stefan Elfwing, Eiji Uchibe, Kenji Doya · arXiv · 2017-2-10

- **Problem** DQN-style agents rely on experience replay and target networks. Whether simpler on-policy TD(λ) and Sarsa(λ) with eligibility traces and softmax exploration can compete had not been established.
- **Method** The SiLU multiplies a hidden unit's input by its sigmoid, and the dSiLU is its derivative. Networks trained with TD(λ) or Sarsa(λ) use these units with annealed softmax action selection, instead of experience replay.
- **Results** The dSiLU shallow network reached a final average score of 263 points in stochastic SZ-Tetris. Across 12 Atari games, SiLU-dSiLU agents reached a mean DQN-normalized best score of 332%, against 127% for double DQN.

## Two activations built on the sigmoid

The SiLU applies to a hidden unit's input \\( z\_k \\), which is a weighted sum of the state features plus a bias, the operation \\( a\_k(s) = z\_k\\,\\sigma(z\_k) \\), where \\( \\sigma(x) = 1/(1+e^{-x}) \\). The form comes from the EE-RBM, whose hidden activations are computed the same way, and that model had performed well in earlier classification and reinforcement learning studies.

Because the derivative is zero at that minimum, the function flattens there, and the authors argue this acts as a soft floor that discourages weights from growing large, an implicit regularizing effect they had shown experimentally in an earlier classification study. The dSiLU is the derivative of the SiLU, so its activation is \\( a\_k(s) = \\sigma(z\_k)\\bigl(1 + z\_k(1-\\sigma(z\_k))\\bigr) \\), a steeper sigmoid-like curve that overshoots.

It peaks at about 1.1 and dips to about −0.1 at \\( z\_k \\approx \\pm 2.4 \\), so it stays bounded, as the sigmoid does, while the SiLU does not.

Weight updates need the derivative of each activation with respect to each weight. For the SiLU this is the dSiLU expression multiplied by the input \\( s\_i \\). For the dSiLU the weight derivative is \\( \\sigma(z\_k)(1-\\sigma(z\_k))\\bigl(2 + z\_k(1-\\sigma(z\_k)) - z\_k\\sigma(z\_k)\\bigr)s\_i \\), which is a second-order expression in the sigmoid, and the networks use it in the same gradient step.

## Updates and softmax action selection

TD(λ) and Sarsa(λ) share one parameter update, \\( \\theta\_{t+1} = \\theta\_t + \\alpha\\,\\delta\_t\\,e\_t \\), and differ only in the TD-error and the eligibility trace they use. TD(λ) uses \\( \\delta\_t = r\_t + \\gamma V\_t(s\_{t+1}) - V\_t(s\_t) \\) and Sarsa(λ) uses \\( \\delta\_t = r\_t + \\gamma Q\_t(s\_{t+1},a\_{t+1}) - Q\_t(s\_t,a\_t) \\). The trace is \\( e\_t = \\gamma\\lambda e\_{t-1} + \\nabla\_{\\theta\_t}V\_t(s\_t) \\) for TD(λ), with \\( e\_0 = 0 \\), and uses the action-value gradient for Sarsa(λ); it carries earlier gradients forward with decay set by γ and λ.

For Sarsa(λ), actions are sampled with Boltzmann probabilities \\( \\pi(a\|s) = \\exp(Q(s,a)/\\tau)\\,/\\,\\sum\_b \\exp(Q(s,b)/\\tau) \\). The model-based TD(λ) variant instead chooses the action whose predicted next state \\( f(s,a) \\) has the highest soft-weighted value \\( V(f(s,a)) \\).

In the SZ-Tetris experiments τ0 was 0.5 and τk was 0.00025, with λ at 0.55. In the Atari experiments τ0 was 0.5 and τk was 0.0005, with λ at 0.8.

## Shallow networks on stochastic SZ-Tetris

Each shallow network had one hidden layer of 50 units and a linear output, with features modelled on the 21 Bertsekas features, except that the maximum column height was dropped and column height differences replaced the absolute differences, giving a 460-length binary state vector. The reward is an exponential of the hole count divided by 33, so holes are penalized.

Each activation type was trained for 200,000 episodes over ten runs with TD(λ) and softmax action selection.

Final average scores, taken over the last 1,000 episodes, were 263 ± 80 for dSiLU, 232 ± 75 for sigmoid, 214 ± 74 for SiLU and 191 ± 58 for ReLU. The differences among the four shallow agents were significant at p \< 0.0001. Bounded units (dSiLU and sigmoid) beat unbounded units (SiLU and ReLU), SiLU beat ReLU, and dSiLU beat sigmoid.

The dSiLU's average of 263 is 43 points above the 220 reported for the VD-CMA-ES method of Jaskowski et al., about 20% higher. Its best final score of 320 is 25 points above the 295 best single-run score from the same earlier work, about 8% higher.

## Deep networks on raw board states

The deep networks had two convolutional layers with 15 and 50 filters of size 5×5 and stride 1, each followed by 3×3 max-pooling with stride 2, then a 250-unit fully-connected layer and a linear output. Each variant was trained for 200,000 episodes over five runs, with the learning rate α set to 0.0001 after a rough grid-like search.

SiLU-dSiLU reached a final average of 229 ± 55, compared with 217 ± 53 for SiLU-SiLU and 215 ± 54 for ReLU-ReLU. SiLU-dSiLU outperformed the other two networks significantly (p \< 0.0001), and its 229 points is above the earlier state-of-the-art of 220 points. SiLU-SiLU and ReLU-ReLU did not differ significantly (p = 0.32).

## Shallow dSiLU network on 10×10 Tetris

The authors did not run the standard 20-row board, because they judged the learning time prohibitive. In 10×10 Tetris the seven standard tetrominoes are used, with 9 actions for the block, 17 for the S, Z and stick shapes and 34 for the J, L and T shapes, and a maximum of +4 points for the stick.

A shallow dSiLU network with 250 hidden units was trained for 400,000 episodes over five runs. It used 20 state features as in SZ-Tetris, a binary state vector of length 260, and the reward e^{-(number of holes)/(33/2)}.

Its average over the final 10,000 episodes and five runs was 4,900 points, compared with 4,200 for CBMPI, 3,400 for DPI and 3,000 for CE. The best single run reached a final mean score of 5,300 points, above the 5,000 points of CBMPI.

The authors stress that the dSiLU agent used features similar to the Bertsekas features, whereas CBMPI, DPI and CE reached only about 500 points with those features. CE reached its best score with extra Dellacherie and original features, and CBMPI reached its best with five RBF height features.

## Atari 2600 results against DQN variants

Sarsa(λ) was applied to Atari 2600 games in the Arcade Learning Environment, using 12 games whose names begin with A or B from the DQN game set to limit selection bias. The network takes the current and fourth previous 105×80 grayscale frames, uses 16 filters of size 8×8 with stride 4 and 32 filters of size 4×4 with stride 2, each followed by 3×3 max-pooling with stride 2, and then a 512-unit fully-connected dSiLU layer.

The architecture was made smaller than the DQN network for computational reasons.

The same meta-parameters were used for all 12 games: α 0.001, γ 0.99, λ 0.8, τ0 0.5 and τk 0.0005. Rewards were clipped to between −1 and +1, but TD-errors were not clipped. Each game was trained for 200,000 episodes over two runs, with up to 30 no-op starts and a limit of 18,000 frames per episode.

The SiLU-dSiLU agents reached a mean DQN-normalized best score of 332% and a median of 125%, against 127% and 105% for double DQN. The final scores gave a mean of 218% and a median of 78%.

The SiLU-dSiLU agents had the highest best mean score in 6 of the 12 games. In Asterix the best mean score was 100,322, which improved the second-best agent's score by 562%, and in Asteroids it was 10,614, which improved it by 552%.

The DQN, Gorila and double DQN numbers were taken from earlier reports, which used different run counts and episode counts for their averages, so they are not a single controlled comparison with these agents.

## Whether value estimates track returns

The authors measure discounted returns \\( R\_t = \\sum\_{k=0}^{T-t} \\gamma^k r\_{t+k} \\), where T is the episode length, and compare them with the learned values. The motivation is that Q-learning targets use a max operator, which can overestimate action values, while TD(λ) and Sarsa(λ) do not use it.

In SZ-Tetris the normalized sum of \\( V(s\_t) - R\_t \\) over 1,000 episodes is fitted by −0.012T + 9.8. Values overestimated returns in short episodes and underestimated them in long episodes, which the authors attribute to those episodes ending earlier or later than expected.

Best Asterix (score of 108,500) and Asteroids (score of 22,500) episodes that ran for the full 18,000 frames, or 4,500 time steps, were examined. The normalized sums of differences, with absolute differences in brackets, were 0.59 (1.05) for Asterix and −0.23 (1.28) for Asteroids. Action values were overestimated near the end of both episodes, which the authors attribute to the 4,500-step cutoff that the agents could not predict.

## Softmax versus ε-greedy exploration

The authors argue that ε-greedy selection picks all actions with equal probability when exploring, which is costly where bad actions have severe consequences. They give Tetris, where many actions create holes, and the Asterix and Asteroids games, where random actions can be fatal, as examples.

In SZ-Tetris softmax scored 326, while ε = 0 scored 332, ε = 0.001 scored 260, ε = 0.01 scored 71 and ε = 0.05 scored 14. In Asterix softmax scored 104,299 and ε = 0.05 scored 7,152, and in Asteroids softmax scored 15,833 and ε = 0.05 scored 1,521. In Asterix and Asteroids softmax was slightly above ε = 0, at 104,299 against 102,890 and at 15,833 against 15,091.

At ε = 0.05 the scores were 4% to 10% of the softmax scores, which the authors read as showing that ε = 0.05, the setting DQN uses for evaluation, does not suit these games. At ε = 0.001 the agents made only 2.1 exploratory actions per episode in Asteroids and 0.59 in SZ-Tetris, yet the paper reports reductions of 30% and 20%, with 26% and 22% in parentheses, measured against softmax selection with ε = 0.

## Limitations

The Atari comparison rests on two runs per game and on 12 games selected by their initial letters. The Atari network was made smaller than the DQN architecture for computational reasons. The exploration analysis covers only three games: the best SZ-Tetris agent and the best Asterix and Asteroids agents.

The 10×10 Tetris result comes from one shallow dSiLU configuration with 250 hidden units and 400,000 episodes over five runs. The standard 20-row Tetris board was not tested. The learning rate was set after only a rough grid-like search.

The conclusions name a separate target network, the dueling architecture and asynchronous learning with multiple agents as extensions that were not tested here.

## Paper info

- **Authors**: Stefan Elfwing, Eiji Uchibe, Kenji Doya
- **Venue**: arXiv · Preprint
- **First published**: 2017-2-10
- **Added**: 2026-11-12
- **Updated**: 2017-11-2
- **Version**: v3
- **arXiv**: 1702.03118
- **Category**: cs.LG
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1702.03118v3) · [PDF ↗](https://arxiv.org/pdf/1702.03118v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Stefan Elfwing, Eiji Uchibe, Kenji Doya (2017). Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learning. arXiv:1702.03118v3. https://arxiv.org/abs/1702.03118v3

**BibTeX**

```
@misc{elfwing2017sigmoid,
  title = {{Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learning}},
  author = {Stefan Elfwing and Eiji Uchibe and Kenji Doya},
  year = {2017},
  eprint = {1702.03118},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1702.03118v3}
}
```

## Other paper commentary

- [Deep Reinforcement Learning for Autonomous Driving: A Survey](https://refivu.com/en/papers/83c5fd0f-2d6a-46a6-9cf3-2c713669425c-deep-reinforcement-learning-for-autonomous-driving-a-survey.md)
- [Offline Reinforcement Learning: Tutorial, Review, and Perspectives on Open Problems](https://refivu.com/en/papers/c66662c6-5085-45ec-9290-15bb160cbde0-offline-reinforcement-learning-tutorial-review-and.md)
- [Soft Actor-Critic Algorithms and Applications](https://refivu.com/en/papers/27323517-0997-4493-a852-d624d86c70dd-soft-actor-critic-algorithms-and-applications.md)
- [Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments](https://refivu.com/en/papers/cdbfc66c-b5f8-47cf-8741-06704dc59cc0-multi-agent-actor-critic-for-mixed-cooperative-competitive.md)
- [Neural Architecture Search with Reinforcement Learning](https://refivu.com/en/papers/f6840c8a-b2c4-418a-8435-8f37c48700e2-neural-architecture-search-with-reinforcement-learning.md)
- [Off-Policy Deep Reinforcement Learning without Exploration](https://refivu.com/en/papers/997f4405-73fe-49b5-a89f-243df2c90604-off-policy-deep-reinforcement-learning-without-exploration.md)
- [DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection](https://refivu.com/en/papers/db31b9c4-53eb-4f35-b73e-46eb633cfd32-dino-detr-with-improved-denoising-anchor-boxes-for.md)
- [LSUN: Construction of a Large-scale Image Dataset using Deep Learning with Humans in the Loop](https://refivu.com/en/papers/9f84cef9-f864-4975-816c-e96f0a87497d-lsun-construction-of-a-large-scale-image-dataset.md)
- [Ensemble deep learning: A review](https://refivu.com/en/papers/ea9dfe6e-facd-4eab-ba72-3f4f7be98df5-ensemble-deep-learning-a-review.md)
- [Time Series Classification from Scratch with Deep Neural Networks: A Strong Baseline](https://refivu.com/en/papers/8883de27-afd8-4d47-acd8-ad01a7dfe332-time-series-classification-from-scratch-with-deep-neural.md)
- [Benchmarking Single Image Dehazing and Beyond](https://refivu.com/en/papers/e56ca83c-da79-4a86-ba3f-0e290a906769-benchmarking-single-image-dehazing-and-beyond.md)
- [Object Detection in Optical Remote Sensing Images: A Survey and A New Benchmark](https://refivu.com/en/papers/9963ea9e-19c4-4bf2-8e66-d7887d703d1e-object-detection-in-optical-remote-sensing-images-a.md)

## Terms in this paper

- [ReLU](https://refivu.com/en/terms/7b22f5612f6c-relu)
- [Sigmoid](https://refivu.com/en/terms/9f3c5f7726af-sigmoid)
- [Arcade Learning Environment](https://refivu.com/en/terms/e4eb3fb7dbe7-arcade-learning-environment)
- [Atari 2600](https://refivu.com/en/terms/529ac229bf48-atari-2600)
- [eligibility trace](https://refivu.com/en/terms/d7b56db176e1-eligibility-trace)
- [SiLU](https://refivu.com/en/terms/35a5fbe5a085-silu)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/0685f7ff-bee6-418f-959d-2e658dbc5d99-sigmoid-weighted-linear-units-for-neural-network-function)
