NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Show HN: I implemented a neural network in SQL (github.com)
sporkl 28 minutes ago [-]
I've been working on something similar, implementing a relational language on top of a tensor library[0].

Mathematically, einsum and database joins are the same thing, just over different semirings (real numbers for einsum, booleans for databases). A lot of papers about datalog explore this sort of thing in more depth. In particular, Dyna[1] might be interesting.

[0]: https://arxiv.org/abs/2509.22614 [1]: https://dyna.org/

HPsquared 2 hours ago [-]
Somewhat more reliable than implementing SQL in neural networks.
40 minutes ago [-]
2 hours ago [-]
tommica 3 hours ago [-]
I'm just going to go back to making my CRUD endpoints...

Jokes aside, sounds really impressive, though I only understood about 10% :D

0xnyn 2 hours ago [-]
initially rolled my eyes at "neural networks in SQL," but after reading the code I came away impressed

basically it comes down to using relational algebra as the IR, letting a database optimizer reason about tensor programs

alxmrs 2 hours ago [-]
I would have had the same gut reaction as you lol.

You’re spot on. I think that SQL, as a data oriented and logic PL, might be ideal for writing tensor programs.

soupspaces 1 hours ago [-]
Neat! Feels analogous to "X runs Doom" demos (but NN).
simonw 35 minutes ago [-]
Just today I saw this implementation of DOOM in SQLite using a recursive CTE for a simple ray tracer: https://github.com/petergpt/doomql
alxmrs 1 hours ago [-]
Totally. I can’t wait to take this to https://hytradboi.com
iqbal1980 2 hours ago [-]
Why? lol
throwaway613746 1 hours ago [-]
[dead]
slipperybeluga 3 hours ago [-]
[dead]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 23:18:08 GMT+0000 (Coordinated Universal Time) with Vercel.