Transcript: Tensor Logic: The Language of AI
Alex: Welcome to another episode of ResearchPod. Today, we're looking at a paper by Pedro Domingos about something called "Tensor Logic" — a proposal for a new kind of foundation for artificial intelligence.
Sam: The core puzzle the paper starts with is this: we're using a general-purpose programming language called Python to build the most complex reasoning systems in history. Python is great for lots of things, but it wasn't designed for AI. So developers end up stitching together a patchwork of specialized libraries just to make things work.
Alex: So the paper is asking — why doesn't AI have its own dedicated language? One that handles both learning and logic at the same time?
Sam: Exactly. The author draws a comparison: physics found its natural language in calculus. Web design found HTML. The argument is that AI hasn't found its equivalent yet. Tensor Logic is proposed as that missing foundation.
Alex: That's a significant claim. So what exactly is the proposal?
Sam: The key insight is that two things we usually think of as completely separate — logical rules and a specific kind of mathematical operation — turn out to be doing essentially the same thing. To understand why, it helps to know what a tensor is.
Alex: I've heard the word, but I'm not sure I could explain it to someone.
Sam: Think of a spreadsheet. That's a two-dimensional grid — rows and columns. A tensor is just that idea extended to more dimensions. A cube of numbers instead of a flat grid. Or a four-dimensional cube. The math works the same way regardless of how many dimensions you add.
Alex: Okay, so tensors are just multi-dimensional tables of numbers. What does that have to do with logic?
Sam: Here's where it gets interesting. Think about how a logical rule works. Something like: "If person A is the parent of person B, and person B is the parent of person C, then A is the grandparent of C." To check that rule, you're essentially searching two lists and finding where they connect — where the output of one matches the input of another. That process of matching and connecting is called a "join."
Alex: Like joining two spreadsheets together based on a shared column?
Sam: Exactly that. And it turns out that when you do that kind of join mathematically, it's the same operation as multiplying tensors together and summing over the shared dimensions. The paper's central claim is that logical reasoning and tensor math are, at a deep level, the same thing.
Alex: So instead of having a separate "logic engine" running rules and a separate "neural engine" learning patterns, you could write both as the same kind of equation?
Sam: That's the proposal. And the practical payoff is significant: if your logic is just tensor math, you can run it on the same hardware — graphics cards, or GPUs — that already powers modern neural networks. Reasoning becomes a high-speed calculation rather than a slow, separate process.
Alex: What about learning? Can the system actually improve itself from data, the way a neural network does?
Sam: Yes, and this is where the unification really pays off. Because everything is expressed in tensor algebra, you can use the same tools we already use to train neural networks — specifically, a technique called gradient descent, where the system nudges its own settings in the direction that reduces its errors. That means the system can learn logical rules from data, rather than having a human write every rule by hand.
Alex: That's the field called inductive logic programming, right? Learning logic from examples?
Sam: Right. And this framework gives it a natural home inside the same mathematical structure as everything else.
Alex: What about when a system needs to invent a concept that wasn't in the original data? Like when a neural network develops its own internal representation of, say, "edge" or "texture" when learning to recognize images?
Sam: The paper calls this "predicate invention" — the system discovering new relationships that weren't explicitly given to it. The mechanism it uses is called Tucker decomposition. Imagine you have a very complex, high-dimensional table of relationships. Tucker decomposition breaks that table down into a compact core — capturing the essential structure — plus a set of smaller matrices that translate that core back into the specific data. It's like summarizing a long, complicated book into a handful of key themes, then using those themes to reconstruct any chapter you need.
Alex: So the system is compressing its own logic into smaller, more meaningful pieces — and those compressed pieces are the "invented" concepts?
Sam: Precisely. It finds hidden structure that wasn't explicitly programmed. And because it's all tensor math, this process runs on the same hardware and uses the same training methods as the rest of the model.
Alex: So it's not just about speed or convenience. It's about having one coherent workspace where learning and reasoning happen together, rather than bolted onto each other.
Sam: That's the heart of it. And the paper argues this extends further than just combining neural and symbolic AI.
Alex: How so?
Sam: A lot of AI isn't about strict rules at all — it's about managing uncertainty. Deciding that something is probably true, rather than definitely true. There's a whole branch of AI built around what are called graphical models, which are essentially diagrams that track how probabilities flow between connected variables.
Alex: Like a flowchart for uncertainty?
Sam: A good way to put it. And the paper shows that those probability tables — the factors in a graphical model — are just tensors of non-negative numbers. When you want to calculate the probability of one outcome given everything else you know, you're doing a series of tensor projections and joins. The same operations, again.
Alex: So neural networks, logical rules, and probabilistic reasoning all reduce to the same underlying math?
Sam: That's the argument. The paper calls it a "common denominator" for the field. Instead of treating neural, symbolic, and probabilistic AI as three separate disciplines with their own tools and languages, you'd have one formal system that expresses all of them.
Alex: And in practical terms — what does a transformer look like in this framework? Transformers are the architecture behind most large language models right now.
Sam: The paper demonstrates that you can express a full transformer model using roughly a dozen tensor equations. The attention mechanism — the part that lets the model weigh which words in a sentence are most relevant to each other — is a specific pattern of tensor multiplications. Positional encoding, residual connections — all of it translates directly.
Alex: So in principle, you could add strict logical constraints to a language model by just writing them in the same notation, rather than building a separate system to enforce them?
Sam: That's the vision. If you want a medical AI that must never recommend a drug combination that violates a known safety rule, you write that rule as a tensor join. It lives in the same workspace as the neural network's learned patterns. No separate enforcement layer, no stitching.
Alex: What's the biggest obstacle to this actually happening?
Sam: The paper is candid about this. It's a chicken-and-egg problem. For Tensor Logic to become practical, it needs a mature ecosystem — libraries, tools, compilers that can take these equations and run them efficiently. But those tools only get built once enough researchers and engineers are working in the framework. The author identifies building an open-source community as the next critical step.
Alex: So the idea is coherent, but the infrastructure around it still needs to be built.
Sam: That's a fair summary. The paper is making a foundational argument — that this could be the right language for AI — rather than announcing a finished system. Whether the field adopts it depends on whether that community forms.
Alex: It's an interesting moment to be thinking about this. AI is moving fast, and the tools we're using were largely designed for other purposes. The question of whether the field needs its own formal language — its own calculus — seems worth taking seriously.
Sam: And that's what this paper is putting on the table. Not a finished answer, but a carefully argued case for what that answer might look like.
Alex: Thanks for walking through it, Sam. And thanks to everyone listening — this has been ResearchPod.