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

Representation learning or Vector Embedding #101

Open
siddhartha-gadgil opened this issue Sep 13, 2016 · 10 comments
Open

Representation learning or Vector Embedding #101

siddhartha-gadgil opened this issue Sep 13, 2016 · 10 comments
Labels
notes Using the issue to keep as notes

Comments

@siddhartha-gadgil
Copy link
Owner

siddhartha-gadgil commented Sep 13, 2016

There are many ways in which, given a (weighted) collection of linear terms, we can generate weighted graphs. Namely, we traverse based on:

  • combinations of terms: function application, lambdas etc.
  • terms joined to their types.
  • alternatively, terms mapped to types to give relations between types only.
  • ordering, sectioning etc of sources.

Each of these give representations of terms and types as vectors. We can use these for various decisions and maps, e.g.

  • deciding whether a statement is a priori likely to be true - so we can recognize strong statements.
  • map statements to likely ingredients in their proofs.
  • basic evaluation of a statement, better than just complexity.
@siddhartha-gadgil
Copy link
Owner Author

Bird2Vec lessons:

  • no magic in word2vec;
  • should first of all use type information;
  • should learn vectors with actual predictions, first, not synthetic ones.

@siddhartha-gadgil
Copy link
Owner Author

Is not really an issue, but part of better learning and dynamics.

@siddhartha-gadgil
Copy link
Owner Author

  • This is now ready for implementation given the generation of equation terms.
  • We don't need to use predictions but can use actual nodes that are constructed.
  • Key cost: discriminate between existing and non-existing nodes that are equation terms for the given node.
  • Islands: Can model mapping into islands by a low rank linear map plus a scalar multiple of the identity.
  • Given a new term we can simply learn afresh starting with the state we had already learnt.

@siddhartha-gadgil
Copy link
Owner Author

  • Simplify: just use some form of force-directed graph.
  • This is not representation learning, just a simple form of Vector embedding

@siddhartha-gadgil siddhartha-gadgil changed the title Representation learning Representation learning or Vector Embedding May 24, 2019
@siddhartha-gadgil
Copy link
Owner Author

Can use bi-directional flows as in #256

@siddhartha-gadgil siddhartha-gadgil added the notes Using the issue to keep as notes label Jul 16, 2019
@siddhartha-gadgil
Copy link
Owner Author

This has been implemented a while ago as RepresentationLearner, but

  • we must test.
  • we may want bi-directional flows for robustness.

@siddhartha-gadgil
Copy link
Owner Author

code2vec may be directly applicable here.

@siddhartha-gadgil
Copy link
Owner Author

  • The transformer approach may be much better.
  • It lets us avoid unnatural linearizations; we can use positional embeddings based on representations in place of trignometric functions, for example.

@siddhartha-gadgil
Copy link
Owner Author

Representations: force directed

  • We represent elements using a force-directed model, based either on explicit forces or predictions.
  • If we use predictions, then positive and negative samples correspond to attractive and repulsive forces.
  • We can have a single repulsive force based on distance of points in the representation, stronger when they are close.
  • We have a norm, essentially a descriptive complexity, on elements.
  • Elements with small descriptive complexity are attracted to the origin.
  • We get a similar attraction between the lhs and rhs of relations when the other terms have smaird attll complexity.
  • A third attractive force depends on the representations: essentially if the representations of f and g are close and so are those of x and y, then there is an attraction between f(x) and g(y).
  • We have a variant of the above where we consider projections and have attractions if these are small, but should be a projected attraction.

@siddhartha-gadgil
Copy link
Owner Author

Representations: Use predictions and dot products

  • A model where we learnt two representations and predicted with dot products was not much worse than force-directed.
  • On the other hand, this needs far fewer choices.
  • Hence it is probably best to go with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes Using the issue to keep as notes
Projects
None yet
Development

No branches or pull requests

1 participant