Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a problem with formula 8 in this paper #3

Open
KAGAII opened this issue May 4, 2024 · 2 comments
Open

There is a problem with formula 8 in this paper #3

KAGAII opened this issue May 4, 2024 · 2 comments

Comments

@KAGAII
Copy link

KAGAII commented May 4, 2024

Hello, I recently read your article, and there is a question that has been bothering me. Formula 8 in the article calculates the lower bound of similarity. Both sides of the equation are not equal and cannot be converted into a maximum pooling representation of the paragraph.
Can you answer my confusion? Thank you very much.

@alexlimh
Copy link
Owner

alexlimh commented May 4, 2024

Thank you for your interest in SLIM. For the lower bound, let's simplify the equation first by setting $N=1$, since the sum operator is a linear operation. we now only need to show that $\max_j e_i^T \phi_j = e_i^T\max_j \phi_j$. As we know that $e_i$ is a one-hot vector and the active dimension $k$ is non-negative, $e_i^T\phi_j = \alpha * \phi_j^{(k)}$, where $\phi_j^{(k)}$ is the $k$-th element of $\phi_j$ and $\alpha = e_j^{(k)}$. Therefore, $\max_j e_i^T \phi_j = \alpha * \max_j \phi_j^{(k)}= \alpha * \max_j$ select $( \phi_j, k)$, where select $( \phi_j, k) = \phi_j^{(k)}$. Now, both the select operation and max operation are element-wise operation, it does not matter if we first select the $k$-th dimension and then take the max, or first take the max for all dimensions and then take the $k$-th dimension. Therefore, $\alpha * \max_j$ select $( \phi_j, k) = \alpha *$ select $( \max_j\phi_j, k) = e_i^T\max_j \phi_j$. I hope this is clear enough.

@KAGAII
Copy link
Author

KAGAII commented May 5, 2024

Your answer is excellent, I already understand, let me thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants