虚拟机可以实现为神经网络吗?
免责声明:我不是数学天才,也没有任何编写神经网络的经验。所以,请原谅我在这里所说的任何愚蠢的话。 ;)
我一直读到有关神经网络用于机器学习的内容,但在尝试编写简单的虚拟机时,我开始想知道它们是否可以以另一种方式应用。
具体来说,可以将虚拟机创建为神经网络吗?如果是这样,它会如何工作(如果必须的话,请随意在此处使用抽象描述)?
我听说过 Joycean Machine,但除了非常非常模糊的解释之外我找不到任何信息。
编辑:我在这里寻找的是基于神经网络的虚拟机如何解释汇编的解释。如何处理输入等?每个单独的输入都是一个内存地址吗?我们来集思广益吧!
Disclaimer: I'm not a mathematical genius, nor do I have any experience with writing neural networks. So, please, forgive whatever idiotic things I happen to say here. ;)
I've always read about neural networks being used for machine learning, but while experimenting with writing simple virtual machines, I began to wonder if they could be applied in another way.
Specifically, can a virtual machine be created as a neural network? If so, how would it work (feel free to use an abstract description here, if you have to)?
I've heard of the Joycean Machine, but I can't find any information other than very, very vague explanations.
EDIT: What I'm looking for here is an explanation of exactly how a neural network-based VM would interpret assembly. How would inputs be handled, etc? Would each individual input be a memory address? Let's brainstorm!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你真的让我很开心……
由于已经训练好的神经网络与常规状态机没有太大区别,因此为确定性指令集编写神经网络虚拟机是没有意义的。
使用多个指令集或未知集来训练这样的虚拟机可能会很有趣。然而,我怀疑执行这样的训练是否实用,甚至 %99 正确的解释器对传统字节码也没有任何用处。
我能想到的神经网络虚拟机的唯一用途是执行包含模糊逻辑构造或人工智能启发式算法的程序。
一些愚蠢的堆栈机示例来演示这个想法:
这里没有明确的启发式。假设我们将所有状态保留在 *map 中,包括启发式算法。
你会发现它看起来很愚蠢,而且不完全上下文敏感,但如果神经网络不在线学习,它就没有任何价值。
You really made my day buddy...
Since an already trained neural network won't be much different than a regular state machine, there is no point writing a neural network VM for a deterministic instruction set.
It might be interesting to train such a VM with multiple instruction sets or an unknown set. However, I doubt it will be practical to execute such a training and even a %99 correct interpreter will be of any use for conventional bytecode.
The only use of a neural network VM I can think of is executing a program that contains fuzzy logic constructs or AI algorithm heuristics.
Some silly stack machine example to demonstrate the idea:
There is no explict heuristic here. Just assume we keep all state in *map including the heuristic algorithm.
You see it looks silly and not completely context sensitive but a neural network is of no value if it doesn't learn online.
当然。毫无疑问,网络相当复杂。
字节码/操作码的大部分解析都是神经网络擅长的模式匹配。
Of course. With a rather complex network no doubt.
Much of the parsing of bytecodes/opcodes is pattern matching which neural networks excel at.
您当然可以使用神经网络来做到这一点 - 我可以轻松地看到学习给定字节码片段的正确状态转换。
输入可能类似于:
输出可能类似于:
但是-我不确定为什么你首先要这样做。与直接执行字节码相比,神经网络的效率要低得多(并且可能会犯错误,除非你训练得足够好)。无论如何,您可能需要编写一个准确的字节码评估器,只是为了创建足够的训练数据......
此外,根据我的经验,神经网络往往擅长模式识别,但不擅长学习逻辑运算(例如二进制加法或异或)一旦超过一定规模(即超过几个位)。因此,根据指令集的复杂性,网络可能需要大量时间来训练。
You could certainly do this with a neural network - I could easily see learning the correct state transitions for a given piece of bytecode.
Input could be something like:
Output could be something like:
However - I'm not sure why you would want to do this in the first place. A neural network would be much less efficient (and potentially make mistakes unless you trained it well enough) compared to just executing the bytecode directly. You'd probably need to write an accurate bytecode evaluator anyway just to create enough training data....
Also, in my experience neural networks tend to be good at pattern recognition but very bad at learning logical operations (like binary addition or XORs) once you get beyond a certain scale (i.e. more than a few bits). So depending on the complexity of your instruction set, the network could take a very large amount of time to train.