\documentclass[aspectratio=169,11pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,graphicx,booktabs}

\definecolor{AcademicBlue}{RGB}{26,57,86}
\definecolor{AcademicTeal}{RGB}{0,105,112}
\setbeamercolor{structure}{fg=AcademicBlue}
\setbeamercolor{frametitle}{fg=AcademicBlue,bg=white}
\setbeamercolor{title}{fg=AcademicBlue}
\setbeamercolor{alerted text}{fg=AcademicTeal}
\setbeamercolor{block title}{fg=white,bg=AcademicBlue}
\setbeamercolor{block body}{fg=black,bg=AcademicBlue!5}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize items}[circle]
\setbeamertemplate{footline}{%
  \hfill\usebeamerfont{page number in head/foot}%
  \insertframenumber\,/\,\inserttotalframenumber\hspace{4mm}\vspace{3mm}}
\setbeamersize{text margin left=8mm,text margin right=8mm}
\setbeamerfont{frametitle}{size=\Large,series=\bfseries}
\setbeamerfont{title}{size=\LARGE,series=\bfseries}
\newcommand{\papersource}[1]{\par\smallskip{\scriptsize\color{gray}#1\par}}

\title[Tensor Logic]{Tensor Logic: The Language of AI}
\subtitle{A common index language for rules, neural computation, and factors}
\author{Paper by Pedro Domingos}
\date{\href{https://arxiv.org/abs/2510.12269v3}{arXiv:2510.12269v3} \quad 26 October 2026}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}{The main idea is a shared computational grammar}
  \begin{block}{One-sentence takeaway}
    A Datalog rule can be evaluated as a Boolean tensor contraction followed by a threshold; the same index grammar also describes numerical AI models.
  \end{block}
  \[
    \text{join} \;\longrightarrow\; \text{sum over hidden indices}
    \;\longrightarrow\; \text{optional nonlinearity}
  \]
  \begin{itemize}
    \item The paper supplies language semantics and illustrative model encodings.
    \item Its runtime and embedding-reliability claims are proposals to test.
  \end{itemize}
  \papersource{Domingos, Secs. 1 and 3--6, PDF pp. 1--16.}
\end{frame}

\begin{frame}{The desired language spans three existing strengths}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.31\textwidth}
      \begin{block}{Logic programming}
        Facts, rules, and sound deduction for the Boolean fragment.
      \end{block}
    \end{column}
    \begin{column}{0.31\textwidth}
      \begin{block}{Tensor frameworks}
        Differentiation and regular dense computation on accelerators.
      \end{block}
    \end{column}
    \begin{column}{0.31\textwidth}
      \begin{block}{Graphical models}
        Factor products and marginalization over variables.
      \end{block}
    \end{column}
  \end{columns}
  \medskip
  \centering
  \alert{Goal: express all three with indexed equations.}
  \papersource{Paper, Sec. 1, PDF pp. 1--2.}
\end{frame}

\begin{frame}{A Datalog rule is a join followed by projection}
  \[
    \operatorname{Aunt}(x,z)
    \leftarrow \operatorname{Sister}(x,y),\operatorname{Parent}(y,z)
  \]
  \begin{enumerate}
    \item Join facts that agree on the shared variable $y$.
    \item Project away $y$: keep only $(x,z)$.
    \item A fact is true if at least one witness $y$ exists.
  \end{enumerate}
  \begin{block}{Teaching example}
    Sister(Alice, Bob) and Parent(Bob, Charlie) derive Aunt(Alice, Charlie).
  \end{block}
  \papersource{Paper, Secs. 2.1 and 3.1, PDF pp. 2--5. Example instantiation for discussion.}
\end{frame}

\begin{frame}{Boolean contraction implements the rule}
  \[
    A_{xz}=H\!\left(\sum_y S_{xy}P_{yz}\right),
    \qquad H(t)=\begin{cases}1&t>0\\0&t\leq 0\end{cases}
  \]
  \begin{itemize}
    \item Multiplication enforces simultaneous facts for one $y$.
    \item Summation enumerates witnesses; $H$ turns any positive count into truth.
    \item The Boolean inputs and threshold are essential to the logical reading.
  \end{itemize}
  \papersource{Paper, Sec. 3.1, PDF p. 5.}
\end{frame}

\begin{frame}{Join and projection are the language primitives}
  \[
    (U\Join V)_{\alpha\beta\gamma}
      =U_{\alpha\beta}V_{\beta\gamma},\qquad
    \pi_{\alpha}(T)=\sum_{\beta}T_{\alpha\beta}.
  \]
  \begin{itemize}
    \item Join retains shared indices $\beta$; projection removes indices absent from the left-hand side.
    \item No shared index gives a tensor product; all shared indices give pointwise multiplication.
    \item For Boolean relations, projection plus threshold recovers database projection.
  \end{itemize}
  \papersource{Paper, Sec. 3.1, PDF pp. 5--6.}
\end{frame}

\begin{frame}{A program is a set of indexed equations}
  \[
    \texttt{Y = step(W[i] X[i])}
    \qquad
    \texttt{Y[i] = step(W[i] X[i])}
  \]
  \begin{itemize}
    \item An index absent from the left-hand side is summed out; a retained index is not.
    \item Missing tensor entries default to zero; equations with the same output are summed.
    \item Boolean facts use Datalog-style parentheses; numerical tensors use brackets.
  \end{itemize}
  \begin{block}{Consequence}
    One syntax can encode both sparse facts and dense numerical transformations.
  \end{block}
  \papersource{Paper, Sec. 3.1, PDF pp. 5--7.}
\end{frame}

\begin{frame}{Inference can be data driven or query driven}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.47\textwidth}
      \begin{block}{Forward chaining}
        Execute applicable equations repeatedly; stop when no new elements appear or a criterion is met.
      \end{block}
    \end{column}
    \begin{column}{0.47\textwidth}
      \begin{block}{Backward chaining}
        Start from a query; recursively evaluate only its required input tensor elements.
      \end{block}
    \end{column}
  \end{columns}
  \medskip
  \alert{Exact Datalog soundness applies to the Boolean rule fragment.}
  \papersource{Paper, Secs. 2.1 and 3.2, PDF pp. 3, 7.}
\end{frame}

\begin{frame}{Differentiation preserves the index structure}
  \[
    Y_{ij}=\sum_k M_{ik}X_{kj}
    \quad\Rightarrow\quad
    \frac{\partial L}{\partial M_{ik}}
      =\sum_j\frac{\partial L}{\partial Y_{ij}}X_{kj}.
  \]
  \begin{itemize}
    \item The gradient is another join and projection of tensors.
    \item Losses are equations; parameters are tensors not supplied as data.
    \item Example-specific derivations motivate backpropagation through structure.
  \end{itemize}
  \papersource{Paper, Sec. 3.3, PDF pp. 7--8. Full loss-gradient equation expanded for teaching.}
\end{frame}

\begin{frame}{The paper encodes four AI paradigms}
  \renewcommand{\arraystretch}{1.2}
  \begin{tabular}{p{0.25\textwidth}p{0.65\textwidth}}
    \toprule
    Paradigm & Core correspondence \\
    \midrule
    Neural models & Indexed linear maps, aggregations, activations \\
    Symbolic AI & Datalog facts and rules as Boolean equations \\
    Kernel machines & Kernel values join support-vector weights \\
    Graphical models & Factors as tensors; marginals as projections \\
    \bottomrule
  \end{tabular}
  \medskip
  \alert{These are expression examples, not experimental comparisons.}
  \papersource{Paper, Sec. 4, Tables 1--3, PDF pp. 8--13.}
\end{frame}

\begin{frame}{A GNN is indexed neighborhood aggregation}
  \[
    \mathrm{Agg}_{nld}
      =\sum_{n'}\mathrm{Neig}_{nn'}Z_{n'ld}.
  \]
  \begin{itemize}
    \item $\mathrm{Neig}_{nn'}$ is the graph relation; $Z$ is a transformed node feature.
    \item Join selects neighbors and projection sums their messages.
    \item A later equation combines neighbor and self representations.
  \end{itemize}
  \papersource{Paper, Sec. 4.1 and Table 1, PDF pp. 9--10.}
\end{frame}

\begin{frame}{Attention becomes a sequence of contractions}
  \[
    Q=XW_Q,\quad K=XW_K,\quad V=XW_V,
  \]
  \[
    C_{pp'}=\operatorname{softmax}_{p'}\!\left(
       \frac{\sum_d Q_{pd}K_{p'd}}{\sqrt{D_k}}\right),\qquad
    \mathrm{Attn}_{pd_v}=\sum_{p'}C_{pp'}V_{p'd_v}.
  \]
  \begin{itemize}
    \item Position, block, head, and feature are explicit tensor indices.
    \item Table 2 sketches embedding, attention, residual flow, and output.
  \end{itemize}
  \papersource{Paper, Sec. 4.1 and Table 2, PDF pp. 10--11. Formula restated from the prose; table syntax is schematic.}
\end{frame}

\begin{frame}{Symbolic rules and kernel machines fit the same grammar}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.47\textwidth}
      \begin{block}{Symbolic AI}
        Datalog rules are Boolean tensor equations. Function-free reasoning and planning inherit the rule representation.
      \end{block}
    \end{column}
    \begin{column}{0.47\textwidth}
      \begin{block}{Kernel machine}
        $Y(Q)=f\!\left(\sum_i a_i y_i K(Q,i)+b\right)$ joins each support vector with its kernel similarity.
      \end{block}
    \end{column}
  \end{columns}
  \medskip
  Prolog-style functions would need a unification mechanism.
  \papersource{Paper, Secs. 4.2--4.3, PDF p. 11.}
\end{frame}

\begin{frame}{Graphical-model operations map directly}
  \[
    P(x)=\frac{1}{Z}\prod_k\phi_k(x_{\{k\}}),
    \qquad \phi'(X)=\sum_Y\phi(X,Y).
  \]
  \begin{itemize}
    \item Factor $\leftrightarrow$ nonnegative tensor; factor product $\leftrightarrow$ join.
    \item Marginalization $\leftrightarrow$ projection; conditioning needs normalization.
    \item Join-tree inference is linear in \emph{tree size}, which may be exponential in the original graph.
  \end{itemize}
  \papersource{Paper, Sec. 4.4 and Table 3, PDF pp. 12--13.}
\end{frame}

\begin{frame}{Random embeddings encode sets approximately}
  \[
    s=\sum_{x\in S}e_x,\qquad
    \operatorname{score}(a)=s^{\top}e_a.
  \]
  \begin{itemize}
    \item With random unit vectors, members score near $1$ and nonmembers near $0$.
    \item Paper's noise scale: $\sqrt{N/D}$ for set size $N$, embedding dimension $D$.
    \item Threshold $1/2$ trades memory for a nonzero probability of error.
  \end{itemize}
  \papersource{Paper, Sec. 5, PDF p. 13.}
\end{frame}

\begin{frame}{Outer-product superposition encodes a relation}
  \[
    E_R=\sum_{(x,y)\in R}e_x\otimes e_y,
    \qquad \widehat R(a,b)=e_a^{\top}E_Re_b.
  \]
  \begin{itemize}
    \item A tuple contributes an outer product of its two object vectors.
    \item Querying contracts the stored tensor with both argument vectors.
    \item Other tuples create cross-term noise when embeddings are not orthogonal.
  \end{itemize}
  \papersource{Paper, Sec. 5, PDF pp. 13--14.}
\end{frame}

\begin{frame}{Rules can operate on embedded relations}
  \begin{block}{Author's proposal}
    Embed rule antecedents and consequents; run forward or backward chaining over the resulting tensor equations.
  \end{block}
  \begin{itemize}
    \item Near-orthogonal random vectors make extracted facts approximately correct.
    \item The paper suggests periodic extraction, thresholding, and re-embedding to limit error.
    \item It gives no end-to-end error bound across long derivations.
  \end{itemize}
  \papersource{Paper, Sec. 5, PDF pp. 14--15. Final point is our assessment.}
\end{frame}

\begin{frame}{Learned embeddings add analogical transfer}
  \[
    G_{xx'}=e_x^{\top}e_{x'}.
  \]
  \begin{itemize}
    \item $G$ is a Gram matrix of object similarities.
    \item Similar objects can ``borrow'' one another's inferences.
    \item This is continuous generalization, distinct from exact Boolean deduction.
  \end{itemize}
  \begin{block}{What must be controlled}
    Similarity leakage, thresholding, and error accumulation during chaining.
  \end{block}
  \papersource{Paper, Sec. 5, PDF pp. 14--15.}
\end{frame}

\begin{frame}{Zero temperature does not imply exact deduction}
  \[
    e_a=(1,0),\quad e_b=(0.8,0.6),\quad G_{ab}=0.8,
  \]
  \[
    \sigma(G_{ab},T)=\frac{1}{1+e^{-0.8/T}}
        \;\xrightarrow[T\to0^+]{}\;1.
  \]
  \begin{itemize}
    \item Both are unit vectors, yet the off-diagonal match survives.
    \item Taking $T\to0$ thresholds similarity signs; it does not make arbitrary $G$ the identity.
    \item Exact deduction therefore needs additional matching constraints or discrete recovery.
  \end{itemize}
  \papersource{Paper claim: Sec. 5, PDF p. 15. Counterexample and inference: this discussion.}
\end{frame}

\begin{frame}{Scaling has two proposed implementation routes}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.47\textwidth}
      \begin{block}{Sparse + dense split}
        Database engine handles sparse joins; GPUs handle dense subtensor operations.
      \end{block}
    \end{column}
    \begin{column}{0.47\textwidth}
      \begin{block}{Compressed dense route}
        Embed or decompose sparse relations, then evaluate dense contractions on GPUs.
      \end{block}
    \end{column}
  \end{columns}
  \medskip
  Cost depends on sparsity, representation rank, target error, and query structure.
  \papersource{Paper, Sec. 6, PDF pp. 15--16. Cost conditions are our assessment.}
\end{frame}

\begin{frame}{The evidence is expressive, not empirical}
  \renewcommand{\arraystretch}{1.25}
  \begin{tabular}{p{0.32\textwidth}p{0.57\textwidth}}
    \toprule
    Claim & Evidence in the paper \\
    \midrule
    Shared rule/tensor syntax & Definitions and worked equations \\
    Model expressibility & GNN, transformer, kernel, and factor examples \\
    Fast large-scale execution & Two implementation proposals; no benchmark \\
    Embedding soundness & No proof; low-$T$ counterexample \\
    \bottomrule
  \end{tabular}
  \papersource{Paper, Secs. 3--6, PDF pp. 4--16; final assessment is ours.}
\end{frame}

\begin{frame}{Takeaways for a research agenda}
  \begin{enumerate}
    \item The join--projection--threshold bridge is the paper's strongest concrete insight.
    \item A useful language needs executable semantics, sparse/dense planning, and differentiation rules.
    \item Embedding-space deduction requires explicit correctness conditions and measured error growth.
  \end{enumerate}
  \medskip
  \begin{block}{Discussion question}
    Which operations should stay exact, and where is approximate analogical transfer worth its cost?
  \end{block}
  \papersource{Paper, Secs. 3--7, PDF pp. 4--16; research priorities are our synthesis.}
\end{frame}

\end{document}
