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

Ib naming model #50

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open

Ib naming model #50

wants to merge 44 commits into from

Conversation

nathimel
Copy link
Collaborator

🥳 We now have an IB-BA implementation native to ULTK and a minimal example comparing efficiency analyses using grammatical/LoT complexity to IB.

Here is a summary of the changes I made:

  • Addition of an information_bottleneck submodule within ultk.effcomm, which includes an implementation of the IB-BA algorithm alone and an IBNamingModel.
  • RDOT is no longer a dependency
  • I have not added any tests. :/ I have a couple of very basic ones from RDOT, but I'm not sure how analytically 'true' they are so I just left them out
  • the signaling game example was a minimal example of how to use the agent.py module with adaptive dynamics together with the effcomm module, but ultimately I think its a little outside the scope of ULTK, at least for now. Also, it required RDOT because it involved computing rate distortion (not IB) bounds. Such style of analysis is controversial and I'd rather not have to defend it later on.
  • the color domain is infeasibly slow to compute our own bounds for. I have tried several code optimizations, including jax and torch trying to take advantage of GPU, but BA simply takes too long for a simple working example. Therefore, I think a better example showcasing the utility of ULK is to replicate the results of a different domain that's easier to compute.
  • In light of this, I added a modals example. This reads in natural languages (open to moving those out of this repo and doing url downloads from the modals-effcomm repo instead), performs the same analysis pipeline as the indefinites example, and then computes IB bounds for the domain based on the 'half-credit' communicative utility metric. We then get a nice comparison of the two approaches to efficient communication analysis of modals. I think from start to finish this notebook might take 1 minute to run.
  • I've been working quickly, so feel free to ask me to go back and make changes etc. Cheers!

Nathaniel Imel and others added 30 commits February 5, 2024 16:52
@nathimel
Copy link
Collaborator Author

A followup: I'm on the fence about whether to include the colors/ example at all, tbh. There is nothing novel in that notebook that is not covered by https://github.com/nogazs/ib-color-naming/tree/master. This doesn't mean there can't be: we can look at how to convert encoders into ULTK languages, and then measure informativity differently. However, (1) right now effcomm.informativity.informativity infers a binary_matrix by default for each language for its Speaker and Listener, which loses enormous information from the stochastic encoders $q(W|M)$, so making a few extra cells in the notebook to illustrate this will require changes to informativity submodule and to agent.py. Which is fine, but probably best left to another PR. (2) I empirically found measuring informativity to be quite slow (I think because currently we need to build a utility matrix for each call to effcomm.informativity.informativity, which is a (330, 330) matrix, and also we need to evaluate, for each expression in a Language, its Meaning mapping , which itself also requires a large FrozenDict ). On the bright side, the comparisons of diff language measures are present in the modals example.

@nathimel
Copy link
Collaborator Author

What if we replaced the images in the README with the two trade-off plots in the modals example? 🤔 The latter are both original to ULTK, instead of pulled from other papers which we have not exactly replicated in ULTK.

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

Successfully merging this pull request may close these issues.

3 participants