Nilang.jl – A Reversible Julia DSL
github.com
Nilang.jl – A Reversible Julia DSL
1–10 of 31 posts
Re: Nilang.jl – A Reversible Julia DSL
#2Re: Nilang.jl – A Reversible Julia DSL
#3Incredible. Given a (one-to-one) Julia function `f`, this package generates `~f`, the inverse of f. Clever use of automatic differentiation. Paper: https://arxiv.org/abs/2003.04617
Re: Nilang.jl – A Reversible Julia DSL
#4Re: Nilang.jl – A Reversible Julia DSL
#5Incredible. Given a (one-to-one) Julia function `f`, this package generates `~f`, the inverse of f. Clever use of automatic differentiation. Paper: https://arxiv.org/abs/2003.04617
Re: Nilang.jl – A Reversible Julia DSL
#6Wait a second, does it yield an exact inverse or a numerical approximation?
https://github.com/GiggleLiu/NiLang.jl/blob/master/examples/...
Ed: after skimming the paper (that went mostly over my head) - this does indeed seem to be about "actually" running functions in reverse - given a function only defined "forward" in the nilang DSL. It appears the graph embed examples are missing in the master branch, unfortunately.
I wonder if this can be used more trivially to solve simple problems too - like calculating values/sums pertaining to compound interest/investment, given a naive function for calculating sums etc (its trivial to add up compounded interest and deposits, but a tiny bit more complicated to answer the question "at what time is my portfolio at X or more dollars).
Re: Nilang.jl – A Reversible Julia DSL
#7Incredible. Given a (one-to-one) Julia function `f`, this package generates `~f`, the inverse of f. Clever use of automatic differentiation. Paper: https://arxiv.org/abs/2003.04617
Forgive my ignorance, but what applications would this be used in where just maintaining copies of the initial parameters to f() wouldn’t work?
Even if you only care about previous applications of f. Keeping snapshots of every input isn't always feasible.
Re: Nilang.jl – A Reversible Julia DSL
#8Earlier quoted context omitted.
Forgive my ignorance, but what applications would this be used in where just maintaining copies of the initial parameters to f() wouldn’t work?
I think the space requirements are different. Even if you only care about previous applications of f. Keeping snapshots of every input isn't always feasible.
There's as far as I can tell no inherent need to call the regular function first - given any function f, you get a callable inverse function ~f.
Re: Nilang.jl – A Reversible Julia DSL
#9Incredible. Given a (one-to-one) Julia function `f`, this package generates `~f`, the inverse of f. Clever use of automatic differentiation. Paper: https://arxiv.org/abs/2003.04617
Forgive my ignorance, but what applications would this be used in where just maintaining copies of the initial parameters to f() wouldn’t work?
Reversibility is important in quantum computing. Quantum circuits must transform input to output in a "unitary" manner, which is reversible. If you consider the input to output as a linear transformation matrix (with complex values), then the complex conjugate of the matrix gives the "inverse function".
This is probably useless info, but reversibility in the classical sense is also interesting due to the energy bounds of computation. The Landauer limit (kTln2) [1] gives a lower bound of energy that must be dissipated to destroy one bit of information in a computation. A reversible calculation does not destroy bits.
Re: Nilang.jl – A Reversible Julia DSL
#10Incredible. Given a (one-to-one) Julia function `f`, this package generates `~f`, the inverse of f. Clever use of automatic differentiation. Paper: https://arxiv.org/abs/2003.04617