Bounded Integral of ReLU/Positive Affine Transform

321 Views Asked by At

I am looking to understand the integrals of rectified linear transforms in the context of machine learning: $f(x) = \begin{cases} \mathbf{w}^T\mathbf{x}+ b , \mathrm{if} \space \mathbf{w}^T\mathbf{x} + b \geq 0 \\ 0, \mathrm{else} \end{cases}$.

In particular, I am interested in area integrals of that function when restricted to bounded domains. For example, let $B=[-1,1]^d$ and $\mathbf{w}, b$ be an arbitrary vector and scalar respectively.

Can the following integral be written in iterative or closed form: $\int_B\mathbb{I}_{\mathbf{w}^T\mathbf{x} + b \geq 0} \mathbf{dx}$? Although the result is polynomial in $\mathbf{w},b$, I have not been able to easily compute it for the general case.

I would also be interested in the following integrals: $\int_Bf(\mathbf{x})\mathbf{dx}$, $\int_B \mathbf{x}f(\mathbf{x})\mathbf{dx}$, $\int_B f^2(\mathbf{x})\mathbf{dx}$. Any help would be appreciated!