The stdplus activation function
Project description
stdplus
stdplus(x) is a smooth activation function for computing Gaussian standard deviations in variational models. It is designed as a numerically stable alternative to softplus / exp, and is introduced in Chapter 6 of Yujia Yan’s PhD dissertation (University of Rochester, 2025).
It resembles a 1-centered softplus (i.e., equals 1 at x = 0) while providing a clean analytic derivative and a stable evaluation recipe.
Definition
stdplus function is defined as a function y = f(x) such that $$y^2- 2 \log(y) - 1 = x^2$$
This is proposed in Chapter 6 of Yujia Yan's dissertation: Slashed Normal Parameterization for Approximate Normal Posterior Distributions
Why stdplus?
In the Slashed Normal / KL-amplitude parameterization, Gaussian parameters are expressed as a complex “KL amplitude” ψ = a + bi, and the standard deviation is computed with:
μ = sqrt(2) * aσ = stdplus(sqrt(2) * b)
This yields an exact closed-form KL term equal to ||ψ||_2^2 (enabling direct, interpretable rate control).
Reference
- Yujia Yan, Structured Analysis and Generation in Music, Audio, and Beyond, PhD Dissertation, University of Rochester, 2025. (See Chapter 6, Sec. 6.6 “More on stdplus Function”.)
Install
pip3 install -e .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stdplus_ext-0.0.1.tar.gz.
File metadata
- Download URL: stdplus_ext-0.0.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19686a2a277c5f13e62bf6538c0e111ba466981b7084e87e94d7cd2da5e0f435
|
|
| MD5 |
ba822d5c55715cd73eab25d68fe1d0d8
|
|
| BLAKE2b-256 |
23e6be505a55e3bdc44f3e7e2bb78fca4e7e5d14204b6e85e1d3ecab01121f3a
|
File details
Details for the file stdplus_ext-0.0.1-py3-none-any.whl.
File metadata
- Download URL: stdplus_ext-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ea348d61353bec01c6f2a42b66b2b0060b0aa350c03c5430319913ce55127bc
|
|
| MD5 |
a59d00928a69b54b9761de0a14fed59d
|
|
| BLAKE2b-256 |
0ec893f05dc5243e704c998326571a79c6df48ec4f7c243e8cffa6986116c933
|