-
Notifications
You must be signed in to change notification settings - Fork 6
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
Represent transpose of Delta as rewrite rules #100
Comments
It's a bit stranger than I thought, but this is the best I've come up so far. Source language: our Delta expressions. Given a source term
Example transposition rules (rewritten from
|
While the above is a fine linear language, I think, the point of this was to Cayley-transform
after which I think we can without issues implement |
Hah, yes, this is unexpected. Re |
Here's the Tom's idea from #95 (comment):
As far as I understand so far, we'd need more
Delta
constructors and we'd transpose by rewriting theDelta
expressions. Afterwards, to get rid of theDelta
constructors, we'd interpret them straightforwardly as linear transformation syntax, which is implemented (and probably bit-rotted) inbuildDerivative
, which computes forward derivatives on the basis ofDelta
collected in forward pass. In the pipeline that produces gradient Ast, we'd runbuildDerivative
withAst
codomain.I wonder how much the extended
Delta
would start resemblingAst
. If we switched fromDelta
toAst
, we'd end up withAst
nested insideAst
, which would be fine in this case. But perhapsDelta
has some advantage overAst
? I guess it's linear, just as the linear sublanguage in the YOLO paper. I wonder if it's easy to extendDelta
to be enough for this term rewriting, but still syntactically guaranteeing linearity (assuming it does ATM, after all the tensor extensions).A modest version of this rewrite is to evaluate
Delta
to combinators of typeDeltaMap -> DeltaMap
, but not reify the combinators as constructors ofDelta
. Then, this can be presented as a rewrite, but implemented with immediate evaluation of the rewritten terms. Relevant parts ofbuildDerivative
are then manually inlined.The text was updated successfully, but these errors were encountered: