Three Filters, Four Emails

Neural Network Building BlocksMedium+20 XP+20

Three Filters, Four Emails

A spam filter is a single neuron with a sigmoid on its output:

z=w1x1+w2x2+b,p=σ(z)=11+e−zz = w_1x_1 + w_2x_2 + b, \qquad p = \sigma(z) = \frac{1}{1+e^{-z}}z=w1​x1​+w2​x2​+b,p=σ(z)=1+e−z1​

Here x1x_1x1​ is a suspicious-words score and x2x_2x2​ is a known-sender score, each between 000 and 111. An email is flagged as spam when p≥0.5p \ge 0.5p≥0.5 and let through otherwise.

The filter in production is P. A retraining run has produced two candidates to replace it, Q and R:

filterw1w_1w1​w2w_2w2​bbb
P (production)222−1-1−1−1-1−1
Q666−3-3−3−3-3−3
R666−3-3−3−1-1−1

On today's four emails, the three filters output these values of ppp:

emailx1x_1x1​x2x_2x2​PQR
A1110000.7310.7310.7310.9530.9530.9530.9930.9930.993
B0.20.20.20.60.60.60.2310.2310.2310.0270.0270.0270.1680.1680.168
C0.90.90.90.20.20.20.6460.6460.6460.8580.8580.8580.9780.9780.978
D0.10.10.11110.1420.1420.1420.0040.0040.0040.0320.0320.032

All three flag A and C as spam and let B and D through.

The team cares about one thing only. The replacement must make the same spam / not-spam call as P on every email it will ever see, whatever that email's two scores are.

Which of the candidates is guaranteed to do that?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.