透過 MCP 連接 →

輸入計算

數學公式

廣告

結果

二階導數 s''_a(x)
-0.057557
無單位
Sigmoid 值 s_a(x) 0.622459
一階導數 s'_a(x) 0.235004
二階導數 s''_a(x) -0.057557

這個計算器的用途

本工具用來計算含增益參數的邏輯 Sigmoid 函數二階導數,記為 \(s''_a(x)\),可在指定點 \(x\) 與所選增益 \(a\)(即斜率參數,常稱為 alpha)下求值。邏輯 Sigmoid 是神經網路與統計模型中最常見的激活函數之一,它的各階導數在以梯度為基礎的訓練及曲率分析中無所不在。

計算公式

增益為 \(a\) 的 Sigmoid 函數為 \(s_a(x) = \frac{1}{1 + e^{-a x}}\)。其一階導數為 \(s'_a(x) = a \cdot s \cdot (1 - s)\),二階導數則為 $$s''_a(x) = a^2 \, s \, (1 - s)(1 - 2s)$$ 其中 \(s = s_a(x)\)。由於所有結果都能以 \(s\) 表示,本計算器會先求出 \(s\),再用同一個 \(s\) 同時算出兩階導數。分母 \(1 + e^{-a x}\) 恆為正值,因此完全不會出現除以零的問題。

Sigmoid curve with its first derivative bell and second derivative wave aligned on the same x-axis
The sigmoid (top), its first derivative (bell), and its second derivative (S-shaped wave crossing zero at the center).

使用方法

輸入增益 \(a\)(預設為 1)與求值點 \(x\)(預設為 0.5),即可讀取 Sigmoid 值、一階導數以及最主要的二階導數結果。若要找出反曲點,請留意:\(s''_a(x) = 0\) 恰好發生在 \(s = 0.5\) 的位置,而不論增益 \(a\) 為何,這都對應到 \(x = 0\)。

Advertisement

範例試算

當 \(a = 1\)、\(x = 0.5\) 時:\(e^{-0.5} = 0.606531\),因此 \(s = \frac{1}{1.606531} = 0.622459\)。接著 \(1 - s = 0.377541\),故 \(s' = 1 \times 0.622459 \times 0.377541 = 0.235004\)。最後 \(1 - 2s = -0.244919\),得到 $$s'' = 1 \times 0.235004 \times (-0.244919) = -0.057557$$

Second derivative wave with positive peak, zero crossing at center, negative trough, and one marked evaluation point
Evaluating s''_a(x): the curve peaks, crosses zero at the sigmoid's center, then troughs.

常見問題

增益 \(a\) 有什麼作用?它用來縮放 Sigmoid 曲線的陡峭程度;\(a\) 越大,轉折越急遽。若設 \(a = 0\),則處處 \(s = 0.5\),因此兩階導數都會是 0。

二階導數在哪裡為零?在 \(x = 0\) 這個反曲點,正是 Sigmoid 由凸轉凹的位置。

數值上穩定嗎?是的——當 \(a x\) 為負值時,計算器會改用等價形式 \(\frac{e^{a x}}{1 + e^{a x}}\),以避免指數運算溢位。

最後更新: