<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://lucpommeret.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://lucpommeret.com/" rel="alternate" type="text/html" /><updated>2026-11-18T16:12:19+00:00</updated><id>https://lucpommeret.com/feed.xml</id><title type="html">Luc Pommeret</title><subtitle>PhD student (CIFRE) at SCIAM and the LISN (CNRS). Small language models, efficient and adaptive training.</subtitle><entry xml:lang="fr"><title type="html">Le paradigme connexioniste et la question de la définition</title><link href="https://lucpommeret.com/2025/12/19/connexionnisme-definition-fr.html" rel="alternate" type="text/html" title="Le paradigme connexioniste et la question de la définition" /><published>2025-12-19T00:00:00+00:00</published><updated>2025-12-19T00:00:00+00:00</updated><id>https://lucpommeret.com/2025/12/19/connexionnisme-definition-fr</id><content type="html" xml:base="https://lucpommeret.com/2025/12/19/connexionnisme-definition-fr.html"><![CDATA[<p><em>Ce texte est une adaptation d’un mini-mémoire rendu à Pierre Wagner (Paris I) en décembre 2025, dans le cadre du cours de philosophie de la logique ayant obtenu la note de 18/20.</em></p>

<h2 id="introduction">Introduction</h2>

<p>L’intelligence artificielle contemporaine, et particulièrement l’apprentissage automatique connexionniste, semble opérer selon des principes radicalement différents de ceux qui gouvernent la pratique traditionnelle de la définition. Là où le logicien construit des définitions explicites respectant les critères stricts d’éliminabilité et de non-créativité, le réseau de neurones apprend des représentations vectorielles distribuées dont le statut épistémologique demeure incertain. Cette situation soulève un problème : comment la représentation vectorielle des concepts dans les modèles connexionnistes se rapporte-t-elle à ce qu’est une définition au sens classique du terme ?</p>

<p>La question n’est pas simplement technique. Elle engage notre compréhension même de ce que signifie définir, circonscrire un concept, tracer les limites du sens. La théorie classique de la définition [Wagner, 2017] établit avec rigueur les exigences que toute définition légitime doit satisfaire : l’éliminabilité du défini, la non-créativité ou conservativité, l’univocité du <em>definiendum</em>. Ces critères, forgés dans la tradition logique et philosophique, du Pascal de <em>De l’esprit géométrique</em> [Pascal, 1657] à Frege [Frege, 1884] et Russell [Russell, 1905], constituent notre point de départ obligé.</p>

<p>Or le paradigme connexionniste, fondé sur l’hypothèse distributionnelle de Firth selon laquelle « on connaît un mot par ses fréquentations » [Firth, 1957], propose un mode d’accès au sens qui semble contourner la définition explicite. Un mot n’y est plus défini par un <em>definiens</em> substituable, mais représenté par un vecteur dans un espace de haute dimension, dont la signification émerge de sa position relative par rapport aux autres vecteurs. Sommes-nous encore dans l’ordre de la définition ?</p>

<p>Ce mini-mémoire se propose d’examiner cette tension à travers trois moments. Nous établirons d’abord ce qu’est une définition au sens classique, en nous appuyant principalement sur la théorie de la définition [Wagner, 2017]. Nous interrogerons ensuite le statut des représentations vectorielles au regard des critères classiques. Enfin, nous chercherons à déterminer si le paradigme connexionniste invalide la théorie classique ou en révèle au contraire une forme implicite et élargie.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></p>

<h2 id="lédifice-classique-de-la-définition">L’édifice classique de la définition</h2>

<h3 id="les-fonctions-de-la-définition">Les fonctions de la définition</h3>

<p>Avant d’examiner les règles formelles de la définition, il convient d’en rappeler la diversité fonctionnelle. La théorie classique distingue plusieurs modalités définitionnelles qui ne poursuivent pas les mêmes objectifs [Wagner, 2017].</p>

<p>La distinction entre définition <em>nominale</em> et définition <em>réelle</em>, héritée de la scolastique médiévale et reprise par Pascal, oppose deux visées. La définition nominale (<em>definitio nominis</em>) se contente d’expliquer l’usage d’un mot ou d’introduire une abréviation commode. Pascal affirme ainsi que « les définitions ne sont faites que pour désigner les choses que l’on nomme, et non pas pour en montrer la nature » [Wagner, 2017]. À l’inverse, la définition réelle (<em>definitio rei</em>), dans la tradition aristotélicienne, prétend saisir l’essence de la chose, dire ce qu’elle est en elle-même.</p>

<p>Une seconde distinction sépare les définitions <em>stipulatives</em> des définitions <em>descriptives</em>. Les premières introduisent un sens nouveau par décision arbitraire (« soit $x$ le plus petit nombre premier »), tandis que les secondes rapportent l’usage établi au sein d’une communauté linguistique, comme le fait le lexicographe [Wagner, 2017].</p>

<p>Enfin, et c’est peut-être la distinction la plus pertinente pour notre propos, on oppose définitions <em>explicites</em> et définitions <em>implicites</em>. Une définition explicite permet la substitution directe du <em>definiendum</em> par le <em>definiens</em>. Une définition implicite, au sens de Gergonne et Hilbert, définit les termes primitifs non pas isolément, mais par leurs relations mutuelles au sein d’un système d’axiomes [Wagner, 2017]. Les axiomes de la géométrie hilbertienne, par exemple, définissent implicitement « point », « droite » et « plan » par les relations structurelles qu’ils imposent à ces termes.</p>

<h3 id="léliminabilité-du-défini">L’éliminabilité du défini</h3>

<p>Le premier critère de la théorie classique est celui de l’<em>éliminabilité</em>. Une définition est essentiellement une abréviation. Si un terme $T$ est défini par une expression $P$, alors dans toute proposition où $T$ apparaît, il doit être possible de remplacer $T$ par $P$ sans altérer la valeur de vérité de la proposition [Wagner, 2017].</p>

<p>Formellement, si nous introduisons un nouveau symbole $s$ dans un langage $\mathcal{L}$ via une définition $\delta$, le langage étendu $\mathcal{L}’$ ne doit contenir aucun contenu sémantique irréductible à $\mathcal{L}$. La définition « 1 = S(0) » (où $S$ est la fonction successeur) nous permet d’éliminer systématiquement le symbole « 1 » de toute formule arithmétique.</p>

<p>Cette exigence d’éliminabilité garantit qu’une définition n’est pas un enrichissement ontologique du langage, mais simplement un instrument de concision. Comme le notent Arnauld et Nicole, le soin apporté aux définitions permet d’« abréger le discours », mais à condition de pouvoir toujours « substituer mentalement la définition à la place du défini » [Wagner, 2017].</p>

<p>Toutefois, l’éliminabilité n’est pas toujours une simple substitution terme à terme. Dans le cas des définitions contextuelles, comme celle de la conjonction logique $\land$ définie à partir de la négation $\neg$ et du conditionnel $\to$, on ne peut substituer directement $\land$ par une expression fixe ; il faut remplacer tout le contexte $(A \land B)$ par $\neg(A \to \neg B)$ [Wagner, 2017].</p>

<p>De surcroît, l’éliminabilité ne vaut que dans certains contextes. Le mot « premier » est éliminable au profit de « divisible par deux nombres exactement » dans le contexte « 13 est… », mais non dans le contexte « Léa ignore que 13 est… », où le principe de substituabilité des identiques ne s’applique pas [Wagner, 2017].</p>

<h3 id="la-non-créativité-et-la-conservativité">La non-créativité et la conservativité</h3>

<p>Le second critère est celui de <em>non-créativité</em> ou de <em>conservativité</em>. Une définition purement définitionnelle ne doit pas permettre de démontrer quoi que ce soit sur les termes primitifs qui n’était déjà démontrable avant son introduction [Wagner, 2017].</p>

<p>Cette exigence peut être formalisée ainsi : soit $\mathcal{L}$ un langage dans lequel est formulée une théorie $T$, et soit $\mathcal{L}’$ le langage obtenu par adjonction d’un mot $m$ défini par $\delta$. On dit que $\delta$ satisfait la condition de conservativité relativement à $T$ si, et seulement si, tout énoncé de $\mathcal{L}$ démontrable à partir de $T \cup {\delta}$ est également démontrable à partir de $T$ seul [Wagner, 2017].</p>

<p>Autrement dit, si $T$ représente nos connaissances et $\delta$ une définition, alors $\delta$ ne doit pas enrichir notre stock de connaissances exprimables dans le langage original. Une définition qui violerait ce principe ne serait pas purement conceptuelle ; elle véhiculerait un contenu épistémique.</p>

<p>Un exemple classique l’illustre bien. La pseudo-définition « Alpha est le plus grand nombre premier » est créative, car elle contredit le théorème d’Euclide sur l’infinitude des nombres premiers [Wagner, 2017]. Plus dramatique encore, la définition russellienne de l’ensemble $E$ de tous les ensembles qui ne s’appartiennent pas à eux-mêmes engendre directement la contradiction $E \in E \leftrightarrow E \notin E$ [Wagner, 2017].</p>

<h3 id="la-définition-implicite-au-sens-de-gergonne-et-hilbert">La définition implicite au sens de Gergonne et Hilbert</h3>

<p>La théorie classique consacre une analyse importante à la définition implicite, qu’elle distingue soigneusement de la définition explicite [Wagner, 2017]. Dans la géométrie hilbertienne, les termes primitifs « point », « droite », « plan » ne sont pas définis isolément par des <em>definiens</em> explicites. Ils sont définis globalement par l’ensemble des axiomes qui contraignent leurs interprétations possibles.</p>

<p>Cette conception relationnelle et holiste de la définition renonce à l’idéal d’une signification intrinsèque, donnée en dehors de toute structure. Le « sens » d’un point est défini exclusivement par son comportement au sein du système axiomatique. Il n’a pas d’essence hors de ses relations.</p>

<h2 id="le-paradigme-connexionniste-comme-défi-à-la-théorie-classique">Le paradigme connexionniste comme défi à la théorie classique</h2>

<h3 id="lhypothèse-distributionnelle">L’hypothèse distributionnelle</h3>

<p>Le traitement automatique des langues contemporain repose sur un principe qui semble étranger à la logique de la définition explicite : l’<em>hypothèse distributionnelle</em>, formulée par le linguiste John Rupert Firth en 1957 : « You shall know a word by the company it keeps » — on connaît un mot par ses fréquentations [Firth, 1957].<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup></p>

<p>Cette maxime déplace radicalement le fondement du sens. Dans la logique classique, l’identité est absolue : $A = A$. Dans la sémantique distributionnelle, l’identité devient similitude : $A \approx B$ si et seulement si $\text{Contexte}(A) \approx \text{Contexte}(B)$. Le sens n’est plus une propriété intrinsèque, une essence à capturer par un <em>definiens</em>, mais une fonction de la distribution contextuelle du mot.</p>

<p>La réalisation technique de cette hypothèse est le <em>plongement de mots</em> (<em>word embedding</em>), où chaque mot est projeté vers un vecteur dans un espace de haute dimension $\mathbb{R}^d$ [Mikolov et al., 2013; Pennington et al., 2014]. La « définition » du mot « chat » devient un vecteur de 512 nombres réels. Ce vecteur encode les co-occurrences statistiques du mot dans un vaste corpus.</p>

<h3 id="lembedding-comme-structuralisme-mathématisé">L’embedding comme structuralisme mathématisé</h3>

<p>Qu’est-ce qu’un vecteur d’embedding <em>en tant que</em> définition ? La réponse engage une ontologie du sens radicalement différente de celle qui sous-tend la définition classique.</p>

<p>Dans la tradition aristotélicienne et logiciste, définir un terme consiste à en exhiber le <em>contenu intrinsèque</em> : « un triangle est une figure fermée à trois côtés ». Le <em>definiens</em> énonce des propriétés essentielles que possède l’objet défini, indépendamment de toute relation à d’autres objets. Le sens est conçu comme une substance sémantique attachée au signe.</p>

<p>Le vecteur d’embedding rompt avec cette métaphysique substantialiste. Le vecteur $\vec{v}_{\text{chat}} \in \mathbb{R}^{512}$ ne porte en lui-même aucune propriété sémantique intrinsèque. Considéré isolément, ce tuple de 512 nombres réels est dépourvu de signification. Il ne devient porteur de sens que par sa <em>position relative</em> dans l’espace vectoriel — c’est-à-dire par ses distances aux autres vecteurs.</p>

<p>Cette conception réalise mathématiquement l’intuition structuraliste de Ferdinand de Saussure, pour qui « dans la langue, il n’y a que des différences sans termes positifs ». Le sens d’un mot ne lui appartient pas en propre ; il émerge du système de différences qui structure la langue comme totalité. L’embedding vectoriel donne une forme géométrique précise à cette idée : le sens de « chat » est sa différence métrique avec « chien » (distance faible), « table » (distance moyenne), « idée » (distance forte), et tous les autres termes du vocabulaire.</p>

<p>On peut donc dire que l’embedding est une <em>définition purement oppositionnelle</em> : « chat » est défini par n’être ni « chien », ni « maison », ni « courir », selon un système de distances euclidiennes dans $\mathbb{R}^d$. Là où la définition classique répond à la question « qu’est-ce que $X$ ? » par une formule positive (« $X$ est $P$ »), la définition vectorielle répond par une localisation négative : « $X$ occupe cette position dans le réseau des différences ».</p>

<p>Cette ontologie a une conséquence immédiate : elle invalide l’exigence classique d’<em>univocité</em>. Pierre Wagner insiste sur le fait qu’un <em>definiendum</em> doit avoir un sens fixe et unique. Or un vecteur d’embedding n’a pas d’identité stable hors du système qui le produit. Que l’on change le corpus d’entraînement, l’architecture du réseau ou les hyperparamètres, et « chat » recevra un vecteur numériquement distinct. Le sens n’est pas une essence immuable, mais une configuration instable et révisable.</p>

<h3 id="géométrie-et-invariance--lidentité-à-une-rotation-près">Géométrie et Invariance : l’identité à une rotation près</h3>

<p>L’arbitraire du signe saussurien trouve son écho mathématique dans l’arbitraire des bases vectorielles. Un réseau de neurones peut être soumis à une rotation globale sans que ses propriétés fonctionnelles ne changent. Ce qui compte, ce ne sont pas les coordonnées absolues des neurones individuellement ($x_i$), mais les relations géométriques qui les unissent.</p>

<p>Nous pouvons formaliser cette intuition par l’analyse des fonctions de coût et des métriques de similarité. L’apprentissage du modèle est piloté par la minimisation de l’entropie croisée (Cross-Entropy) entre la distribution prédite $q$ et la distribution cible $p$.</p>

\[\begin{align}
    H(p, q) &amp;= -\sum_{x \in \mathcal{X}} p(x) \log q(x) \\
    &amp;= -\mathbb{E}_{x \sim p} [\log q(x)]
\end{align}\]

<p>Cette quantité force les représentations internes à s’organiser de manière à maximiser la séparabilité linéaire des classes ou la probabilité du token suivant.</p>

<p>Mais comment comparer ces représentations ? Si l’on entraîne deux modèles identiques avec des initialisations aléatoires différentes, les vecteurs pour « chat » seront numériquement très différents. Pourtant, ils capturent la même « définition ». Il nous faut donc une mesure de similarité qui soit invariante par rotation et permutation orthogonale.</p>

<p>La distance euclidienne classique $|\vec{u} - \vec{v}|$ est sensible à la norme. Les informaticiens en traitement du langage naturel lui préfèrent souvent la similarité cosinus, qui ne considère que l’angle :</p>

\[\begin{align}
    \text{sim}(\vec{u}, \vec{v}) &amp;= \frac{\vec{u} \cdot \vec{v}}{\|\vec{u}\| \|\vec{v}\|} \\
    &amp;= \cos(\theta)
\end{align}\]

<p>Cependant, pour comparer des espaces de représentation entiers (par exemple, la couche 3 du modèle A et la couche 3 du modèle B), la mesure la plus robuste est l’alignement de noyau centré (<em>Centered Kernel Alignment</em>, CKA). Elle permet de quantifier la similarité entre deux matrices de représentations $X \in \mathbb{R}^{n \times d_1}$ et $Y \in \mathbb{R}^{n \times d_2}$ de manière invariante aux transformations orthogonales :</p>

\[\begin{align}
    \text{CKA}(K, L) &amp;= \frac{\text{HSIC}(K, L)}{\sqrt{\text{HSIC}(K, K)\text{HSIC}(L, L)}}
\end{align}\]

<p>où $K = XX^T$ et $L = YY^T$ sont les matrices de similarité (kernels) entre exemples. Si $X’ = XQ$ avec $Q$ une matrice orthogonale, alors $K’ = (XQ)(XQ)^T = XQQ^TX^T = XX^T = K$. L’invariance est ainsi mathématiquement garantie.</p>

<p>Cette invariance mathématique n’est pas un simple détail technique. Elle révèle une thèse ontologique forte : la « définition » d’un concept dans un réseau de neurones n’est pas le vecteur particulier (qui dépend de l’initialisation aléatoire), mais la structure géométrique invariante sous transformations isométriques. C’est une forme de <em>réalisme structural</em> : ce qui est réel, ce n’est pas la substance (les coordonnées numériques), mais la forme (les relations métriques). Cette position rappelle Poincaré et Maxwell pour qui ce qui survit aux changements de représentation constitue le contenu objectif de la connaissance scientifique. La « définition » véritable est donc la géométrie relative du nuage de points, non ses coordonnées contingentes.</p>

<h3 id="la-définition-comme-calcul-dattention">La définition comme calcul d’attention</h3>

<p>Une limite majeure des premiers modèles vectoriels (type Word2Vec) résidait dans le caractère statique de la définition : un mot recevait un vecteur unique, indépendamment de ses acceptions variées. L’architecture des Transformeurs [Vaswani et al., 2017] résout ce problème en rendant la définition <em>dynamique</em> grâce au mécanisme d’attention.</p>

<p>Dans ce formalisme, le sens d’un token n’est pas donné, il est calculé. Pour un token à la position $i$, on projette son vecteur initial $x_i$ vers trois espaces distincts : une requête $q_i$ (<em>query</em>), une clé $k_i$ (<em>key</em>) et une valeur $v_i$ (<em>value</em>), par multiplication avec des matrices apprises $W^Q, W^K, W^V$.</p>

<p>La contribution sémantique de chaque mot du contexte $j$ au mot cible $i$ est déterminée par un score d’attention $A_{i,j}$, calculé comme la compatibilité entre la requête de l’un et la clé de l’autre :</p>

\[A_{i,j} = \text{Softmax}_j \left( \frac{q_i \cdot k_j^T}{\sqrt{d_k}} \right)\]

<p>La représentation finale $z_i$ du mot est alors la somme pondérée des valeurs de tous les mots du contexte :</p>

\[z_i = \sum_{j} A_{i,j} v_j\]

<p>Cette équation donne une forme mathématique précise à l’idée de définition contextuelle. Le « sens » $z_i$ est littéralement la somme des traces laissées par les autres mots ($v_j$), pondérées par leur pertinence contextuelle ($A_{i,j}$).</p>

<h3 id="la-polysémie-contextuelle-comme-réfutation-de-lunivocité">La polysémie contextuelle comme réfutation de l’univocité</h3>

<p>La théorie classique de la définition se heurte à un obstacle empirique majeur : la <em>polysémie contextuelle</em>. Un même mot possède souvent plusieurs sens apparentés mais distincts. La définition classique traite ce phénomène comme une ambiguïté à lever : « banque$_1$ » = institution financière, « banque$_2$ » = bord d’un cours d’eau. Le contexte joue alors le rôle de <em>sélecteur</em> entre ces significations préétablies.</p>

<p>Mais cette conception se révèle inadéquate face à des énoncés comme « j’ai dormi sur la banque ». Quelle acception de « banque » y est sélectionnée ? Ni l’institution financière ni le bord du fleuve ne conviennent — à moins de supposer un troisième sens, « banque$_3$ » = meuble. Or cette multiplication <em>ad hoc</em> des acceptions révèle l’échec de la stratégie : plutôt qu’une définition unique avec des sens préétablis, nous avons une infinité potentielle de micro-sens ajustés au contexte.</p>

<p>Le problème est plus profond encore. Considérons « la température monte ». S’agit-il d’un thermomètre, de la fièvre, de la tension sociale ? La définition classique exigerait de stipuler par avance tous les sens possibles de « monter », ou d’introduire un <em>definiens</em> suffisamment abstrait pour les couvrir tous (« augmenter selon une dimension scalaire »). Mais cette dernière option revient à admettre que le sens concret de « monter » dans chaque contexte ne peut être <em>déduit</em> de la définition générale — il doit être <em>construit</em> par interprétation contextuelle.</p>

<p>C’est ici que le mécanisme d’attention des transformeurs révèle son importance philosophique. Rappelons l’équation :</p>

\[z_i = \sum_{j} A_{i,j} v_j\]

<p>Cette formule montre que la représentation finale $z_i$ du mot $i$ n’est pas <em>sélectionnée</em> parmi un stock de sens préétablis, mais <em>calculée dynamiquement</em> par agrégation pondérée des contributions de tous les mots contextuels $v_j$. Dans « j’ai dormi sur la banque », le vecteur final de « banque » incorpore des traces sémantiques de « dormi » et « sur », produisant une représentation <em>sui generis</em> qui n’existait pas avant le calcul.</p>

<p>Le sens n’est donc pas consultation d’un dictionnaire mental, mais <em>computation</em>. Cette idée trouve un écho dans la philosophie du langage ordinaire. Wittgenstein, dans les <em>Recherches philosophiques</em>, affirme : « Ne demandez pas le sens, demandez l’usage » (§43). Pour lui, le sens d’un mot n’est pas une entité fixe associée au mot, mais sa manière d’être employé dans les jeux de langage.</p>

<p>Le mécanisme d’attention est une formalisation mathématique de cette intuition wittgensteinienne : le « sens » de « banque » dans une phrase donnée est littéralement son <em>usage</em> dans cette configuration syntaxique et sémantique particulière, encodé comme vecteur résultant.<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup> La définition cesse d’être un stock <em>a priori</em> de significations, pour devenir un processus <em>in situ</em> de construction du sens.</p>

<p>Ceci invalide la présupposition centrale de la théorie classique : que définir consiste à <em>fixer</em> le sens une fois pour toutes. Le paradigme connexionniste montre au contraire que le sens est constitutivement <em>variable</em>, <em>contextuel</em> et <em>émergent</em>.</p>

<h3 id="léliminabilité-violée">L’éliminabilité violée</h3>

<p>Confrontons cette pratique au critère classique d’éliminabilité. Peut-on éliminer un vecteur d’embedding au profit d’une expression linguistique qui lui serait synonyme ?</p>

<p>La réponse est manifestement négative. Le vecteur $\vec{v}_{\text{roi}}$ n’est pas une chaîne de symboles du langage. C’est une entité mathématique d’une nature ontologique radicalement différente — un point dans $\mathbb{R}^{512}$. On ne peut « substituer mentalement » ce vecteur au mot « roi » dans une phrase ordinaire. La traduction du mot en vecteur n’est pas une substitution de symboles équivalents, mais une projection dans un espace phénoménologique distinct.</p>

<p>De surcroît, cette projection est « lossy » — elle perd de l’information, ou du moins transforme irréversiblement la nature de l’information. Le vecteur capture une distribution statistique, non un sens compositionnel au sens traditionnel. Il n’y a pas d’équivalence stricte au sens classique, mais une correspondance probabiliste. La question de la compositionnalité dans les modèles de langue, notamment les architectures à transformeurs [Vaswani et al., 2017] et les modèles contextuels comme BERT [Devlin et al., 2019], fait l’objet de recherches actives [Pommeret et al., 2025].</p>

<h3 id="créativité-apparente-ou-découverte-structurelle-">Créativité apparente ou découverte structurelle ?</h3>

<p>Le second critère classique — la non-créativité — semble violé de manière flagrante par les modèles connexionnistes. Les relations vectorielles permettent des inférences célèbres du type :</p>

\[\vec{v}_{\text{Roi}} - \vec{v}_{\text{Homme}} + \vec{v}_{\text{Femme}} \approx \vec{v}_{\text{Reine}}\]

<p>Cette « arithmétique vectorielle » produit des connaissances qui n’étaient pas explicitement encodées dans les définitions individuelles des termes. Si $T$ désigne notre théorie du langage et $\delta$ la représentation vectorielle de « roi », alors $T \cup {\delta}$ permet d’inférer des relations sémantiques (roi:homme::reine:femme) qui n’étaient pas démontrables dans $T$. En ce sens, la définition vectorielle est <em>créative</em> : elle enrichit notre stock de connaissances.</p>

<p>Mais cette « créativité » est-elle réelle ou apparente ? La question mérite d’être examinée avec soin.</p>

<p>D’un côté, on peut soutenir que l’inférence « roi - homme + femme = reine » ne crée aucune connaissance nouvelle, mais <em>révèle</em> une structure sémantique latente déjà présente dans l’usage linguistique. Cette relation d’analogie entre royauté et genre était implicitement contenue dans la manière dont les locuteurs emploient ces mots. Le modèle vectoriel ne fait que <em>rendre explicite</em> ce qui était déjà implicitement connaissable — exactement comme le géomètre qui démontre un théorème rend explicite ce qui était implicite dans les axiomes.</p>

<p>Dans cette perspective, le critère de non-créativité n’est pas violé. Si l’on définit $T$ non pas comme un ensemble fini de propositions explicites, mais comme l’ensemble de toutes les vérités sémantiques implicites dans l’usage linguistique d’une communauté, alors la relation « roi:homme::reine:femme » était déjà dans $T$. Le modèle connexionniste n’ajoute rien ; il <em>extrait</em>.</p>

<p>Toutefois, cette réponse soulève une objection importante. Chomsky et les symbolistes objecteraient que les régularités statistiques de surface ne capturent pas la structure profonde du langage — les règles syntaxiques universelles, innées, qui génèrent la compétence linguistique. L’arithmétique vectorielle « roi - homme + femme = reine » serait alors un artefact superficiel, non une découverte structurelle authentique.</p>

<p>Mais on peut retourner l’argument : et si la « structure profonde » chomskyenne n’était elle-même qu’un artefact de notre obsession rationaliste pour les règles explicites ? Si la compétence linguistique réelle était statistique, distribuée, émergente ? Les deux positions révèlent des niveaux d’analyse différents : le connexionnisme modélise la performance effective, le symbolisme vise la compétence idéalisée. Ni l’un ni l’autre n’épuise le phénomène.</p>

<p>D’un autre côté, on peut objecter que cette structure géométrique est un <em>artefact</em> du processus d’apprentissage, sans contrepartie réelle dans la compétence linguistique humaine. Aucun locuteur naïf ne manipule mentalement des vecteurs à 512 dimensions ni n’effectue des soustractions vectorielles. Les relations d’analogie capturées par les embeddings sont peut-être des régularisations statistiques produites par l’optimisation, plutôt que des structures cognitives authentiques.</p>

<p>Dans cette lecture sceptique, le modèle est bien créatif : il introduit des relations conceptuelles nouvelles qui n’appartiennent pas à la sémantique ordinaire, mais à une géométrie artificielle projetée sur les données linguistiques. La « découverte » que roi - homme + femme = reine est alors une propriété du modèle, non du langage naturel.</p>

<p>Ce débat révèle une ambiguïté : que définit exactement un embedding vectoriel ? Définit-il le mot <em>tel qu’il est utilisé</em> par les locuteurs (réalisme sémantique), ou <em>tel qu’il est modélisé</em> par une architecture particulière entraînée sur un corpus particulier (instrumentalisme) ?</p>

<p>La philosophie du langage offre une distinction utile ici. Putnam, dans « The Meaning of ‘Meaning’ » [Putnam, 1975], distingue l’<em>intension</em> d’un terme (son sens, sa définition) et son <em>extension</em> (l’ensemble des objets auxquels il réfère dans les usages effectifs).<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup> Les définitions classiques visent à capturer l’intension ; les embeddings capturent des régularités extensionnelles.</p>

<p>Un vecteur d’embedding n’encode pas « ce que signifie être un roi », mais « comment le mot ‘roi’ se comporte dans les contextes observés ». Il ne définit pas le concept, mais modélise sa distribution. En ce sens, les embeddings ne violent pas tant le critère de non-créativité qu’ils <em>changent de domaine</em> : ils quittent le plan de la définition conceptuelle pour celui de la modélisation statistique.</p>

<h3 id="définition-implicite-vectorielle--une-analogie-avec-hilbert">Définition implicite vectorielle : une analogie avec Hilbert</h3>

<p>Face à l’échec apparent des critères classiques (éliminabilité, non-créativité), faut-il conclure que les représentations vectorielles ne sont pas des définitions ? Ce serait hâtif. Elles pourraient constituer une forme particulière de <em>définition implicite</em>, au sens élargi que la théorie classique reconnaît déjà comme légitime.</p>

<p>L’analogie avec la géométrie hilbertienne est instructive. Dans le système axiomatique de Hilbert, les termes primitifs « point », « droite », « plan » ne reçoivent pas de définition explicite. Ils sont définis <em>globalement</em> par l’ensemble des axiomes qui contraignent leurs interprétations possibles. Le « sens » d’un point n’est rien d’autre que le rôle structural qu’il joue dans les relations axiomatiques.</p>

<p>De manière analogue, dans un modèle connexionniste, le sens d’un token n’est pas donné par un <em>definiens</em> linguistique, mais par son interaction avec tous les autres tokens dans l’espace structuré par les poids du réseau. Les poids jouent le rôle des axiomes : ils définissent implicitement les relations admissibles entre termes.</p>

<p>Construisons cette analogie plus rigoureusement :</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left">Définition implicite hilbertienne</th>
      <th style="text-align: left">Définition vectorielle connexionniste</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Termes primitifs non définis : point, droite, plan</td>
      <td style="text-align: left">Tokens : « chat », « chien », « roi »</td>
    </tr>
    <tr>
      <td style="text-align: left">Axiomes : propositions logiques contraignant les relations</td>
      <td style="text-align: left">Poids du réseau : paramètres contraignant les distances vectorielles</td>
    </tr>
    <tr>
      <td style="text-align: left">Sens = satisfaire les axiomes dans un modèle</td>
      <td style="text-align: left">Sens = position dans l’espace d’embedding</td>
    </tr>
    <tr>
      <td style="text-align: left">Unicité structurelle si modèles isomorphes</td>
      <td style="text-align: left">Pluralité structurelle : embeddings dépendent du corpus</td>
    </tr>
  </tbody>
</table>

<p>Toutefois, l’analogie révèle aussi une différence cruciale, de nature épistémologique.</p>

<p>Chez Hilbert, les axiomes sont des propositions <em>a priori</em> dont le statut est (du moins dans l’interprétation logiciste) celui de vérités analytiques ou de stipulations nécessaires. Si « entre » satisfait les axiomes de la géométrie euclidienne, c’est qu’il possède <em>nécessairement</em> la structure euclidienne. Les axiomes contraignent <em>a priori</em> l’espace des interprétations possibles.</p>

<p>En revanche, dans le paradigme connexionniste, les poids du réseau sont des paramètres <em>appris empiriquement</em> par descente de gradient sur un corpus. Ils encodent des régularités <em>statistiques</em> observées dans ce corpus particulier. Si « chat » possède tel vecteur, ce n’est pas une vérité nécessaire sur le concept de chat, mais un <em>fait contingent</em> sur la distribution du mot dans Wikipedia, ou dans Common Crawl, ou dans tel autre corpus d’entraînement.</p>

<p>La définition implicite hilbertienne est donc <em>a priori</em>, là où la définition vectorielle est <em>a posteriori</em>. Cette distinction a des conséquences majeures. Premièrement, les axiomes hilbertiens prétendent à l’<em>universalité</em>, alors que les embeddings sont toujours relatifs à un corpus et à une architecture spécifique. Deuxièmement, là où les axiomes imposent des contraintes <em>nécessaires</em>, les poids neuronaux ne capturent que des tendances <em>probables</em>. Enfin, si la définition hilbertienne aspire à la <em>rigueur logique</em>, la définition vectorielle assume une forme de <em>fluidité statistique</em>.</p>

<p>Cette différence rappelle la critique quinéenne de la distinction analytique/synthétique. Dans « Two Dogmas of Empiricism » [Quine, 1951], Quine conteste l’idée qu’il existerait une frontière nette entre vérités définitionnelles (analytiques) et vérités factuelles (synthétiques). Toute connaissance forme un réseau holistique où les « définitions » elles-mêmes peuvent être révisées à la lumière de l’expérience.</p>

<p>Le paradigme connexionniste donne raison à Quine : la « définition » d’un mot n’est pas un noyau analytique fixe, mais une structure inductive révisable, ancrée dans l’usage linguistique observé. Les embeddings ne sont donc pas des définitions au sens classique, mais des <em>modèles empiriques du sens</em>.</p>

<h2 id="les-limites-de-lopacité-vectorielle">Les limites de l’opacité vectorielle</h2>

<h3 id="transparence-définitionnelle-versus-opacité-calculatoire">Transparence définitionnelle versus opacité calculatoire</h3>

<p>Si les représentations vectorielles peuvent être comprises comme des formes élargies de définition, elles se distinguent néanmoins des définitions classiques par une propriété épistémique cruciale : leur <em>opacité</em>.</p>

<p>Une définition classique possède une vertu de <em>transparence</em> : elle expose explicitement les conditions d’application du concept. La définition « un nombre premier est un entier naturel divisible par exactement deux nombres distincts » me permet non seulement d’identifier les nombres premiers, mais surtout de <em>comprendre pourquoi</em> 13 est premier et 14 ne l’est pas. La définition fournit les raisons de la classification.</p>

<p>Un vecteur d’embedding, à l’inverse, est <em>opaque</em>. Le vecteur $\vec{v}_{\text{premier}} \in \mathbb{R}^{512}$ peut me permettre de prédire avec précision si un nombre est premier (si le modèle a été entraîné sur cette tâche), mais il ne m’explique rien. Je ne peux inspecter ce vecteur pour y lire les critères qui font qu’un nombre est premier. La représentation vectorielle encapsule des régularités statistiques sans les articuler sous forme de critères intelligibles.</p>

<p>Cette différence n’est pas simplement pragmatique, elle est <em>épistémologique</em>. La définition classique satisfait un idéal de <em>connaissabilité</em> : savoir ce qu’est $X$, c’est pouvoir énoncer explicitement les conditions qui font qu’un objet tombe sous $X$. Le vecteur d’embedding satisfait un idéal de <em>prédictibilité</em> : savoir traiter $X$, c’est pouvoir calculer des réponses correctes impliquant $X$.</p>

<p>On reconnaît ici l’opposition entre deux conceptions de la connaissance : le modèle rationaliste (connaître, c’est posséder des raisons articulables) et le modèle connexionniste (connaître, c’est disposer de capacités de traitement).</p>

<h3 id="le-problème-de-lhallucination">Le problème de l’hallucination</h3>

<p>Cette opacité a des conséquences pratiques importantes. Les modèles de langue génératifs, entraînés sur des représentations vectorielles, produisent fréquemment des affirmations plausibles mais fausses — le phénomène dit d’« hallucination ». Le modèle génère « La tour Eiffel a été inaugurée en 1887 » (faux : 1889) parce que cette proposition est statistiquement cohérente avec les patterns appris, même si elle est factuellement incorrecte.</p>

<p>Ce problème révèle une limite structurelle des représentations vectorielles : elles capturent la <em>vraisemblance</em> (ce qui ressemble aux données d’entraînement) plutôt que la <em>vérité</em> (ce qui correspond aux faits). Un vecteur n’a pas de critère intrinsèque de correction factuelle ; il n’encode que des probabilités conditionnelles.</p>

<p>Face à ce défi, plusieurs travaux en intelligence artificielle ont tenté de réintroduire des structures <em>discrètes</em> et <em>vérifiables</em>. L’approche dite de « génération augmentée par récupération » (RAG) en est emblématique. Elle repose sur la décomposition du texte en <em>propositions atomiques</em> — des énoncés qui contiennent exactement un fait distinct, autonome et minimal [Pommeret et al., 2024].</p>

<p>Par exemple, la phrase « Le chien et le chat sont dans la cuisine » serait décomposée en deux propositions atomiques : « Le chien est dans la cuisine » et « Le chat est dans la cuisine ».</p>

<p>Chaque proposition peut alors être vérifiée indépendamment contre une base de connaissances fiable. La réponse du modèle est validée ou corrigée en fonction de la correspondance factuelle de ses propositions atomiques.</p>

<p>Cette démarche réintroduit explicitement la logique de l’<em>atomisme logique</em>, défendue par Russell et le premier Wittgenstein [Wittgenstein, 1921]. Selon cette doctrine, le monde est constitué de faits atomiques indépendants, et une proposition vraie correspond à un fait atomique. En imposant cette structure atomique au matériau traité par le modèle vectoriel, on force le système à respecter les frontières logiques des faits.</p>

<h3 id="une-dialectique-entre-continuité-et-discrétion">Une dialectique entre continuité et discrétion</h3>

<p>On observe ici une tension dialectique. Le modèle connexionniste est puissant précisément parce qu’il opère dans l’espace <em>continu</em> et <em>distribué</em> des vecteurs. Cette continuité lui permet de généraliser, d’interpoler, de capturer des nuances sémantiques fines. Mais cette puissance se paie d’une perte de contrôle logique.</p>

<p>La réintroduction des propositions atomiques cherche à restaurer la précision factuelle en sacrifiant une part de la fluidité vectorielle. C’est un retour partiel au paradigme classique : des unités discrètes, composables, vérifiables.</p>

<p>Toutefois, ce retour n’est jamais total. Les propositions atomiques elles-mêmes sont identifiées et traitées par des modèles connexionnistes. La vérification factuelle repose encore sur des embeddings pour mesurer la similarité sémantique entre la proposition générée et la base de connaissances. Nous n’avons donc pas un abandon du paradigme vectoriel, mais une <em>hybridation</em> : des structures logiques discrètes ancrées dans un substrat vectoriel continu.</p>

<p>Cette hybridation suggère qu’aucun des deux paradigmes — le logico-symbolique et le connexionniste — ne peut prétendre à l’exclusivité. Les définitions explicites classiques garantissent la rigueur, l’éliminabilité, la transparence épistémique. Mais elles sont fragiles, rigides, et peinent à capturer la richesse contextuelle du langage naturel.</p>

<p>Les représentations vectorielles, à l’inverse, sont robustes, flexibles, et capturent remarquablement bien les nuances distributionnelles. Mais elles violent les critères classiques, produisent des inférences dont la validité logique n’est pas garantie, et demeurent opaques.</p>

<p>L’avenir pourrait donc résider dans des architectures <em>neuro-symboliques</em>, où les vecteurs gèrent la correspondance floue et intuitive, tandis que les structures logiques discrètes (propositions atomiques, graphes de connaissances, règles symboliques) gèrent la précision factuelle et la contrôlabilité. La définition du futur serait alors un objet hybride : un embedding vectoriel ancré à un graphe logique discret.</p>

<h2 id="conclusion--vers-une-théorie-pluraliste-de-la-définition">Conclusion : vers une théorie pluraliste de la définition</h2>

<p>La confrontation entre la théorie classique de la définition et le paradigme connexionniste ne révèle pas, comme on aurait pu le craindre, une incompatibilité radicale. Elle révèle plutôt que la notion de « définition » est elle-même plus large et plus hétérogène que ne le laissait penser la tradition logiciste.</p>

<p>La théorie classique, telle que formulée par Pierre Wagner à partir de Pascal, Frege et Russell, a établi avec rigueur les exigences normatives de la définition <em>explicite</em> dans les systèmes formels : éliminabilité du défini par le définissant, non-créativité ou conservativité relativement à une théorie, univocité du <em>definiendum</em>. Ces critères demeurent valides et nécessaires pour les définitions stipulatives en logique et en mathématiques.</p>

<p>Mais la théorie classique reconnaît elle-même l’existence de formes alternatives : la définition <em>implicite</em> à la Hilbert, où les termes sont définis par leurs relations mutuelles dans un système d’axiomes ; la définition <em>récursive</em>, où le défini apparaît dans le définissant sous certaines conditions ; la définition par <em>abstraction</em>, qui introduit de nouveaux objets en quotientant une relation d’équivalence.</p>

<p>Le paradigme connexionniste prolonge cette pluralité en introduisant une nouvelle forme : la <em>définition distributionnelle statistique</em>. Dans ce mode, le sens d’un terme n’est ni une formule substituable (définition explicite), ni un rôle structural dans un système d’axiomes (définition implicite hilbertienne), mais une <em>localisation géométrique dans un espace de co-occurrences apprises</em>.</p>

<p>Cette définition possède des propriétés distinctives qui la singularisent radicalement. Elle est d’abord <em>relationnelle</em>, le sens d’un mot n’étant que sa position relative à tous les autres. Elle est ensuite <em>contextuelle</em> et <em>continue</em>, variant selon l’environnement syntaxique et sémantique et s’exprimant dans un espace métrique plutôt que discret. Enfin, elle est <em>a posteriori</em> et <em>opaque</em>, émergeant de régularités observées sans offrir d’explication articulable.</p>

<p>Ces propriétés violent les critères classiques d’éliminabilité et de non-créativité. Mais elles ne constituent pas pour autant un abandon de la notion de définition. Elles révèlent plutôt que la théorie classique décrivait un <em>cas particulier</em> (la définition explicite formelle) en le prenant pour la <em>forme générale</em>.</p>

<p>Nous pouvons donc proposer une typologie des modes définitionnels qui distingue quatre approches. La <strong>définition stipulative explicite</strong> (Pascal, Frege), caractérisée par l’éliminabilité stricte et la transparence épistémique, reste l’idéal pour les systèmes formels. La <strong>définition implicite structurale</strong> (Hilbert), qui définit le sens par les relations axiomatiques, convient aux théories mathématiques. La <strong>définition distributionnelle statistique</strong> (Firth, connexionnisme), fondée sur les co-occurrences et la généralisation inductive, s’avère puissante pour le traitement du langage naturel malgré son opacité. Enfin, la <strong>définition ostensive</strong> (Wittgenstein), qui ancre le sens dans l’usage et l’apprentissage direct, demeure fondamentale pour comprendre l’acquisition linguistique ordinaire.</p>

<p>Ces modes ne sont pas mutuellement exclusifs. Ils correspondent à des pratiques cognitives et scientifiques différentes, ayant chacune leur domaine de validité.</p>

<p>Le paradigme connexionniste ne détruit donc pas la théorie classique : il révèle que celle-ci décrivait un cas particulier en le prenant pour la forme générale. L’embedding vectoriel est bien une forme de définition — non pas au sens de l’identité substituable, mais au sens de la <em>localisation structurale</em> d’un concept dans un espace de significations.</p>

<p>Ce que le connexionnisme nous apprend, c’est que définir n’est pas seulement <em>analyser et décomposer</em> (idéal classique), mais aussi <em>situer et relier</em> (idéal structural). La définition n’est pas uniquement un acte de fixation du sens, mais aussi un processus de construction contextuelle.</p>

<p>Reste ouverte une question méta-théorique vertigineuse : si la notion de « définition » elle-même recouvre des pratiques hétérogènes (stipulative, implicite, distributionnelle, ostensive), ne faudrait-il pas une méta-définition qui unifie ces modes ? Ou devons-nous accepter que « définition » soit elle-même un concept <em>polysémique</em>, dont le sens varie avec le contexte théorique ?</p>

<p>Ce serait là une ironie profonde : la confrontation avec le paradigme connexionniste nous contraint à admettre que le concept même de « définition » résiste à une définition univoque et explicite. Validant par là, d’une certaine manière, l’enseignement central du connexionnisme : le sens émerge du réseau des usages, non d’une essence préétablie.</p>

<h2 id="annexe--la-descente-de-gradient">Annexe : La descente de gradient</h2>

<p>La <em>descente de gradient</em> est l’algorithme d’optimisation qui permet aux réseaux de neurones d’apprendre à partir de données. Son principe repose sur une idée géométrique simple : pour minimiser une fonction, il suffit de se déplacer dans la direction de sa plus forte décroissance.</p>

<h3 id="principe-mathématique">Principe mathématique</h3>

<p>Considérons un modèle paramétré par un vecteur de poids $\theta \in \mathbb{R}^n$ (où $n$ peut atteindre plusieurs milliards dans les modèles contemporains). L’objectif de l’apprentissage est de minimiser une fonction de coût $\mathcal{L}(\theta)$ qui mesure l’écart entre les prédictions du modèle et les données observées.</p>

<p>Le gradient de cette fonction, noté $\nabla_\theta \mathcal{L}(\theta)$, est un vecteur qui pointe dans la direction de la plus forte croissance de $\mathcal{L}$. Pour minimiser $\mathcal{L}$, on effectue donc des pas dans la direction opposée :</p>

\[\theta_{t+1} = \theta_t - \eta \nabla_\theta \mathcal{L}(\theta_t)\]

<p>où $\eta &gt; 0$ est le <em>taux d’apprentissage</em> (<em>learning rate</em>), un hyperparamètre qui contrôle l’amplitude de chaque pas.</p>

<h3 id="interprétation-géométrique">Interprétation géométrique</h3>

<p>Imaginons la fonction de coût comme une surface dans un espace de haute dimension. Le gradient indique la « pente » locale en chaque point. L’algorithme procède par descentes successives : partant d’une initialisation aléatoire $\theta_0$, il ajuste itérativement les paramètres en « descendant la pente » jusqu’à atteindre (idéalement) un minimum.</p>

<h3 id="descente-de-gradient-stochastique">Descente de gradient stochastique</h3>

<p>En pratique, calculer le gradient exact sur l’ensemble du corpus d’entraînement est prohibitif. On utilise donc la <em>descente de gradient stochastique</em> (SGD) : à chaque itération, on estime le gradient sur un petit sous-ensemble aléatoire de données (un <em>mini-batch</em>). Bien que cette estimation soit bruitée, elle permet un apprentissage efficace sur de vastes corpus.</p>

<h3 id="conséquence-épistémologique">Conséquence épistémologique</h3>

<p>La descente de gradient révèle le caractère <em>inductif</em> et <em>a posteriori</em> de l’apprentissage connexionniste. Cette opposition a priori/a posteriori réactive un débat philosophique classique : les concepts sont-ils innés (rationalisme cartésien, leibnizien) ou acquis par expérience (empirisme lockéen, huméen) ? Le paradigme connexionniste donne raison aux empiristes : le sens n’est pas stipulé par la raison pure, mais extrait des régularités observées dans l’usage linguistique.</p>

<p>Contrairement aux axiomes hilbertiens, qui fixent <em>a priori</em> la structure géométrique comme vérités nécessaires ou stipulations analytiques, les poids neuronaux émergent d’un processus itératif d’ajustement empirique sur un corpus. Le « sens » d’un mot dans un modèle connexionniste n’est donc pas stipulé comme essence immuable, mais <em>appris</em> inductivement par optimisation statistique. C’est l’expérience linguistique — la distribution observée des mots dans leurs contextes — qui détermine la représentation, non une intuition rationnelle préalable.</p>

<hr />

<h3 id="références">Références</h3>

<p><em>Cette réflexion s’appuie sur des travaux de recherche menés à l’Institut de Recherche en Informatique Fondamentale (IRIF) et au Laboratoire Interdisciplinaire des Sciences du Numérique (LISN) [Pommeret et al., 2024], portant notamment sur la compositionnalité dans les transformeurs [Pommeret et al, 2025] et l’évaluation de propositions atomiques pour le fact-checking [Pommeret et al., 2024].</em></p>

<ul>
  <li>[Devlin et al., 2019] Devlin, J., Chang, M.-W., Lee, K., &amp; Toutanova, K. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. <em>NAACL</em>.</li>
  <li>[Distrub. Hypo., 2023] A Review of Distrbutional Hypothesis. <em>ACL</em>.</li>
  <li>[Firth, 1957] Firth, J. R. (1957). A synopsis of linguistic theory 1930–1955.</li>
  <li>[Frege, 1884] Frege, G. (1884). <em>Die Grundlagen der Arithmetik</em>.</li>
  <li>[Mikolov et al., 2013] Mikolov, T., Chen, K., Corrado, G., &amp; Dean, J. (2013). Efficient Estimation of Word Representations in Vector Space. <em>ICLR</em>.</li>
  <li>[Pascal, 1657] Pascal, B. (1657). <em>De l’esprit géométrique</em>.</li>
  <li>[Pennington et al., 2014] Pennington, J., Socher, R., &amp; Manning, C. D. (2014). GloVe: Global Vectors for Word Representation. <em>EMNLP</em>.</li>
  <li>[Pommeret et al., 2024] Pommeret, L. (2024). Rapport de recherche IRIF.</li>
  <li>[Pommeret et al., 2024] Pommeret, L., Lassoued, A., &amp; de Rougemont, M. (2025). Composition with Transformers.</li>
  <li>[Pommeret et al., 2024] Pommeret, L., Rosset, S., Servan, C., &amp; Ghannay, S. (2024). AtomicEval : Evaluation Framework for Atomic Proposition Autonomy with French Propositioner. <em>JDSE</em>.</li>
  <li>[Putnam, 1975] Putnam, H. (1975). The Meaning of ‘Meaning’.</li>
  <li>[Quine, 1951] Quine, W. V. O. (1951). Two Dogmas of Empiricism.</li>
  <li>[Russell, 1905] Russell, B. (1905). On Denoting.</li>
  <li>[Vaswani et al., 2017] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., &amp; Polosukhin, I. (2017). Attention Is All You Need. <em>NeurIPS</em>.</li>
  <li>[Wagner, 2017] Wagner, P. (2017). <em>La définition</em>. https://shs.hal.science/halshs-01494741</li>
  <li>[Wittgenstein, 1921] Wittgenstein, L. (1921). <em>Tractatus Logico-Philosophicus</em>.</li>
</ul>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>Cette réflexion s’appuie sur des travaux de recherche menés à l’Institut de Recherche en Informatique Fondamentale (IRIF) et au Laboratoire Interdisciplinaire des Sciences du Numérique (LISN), portant notamment sur la compositionnalité dans les transformeurs et l’évaluation de propositions atomiques pour le fact-checking. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>Pour une introduction pédagogique moderne, voir [Distrub. Hypo., 2023]. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:3" role="doc-endnote">
      <p>Ludwig Wittgenstein, <em>Recherches philosophiques</em>, §43 : « la signification d’un mot est son emploi dans le langage ». Édition Tel Gallimard, traduit par Dastur, Elie, Gautero, Janicaud et Rigal. <a href="#fnref:3" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:4" role="doc-endnote">
      <p>Cette distinction remonte à la <em>Logique ou l’art de penser</em> (1662) d’Antoine Arnauld et Pierre Nicole, dite logique de Port-Royal, qui opposait la « compréhension » (ensemble des attributs contenus dans l’idée) à l’« extension » (ensemble des objets auxquels l’idée s’applique). <a href="#fnref:4" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><category term="Philosophie" /><category term="Machine Learning" /><category term="Logique" /><summary type="html"><![CDATA[Comment les LLMs et l'IA générative redéfinissent-ils la notion de définition ?]]></summary></entry><entry xml:lang="en"><title type="html">The Connectionist Paradigm and the Question of Definition</title><link href="https://lucpommeret.com/2025/12/19/connexionnisme-definition.html" rel="alternate" type="text/html" title="The Connectionist Paradigm and the Question of Definition" /><published>2025-12-19T00:00:00+00:00</published><updated>2025-12-19T00:00:00+00:00</updated><id>https://lucpommeret.com/2025/12/19/connexionnisme-definition</id><content type="html" xml:base="https://lucpommeret.com/2025/12/19/connexionnisme-definition.html"><![CDATA[<p><em>This text was originally written in French and has been translated by AI. Original text: an adaptation of a mini-dissertation submitted to Pierre Wagner (Paris I) in December 2025, as part of a philosophy of logic course, which received a mark of 18/20.</em></p>

<h2 id="introduction">Introduction</h2>

<p>Contemporary artificial intelligence, and particularly connectionist machine learning, appears to operate according to principles radically different from those that govern the traditional practice of definition. Where the logician constructs explicit definitions respecting the strict criteria of eliminability and non-creativity, the neural network learns distributed vector representations whose epistemological status remains uncertain. This situation raises a problem: how does the vector representation of concepts in connectionist models relate to what a definition is in the classical sense of the term?</p>

<p>The question is not simply technical. It engages our very understanding of what it means to define, to circumscribe a concept, to trace the boundaries of meaning. The classical theory of definition [Wagner, 2017] rigorously establishes the requirements that any legitimate definition must satisfy: eliminability of the defined term, non-creativity or conservativity, univocity of the <em>definiendum</em>. These criteria, forged in the logical and philosophical tradition, from Pascal’s <em>De l’esprit géométrique</em> [Pascal, 1657] to Frege [Frege, 1884] and Russell [Russell, 1905], constitute our obligatory starting point.</p>

<p>Yet the connectionist paradigm, founded on Firth’s distributional hypothesis according to which “you shall know a word by the company it keeps” [Firth, 1957], proposes a mode of access to meaning that seems to bypass explicit definition. A word is no longer defined by a substitutable <em>definiens</em>, but represented by a vector in a high-dimensional space, whose meaning emerges from its relative position with respect to other vectors. Are we still in the order of definition?</p>

<p>This mini-dissertation proposes to examine this tension through three moments. We shall first establish what a definition is in the classical sense, relying principally on the theory of definition [Wagner, 2017]. We shall then interrogate the status of vector representations with regard to classical criteria. Finally, we shall seek to determine whether the connectionist paradigm invalidates the classical theory or on the contrary reveals an implicit and enlarged form of it.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></p>

<h2 id="the-classical-edifice-of-definition">The Classical Edifice of Definition</h2>

<h3 id="the-functions-of-definition">The Functions of Definition</h3>

<p>Before examining the formal rules of definition, it is fitting to recall its functional diversity. Classical theory distinguishes several definitional modalities that do not pursue the same objectives [Wagner, 2017].</p>

<p>The distinction between <em>nominal</em> definition and <em>real</em> definition, inherited from mediaeval scholasticism and taken up by Pascal, opposes two aims. Nominal definition (<em>definitio nominis</em>) is content to explain the use of a word or to introduce a convenient abbreviation. Pascal thus affirms that “definitions are made only to designate the things that are named, and not to show their nature” [Wagner, 2017]. Conversely, real definition (<em>definitio rei</em>), in the Aristotelian tradition, claims to grasp the essence of the thing, to say what it is in itself.</p>

<p>A second distinction separates <em>stipulative</em> definitions from <em>descriptive</em> definitions. The former introduce a new meaning by arbitrary decision (“let $x$ be the smallest prime number”), whilst the latter report the established usage within a linguistic community, as the lexicographer does [Wagner, 2017].</p>

<p>Finally, and this is perhaps the most pertinent distinction for our purpose, one opposes <em>explicit</em> definitions to <em>implicit</em> definitions. An explicit definition permits the direct substitution of the <em>definiendum</em> by the <em>definiens</em>. An implicit definition, in the sense of Gergonne and Hilbert, defines primitive terms not in isolation, but by their mutual relations within a system of axioms [Wagner, 2017]. The axioms of Hilbertian geometry, for example, implicitly define “point”, “line” and “plane” by the structural relations they impose on these terms.</p>

<h3 id="eliminability-of-the-defined-term">Eliminability of the Defined Term</h3>

<p>The first criterion of classical theory is that of <em>eliminability</em>. A definition is essentially an abbreviation. If a term $T$ is defined by an expression $P$, then in any proposition where $T$ appears, it must be possible to replace $T$ by $P$ without altering the truth value of the proposition [Wagner, 2017].</p>

<p>Formally, if we introduce a new symbol $s$ in a language $\mathcal{L}$ via a definition $\delta$, the extended language $\mathcal{L}’$ must contain no semantic content irreducible to $\mathcal{L}$. The definition “1 = S(0)” (where $S$ is the successor function) enables us to systematically eliminate the symbol “1” from any arithmetic formula.</p>

<p>This requirement of eliminability guarantees that a definition is not an ontological enrichment of the language, but simply an instrument of concision. As Arnauld and Nicole note, the care devoted to definitions enables us to “abbreviate discourse”, but on condition that one can always “mentally substitute the definition in place of the defined term” [Wagner, 2017].</p>

<p>However, eliminability is not always a simple term-by-term substitution. In the case of contextual definitions, such as that of logical conjunction $\land$ defined from negation $\neg$ and the conditional $\to$, one cannot directly substitute $\land$ by a fixed expression; one must replace the entire context $(A \land B)$ by $\neg(A \to \neg B)$ [Wagner, 2017].</p>

<p>Moreover, eliminability is only valid in certain contexts. The word “prime” is eliminable in favour of “divisible by exactly two numbers” in the context “13 is…”, but not in the context “Léa is unaware that 13 is…”, where the principle of substitutability of identicals does not apply [Wagner, 2017].</p>

<h3 id="non-creativity-and-conservativity">Non-Creativity and Conservativity</h3>

<p>The second criterion is that of <em>non-creativity</em> or <em>conservativity</em>. A purely definitional definition must not enable the demonstration of anything whatsoever about primitive terms that was not already demonstrable before its introduction [Wagner, 2017].</p>

<p>This requirement can be formalised thus: let $\mathcal{L}$ be a language in which a theory $T$ is formulated, and let $\mathcal{L}’$ be the language obtained by adjoining a word $m$ defined by $\delta$. One says that $\delta$ satisfies the condition of conservativity relative to $T$ if, and only if, any statement of $\mathcal{L}$ demonstrable from $T \cup {\delta}$ is also demonstrable from $T$ alone [Wagner, 2017].</p>

<p>In other words, if $T$ represents our knowledge and $\delta$ a definition, then $\delta$ must not enrich our stock of knowledge expressible in the original language. A definition that violated this principle would not be purely conceptual; it would convey epistemic content.</p>

<p>A classical example illustrates this well. The pseudo-definition “Alpha is the largest prime number” is creative, for it contradicts Euclid’s theorem on the infinitude of prime numbers [Wagner, 2017]. More dramatic still, the Russellian definition of the set $E$ of all sets that do not belong to themselves directly engenders the contradiction $E \in E \leftrightarrow E \notin E$ [Wagner, 2017].</p>

<h3 id="implicit-definition-in-the-sense-of-gergonne-and-hilbert">Implicit Definition in the Sense of Gergonne and Hilbert</h3>

<p>Classical theory devotes an important analysis to implicit definition, which it carefully distinguishes from explicit definition [Wagner, 2017]. In Hilbertian geometry, the primitive terms “point”, “line”, “plane” are not defined in isolation by explicit <em>definiens</em>. They are defined globally by the set of axioms that constrain their possible interpretations.</p>

<p>This relational and holistic conception of definition renounces the ideal of an intrinsic meaning, given outside of any structure. The “sense” of a point is defined exclusively by its behaviour within the axiomatic system. It has no essence outside its relations.</p>

<h2 id="the-connectionist-paradigm-as-challenge-to-classical-theory">The Connectionist Paradigm as Challenge to Classical Theory</h2>

<h3 id="the-distributional-hypothesis">The Distributional Hypothesis</h3>

<p>Contemporary natural language processing rests on a principle that seems foreign to the logic of explicit definition: the <em>distributional hypothesis</em>, formulated by the linguist John Rupert Firth in 1957: “You shall know a word by the company it keeps” [Firth, 1957].<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup></p>

<p>This maxim radically displaces the foundation of meaning. In classical logic, identity is absolute: $A = A$. In distributional semantics, identity becomes similarity: $A \approx B$ if and only if $\text{Context}(A) \approx \text{Context}(B)$. Meaning is no longer an intrinsic property, an essence to be captured by a <em>definiens</em>, but a function of the contextual distribution of the word.</p>

<p>The technical realisation of this hypothesis is <em>word embedding</em>, where each word is projected towards a vector in a high-dimensional space $\mathbb{R}^d$ [Mikolov et al., 2013; Pennington et al., 2014]. The “definition” of the word “cat” becomes a vector of 512 real numbers. This vector encodes the statistical co-occurrences of the word in a vast corpus.</p>

<h3 id="embedding-as-mathematised-structuralism">Embedding as Mathematised Structuralism</h3>

<p>What is an embedding vector <em>as</em> definition? The answer engages an ontology of meaning radically different from that which underlies classical definition.</p>

<p>In the Aristotelian and logicist tradition, to define a term consists in exhibiting its <em>intrinsic content</em>: “a triangle is a closed figure with three sides”. The <em>definiens</em> enunciates essential properties that the defined object possesses, independently of any relation to other objects. Meaning is conceived as a semantic substance attached to the sign.</p>

<p>The embedding vector breaks with this substantialist metaphysics. The vector $\vec{v}_{\text{cat}} \in \mathbb{R}^{512}$ bears in itself no intrinsic semantic property. Considered in isolation, this tuple of 512 real numbers is devoid of signification. It becomes bearer of meaning only by its <em>relative position</em> in vector space—that is to say by its distances from other vectors.</p>

<p>This conception mathematically realises the structuralist intuition of Ferdinand de Saussure, for whom “in language, there are only differences without positive terms”. The meaning of a word does not belong to it as property; it emerges from the system of differences that structures language as totality. Vector embedding gives a precise geometric form to this idea: the meaning of “cat” is its metric difference from “dog” (small distance), “table” (medium distance), “idea” (large distance), and all the other terms of the vocabulary.</p>

<p>One can therefore say that embedding is a <em>purely oppositional definition</em>: “cat” is defined by being neither “dog”, nor “house”, nor “run”, according to a system of Euclidean distances in $\mathbb{R}^d$. Where classical definition responds to the question “what is $X$?” by a positive formula (“$X$ is $P$”), vectorial definition responds by a negative localisation: “$X$ occupies this position in the network of differences”.</p>

<p>This ontology has an immediate consequence: it invalidates the classical requirement of <em>univocity</em>. Pierre Wagner insists on the fact that a <em>definiendum</em> must have a fixed and unique sense. Yet an embedding vector has no stable identity outside the system that produces it. Whether one changes the training corpus, the network architecture or the hyperparameters, and “cat” will receive a numerically distinct vector. Meaning is not an immutable essence, but an unstable and revisable configuration.</p>

<h3 id="geometry-and-invariance-identity-up-to-rotation">Geometry and Invariance: Identity up to Rotation</h3>

<p>The Saussurian arbitrariness of the sign finds its mathematical echo in the arbitrariness of vector bases. A neural network can be subjected to a global rotation without its functional properties changing. What matters is not the absolute coordinates of neurons individually ($x_i$), but the geometric relations that unite them.</p>

<p>We can formalise this intuition by analysing cost functions and similarity metrics. Model learning is steered by the minimisation of cross-entropy between the predicted distribution $q$ and the target distribution $p$.</p>

\[\begin{align}
    H(p, q) &amp;= -\sum_{x \in \mathcal{X}} p(x) \log q(x) \\
    &amp;= -\mathbb{E}_{x \sim p} [\log q(x)]
\end{align}\]

<p>This quantity forces internal representations to organise themselves so as to maximise the linear separability of classes or the probability of the next token.</p>

<p>But how to compare these representations? If one trains two identical models with different random initialisations, the vectors for “cat” will be numerically very different. Yet they capture the same “definition”. We therefore need a similarity measure that is invariant under rotation and orthogonal permutation.</p>

<p>The classical Euclidean distance $|\vec{u} - \vec{v}|$ is sensitive to norm. Computer scientists in natural language processing often prefer cosine similarity, which only considers the angle:</p>

\[\begin{align}
    \text{sim}(\vec{u}, \vec{v}) &amp;= \frac{\vec{u} \cdot \vec{v}}{\|\vec{u}\| \|\vec{v}\|} \\
    &amp;= \cos(\theta)
\end{align}\]

<p>However, to compare entire representation spaces (for example, layer 3 of model A and layer 3 of model B), the most robust measure is <em>Centred Kernel Alignment</em> (CKA). It enables quantification of the similarity between two representation matrices $X \in \mathbb{R}^{n \times d_1}$ and $Y \in \mathbb{R}^{n \times d_2}$ in a manner invariant to orthogonal transformations:</p>

\[\begin{align}
    \text{CKA}(K, L) &amp;= \frac{\text{HSIC}(K, L)}{\sqrt{\text{HSIC}(K, K)\text{HSIC}(L, L)}}
\end{align}\]

<p>where $K = XX^T$ and $L = YY^T$ are the similarity (kernel) matrices between examples. If $X’ = XQ$ with $Q$ an orthogonal matrix, then $K’ = (XQ)(XQ)^T = XQQ^TX^T = XX^T = K$. Invariance is thus mathematically guaranteed.</p>

<p>This mathematical invariance is not a mere technical detail. It reveals a strong ontological thesis: the “definition” of a concept in a neural network is not the particular vector (which depends on random initialisation), but the geometric structure invariant under isometric transformations. This is a form of <em>structural realism</em>: what is real is not the substance (numerical coordinates), but the form (metric relations). This position recalls Poincaré and Maxwell, for whom what survives changes of representation constitutes the objective content of scientific knowledge. The true “definition” is therefore the relative geometry of the point cloud, not its contingent coordinates.</p>

<h3 id="definition-as-attention-calculation">Definition as Attention Calculation</h3>

<p>A major limitation of early vector models (Word2Vec type) resided in the static character of definition: a word received a unique vector, independent of its varied senses. The Transformer architecture [Vaswani et al., 2017] resolves this problem by rendering definition <em>dynamic</em> thanks to the attention mechanism.</p>

<p>In this formalism, the meaning of a token is not given, it is calculated. For a token at position $i$, one projects its initial vector $x_i$ towards three distinct spaces: a query $q_i$, a key $k_i$, and a value $v_i$, by multiplication with learnt matrices $W^Q, W^K, W^V$.</p>

<p>The semantic contribution of each context word $j$ to the target word $i$ is determined by an attention score $A_{i,j}$, calculated as the compatibility between the query of one and the key of the other:</p>

\[A_{i,j} = \text{Softmax}_j \left( \frac{q_i \cdot k_j^T}{\sqrt{d_k}} \right)\]

<p>The final representation $z_i$ of the word is then the weighted sum of the values of all context words:</p>

\[z_i = \sum_{j} A_{i,j} v_j\]

<p>This equation gives a precise mathematical form to the idea of contextual definition. The “meaning” $z_i$ is literally the sum of traces left by other words ($v_j$), weighted by their contextual relevance ($A_{i,j}$).</p>

<h3 id="contextual-polysemy-as-refutation-of-univocity">Contextual Polysemy as Refutation of Univocity</h3>

<p>Classical theory of definition confronts a major empirical obstacle: <em>contextual polysemy</em>. A same word often possesses several related but distinct senses. Classical definition treats this phenomenon as an ambiguity to be resolved: “bank$_1$” = financial institution, “bank$_2$” = edge of a watercourse. Context then plays the role of <em>selector</em> between these pre-established significations.</p>

<p>But this conception proves inadequate in the face of utterances such as “I slept on the bank”. Which sense of “bank” is selected here? Neither the financial institution nor the river bank is suitable—unless one supposes a third sense, “bank$_3$” = piece of furniture. Yet this <em>ad hoc</em> multiplication of senses reveals the failure of the strategy: rather than a unique definition with pre-established senses, we have a potential infinity of micro-senses adjusted to context.</p>

<p>The problem is deeper still. Consider “the temperature is rising”. Is it a thermometer, fever, social tension? Classical definition would require stipulating in advance all possible senses of “rising”, or introducing a <em>definiens</em> sufficiently abstract to cover them all (“to increase according to a scalar dimension”). But this latter option amounts to admitting that the concrete sense of “rising” in each context cannot be <em>deduced</em> from the general definition—it must be <em>constructed</em> by contextual interpretation.</p>

<p>It is here that the attention mechanism of transformers reveals its philosophical importance. Let us recall the equation:</p>

\[z_i = \sum_{j} A_{i,j} v_j\]

<p>This formula shows that the final representation $z_i$ of word $i$ is not <em>selected</em> from amongst a stock of pre-established senses, but <em>calculated dynamically</em> by weighted aggregation of the contributions of all contextual words $v_j$. In “I slept on the bank”, the final vector of “bank” incorporates semantic traces of “slept” and “on”, producing a representation <em>sui generis</em> that did not exist before the calculation.</p>

<p>Meaning is therefore not consultation of a mental dictionary, but <em>computation</em>. This idea finds an echo in ordinary language philosophy. Wittgenstein, in the <em>Philosophical Investigations</em>, affirms: “Don’t ask for the meaning, ask for the use” (§43). For him, the meaning of a word is not a fixed entity associated with the word, but its manner of being employed in language games.</p>

<p>The attention mechanism is a mathematical formalisation of this Wittgensteinian intuition: the “meaning” of “bank” in a given sentence is literally its <em>use</em> in that particular syntactic and semantic configuration, encoded as resulting vector.<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup> Definition ceases to be an <em>a priori</em> stock of significations, to become an <em>in situ</em> process of construction of meaning.</p>

<p>This invalidates the central presupposition of classical theory: that to define consists in <em>fixing</em> meaning once and for all. The connectionist paradigm shows on the contrary that meaning is constitutively <em>variable</em>, <em>contextual</em> and <em>emergent</em>.</p>

<h3 id="eliminability-violated">Eliminability Violated</h3>

<p>Let us confront this practice with the classical criterion of eliminability. Can one eliminate an embedding vector in favour of a linguistic expression that would be synonymous with it?</p>

<p>The answer is manifestly negative. The vector $\vec{v}_{\text{king}}$ is not a string of language symbols. It is a mathematical entity of a radically different ontological nature—a point in $\mathbb{R}^{512}$. One cannot “mentally substitute” this vector for the word “king” in an ordinary sentence. The translation of the word into vector is not a substitution of equivalent symbols, but a projection into a distinct phenomenological space.</p>

<p>Moreover, this projection is “lossy”—it loses information, or at least irreversibly transforms the nature of information. The vector captures a statistical distribution, not a compositional meaning in the traditional sense. There is no strict equivalence in the classical sense, but a probabilistic correspondence. The question of compositionality in language models, notably Transformer architectures [Vaswani et al., 2017] and contextual models such as BERT [Devlin et al., 2019], is the subject of active research [Pommeret et al., 2025].</p>

<h3 id="apparent-creativity-or-structural-discovery">Apparent Creativity or Structural Discovery?</h3>

<p>The second classical criterion—non-creativity—seems flagrantly violated by connectionist models. Vector relations permit famous inferences of the type:</p>

\[\vec{v}_{\text{King}} - \vec{v}_{\text{Man}} + \vec{v}_{\text{Woman}} \approx \vec{v}_{\text{Queen}}\]

<p>This “vector arithmetic” produces knowledge that was not explicitly encoded in the individual definitions of terms. If $T$ designates our theory of language and $\delta$ the vector representation of “king”, then $T \cup {\delta}$ permits inferring semantic relations (king:man::queen:woman) that were not demonstrable in $T$. In this sense, vector definition is <em>creative</em>: it enriches our stock of knowledge.</p>

<p>But is this “creativity” real or apparent? The question merits careful examination.</p>

<p>On one side, one can maintain that the inference “king - man + woman = queen” creates no new knowledge, but <em>reveals</em> a latent semantic structure already present in linguistic usage. This relation of analogy between royalty and gender was implicitly contained in the manner in which speakers employ these words. The vector model does no more than <em>render explicit</em> what was already implicitly knowable—exactly as the geometer who demonstrates a theorem renders explicit what was implicit in the axioms.</p>

<p>In this perspective, the criterion of non-creativity is not violated. If one defines $T$ not as a finite set of explicit propositions, but as the set of all semantic truths implicit in the linguistic usage of a community, then the relation “king:man::queen:woman” was already in $T$. The connectionist model adds nothing; it <em>extracts</em>.</p>

<p>However, this response raises an important objection. Chomsky and the symbolists would object that statistical regularities of surface do not capture the deep structure of language—the universal, innate syntactic rules that generate linguistic competence. Vector arithmetic “king - man + woman = queen” would then be a superficial artefact, not an authentic structural discovery.</p>

<p>But one can turn the argument round: what if Chomskyan “deep structure” were itself merely an artefact of our rationalist obsession with explicit rules? What if real linguistic competence were statistical, distributed, emergent? The two positions reveal different levels of analysis: connectionism models effective performance, symbolism aims at idealised competence. Neither exhausts the phenomenon.</p>

<p>On the other side, one can object that this geometric structure is an <em>artefact</em> of the learning process, without real counterpart in human linguistic competence. No naïve speaker mentally manipulates vectors of 512 dimensions nor performs vector subtractions. The analogical relations captured by embeddings are perhaps statistical regularisations produced by optimisation, rather than authentic cognitive structures.</p>

<p>In this sceptical reading, the model is indeed creative: it introduces new conceptual relations that do not belong to ordinary semantics, but to an artificial geometry projected onto linguistic data. The “discovery” that king - man + woman = queen is then a property of the model, not of natural language.</p>

<p>This debate reveals an ambiguity: what exactly does a vector embedding define? Does it define the word <em>as it is used</em> by speakers (semantic realism), or <em>as it is modelled</em> by a particular architecture trained on a particular corpus (instrumentalism)?</p>

<p>Philosophy of language offers a useful distinction here. Putnam, in “The Meaning of ‘Meaning’” [Putnam, 1975], distinguishes the <em>intension</em> of a term (its sense, its definition) and its <em>extension</em> (the set of objects to which it refers in effective usages).<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup> Classical definitions aim to capture intension; embeddings capture extensional regularities.</p>

<p>An embedding vector does not encode “what it means to be a king”, but “how the word ‘king’ behaves in observed contexts”. It does not define the concept, but models its distribution. In this sense, embeddings do not so much violate the criterion of non-creativity as they <em>change domain</em>: they leave the plane of conceptual definition for that of statistical modelling.</p>

<h3 id="vector-implicit-definition-an-analogy-with-hilbert">Vector Implicit Definition: An Analogy with Hilbert</h3>

<p>Faced with the apparent failure of classical criteria (eliminability, non-creativity), must one conclude that vector representations are not definitions? This would be hasty. They could constitute a particular form of <em>implicit definition</em>, in the enlarged sense that classical theory already recognises as legitimate.</p>

<p>The analogy with Hilbertian geometry is instructive. In Hilbert’s axiomatic system, the primitive terms “point”, “line”, “plane” receive no explicit definition. They are defined <em>globally</em> by the set of axioms that constrain their possible interpretations. The “sense” of a point is nothing other than the structural role it plays in axiomatic relations.</p>

<p>In an analogous manner, in a connectionist model, the meaning of a token is not given by a linguistic <em>definiens</em>, but by its interaction with all other tokens in the space structured by the network weights. Weights play the role of axioms: they implicitly define admissible relations between terms.</p>

<p>Let us construct this analogy more rigorously:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left">Hilbertian implicit definition</th>
      <th style="text-align: left">Connectionist vector definition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Undefined primitive terms: point, line, plane</td>
      <td style="text-align: left">Tokens: “cat”, “dog”, “king”</td>
    </tr>
    <tr>
      <td style="text-align: left">Axioms: logical propositions constraining relations</td>
      <td style="text-align: left">Network weights: parameters constraining vector distances</td>
    </tr>
    <tr>
      <td style="text-align: left">Meaning = satisfying axioms in a model</td>
      <td style="text-align: left">Meaning = position in embedding space</td>
    </tr>
    <tr>
      <td style="text-align: left">Structural uniqueness if models isomorphic</td>
      <td style="text-align: left">Structural plurality: embeddings depend on corpus</td>
    </tr>
  </tbody>
</table>

<p>However, the analogy also reveals a crucial difference, epistemological in nature.</p>

<p>In Hilbert, axioms are <em>a priori</em> propositions whose status is (at least in the logicist interpretation) that of analytic truths or necessary stipulations. If “between” satisfies the axioms of Euclidean geometry, it is because it possesses <em>necessarily</em> Euclidean structure. Axioms constrain <em>a priori</em> the space of possible interpretations.</p>

<p>By contrast, in the connectionist paradigm, network weights are parameters <em>learnt empirically</em> by gradient descent on a corpus. They encode <em>statistical</em> regularities observed in that particular corpus. If “cat” possesses such-and-such vector, this is not a necessary truth about the concept of cat, but a <em>contingent fact</em> about the distribution of the word in Wikipedia, or in Common Crawl, or in such-and-such other training corpus.</p>

<p>Hilbertian implicit definition is therefore <em>a priori</em>, where vector definition is <em>a posteriori</em>. This distinction has major consequences. Firstly, Hilbertian axioms claim <em>universality</em>, whereas embeddings are always relative to a corpus and a specific architecture. Secondly, where axioms impose <em>necessary</em> constraints, neural weights only capture <em>probable</em> tendencies. Finally, if Hilbertian definition aspires to <em>logical rigour</em>, vector definition assumes a form of <em>statistical fluidity</em>.</p>

<p>This difference recalls the Quinean critique of the analytic/synthetic distinction. In “Two Dogmas of Empiricism” [Quine, 1951], Quine contests the idea that there exists a clear frontier between definitional truths (analytic) and factual truths (synthetic). All knowledge forms a holistic network where “definitions” themselves can be revised in the light of experience.</p>

<p>The connectionist paradigm proves Quine right: the “definition” of a word is not a fixed analytic kernel, but a revisable inductive structure, anchored in observed linguistic usage. Embeddings are therefore not definitions in the classical sense, but <em>empirical models of meaning</em>.</p>

<h2 id="the-limits-of-vector-opacity">The Limits of Vector Opacity</h2>

<h3 id="definitional-transparency-versus-computational-opacity">Definitional Transparency versus Computational Opacity</h3>

<p>If vector representations can be understood as enlarged forms of definition, they are nevertheless distinguished from classical definitions by a crucial epistemic property: their <em>opacity</em>.</p>

<p>A classical definition possesses a virtue of <em>transparency</em>: it explicitly exposes the conditions of application of the concept. The definition “a prime number is a natural number divisible by exactly two distinct numbers” enables me not only to identify prime numbers, but above all to <em>understand why</em> 13 is prime and 14 is not. The definition provides the reasons for classification.</p>

<p>An embedding vector, conversely, is <em>opaque</em>. The vector $\vec{v}_{\text{prime}} \in \mathbb{R}^{512}$ can enable me to predict with precision whether a number is prime (if the model has been trained on this task), but it explains nothing to me. I cannot inspect this vector to read in it the criteria that make a number prime. Vector representation encapsulates statistical regularities without articulating them in the form of intelligible criteria.</p>

<p>This difference is not simply pragmatic, it is <em>epistemological</em>. Classical definition satisfies an ideal of <em>knowability</em>: to know what $X$ is, is to be able to explicitly enunciate the conditions that make an object fall under $X$. Embedding vector satisfies an ideal of <em>predictability</em>: to know how to treat $X$, is to be able to calculate correct responses involving $X$.</p>

<p>One recognises here the opposition between two conceptions of knowledge: the rationalist model (to know is to possess articulable reasons) and the connectionist model (to know is to have processing capacities).</p>

<h3 id="the-problem-of-hallucination">The Problem of Hallucination</h3>

<p>This opacity has important practical consequences. Generative language models, trained on vector representations, frequently produce plausible but false affirmations—the phenomenon called “hallucination”. The model generates “The Eiffel Tower was inaugurated in 1887” (false: 1889) because this proposition is statistically coherent with learnt patterns, even if it is factually incorrect.</p>

<p>This problem reveals a structural limitation of vector representations: they capture <em>verisimilitude</em> (what resembles training data) rather than <em>truth</em> (what corresponds to facts). A vector has no intrinsic criterion of factual correctness; it only encodes conditional probabilities.</p>

<p>Faced with this challenge, several works in artificial intelligence have attempted to reintroduce <em>discrete</em> and <em>verifiable</em> structures. The so-called “retrieval-augmented generation” (RAG) approach is emblematic. It rests on the decomposition of text into <em>atomic propositions</em>—statements that contain exactly one distinct, autonomous and minimal fact [Pommeret et al., 2024].</p>

<p>For example, the sentence “The dog and the cat are in the kitchen” would be decomposed into two atomic propositions: “The dog is in the kitchen” and “The cat is in the kitchen”.</p>

<p>Each proposition can then be verified independently against a reliable knowledge base. The model’s response is validated or corrected according to the factual correspondence of its atomic propositions.</p>

<p>This approach explicitly reintroduces the logic of <em>logical atomism</em>, defended by Russell and the early Wittgenstein [Wittgenstein, 1921]. According to this doctrine, the world is constituted of independent atomic facts, and a true proposition corresponds to an atomic fact. By imposing this atomic structure on the material treated by the vector model, one forces the system to respect the logical boundaries of facts.</p>

<h3 id="a-dialectic-between-continuity-and-discretion">A Dialectic between Continuity and Discretion</h3>

<p>One observes here a dialectical tension. The connectionist model is powerful precisely because it operates in the <em>continuous</em> and <em>distributed</em> space of vectors. This continuity enables it to generalise, to interpolate, to capture fine semantic nuances. But this power is paid for by a loss of logical control.</p>

<p>The reintroduction of atomic propositions seeks to restore factual precision by sacrificing a part of vector fluidity. It is a partial return to the classical paradigm: discrete units, composable, verifiable.</p>

<p>However, this return is never total. Atomic propositions themselves are identified and treated by connectionist models. Factual verification still rests on embeddings to measure semantic similarity between generated proposition and knowledge base. We therefore have not an abandonment of the vector paradigm, but a <em>hybridisation</em>: discrete logical structures anchored in a continuous vector substrate.</p>

<p>This hybridisation suggests that neither of the two paradigms—the logical-symbolic and the connectionist—can claim exclusivity. Classical explicit definitions guarantee rigour, eliminability, epistemic transparency. But they are fragile, rigid, and struggle to capture the contextual richness of natural language.</p>

<p>Vector representations, conversely, are robust, flexible, and capture distributional nuances remarkably well. But they violate classical criteria, produce inferences whose logical validity is not guaranteed, and remain opaque.</p>

<p>The future could therefore reside in <em>neuro-symbolic</em> architectures, where vectors manage fuzzy and intuitive correspondence, whilst discrete logical structures (atomic propositions, knowledge graphs, symbolic rules) manage factual precision and controllability. The definition of the future would then be a hybrid object: a vector embedding anchored to a discrete logical graph.</p>

<h2 id="conclusion-towards-a-pluralist-theory-of-definition">Conclusion: Towards a Pluralist Theory of Definition</h2>

<p>The confrontation between classical theory of definition and the connectionist paradigm does not reveal, as one might have feared, a radical incompatibility. It rather reveals that the notion of “definition” is itself broader and more heterogeneous than the logicist tradition suggested.</p>

<p>Classical theory, as formulated by Pierre Wagner from Pascal, Frege and Russell, has rigorously established the normative requirements of <em>explicit</em> definition in formal systems: eliminability of the defined by the defining, non-creativity or conservativity relative to a theory, univocity of the <em>definiendum</em>. These criteria remain valid and necessary for stipulative definitions in logic and mathematics.</p>

<p>But classical theory itself recognises the existence of alternative forms: <em>implicit</em> definition à la Hilbert, where terms are defined by their mutual relations in a system of axioms; <em>recursive</em> definition, where the defined appears in the defining under certain conditions; definition by <em>abstraction</em>, which introduces new objects by quotienting an equivalence relation.</p>

<p>The connectionist paradigm extends this plurality by introducing a new form: the <em>statistical distributional definition</em>. In this mode, the meaning of a term is neither a substitutable formula (explicit definition), nor a structural role in a system of axioms (Hilbertian implicit definition), but a <em>geometric localisation in a space of learnt co-occurrences</em>.</p>

<p>This definition possesses distinctive properties that singularise it radically. It is first <em>relational</em>, the meaning of a word being only its relative position to all others. It is then <em>contextual</em> and <em>continuous</em>, varying according to syntactic and semantic environment and expressing itself in a metric rather than discrete space. Finally, it is <em>a posteriori</em> and <em>opaque</em>, emerging from observed regularities without offering articulable explanation.</p>

<p>These properties violate the classical criteria of eliminability and non-creativity. But they do not therefore constitute an abandonment of the notion of definition. They rather reveal that classical theory described a <em>particular case</em> (formal explicit definition) whilst taking it for the <em>general form</em>.</p>

<p>We can therefore propose a typology of definitional modes that distinguishes four approaches. <strong>Explicit stipulative definition</strong> (Pascal, Frege), characterised by strict eliminability and epistemic transparency, remains the ideal for formal systems. <strong>Structural implicit definition</strong> (Hilbert), which defines meaning by axiomatic relations, suits mathematical theories. <strong>Statistical distributional definition</strong> (Firth, connectionism), founded on co-occurrences and inductive generalisation, proves powerful for natural language processing despite its opacity. Finally, <strong>ostensive definition</strong> (Wittgenstein), which anchors meaning in usage and direct learning, remains fundamental for understanding ordinary language acquisition.</p>

<p>These modes are not mutually exclusive. They correspond to different cognitive and scientific practices, each having its domain of validity.</p>

<p>The connectionist paradigm therefore does not destroy classical theory: it reveals that it described a particular case whilst taking it for the general form. Vector embedding is indeed a form of definition—not in the sense of substitutable identity, but in the sense of <em>structural localisation</em> of a concept in a space of significations.</p>

<p>What connectionism teaches us is that to define is not only to <em>analyse and decompose</em> (classical ideal), but also to <em>situate and relate</em> (structural ideal). Definition is not uniquely an act of fixing meaning, but also a process of contextual construction.</p>

<p>There remains open a vertiginous meta-theoretical question: if the notion of “definition” itself covers heterogeneous practices (stipulative, implicit, distributional, ostensive), should we not have a meta-definition that unifies these modes? Or must we accept that “definition” is itself a <em>polysemous</em> concept, whose meaning varies with theoretical context?</p>

<p>That would be a profound irony: confrontation with the connectionist paradigm constrains us to admit that the very concept of “definition” resists a univocal and explicit definition. Thereby validating, in a certain manner, the central teaching of connectionism: meaning emerges from the network of usages, not from a pre-established essence.</p>

<h2 id="appendix-gradient-descent">Appendix: Gradient Descent</h2>

<p><em>Gradient descent</em> is the optimisation algorithm that enables neural networks to learn from data. Its principle rests on a simple geometric idea: to minimise a function, it suffices to move in the direction of its steepest decrease.</p>

<h3 id="mathematical-principle">Mathematical Principle</h3>

<p>Consider a model parameterised by a weight vector $\theta \in \mathbb{R}^n$ (where $n$ can reach several billion in contemporary models). The objective of learning is to minimise a cost function $\mathcal{L}(\theta)$ that measures the gap between model predictions and observed data.</p>

<p>The gradient of this function, noted $\nabla_\theta \mathcal{L}(\theta)$, is a vector that points in the direction of the steepest growth of $\mathcal{L}$. To minimise $\mathcal{L}$, one therefore takes steps in the opposite direction:</p>

\[\theta_{t+1} = \theta_t - \eta \nabla_\theta \mathcal{L}(\theta_t)\]

<p>where $\eta &gt; 0$ is the <em>learning rate</em>, a hyperparameter that controls the amplitude of each step.</p>

<h3 id="geometric-interpretation">Geometric Interpretation</h3>

<p>Let us imagine the cost function as a surface in a high-dimensional space. The gradient indicates the local “slope” at each point. The algorithm proceeds by successive descents: starting from a random initialisation $\theta_0$, it iteratively adjusts parameters by “descending the slope” until reaching (ideally) a minimum.</p>

<h3 id="stochastic-gradient-descent">Stochastic Gradient Descent</h3>

<p>In practice, calculating the exact gradient on the entire training corpus is prohibitive. One therefore uses <em>stochastic gradient descent</em> (SGD): at each iteration, one estimates the gradient on a small random subset of data (a <em>mini-batch</em>). Although this estimation is noisy, it permits efficient learning on vast corpora.</p>

<h3 id="epistemological-consequence">Epistemological Consequence</h3>

<p>Gradient descent reveals the <em>inductive</em> and <em>a posteriori</em> character of connectionist learning. This a priori/a posteriori opposition reactivates a classical philosophical debate: are concepts innate (Cartesian, Leibnizian rationalism) or acquired by experience (Lockean, Humean empiricism)? The connectionist paradigm proves the empiricists right: meaning is not stipulated by pure reason, but extracted from regularities observed in linguistic usage.</p>

<p>Unlike Hilbertian axioms, which fix <em>a priori</em> geometric structure as necessary truths or analytic stipulations, neural weights emerge from an iterative process of empirical adjustment on a corpus. The “sense” of a word in a connectionist model is therefore not stipulated as immutable essence, but <em>learnt</em> inductively by statistical optimisation. It is linguistic experience—the observed distribution of words in their contexts—that determines representation, not a prior rational intuition.</p>

<hr />

<h3 id="references">References</h3>

<p><em>This reflection draws on research work conducted at the Institut de Recherche en Informatique Fondamentale (IRIF) and the Laboratoire Interdisciplinaire des Sciences du Numérique (LISN) [Pommeret et al., 2024], notably concerning compositionality in transformers [Pommeret et al., 2025] and the evaluation of atomic propositions for fact-checking [Pommeret et al., 2024].</em></p>

<ul>
  <li>[Devlin et al., 2019] Devlin, J., Chang, M.-W., Lee, K., &amp; Toutanova, K. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. <em>NAACL</em>.</li>
  <li>[Distrub. Hypo., 2023] A Review of Distributional Hypothesis. <em>ACL</em>.</li>
  <li>[Firth, 1957] Firth, J. R. (1957). A synopsis of linguistic theory 1930–1955.</li>
  <li>[Frege, 1884] Frege, G. (1884). <em>Die Grundlagen der Arithmetik</em>.</li>
  <li>[Mikolov et al., 2013] Mikolov, T., Chen, K., Corrado, G., &amp; Dean, J. (2013). Efficient Estimation of Word Representations in Vector Space. <em>ICLR</em>.</li>
  <li>[Pascal, 1657] Pascal, B. (1657). <em>De l’esprit géométrique</em>.</li>
  <li>[Pennington et al., 2014] Pennington, J., Socher, R., &amp; Manning, C. D. (2014). GloVe: Global Vectors for Word Representation. <em>EMNLP</em>.</li>
  <li>[Pommeret et al., 2024] Pommeret, L. (2024). Rapport de recherche IRIF.</li>
  <li>[Pommeret et al., 2024] Pommeret, L., Lassoued, A., &amp; de Rougemont, M. (2025). Composition with Transformers.</li>
  <li>[Pommeret et al., 2024] Pommeret, L., Rosset, S., Servan, C., &amp; Ghannay, S. (2024). AtomicEval: Evaluation Framework for Atomic Proposition Autonomy with French Propositioner. <em>JDSE</em>.</li>
  <li>[Putnam, 1975] Putnam, H. (1975). The Meaning of ‘Meaning’.</li>
  <li>[Quine, 1951] Quine, W. V. O. (1951). Two Dogmas of Empiricism.</li>
  <li>[Russell, 1905] Russell, B. (1905). On Denoting.</li>
  <li>[Vaswani et al., 2017] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., &amp; Polosukhin, I. (2017). Attention Is All You Need. <em>NeurIPS</em>.</li>
  <li>[Wagner, 2017] Wagner, P. (2017). <em>La définition</em>. https://shs.hal.science/halshs-01494741</li>
  <li>[Wittgenstein, 1921] Wittgenstein, L. (1921). <em>Tractatus Logico-Philosophicus</em>.</li>
</ul>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>This reflection draws on research work conducted at the Institut de Recherche en Informatique Fondamentale (IRIF) and the Laboratoire Interdisciplinaire des Sciences du Numérique (LISN), notably concerning compositionality in transformers and the evaluation of atomic propositions for fact-checking. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>For a modern pedagogical introduction, see [Distrub. Hypo., 2023]. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:3" role="doc-endnote">
      <p>Ludwig Wittgenstein, <em>Philosophical Investigations</em>, §43: “the meaning of a word is its use in the language”. Basil Blackwell edition, translated by G. E. M. Anscombe. <a href="#fnref:3" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:4" role="doc-endnote">
      <p>This distinction goes back to the <em>Logic or the Art of Thinking</em> (1662) by Antoine Arnauld and Pierre Nicole, called the Port-Royal Logic, which opposed “comprehension” (set of attributes contained in the idea) to “extension” (set of objects to which the idea applies). <a href="#fnref:4" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><category term="Philosophy" /><category term="Machine Learning" /><category term="Logic" /><summary type="html"><![CDATA[How do LLMs and generative AI redefine the notion of definition?]]></summary></entry><entry xml:lang="fr"><title type="html">Projet Spinoza</title><link href="https://lucpommeret.com/projets/spinoza-fr.html" rel="alternate" type="text/html" title="Projet Spinoza" /><published>2025-03-01T00:00:00+00:00</published><updated>2025-03-01T00:00:00+00:00</updated><id>https://lucpommeret.com/projets/spinoza-fr</id><content type="html" xml:base="https://lucpommeret.com/projets/spinoza-fr.html"><![CDATA[<style>
    .github-link {
        display: block;
        text-align: center;
        margin: 20px 0;
        font-size: 18px;
        font-weight: bold;
    }

    .portrait-container {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        margin: 30px 0;
    }

    .portrait {
        text-align: center;
        margin: 10px;
        max-width: 300px;
    }

    .portrait img {
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        max-height: 300px;
    }

    .portrait p {
        margin-top: 10px;
        font-style: italic;
        color: var(--text-muted);
    }

    pre {
        overflow-x: auto;
    }
</style>

<p><a href="https://github.com/l-pommeret/Projet-Spinoza" target="_blank" rel="noopener noreferrer" class="github-link">Voir le projet sur GitHub</a></p>

<div class="portrait-container">
    <div class="portrait">
        <picture>
            <source type="image/avif" srcset="/assets/img/posts/spinoza/spinoza-300.avif 1x, /assets/img/posts/spinoza/spinoza-600.avif 2x" />
            <source type="image/webp" srcset="/assets/img/posts/spinoza/spinoza-300.webp 1x, /assets/img/posts/spinoza/spinoza-600.webp 2x" />
            <img src="/assets/img/posts/spinoza/spinoza-300.jpg" alt="Baruch Spinoza" width="258" height="300" loading="lazy" decoding="async" />
        </picture>
        <p>Baruch Spinoza (1632-1677)</p>
    </div>
    <div class="portrait">
        <img src="https://philosophyandreligion.camden.rutgers.edu/files/2012/06/c_jarrett1.jpg" alt="Charles Jarrett" loading="lazy" />
        <p>Charles Jarrett, auteur de « The Logical Structure of Spinoza's Ethics, Part I » (1978)</p>
    </div>
</div>

<p>Ce projet est une formalisation en Coq des propositions du Livre I de l’Éthique de Spinoza, selon la formalisation logique proposée par Charles Jarrett dans son article « The Logical Structure of Spinoza’s Ethics, Part I » (1978).</p>

<p><a href="/assets/De_Deo.pdf" class="document-link">Le PDF des preuves en Coq !</a></p>

<h2 id="mise-en-garde">Mise en garde</h2>
<p>Ces démonstrations reposent sur une interprétation philosophique (puisque c’est une formalisation) de l’Ethique, et donc sont responsabilité partagée de Spinoza et de Charles Jarrett.</p>

<h2 id="contenu-du-projet">Contenu du projet</h2>
<p>Le fichier principal <code class="language-plaintext highlighter-rouge">De_Deo.v</code> contient :</p>
<ul>
  <li>Les définitions formelles des opérateurs modaux (nécessité logique, possibilité, nécessité naturelle), qui sied à la philosophie de Spinoza</li>
  <li>Le lexique des prédicats unaires, binaires et ternaires correspondant aux concepts spinozistes</li>
  <li>Les axiomes modaux fondamentaux</li>
  <li>Les définitions de Spinoza (causa sui, substance, attribut, mode, Dieu, etc.)</li>
  <li>Les axiomes proposés par Spinoza et complétés par Jarrett</li>
  <li>Les démonstrations formelles des 36 propositions du Livre I (excepté la P33 et la P36 qui sont indérivable du système)</li>
</ul>

<h2 id="prérequis">Prérequis</h2>
<p>Pour exécuter ce projet, vous aurez besoin de :</p>
<ol>
  <li><a href="https://coq.inria.fr/" target="_blank" rel="noopener noreferrer">Coq</a> (version 8.13 ou supérieure recommandée)</li>
  <li>Un IDE compatible avec Coq comme CoqIDE ou <a href="https://proofgeneral.github.io/" target="_blank" rel="noopener noreferrer">Proof General</a> pour Emacs</li>
</ol>

<h2 id="installation">Installation</h2>
<ol>
  <li>Installez Coq en suivant les instructions sur le <a href="https://coq.inria.fr/download" target="_blank" rel="noopener noreferrer">site officiel</a></li>
  <li>Clonez ce dépôt :
    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/l-pommeret/Projet-Spinoza.git
<span class="nb">cd </span>Projet-Spinoza
</code></pre></div>    </div>
  </li>
</ol>

<h2 id="exécution">Exécution</h2>
<h3 id="avec-coqide">Avec CoqIDE</h3>
<ol>
  <li>Ouvrez CoqIDE</li>
  <li>Ouvrez le fichier <code class="language-plaintext highlighter-rouge">De_Deo.v</code></li>
  <li>Utilisez le bouton “Step forward” ou la combinaison de touches Ctrl+Right pour avancer pas à pas dans la preuve</li>
</ol>

<h3 id="avec-proof-general-emacs">Avec Proof General (Emacs)</h3>
<ol>
  <li>Ouvrez Emacs</li>
  <li>Ouvrez le fichier <code class="language-plaintext highlighter-rouge">De_Deo.v</code></li>
  <li>Utilisez C-c C-n pour avancer d’une étape dans la preuve ou C-c C-Enter pour avancer jusqu’au curseur</li>
</ol>

<h3 id="en-ligne-de-commande">En ligne de commande</h3>
<p>Pour compiler le projet sans interface graphique :</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>coqc De_Deo.v
</code></pre></div></div>

<h2 id="remerciements">Remerciements</h2>
<ul>
  <li>Charles Jarrett pour sa formalisation logique de l’Éthique</li>
  <li>L’équipe de développement de Coq pour cet assistant de preuve</li>
  <li>Claude 3.5, le LLM qui m’a beaucoup aidé à réaliser ce projet, parfois étonnamment fort en démonstrations.</li>
</ul>]]></content><author><name></name></author><category term="Philosophie" /><category term="Logique" /><category term="Coq" /><summary type="html"><![CDATA[Formalisation en Coq des propositions du Livre I de l'Éthique de Spinoza basée sur la structure logique de Charles Jarrett.]]></summary></entry><entry xml:lang="en"><title type="html">Spinoza Project</title><link href="https://lucpommeret.com/projets/spinoza.html" rel="alternate" type="text/html" title="Spinoza Project" /><published>2025-03-01T00:00:00+00:00</published><updated>2025-03-01T00:00:00+00:00</updated><id>https://lucpommeret.com/projets/spinoza</id><content type="html" xml:base="https://lucpommeret.com/projets/spinoza.html"><![CDATA[<style>
    .github-link {
        display: block;
        text-align: center;
        margin: 20px 0;
        font-size: 18px;
        font-weight: bold;
    }

    .portrait-container {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        margin: 30px 0;
    }

    .portrait {
        text-align: center;
        margin: 10px;
        max-width: 300px;
    }

    .portrait img {
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        max-height: 300px;
    }

    .portrait p {
        margin-top: 10px;
        font-style: italic;
        color: var(--text-muted);
    }

    pre {
        overflow-x: auto;
    }
</style>

<p><a href="https://github.com/l-pommeret/Projet-Spinoza" target="_blank" rel="noopener noreferrer" class="github-link">View the project on GitHub</a></p>

<div class="portrait-container">
    <div class="portrait">
        <picture>
            <source type="image/avif" srcset="/assets/img/posts/spinoza/spinoza-300.avif 1x, /assets/img/posts/spinoza/spinoza-600.avif 2x" />
            <source type="image/webp" srcset="/assets/img/posts/spinoza/spinoza-300.webp 1x, /assets/img/posts/spinoza/spinoza-600.webp 2x" />
            <img src="/assets/img/posts/spinoza/spinoza-300.jpg" alt="Baruch Spinoza" width="258" height="300" loading="lazy" decoding="async" />
        </picture>
        <p>Baruch Spinoza (1632-1677)</p>
    </div>
    <div class="portrait">
        <img src="https://philosophyandreligion.camden.rutgers.edu/files/2012/06/c_jarrett1.jpg" alt="Charles Jarrett" loading="lazy" />
        <p>Charles Jarrett, author of "The Logical Structure of Spinoza's Ethics, Part I" (1978)</p>
    </div>
</div>

<p>This project is a formalization in Coq of the propositions from Book I of Spinoza’s Ethics, according to the logical formalization proposed by Charles Jarrett in his article “The Logical Structure of Spinoza’s Ethics, Part I” (1978).</p>

<p><a href="/assets/De_Deo.pdf" class="document-link">The PDF for the proofs in Coq!</a></p>

<h2 id="caveat">Caveat</h2>
<p>These demonstrations are based on a philosophical interpretation (since it’s a formalization) of the Ethics, and are therefore a shared responsibility of Spinoza and Charles Jarrett.</p>

<h2 id="project-content">Project Content</h2>
<p>The main file <code class="language-plaintext highlighter-rouge">De_Deo.v</code> contains:</p>
<ul>
  <li>Formal definitions of modal operators (logical necessity, possibility, natural necessity), which suit Spinoza’s philosophy</li>
  <li>The lexicon of unary, binary and ternary predicates corresponding to Spinozist concepts</li>
  <li>The fundamental modal axioms</li>
  <li>Spinoza’s definitions (causa sui, substance, attribute, mode, God, etc.)</li>
  <li>The axioms proposed by Spinoza and completed by Jarrett</li>
  <li>The formal demonstrations of the 36 propositions of Book I (except P33 and P36 which are underivable from the system)</li>
</ul>

<h2 id="requirements">Requirements</h2>
<p>To run this project, you will need:</p>
<ol>
  <li><a href="https://coq.inria.fr/" target="_blank" rel="noopener noreferrer">Coq</a> (version 8.13 or higher recommended)</li>
  <li>A Coq-compatible IDE such as CoqIDE or <a href="https://proofgeneral.github.io/" target="_blank" rel="noopener noreferrer">Proof General</a> for Emacs</li>
</ol>

<h2 id="installation">Installation</h2>
<ol>
  <li>Install Coq by following the instructions on the <a href="https://coq.inria.fr/download" target="_blank" rel="noopener noreferrer">official website</a></li>
  <li>Clone this repository:
    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/l-pommeret/Projet-Spinoza.git
<span class="nb">cd </span>Projet-Spinoza
</code></pre></div>    </div>
  </li>
</ol>

<h2 id="execution">Execution</h2>
<h3 id="with-coqide">With CoqIDE</h3>
<ol>
  <li>Open CoqIDE</li>
  <li>Open the file <code class="language-plaintext highlighter-rouge">De_Deo.v</code></li>
  <li>Use the “Step forward” button or the Ctrl+Right key combination to advance step by step in the proof</li>
</ol>

<h3 id="with-proof-general-emacs">With Proof General (Emacs)</h3>
<ol>
  <li>Open Emacs</li>
  <li>Open the file <code class="language-plaintext highlighter-rouge">De_Deo.v</code></li>
  <li>Use C-c C-n to advance one step in the proof or C-c C-Enter to advance to the cursor</li>
</ol>

<h3 id="command-line">Command Line</h3>
<p>To compile the project without a graphical interface:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>coqc De_Deo.v
</code></pre></div></div>

<h2 id="acknowledgements">Acknowledgements</h2>
<ul>
  <li>Charles Jarrett for his logical formalization of the Ethics</li>
  <li>The Coq development team for this proof assistant</li>
  <li>Claude 3.5, the LLM that helped me a lot with this project, sometimes surprisingly strong in demonstrations.</li>
</ul>]]></content><author><name></name></author><category term="Philosophy" /><category term="Logic" /><category term="Coq" /><summary type="html"><![CDATA[Formalization in Coq of Spinoza's Ethics Book I propositions based on Charles Jarrett's logical structure.]]></summary></entry><entry xml:lang="fr"><title type="html">Neurochirurgie des transformers</title><link href="https://lucpommeret.com/projets/SAE-fr.html" rel="alternate" type="text/html" title="Neurochirurgie des transformers" /><published>2024-08-01T00:00:00+00:00</published><updated>2024-08-01T00:00:00+00:00</updated><id>https://lucpommeret.com/projets/sae-fr</id><content type="html" xml:base="https://lucpommeret.com/projets/SAE-fr.html"><![CDATA[<p><a href="https://colab.research.google.com/github/l-pommeret/LLM_neurochirurgy/blob/main/Neurochirurgie_des_Transformers.ipynb" target="_blank" rel="noopener noreferrer">Ouvrir dans Google Colab</a></p>

<iframe src="/assets/neurochirurgie_transformers.html" title="Notebook : Neurochirurgie des transformers" loading="lazy" width="100%" height="800px" style="border: none; margin-top: 20px;">
</iframe>]]></content><author><name></name></author><category term="Machine Learning" /><category term="Interprétabilité" /><summary type="html"><![CDATA[Notebook explorant l'interprétabilité des réseaux de neurones via les Sparse Auto-Encoders.]]></summary></entry><entry xml:lang="en"><title type="html">Transformer neurosurgery</title><link href="https://lucpommeret.com/projets/SAE.html" rel="alternate" type="text/html" title="Transformer neurosurgery" /><published>2024-08-01T00:00:00+00:00</published><updated>2024-08-01T00:00:00+00:00</updated><id>https://lucpommeret.com/projets/sae</id><content type="html" xml:base="https://lucpommeret.com/projets/SAE.html"><![CDATA[<p><a href="https://colab.research.google.com/github/l-pommeret/LLM_neurochirurgy/blob/main/Neurochirurgie_des_Transformers.ipynb" target="_blank" rel="noopener noreferrer">Open in Google Colab</a></p>

<iframe src="/assets/neurochirurgie_transformers.html" title="Notebook: Transformer neurosurgery" loading="lazy" width="100%" height="800px" style="border: none; margin-top: 20px;">
</iframe>]]></content><author><name></name></author><category term="Machine Learning" /><category term="Interpretability" /><summary type="html"><![CDATA[Notebook exploring neural network interpretability via Sparse Auto-Encoders.]]></summary></entry><entry xml:lang="fr"><title type="html">L’hypothèse de représentation platonique dans un petit monde : le morpion</title><link href="https://lucpommeret.com/projets/prh-fr.html" rel="alternate" type="text/html" title="L’hypothèse de représentation platonique dans un petit monde : le morpion" /><published>2024-06-01T00:00:00+00:00</published><updated>2024-06-01T00:00:00+00:00</updated><id>https://lucpommeret.com/projets/prh-fr</id><content type="html" xml:base="https://lucpommeret.com/projets/prh-fr.html"><![CDATA[<script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha384-Wuix6BuhrWbjDBs24bXrjf4ZQ5aFeFWBuKkFekO2t8xFU0iNaLQfp2K6/1Nxveei" crossorigin="anonymous"></script>

<p><em>Luc Pommeret</em></p>

<h2 id="résumé">Résumé</h2>

<p>Ce projet s’inspire de l’article de juin 2024 de Philip Isola et ses étudiants : Platonic Representation Hypothesis. L’idée centrale est que les modèles entraînés sur différents types de données (image, audio, texte) convergent vers la même représentation dans l’espace latent. Le code pour l’entraînement des transformers est basé sur le travail d’Andrej Karpathy (nanoGPT). Dans ce projet, nous testons cette hypothèse sur un monde très simple : le morpion. Nous entraînons deux transformers avec la même architecture et le même nombre de paramètres sur : 1) des images PNG de parties, 2) des parties en notation textuelle standard.</p>

<p>Tout le code est disponible sur GitHub à cette adresse : <a href="https://github.com/l-pommeret/platonic_representation">https://github.com/l-pommeret/platonic_representation</a></p>

<h2 id="introduction">Introduction</h2>

<p>Les LLMs sont des modèles dont la performance sur le langage humain n’est plus à démontrer. Fondée sur l’architecture <em>transformer</em>, leurs capacités hors-norme semblent parfois nous échapper, si bien qu’on ne comprend pas toujours comment le modèle infère ce qu’il infère.</p>

<p>Une hypothèse en particulier a attiré notre attention, parce qu’elle semble faire la synthèse de nombreuses observations éparses que l’on a pu faire dans le domaine de l’interprétabilité (ou explicabilité). Il s’agit de la PRH, ou <em>Platonic Representation Hypothesis</em>, qui postule que les modèles de <em>transformer</em> se forgent un modèle de représentation du monde durant l’entraînement, résultant de la recherche de simplicité que recherche naturellement un réseau de neurones qui apprend.</p>

<p>La conséquence la plus surprenante de leur hypothèse est que des modèles entraînés sur différents types de données (images, texte, sons, etc.) vont converger vers la même représentation dans leur <em>espace latent</em>. Notre but ici sera d’étudier en profondeur un cas simple, très simple, celui du morpion. Dans ce jeu, dont l’ensemble des parties peut être généré en quelques minutes par un ordinateur moderne, le monde est très simple, et ne nécessite pas une immense puissance de calcul, autre avantage dont nous pourrons tirer parti.</p>

<p>Ici nous allons étudier les représentations de deux <em>transformers</em> : l’un est entraîné sur des images du jeu, et l’autre sur des séquences de coups sous forme de texte.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/txt_img-800.webp 800w, /assets/img/posts/prh/txt_img-1600.webp 1600w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/txt_img-800.png" alt="Représentations textuelles et imagées du morpion" width="800" height="99" loading="lazy" decoding="async" />
</picture>

<p>L’hypothèse principale que nous voulons tester est en somme si les deux représentations d’une même partie de morpion convergent.</p>

<p>Pour préparer le terrain et explorer d’autres aspects de l’interprétation de l’architecture <em>transformer</em>, nous allons effectuer des tests à l’aide d’autres techniques, à commencer par le <em>sondage</em> (<em>probing</em>).</p>

<h2 id="comment-représenter-une-partie-de-morpion-">Comment représenter une partie de morpion ?</h2>

<p>Le morpion, comme les échecs ou les dames, est un jeu de plateau. Mais contrairement aux deux derniers, il est extrêmement simple, ce qui permet la complétude de l’analyse (on génère toutes les parties possibles, et on analyse notre <em>transformer</em> avec toutes ces parties).</p>

<p>Une manière très simple, voire enfantine, de représenter une partie de morpion est de la noter sous forme de dessin, côte à côte, en montrant l’état du plateau à chaque trait. C’est le format que nous avons choisi pour les images, qui ont donc une taille 9x9.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/game-540.webp 540w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/game-540.png" alt="Représentation d'une partie de morpion" width="540" height="540" loading="lazy" decoding="async" />
</picture>

<p>Pour noter les parties de morpion textuellement, nous avons choisi de noter les coups les uns à la suite des autres, comme le format PGN aux échecs, ce qui donne un historique de la partie.</p>

<p>Le format du jeu de morpion étant ce qu’il est, le nombre de coups ne peut excéder 9, ce qui est bien pratique pour la tokénisation, première étape de l’apprentissage.</p>

<p>Voici les tokénisations respectives des images et des textes (que l’on trouve dans les fichiers <code class="language-plaintext highlighter-rouge">meta.pkl</code>) :</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"vocab_size"</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w">
</span><span class="nl">"itos"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"0"</span><span class="p">:</span><span class="w"> </span><span class="s2">"b"</span><span class="p">,</span><span class="w"> </span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"n"</span><span class="p">,</span><span class="w"> </span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g"</span><span class="p">,</span><span class="w"> </span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="s2">";"</span><span class="p">},</span><span class="w">
</span><span class="nl">"stoi"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"b"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nl">"n"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nl">"g"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="nl">";"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"vocab_size"</span><span class="p">:</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w">
</span><span class="nl">"itos"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"0"</span><span class="p">:</span><span class="w"> </span><span class="s2">";"</span><span class="p">,</span><span class="w"> </span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="s2">" "</span><span class="p">,</span><span class="w"> </span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w"> </span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w"> </span><span class="nl">"4"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w"> </span><span class="nl">"5"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3"</span><span class="p">,</span><span class="w"> </span><span class="nl">"6"</span><span class="p">:</span><span class="w"> </span><span class="s2">"X"</span><span class="p">,</span><span class="w"> </span><span class="nl">"7"</span><span class="p">:</span><span class="w"> </span><span class="s2">"O"</span><span class="p">,</span><span class="w"> </span><span class="nl">"8"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/"</span><span class="p">,</span><span class="w"> </span><span class="nl">"9"</span><span class="p">:</span><span class="w"> </span><span class="s2">"-"</span><span class="p">},</span><span class="w">
</span><span class="nl">"stoi"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">";"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nl">" "</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nl">"0"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="nl">"X"</span><span class="p">:</span><span class="w"> </span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="nl">"O"</span><span class="p">:</span><span class="w"> </span><span class="mi">7</span><span class="p">,</span><span class="w"> </span><span class="nl">"/"</span><span class="p">:</span><span class="w"> </span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="nl">"-"</span><span class="p">:</span><span class="w"> </span><span class="mi">9</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>Les <em>stoi</em> et les <em>itos</em> ne sont pas grecs, mais un format de données qui permet de convertir les chaînes de caractères (strings) en entiers naturels (integers), c’est-à-dire string to integer ou plus simplement <em>stoi</em>, l’<em>itos</em> étant l’opération réciproque.</p>

<p>La tokénisation des images repose sur le pixel, qui sera blanc, valeur 0 (représenté par ‘b’), si la case est saturée par un X, noire, valeur 1 (représenté par ‘n’), si la case est saturée par un O, et grise, valeur 2 (représenté par ‘g’) si la case est vide. L’image est parcourue de manière naturelle, ligne par ligne pour former une ligne au format <code class="language-plaintext highlighter-rouge">str</code> (string).</p>

<p>Dans les deux cas, “;” est le token de début, celui qui marque le début de la séquence pour les images comme pour les textes.</p>

<h2 id="probing">Probing</h2>

<p>Le <em>probing</em> (ou sondage) est une technique permettant de détecter la présence de propriétés dans un réseau de neurones. C’est une technique qui a été abondamment utilisée depuis 2018 et l’article Manning et al. qui l’applique à la détection d’arbres syntaxiques dans un transformer entraîné sur un corpus de textes étiquetés.</p>

<p>Ici, nous voulons utiliser le <em>probing</em> pour détecter la présence ou non d’une représentation du plateau de morpion, couche par couche dans le <em>transformer</em>. L’idée est d’entraîner un classifieur linéaire case par case et couche par couche pour qu’il détecte l’état d’une case (X, O ou vide). La technique utilisée ici est une généralisation du SVM originel, appelée <em>OneVsRest</em>.</p>

<h3 id="quest-ce-quun-svm-linéaire-">Qu’est-ce qu’un SVM linéaire ?</h3>

<p>Le SVM (Support Vector Machine) linéaire est une technique d’apprentissage supervisé utilisée pour la classification. Dans le cas binaire, l’objectif est de trouver un hyperplan qui sépare au mieux les deux classes de données. Dans le cas linéaire qui nous occupe, il s’agit donc de trouver l’hyperplan qui explique le mieux la séparation des données dans le réseau de neurones.</p>

<p>Soit un ensemble de données d’entraînement ${(x_i, y_i)}_{i=1}^n$, où $x_i \in \mathbb{R}^d$ sont les vecteurs de caractéristiques et $y_i \in {-1, +1}$ sont les étiquettes de classe.</p>

<p>L’hyperplan séparateur est défini par l’équation :
\(w^T x + b = 0\)
où $w \in \mathbb{R}^d$ est le vecteur normal à l’hyperplan et $b \in \mathbb{R}$ est le biais.</p>

<h4 id="problème-doptimisation">Problème d’optimisation</h4>

<p>Le SVM cherche à maximiser la marge entre l’hyperplan et les points les plus proches de chaque classe. Cela se traduit par le problème d’optimisation suivant :</p>

\[\begin{aligned}
\min_{w,b} &amp;\quad \frac{1}{2} \|w\|^2 \\
\text{s.c.} &amp;\quad y_i(w^T x_i + b) \geq 1, \quad i = 1, \ldots, n
\end{aligned}\]

<p>En utilisant les multiplicateurs de Lagrange, on obtient la formulation duale :</p>

\[\begin{aligned}
\max_{\alpha} &amp;\quad \sum_{i=1}^n \alpha_i - \frac{1}{2} \sum_{i=1}^n \sum_{j=1}^n \alpha_i \alpha_j y_i y_j
x_i^T x_j \\
\text{s.c.} &amp;\quad \sum_{i=1}^n \alpha_i y_i = 0 \\
&amp;\quad 0 \leq \alpha_i \leq C, \quad i = 1, \ldots, n
\end{aligned}\]

<p>où $\alpha_i$ sont les multiplicateurs de Lagrange et C est un paramètre de régularisation.</p>

<p>Une fois les $\alpha_i$ optimaux trouvés, la fonction de décision pour un nouveau point x est :
\(f(x) = \text{sign}\left(\sum_{i=1}^n \alpha_i y_i x_i^T x + b\right)\)
où b est calculé en utilisant les vecteurs de support (points pour lesquels $\alpha_i &gt; 0$).</p>

<h4 id="extension-multi-classe">Extension multi-classe</h4>

<p>Dans notre code, une approche <em>One-vs-Rest</em> est utilisée pour étendre le SVM binaire au cas multi-classe. Pour K classes, on entraîne K classifieurs binaires, chacun séparant une classe de toutes les autres.</p>

<h3 id="les-résultats-couche-par-couche">Les résultats couche par couche</h3>

<p>Le transformer est une architecture assez complexe qui permet de multiples points de sonde. Nous avons donc voulu sonder les moindres recoins de celui-ci pour avoir une idée de la représentation du plateau de morpion à chaque étape.</p>

<p>Voici les résultats en prenant la précision de l’évaluation du SVM couche par couche pour le texte.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/txt_accuracy_across_probe_points-800.webp 800w, /assets/img/posts/prh/txt_accuracy_across_probe_points-1500.webp 1500w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/txt_accuracy_across_probe_points-800.png" alt="Probing couche par couche pour le texte" width="800" height="427" loading="lazy" decoding="async" />
</picture>

<p>Nous pouvons observer que le transformer acquiert petit à petit une représentation de l’état du plateau de morpion, qui culmine lors de la normalisation post-attention et de la seconde couche du MLP.</p>

<p>Pour le modèle entraîné sur les images, le résultat est très différent, puisque la courbe reste quasiment plate tout du long du <em>transformer</em>.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/img_accuracy_across_probe_points-800.webp 800w, /assets/img/posts/prh/img_accuracy_across_probe_points-1500.webp 1500w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/img_accuracy_across_probe_points-800.png" alt="Probing couche par couche pour les images" width="800" height="427" loading="lazy" decoding="async" />
</picture>

<p>On remarque que le modèle ne forge pas de représentation du plateau de morpion, ce qui peut interroger. Pour répondre à cela, nous pouvons formuler l’hypothèse qu’étant donné que pour résoudre la tâche (prédire le prochain token), il faut avoir une représentation sur laquelle se reposer à au moins un moment, il n’y a pas besoin de se forger une représentation lorsqu’on a déjà l’image en entrée, alors que c’est nécessaire lorsqu’on n’a que le texte.</p>

<p>Nous pouvons également nous intéresser à la représentation des cases (<em>positions</em>), qui montre des effets de symétrie et d’asymétrie assez intéressants.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/txt_accuracy_across_positions_all_points-800.webp 800w, /assets/img/posts/prh/txt_accuracy_across_positions_all_points-1500.webp 1500w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/txt_accuracy_across_positions_all_points-800.png" alt="Probing couche par couche pour le texte (positions)" width="800" height="427" loading="lazy" decoding="async" />
</picture>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/img_accuracy_across_positions_all_points-800.webp 800w, /assets/img/posts/prh/img_accuracy_across_positions_all_points-1500.webp 1500w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/img_accuracy_across_positions_all_points-800.png" alt="Probing couche par couche pour les images (positions)" width="800" height="427" loading="lazy" decoding="async" />
</picture>

<p>Une observation générale est que très souvent, dans la plupart des couches des deux modèles, c’est la case du milieu (position 5) qui est la mieux représentée.</p>

<p>Ensuite, nous pouvons observer de belles symétries, surtout pour le texte, et certaines couches, qui montrent une représentation géométrique du plateau, qui évolue en fonction de la couche. Par exemple, dans le modèle d’image, la couche de normalisation pré-attention avantage clairement la case centrale, tandis que plus on s’approche de la sortie, moins cette case du milieu est favorisée, au profit d’autres cases, comme si l’analyse effectuait un mouvement concentrique vers les bords du plateau.</p>

<h2 id="la-prh-se-vérifie-t-elle-">La PRH se vérifie-t-elle ?</h2>

<h3>Quelles métriques ?</h3>
<p>Suivant la littérature antérieure, nous définissons l’<em>alignement représentationnel</em> comme une mesure de la similarité des structures de similarité induites par deux représentations, c’est-à-dire une métrique de similarité sur les noyaux. Nous donnons la définition mathématique de ces concepts ci-dessous :</p>

<ul>
  <li>Une <strong>représentation</strong> est une fonction f : X → ℝ^n qui attribue un vecteur de caractéristiques à chaque entrée dans un certain domaine de données X.</li>
  <li>Un <strong>noyau</strong>, K : X × X → ℝ, caractérise comment une représentation mesure la distance/similarité entre les points de données. K(x_i,x_j)=⟨f(x_i),f(x_j)⟩, où ⟨·,·⟩ désigne le produit scalaire, x_i,x_j ∈ X et K ∈ 𝒦.</li>
  <li>Une <strong>métrique d’alignement de noyau</strong>, m : 𝒦 × 𝒦 → ℝ, mesure la similarité entre deux noyaux, c’est-à-dire à quel point la mesure de distance induite par une représentation est similaire à celle induite par une autre. Les exemples incluent la Distance de Noyau Centrée (CKA), SVCCA, et les métriques des plus proches voisins.</li>
</ul>

<h3 id="métriques-dalignement">Métriques d’alignement</h3>

<h4 id="cycle-knn-k-plus-proches-voisins-cycliques">Cycle KNN (K plus proches voisins cycliques)</h4>

<p><strong>Définition mathématique</strong>
Soient A et B deux ensembles de vecteurs de caractéristiques, chacun de taille N. Pour un k donné :</p>

<ol>
  <li>Calculer les k-NN dans A : Pour chaque point dans A, trouver ses k plus proches voisins dans A.</li>
  <li>Mapper ces voisins vers B.</li>
  <li>Calculer les k-NN dans B pour ces points mappés.</li>
  <li>Vérifier si le point original dans A est parmi ces voisins.</li>
</ol>

<p>La métrique est la fraction de points qui « survivent » à ce cycle.</p>

<p><strong>Formule</strong></p>

\[\text{Cycle\_KNN}(A, B) = \frac{1}{N} \sum_{i=1}^N \mathbb{I}(a_i \in \text{kNN}_B(\text{kNN}_A(a_i)))\]

<p>où $\mathbb{I}$ est la fonction indicatrice, et $\text{kNN}_X(y)$ renvoie les k plus proches voisins de y dans X.</p>

<p><strong>Interprétation</strong></p>

<ul>
  <li>Plage : [0, 1]</li>
  <li>Des valeurs plus élevées indiquent un meilleur alignement entre les deux espaces de caractéristiques.</li>
  <li>Une valeur de 1 signifie une parfaite consistance cyclique : la structure de voisinage est parfaitement préservée lors du mapping de A vers B et retour.</li>
  <li>Des valeurs plus basses suggèrent que la structure locale n’est pas bien préservée entre les deux espaces.</li>
</ul>

<h4 id="knn-mutuel-k-plus-proches-voisins-mutuels">KNN mutuel (K plus proches voisins mutuels)</h4>

<p><strong>Définition mathématique</strong>
Pour chaque point dans A, vérifier s’il est parmi les k-plus proches voisins de son point correspondant dans B, et vice versa.</p>

<p><strong>Formule</strong></p>

\[\text{Mutual\_KNN}(A, B) = \frac{1}{N} \sum_{i=1}^N \mathbb{I}(a_i \in \text{kNN}_B(b_i) \text{ ET } b_i \in
\text{kNN}_A(a_i))\]

<p>où $\mathbb{I}$ est la fonction indicatrice, et $\text{kNN}_X(y)$ renvoie les k plus proches voisins de y dans X.</p>

<p><strong>Interprétation</strong></p>

<ul>
  <li>Plage : [0, 1]</li>
  <li>Des valeurs plus élevées indiquent une meilleure préservation mutuelle du voisinage entre les deux espaces.</li>
  <li>Une valeur de 1 signifie que tous les points sont des k-plus proches voisins mutuels dans les deux espaces.</li>
  <li>Des valeurs plus basses suggèrent que les structures de voisinage dans A et B sont différentes.</li>
</ul>

<h4 id="cka-alignement-de-noyau-centré">CKA (alignement de noyau centré)</h4>

<p><strong>Définition mathématique</strong>
CKA mesure la similarité entre deux noyaux après centrage.</p>

<p><strong>Formule</strong></p>

\[\text{CKA}(K, L) = \frac{\langle K_c, L_c \rangle_F}{\|K_c\|_F \|L_c\|_F}\]

<p>où $K_c$ et $L_c$ sont des matrices de noyau centrées, $\langle \cdot,\cdot \rangle_F$ est le produit scalaire de Frobenius, et $|\cdot|_F$ est la norme de Frobenius.</p>

<p><strong>Interprétation</strong></p>

<ul>
  <li>Plage : [0, 1]</li>
  <li>Des valeurs plus élevées indiquent une plus grande similarité entre les matrices de noyau.</li>
  <li>Une valeur de 1 suggère que les deux noyaux capturent des relations identiques entre les points de données.</li>
  <li>Des valeurs plus basses indiquent que les noyaux capturent des relations différentes.</li>
  <li>CKA est invariant aux transformations orthogonales et à la mise à l’échelle isotrope.</li>
</ul>

<h4 id="svcca-analyse-de-corrélation-canonique-des-vecteurs-singuliers">SVCCA (analyse de corrélation canonique des vecteurs singuliers)</h4>

<p><strong>Définition mathématique</strong></p>

<ol>
  <li>Effectuer la SVD sur les deux matrices de caractéristiques : A = U_A Σ_A V_A^T, B = U_B Σ_B V_B^T</li>
  <li>Prendre les d premiers vecteurs singuliers : Ũ_A, Ũ_B</li>
  <li>Effectuer la CCA sur ces matrices tronquées</li>
</ol>

<p><strong>Formule</strong></p>

\[\text{SVCCA}(A, B) = \frac{1}{d} \sum_{i=1}^d \rho_i\]

<p>où $\rho_i$ sont les corrélations canoniques entre $\tilde{U}_A$ et $\tilde{U}_B$.</p>

<p>Les étapes pour calculer SVCCA sont :</p>

<ol>
  <li>Effectuer la SVD sur les deux matrices de caractéristiques :
\(A = U_A \Sigma_A V_A^T, \quad B = U_B \Sigma_B V_B^T\)</li>
  <li>Prendre les d premiers vecteurs singuliers : $\tilde{U}_A, \tilde{U}_B$</li>
  <li>Effectuer la CCA sur ces matrices tronquées</li>
</ol>

<p><strong>Interprétation</strong></p>

<ul>
  <li>Plage : [0, 1]</li>
  <li>Des valeurs plus élevées indiquent une corrélation plus forte entre les composantes principales des deux espaces de caractéristiques.</li>
  <li>Une valeur proche de 1 suggère que les principales directions de variation dans les deux espaces sont fortement alignées.</li>
  <li>Des valeurs plus basses indiquent que les composantes principales des deux espaces capturent différents aspects des données.</li>
  <li>SVCCA est moins sensible au bruit comparé à la simple CCA, en raison de l’étape initiale de SVD.</li>
</ul>

<h3 id="conclusion">Conclusion</h3>

<p>Ces métriques fournissent différentes perspectives sur l’alignement entre deux ensembles de caractéristiques :</p>

<ul>
  <li>Cycle KNN et Mutual KNN sont plus sensibles aux structures locales et peuvent être utiles pour détecter des alignements fins.</li>
  <li>CKA est plus robuste et capture des similarités globales, mais peut manquer des détails fins.</li>
  <li>SVCCA est utile pour comparer les principales directions de variation, mais peut ignorer les caractéristiques moins importantes.</li>
</ul>

<p>En pratique, il est souvent bénéfique d’utiliser plusieurs de ces métriques ensemble pour obtenir une image plus complète de l’alignement entre deux ensembles de caractéristiques.</p>

<h3 id="les-résultats">Les résultats</h3>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/metrics_comparison-800.webp 800w, /assets/img/posts/prh/metrics_comparison-1200.webp 1200w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/metrics_comparison-800.png" alt="Différentes métriques pour comparer la distance des représentations entre les deux modèles" width="800" height="400" loading="lazy" decoding="async" />
</picture>

<h2 id="bibliographie">Bibliographie</h2>

<ol>
  <li>Huh, M., Cheung, B., Wang, T., &amp; Isola, P. (2024). The Platonic Representation Hypothesis. <em>arXiv preprint</em>.</li>
  <li>Kornblith, S., Norouzi, M., Lee, H., &amp; Hinton, G. (2019). Similarity of neural network representations revisited. In <em>International Conference on Machine Learning</em> (pp. 3519-3529). PMLR.</li>
  <li>Raghu, M., Gilmer, J., Yosinski, J., &amp; Sohl-Dickstein, J. (2017). SVCCA: Singular vector canonical correlation analysis for deep learning dynamics and interpretability. In <em>Advances in Neural Information Processing Systems</em> (pp. 6076-6085).</li>
  <li>Karvonen, A. (2024). Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models. <em>arXiv preprint</em>.</li>
</ol>]]></content><author><name></name></author><category term="Machine Learning" /><category term="Réseaux de neurones" /><summary type="html"><![CDATA[Recherche sur l'hypothèse de représentation platonique avec le jeu du morpion. Exploration des représentations partagées dans les réseaux de neurones.]]></summary></entry><entry xml:lang="en"><title type="html">The Platonic Representation Hypothesis in a Small World: Tic-Tac-Toe</title><link href="https://lucpommeret.com/projets/prh.html" rel="alternate" type="text/html" title="The Platonic Representation Hypothesis in a Small World: Tic-Tac-Toe" /><published>2024-06-01T00:00:00+00:00</published><updated>2024-06-01T00:00:00+00:00</updated><id>https://lucpommeret.com/projets/prh</id><content type="html" xml:base="https://lucpommeret.com/projets/prh.html"><![CDATA[<script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" integrity="sha384-Wuix6BuhrWbjDBs24bXrjf4ZQ5aFeFWBuKkFekO2t8xFU0iNaLQfp2K6/1Nxveei" crossorigin="anonymous"></script>

<p><em>Luc Pommeret</em></p>

<h2 id="abstract">Abstract</h2>

<p>This project draws inspiration from the June 2024 article by Philip Isola and his students: Platonic Representation Hypothesis. The central idea is that models trained on different types of data (image, audio, text) converge towards the same representation in the latent space. The code for training the transformers is based on Andrej Karpathy’s work (nanoGPT). In this project, we test this hypothesis on a very simple world: Tic-Tac-Toe. We train two transformers with the same architecture and number of parameters on: 1) PNG images of games, 2) games in standard textual notation.</p>

<p>All the code is available on GitHub at this address: <a href="https://github.com/l-pommeret/platonic_representation">https://github.com/l-pommeret/platonic_representation</a></p>

<h2 id="introduction">Introduction</h2>

<p>LLMs are models whose performance on human language is no longer in question. Based on the <em>transformer</em> architecture, their extraordinary capabilities sometimes seem to elude us, to the point where we don’t always understand how the model infers what it infers.</p>

<p>One hypothesis in particular has caught our attention because it seems to synthesize many scattered observations we’ve made in the field of interpretability (or explainability). This is the PRH, or <em>Platonic Representation Hypothesis</em>, which postulates that transformer models forge a model of world representation during training, resulting from the search for simplicity that a learning neural network naturally seeks.</p>

<p>The most surprising consequence of their hypothesis is that models trained on different types of data (images, text, sounds, etc.) will converge towards the same representation in their <em>latent space</em>. Our goal here will be to study in depth a simple, very simple case, that of Tic-Tac-Toe. In this game, where all possible games can be generated in a few minutes by a modern computer, the world is very simple, and does not require immense computing power, another advantage we can take advantage of.</p>

<p>Here we will study the representations of two <em>transformers</em>: one is trained on images of the game, and the other on sequences of moves in text form.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/txt_img-800.webp 800w, /assets/img/posts/prh/txt_img-1600.webp 1600w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/txt_img-800.png" alt="Textual and image representations of Tic-Tac-Toe" width="800" height="99" loading="lazy" decoding="async" />
</picture>

<p>The main hypothesis we want to test is essentially whether the two representations of the same Tic-Tac-Toe game converge.</p>

<p>To prepare the ground and explore other aspects of interpreting the <em>transformer</em> architecture, we will perform tests using other techniques, starting with <em>probing</em>.</p>

<h2 id="how-to-represent-a-tic-tac-toe-game">How to represent a Tic-Tac-Toe game?</h2>

<p>Tic-Tac-Toe, like chess or checkers, is a board game. But unlike the latter two, it is extremely simple, which allows for completeness of analysis (we generate all possible games and analyze our <em>transformer</em> with all these games).</p>

<p>A very simple, even childish way to represent a Tic-Tac-Toe game is to note it in the form of a drawing, side by side, showing the state of the board at each move. This is the format we chose for the images, which therefore have a size of 9x9.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/approx-795.webp 795w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/approx-795.png" alt="Representations of a Tic-Tac-Toe game" width="795" height="200" loading="lazy" decoding="async" />
</picture>

<p>To note Tic-Tac-Toe games textually, we chose to note the moves one after the other, like the PGN format in chess, which gives a history of the game.</p>

<p>Given the format of the Tic-Tac-Toe game, the number of moves cannot exceed 9, which is very convenient for tokenization, the first step in learning.</p>

<p>Here are the respective tokenizations of images and texts (found in the <code class="language-plaintext highlighter-rouge">meta.pkl</code> files):</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"vocab_size"</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w">
</span><span class="nl">"itos"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"0"</span><span class="p">:</span><span class="w"> </span><span class="s2">"b"</span><span class="p">,</span><span class="w"> </span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"n"</span><span class="p">,</span><span class="w"> </span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g"</span><span class="p">,</span><span class="w"> </span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="s2">";"</span><span class="p">},</span><span class="w">
</span><span class="nl">"stoi"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"b"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nl">"n"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nl">"g"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="nl">";"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"vocab_size"</span><span class="p">:</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w">
</span><span class="nl">"itos"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"0"</span><span class="p">:</span><span class="w"> </span><span class="s2">";"</span><span class="p">,</span><span class="w"> </span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="s2">" "</span><span class="p">,</span><span class="w"> </span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w"> </span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w"> </span><span class="nl">"4"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w"> </span><span class="nl">"5"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3"</span><span class="p">,</span><span class="w"> </span><span class="nl">"6"</span><span class="p">:</span><span class="w"> </span><span class="s2">"X"</span><span class="p">,</span><span class="w"> </span><span class="nl">"7"</span><span class="p">:</span><span class="w"> </span><span class="s2">"O"</span><span class="p">,</span><span class="w"> </span><span class="nl">"8"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/"</span><span class="p">,</span><span class="w"> </span><span class="nl">"9"</span><span class="p">:</span><span class="w"> </span><span class="s2">"-"</span><span class="p">},</span><span class="w">
</span><span class="nl">"stoi"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">";"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="nl">" "</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nl">"0"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="nl">"X"</span><span class="p">:</span><span class="w"> </span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="nl">"O"</span><span class="p">:</span><span class="w"> </span><span class="mi">7</span><span class="p">,</span><span class="w"> </span><span class="nl">"/"</span><span class="p">:</span><span class="w"> </span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="nl">"-"</span><span class="p">:</span><span class="w"> </span><span class="mi">9</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>The <em>stoi</em> and <em>itos</em> are not Greek, but a data format that allows converting strings to integers, that is, string to integer or more simply <em>stoi</em>, with <em>itos</em> being the reciprocal operation.</p>

<p>The tokenization of images is based on the pixel, which will be white, value 0 (represented by ‘b’), if the cell is saturated by an X, black, value 1 (represented by ‘n’), if the cell is saturated by an O, and gray, value 2 (represented by ‘g’) if the cell is empty. The image is traversed naturally, line by line to form a line in <code class="language-plaintext highlighter-rouge">str</code> (string) format.</p>

<p>In both cases, “;” is the start token, which marks the beginning of the sequence for both images and texts.</p>

<h2 id="probing">Probing</h2>

<p>Probing is a technique for detecting the presence of properties in a neural network. It’s a technique that has been extensively used since 2018 and Manning et al.’s article applying it to the detection of syntactic trees in a transformer trained on a corpus of tagged texts.</p>

<p>Here, we want to use probing to detect the presence or absence of a representation of the Tic-Tac-Toe board, layer by layer in the <em>transformer</em>. The idea is to train a linear classifier cell by cell and layer by layer to detect the state of a cell (X, O, or empty). The technique used here is a generalization of the original SVM, called <em>OneVsRest</em>.</p>

<h3 id="what-is-a-linear-svm">What is a linear SVM?</h3>

<p>The linear SVM (Support Vector Machine) is a supervised learning technique used for classification. In the binary case, the objective is to find a hyperplane that best separates the two classes of data. In the linear case that concerns us, it is therefore a matter of finding the hyperplane that best explains the separation of data in the neural network.</p>

<p>Let a training data set ${(x_i, y_i)}_{i=1}^n$, where $x_i \in \mathbb{R}^d$ are the feature vectors and $y_i \in {-1, +1}$ are the class labels.</p>

<p>The separating hyperplane is defined by the equation:
\(w^T x + b = 0\)
where $w \in \mathbb{R}^d$ is the normal vector to the hyperplane and $b \in \mathbb{R}$ is the bias.</p>

<h4 id="optimization-problem">Optimization Problem</h4>

<p>The SVM seeks to maximize the margin between the hyperplane and the closest points of each class. This translates into the following optimization problem:</p>

\[\begin{aligned}
\min_{w,b} &amp;\quad \frac{1}{2} \|w\|^2 \\
\text{s.t.} &amp;\quad y_i(w^T x_i + b) \geq 1, \quad i = 1, \ldots, n
\end{aligned}\]

<p>Using Lagrange multipliers, we obtain the dual formulation:</p>

\[\begin{aligned}
\max_{\alpha} &amp;\quad \sum_{i=1}^n \alpha_i - \frac{1}{2} \sum_{i=1}^n \sum_{j=1}^n \alpha_i \alpha_j y_i y_j
x_i^T x_j \\
\text{s.t.} &amp;\quad \sum_{i=1}^n \alpha_i y_i = 0 \\
&amp;\quad 0 \leq \alpha_i \leq C, \quad i = 1, \ldots, n
\end{aligned}\]

<p>where $\alpha_i$ are the Lagrange multipliers and C is a regularization parameter.</p>

<p>Once the optimal $\alpha_i$ are found, the decision function for a new point x is:
\(f(x) = \text{sign}\left(\sum_{i=1}^n \alpha_i y_i x_i^T x + b\right)\)
where b is calculated using the support vectors (points for which $\alpha_i &gt; 0$).</p>

<h4 id="multi-class-extension">Multi-class Extension</h4>

<p>In our code, a <em>One-vs-Rest</em> approach is used to extend the binary SVM to the multi-class case. For K classes, we train K binary classifiers, each separating one class from all the others.</p>

<h3 id="layer-by-layer-results">Layer-by-Layer Results</h3>

<p>The transformer is a rather complex architecture that allows for multiple probe points. We therefore wanted to probe every nook and cranny of it to get an idea of the representation of the Tic-Tac-Toe board at each step.</p>

<p>Here are the results taking the accuracy of the SVM evaluation layer by layer for the text.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/txt_probe-800.webp 800w, /assets/img/posts/prh/txt_probe-1080.webp 1080w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/txt_probe-800.png" alt="Probing layer by layer for text" width="800" height="473" loading="lazy" decoding="async" />
</picture>

<p>We can observe that the transformer gradually acquires a representation of the state of the Tic-Tac-Toe board, which culminates during post-attention normalization and the second layer of the MLP.</p>

<p>For the model trained on images, the result is very different, as the curve remains almost flat throughout the <em>transformer</em>.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/img_probe-800.webp 800w, /assets/img/posts/prh/img_probe-1600.webp 1600w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/img_probe-800.png" alt="Probing layer by layer for images" width="800" height="500" loading="lazy" decoding="async" />
</picture>

<p>We notice that the model does not forge a representation of the Tic-Tac-Toe board, which may raise questions. To answer this, we can hypothesize that given that to solve the task (predicting the next token), one needs to have a representation to rely on at least at one point, there is no need to forge a representation when one already has the image as input, whereas it is necessary when one only has the text.</p>

<p>We can also look at the representation of the cells (<em>positions</em>), which shows some interesting symmetry and asymmetry effects.</p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/txt_accuracy_across_positions_all_points-800.webp 800w, /assets/img/posts/prh/txt_accuracy_across_positions_all_points-1500.webp 1500w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/txt_accuracy_across_positions_all_points-800.png" alt="Probing layer by layer for text (positions)" width="800" height="427" loading="lazy" decoding="async" />
</picture>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/img_accuracy_across_positions_all_points-800.webp 800w, /assets/img/posts/prh/img_accuracy_across_positions_all_points-1500.webp 1500w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/img_accuracy_across_positions_all_points-800.png" alt="Probing layer by layer for images (positions)" width="800" height="427" loading="lazy" decoding="async" />
</picture>

<p>A general observation is that very often, in most layers of both models, it’s the middle cell (position 5) that is best represented.</p>

<p>Then, we can observe beautiful symmetries, especially for the text, and certain layers, which show a geometric representation of the board that evolves depending on the layer. For example, in the image model, the pre-attention normalization layer clearly favors the central cell, while the closer we get to the output, the less this middle cell is favored, in favor of other cells, as if the analysis was performing a concentric movement towards the edges of the board.</p>

<h2 id="does-the-prh-hold-true">Does the PRH hold true?</h2>

<h3 id="which-metrics">Which metrics?</h3>

<p>Following previous literature, we define <em>representational alignment</em> as a measure of the similarity of similarity structures induced by two representations, i.e., a similarity metric on kernels. We give the mathematical definition of these concepts below:</p>

<ul>
  <li>A <strong>representation</strong> is a function f : X → ℝ^n that assigns a feature vector to each input in a certain data domain X.</li>
  <li>A <strong>kernel</strong>, K : X × X → ℝ, characterizes how a representation measures the distance/similarity between data points. K(x_i,x_j)=⟨f(x_i),f(x_j)⟩, where ⟨·,·⟩ denotes the dot product, x_i,x_j ∈ X and K ∈ 𝒦.</li>
  <li>A <strong>kernel alignment metric</strong>, m : 𝒦 × 𝒦 → ℝ, measures the similarity between two kernels, i.e., how similar the distance measure induced by one representation is to that induced by another. Examples include Centered Kernel Alignment (CKA), SVCCA, and nearest neighbor metrics.</li>
</ul>

<h3 id="alignment-metrics">Alignment Metrics</h3>

<h4 id="cycle-knn-k-nearest-neighbors-cycle">Cycle KNN (K Nearest Neighbors Cycle)</h4>

<p><strong>Mathematical Definition</strong>
Let A and B be two sets of feature vectors, each of size N. For a given k:</p>

<ol>
  <li>Calculate the k-NN in A: For each point in A, find its k nearest neighbors in A.</li>
  <li>Map these neighbors to B.</li>
  <li>Calculate the k-NN in B for these mapped points.</li>
  <li>Check if the original point in A is among these neighbors.</li>
</ol>

<p>The metric is the fraction of points that “survive” this cycle.</p>

<p><strong>Formula</strong></p>

\[\text{Cycle\_KNN}(A, B) = \frac{1}{N} \sum_{i=1}^N \mathbb{I}(a_i \in \text{kNN}_B(\text{kNN}_A(a_i)))\]

<p>where $\mathbb{I}$ is the indicator function, and $\text{kNN}_X(y)$ returns the k nearest neighbors of y in X.</p>

<p><strong>Interpretation</strong></p>

<ul>
  <li>Range: [0, 1]</li>
  <li>Higher values indicate better alignment between the two feature spaces.</li>
  <li>A value of 1 means perfect cyclic consistency: the neighborhood structure is perfectly preserved when mapping from A to B and back.</li>
  <li>Lower values suggest that the local structure is not well preserved between the two spaces.</li>
</ul>

<h4 id="mutual-knn-k-nearest-neighbors-mutual">Mutual KNN (K Nearest Neighbors Mutual)</h4>

<p><strong>Mathematical Definition</strong>
For each point in A, check if it is among the k-nearest neighbors of its corresponding point in B, and vice versa.</p>

<p><strong>Formula</strong></p>

\[\text{Mutual\_KNN}(A, B) = \frac{1}{N} \sum_{i=1}^N \mathbb{I}(a_i \in \text{kNN}_B(b_i) \text{ AND } b_i
\in \text{kNN}_A(a_i))\]

<p>where $\mathbb{I}$ is the indicator function, and $\text{kNN}_X(y)$ returns the k nearest neighbors of y in X.</p>

<p><strong>Interpretation</strong></p>

<ul>
  <li>Range: [0, 1]</li>
  <li>Higher values indicate better mutual preservation of neighborhood between the two spaces.</li>
  <li>A value of 1 means that all points are mutual k-nearest neighbors in both spaces.</li>
  <li>Lower values suggest that the neighborhood structures in A and B are different.</li>
</ul>

<h4 id="cka-centered-kernel-alignment">CKA (Centered Kernel Alignment)</h4>

<p><strong>Mathematical Definition</strong>
CKA measures the similarity between two kernels after centering.</p>

<p><strong>Formula</strong></p>

\[\text{CKA}(K, L) = \frac{\langle K_c, L_c \rangle_F}{\|K_c\|_F \|L_c\|_F}\]

<p>where $K_c$ and $L_c$ are centered kernel matrices, $\langle \cdot,\cdot \rangle_F$ is the Frobenius inner product, and $|\cdot|_F$ is the Frobenius norm.</p>

<p><strong>Interpretation</strong></p>

<ul>
  <li>Range: [0, 1]</li>
  <li>Higher values indicate greater similarity between the kernel matrices.</li>
  <li>A value of 1 suggests that the two kernels capture identical relationships between data points.</li>
  <li>Lower values indicate that the kernels capture different relationships.</li>
  <li>CKA is invariant to orthogonal transformations and isotropic scaling.</li>
</ul>

<h4 id="svcca-singular-vector-canonical-correlation-analysis">SVCCA (Singular Vector Canonical Correlation Analysis)</h4>

<p><strong>Mathematical Definition</strong></p>

<ol>
  <li>Perform SVD on the two feature matrices: A = U_A Σ_A V_A^T, B = U_B Σ_B V_B^T</li>
  <li>Take the first d singular vectors: Ũ_A, Ũ_B</li>
  <li>Perform CCA on these truncated matrices</li>
</ol>

<p><strong>Formula</strong></p>

\[\text{SVCCA}(A, B) = \frac{1}{d} \sum_{i=1}^d \rho_i\]

<p>where $\rho_i$ are the canonical correlations between $\tilde{U}_A$ and $\tilde{U}_B$.</p>

<p>The steps to calculate SVCCA are:</p>

<ol>
  <li>Perform SVD on the two feature matrices:
\(A = U_A \Sigma_A V_A^T, \quad B = U_B \Sigma_B V_B^T\)</li>
  <li>Take the first d singular vectors: $\tilde{U}_A, \tilde{U}_B$</li>
  <li>Perform CCA on these truncated matrices</li>
</ol>

<p><strong>Interpretation</strong></p>

<ul>
  <li>Range: [0, 1]</li>
  <li>Higher values indicate stronger correlation between the principal components of the two feature spaces.</li>
  <li>A value close to 1 suggests that the main directions of variation in the two spaces are strongly aligned.</li>
  <li>Lower values indicate that the principal components of the two spaces capture different aspects of the data.</li>
  <li>SVCCA is less sensitive to noise compared to simple CCA, due to the initial SVD step.</li>
</ul>

<h3 id="conclusion">Conclusion</h3>

<p>These metrics provide different perspectives on the alignment between two sets of features:</p>

<ul>
  <li>Cycle KNN and Mutual KNN are more sensitive to local structures and can be useful for detecting fine alignments.</li>
  <li>CKA is more robust and captures global similarities, but may miss fine details.</li>
  <li>SVCCA is useful for comparing the main directions of variation, but may ignore less important features.</li>
</ul>

<p>In practice, it is often beneficial to use several of these metrics together to get a more complete picture of the alignment between two sets of features.</p>

<h3 id="the-results">The Results</h3>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/prh/metrics_comparison-800.webp 800w, /assets/img/posts/prh/metrics_comparison-1200.webp 1200w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/prh/metrics_comparison-800.png" alt="Different metrics to compare the distance of representations between the two models" width="800" height="400" loading="lazy" decoding="async" />
</picture>

<h2 id="bibliography">Bibliography</h2>

<ol>
  <li>Huh, M., Cheung, B., Wang, T., &amp; Isola, P. (2024). The Platonic Representation Hypothesis. <em>arXiv preprint</em>.</li>
  <li>Kornblith, S., Norouzi, M., Lee, H., &amp; Hinton, G. (2019). Similarity of neural network representations revisited. In <em>International Conference on Machine Learning</em> (pp. 3519-3529). PMLR.</li>
  <li>Raghu, M., Gilmer, J., Yosinski, J., &amp; Sohl-Dickstein, J. (2017). SVCCA: Singular vector canonical correlation analysis for deep learning dynamics and interpretability. In <em>Advances in Neural Information Processing Systems</em> (pp. 6076-6085).</li>
  <li>Karvonen, A. (2024). Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models. <em>arXiv preprint</em>.</li>
</ol>]]></content><author><name></name></author><category term="Machine Learning" /><category term="Neural Networks" /><summary type="html"><![CDATA[Research on the Platonic Representation Hypothesis using Tic-Tac-Toe. Exploring how neural networks develop shared representations across different architectures.]]></summary></entry><entry xml:lang="fr"><title type="html">Généralité absolue et généricité dans les modèles de la calculabilité</title><link href="https://lucpommeret.com/2024/05/23/generalite-absolue-genericite-fr.html" rel="alternate" type="text/html" title="Généralité absolue et généricité dans les modèles de la calculabilité" /><published>2024-05-23T00:00:00+00:00</published><updated>2024-05-23T00:00:00+00:00</updated><id>https://lucpommeret.com/2024/05/23/generalite-absolue-genericite-fr</id><content type="html" xml:base="https://lucpommeret.com/2024/05/23/generalite-absolue-genericite-fr.html"><![CDATA[<p><em>Ce texte est un travail rendu à Brice Halimi (Université Paris-Cité) en mai 2024, dans le cadre du cours de philosophie des mathématiques.</em></p>

<h2 id="résumé">Résumé</h2>

<p>Ici nous voulons montrer que la généricité et la généralité absolue sont naturellement distinctes dans les modèles de la calculabilité, et en particulier dans le $\lambda$-calcul. Nous faisons dialoguer deux désirs antagonistes : celui d’un formalisme intégral, permettant de parler de toute chose, et celui d’un modèle de calcul associé qui « termine » toujours. Nous remarquons que la logique ne recouvre pas tout le domaine du calculable (à cause des points-fixes), et que la logique (la nécessité) permet de garantir la bonne terminaison des calculs.</p>

<h2 id="1-le-calculable-comme-général">1. Le calculable comme général</h2>

<h3 id="11-calculemus--la-réduction-leibnizienne-des-problèmes">1.1 Calculemus : la réduction leibnizienne des problèmes</h3>

<blockquote>
  <p>« Pour résoudre une question ou terminer une controverse, les adversaires n’auront qu’à prendre la plume, en s’adjoignant au besoin un ami comme arbitre, et à dire : « Calculons! ». »
— Couturat expliquant Leibniz</p>
</blockquote>

<p>Dans notre analyse des modèles de calcul nous voulons partir du rêve leibnizien du <em>calculus ratiocinator</em> pour explorer les différents modes que l’on peut attribuer au calcul. Pour ce faire, nous nous appuyons sur les concepts de généricité et de généralité absolue. La généralité absolue est le fait de parler de toutes choses en général en visant tous les objets (la science des choses en générale est appelée métaphysique), tandis que la généricité est le fait de viser un objet quelconque en général.</p>

<p>Nous pouvons ici mobiliser le <strong>Principe Ensembliste de Généricité</strong> :</p>

<blockquote>
  <p>Étant donné un ensemble, la référence à un membre quelconque de cet ensemble est garantie.</p>
</blockquote>

<p>Cela, nous pouvons avantageusement le transposer dans le monde des types, dans lesquels vivent des variables, et c’est ce que nous ferons en étudiant le $\lambda$-calcul typé. Dans ce monde, nous pouvons faire référence à un membre quelconque d’un type habité.</p>

<p>Nous explorerons d’abord succinctement les problèmes qui se sont présentés aux logiciens et mathématiciens qui voulaient mettre en place un <em>calculus ratiocinator</em> sur une langue universelle, puis nous explorerons la question des objets dégénérés de la généralité absolue, et enfin nous verrons que la logique, c’est-à-dire la nécessité, est la garante d’un bon calcul, un calcul qui termine.</p>

<h3 id="12-hilbert-ackermann-et-lentscheidungsproblem">1.2 Hilbert, Ackermann et l’entscheidungsproblem</h3>

<p>Les mathématiciens du début de XXe siècle ont essayé de trouver des méthodes de calcul et de prouver que l’<em>Entscheidungsproblem</em><sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> était décidable, c’est-à-dire que toute proposition bien formulée dans le langage d’une théorie axiomatique suffisamment puissante (celle de Peano, voire celle des <em>Principia Mathematica</em>), était décidable.</p>

<p>Pour ce faire, les mathématiciens se sont peu à peu dotés d’une définition de la calculabilité, à commencer par les fonctions récursives, que l’on peut faire remonter à Dedekind, mais dont le formalisme est surtout associé à Skolem, Ackermann, puis Gödel.</p>

<p>Les fonctions primitives récursives sont des fonctions totales, au sens où leur calcul termine pour n’importe quelle valeur. Le contre-exemple de la fonction d’Ackermann montre cependant qu’il y a une fonction non-primitive récursive, mais qui est cependant totalement récursive, montrant ainsi que le calculable s’étendait plus que cela.</p>

<p>La citation de l’épigraphe montre qu’en son temps déjà, Leibniz formulait le vœu d’une syntaxe qui puisse exprimer toute chose (que le problème soit mathématique, scientifique ou métaphysique), et d’une procédure de calcul permettant de réduire ces problèmes. Ce désir nécessitait deux choses :
— Une <em>Characteristica universalis</em>, syntaxe pouvant exprimer toute chose (également vue comme langue internationale), que l’on doit donc associer à la généralité absolue;
— Un <em>Calculus ratiocinator</em>, ou procédure de calcul permettant de réduire tous les problèmes formulés dans la <em>Characteristica universalis</em>.</p>

<p>Le rêve leibnizien fut partagé par de nombreux philosophes au début du XXe siècle, y compris par Bertrand Russell et Louis Couturat, qui étaient tous deux de grands lecteurs de Leibniz pour avoir publié sur lui.</p>

<p>Déjà en son temps, Leibniz considérait le raisonnement comme diagrammatique, même si ses ébauches de syntaxe doivent être vus comme une curiosité historique. Nous verrons dans les prochaines parties que les logiciens du début du XXe siècle se sont lancés à corps perdu dans cette quête leibnizienne d’une langue universelle et d’un calcul confluant et fortement normalisant, mais que le modèle diagrammatique du calcul est idée qui fera date chez de nombreux logiciens et informaticiens. Kluge (1980) soutient que le <em>Begriffschrift</em> de Frege était inspiré par ce problème leibnizien.</p>

<h3 id="13-fin-du-jeu--les-théorèmes-de-gödel">1.3 Fin du jeu : les théorèmes de Gödel</h3>

<p>Le premier théorème de Gödel marque comme on le sait la fin de l’espérance d’un calcul sur une syntaxe absolument générale, une <em>characteristica universalis</em> qui termine toujours. Certains problèmes sont, nous le savons, indécidables, si bien qu’il est voué à l’échec de construire un calcul fondé sur une langue universelle qui a réponse à toute chose en général, du moins dans le domaine des mathématiques<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup>.</p>

<p>Le second théorème de Gödel montre qu’en particulier, l’énoncé qui prouve la cohérence d’un système formalisant a minima l’arithmétique est lui aussi indécidable.</p>

<h2 id="2-exploration--la-généralité-absolue-comme-lieu-des-antinomies">2. Exploration : la généralité absolue comme lieu des antinomies</h2>

<h3 id="21-le-paradoxe-de-russell--punition-de-la-généralité-absolue-">2.1 Le paradoxe de Russell : punition de la généralité absolue ?</h3>

<p>Épisode bien connu de la crise des fondements des mathématiques, le paradoxe de Russell fait s’effondrer la structure trop générale, trop logiciste de la théorie naïve des ensembles, qui fut développée (entre autres) par Gottlob Frege dans <em>Grundgesetze der Arithmetik</em> à la fin du XIXe siècle. Le paradoxe est dévastateur : il consiste à utiliser toute la généralité de la syntaxe de Frege (rêve fou mais impossible de faire tenir les mathématiques dans une syntaxe, dont les entités sont ce que l’on peut y écrire) pour écrire un ensemble dégénéré (dit ensemble de Russell) : $\{x \mid \neg x \in x\}$.</p>

<p>La solution adoptée par les logiciens et mathématiciens est toujours d’introduire une hiérarchie entre les entités considérées (ce que fait Russell avec la théorie des types ramifiés dans les <em>Principia Mathematica</em>), une hiérarchie entre les ensembles et les classes dans ZF, en ajoutant un axiome de fondation qui interdit à un ensemble d’appartenir à lui-même, et en ne considérant de facto comme seule entité mathématique les ensembles, et non les classes (même si c’est discutable, plusieurs objets importants étant des classes, je pense à la classe des ordinaux par exemple).</p>

<p>Un autre parti pris fut (pour les logiciens-philosophes) d’inventer un formalisme beaucoup moins expressif, qui n’est pas soumis au paradoxe de Russell, mais qui ne permet pas d’exprimer grand-chose : la méréologie. Ce dernier formalisme ne fait pas de hiérarchie entre des types d’objets, ni entre les individus et les prédicats, mais n’est pas adéquat pour fonder les mathématiques (sauf dans une perspective hyper-finitiste, dans laquelle on considère que les mathématiques s’arrêtent à un certain entier, disons trois milliards). C’est pour cette raison que la méréologie est régulièrement prise pour ontologie par les philosophes analytiques (Lewis notamment), à cause de sa réputation de neutralité et simplicité<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup> quant aux entités postulées, ce qui est conforme au rasoir d’Occam.</p>

<p>En somme, le paradoxe de Russell est un point fixe<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup> qui advient dans les systèmes généraux, c’est-à-dire les systèmes qui veulent beaucoup dire sans se brider par une hiérarchie des entités. L’analogie entre la théorie naïve des ensembles et le $\lambda$-calcul pur est d’ailleurs frappante :</p>

<p>Soit $M$ un terme involutif (tel que $MMx = x$).</p>

\[(\lambda x.Mxx)(\lambda x.Mxx) \rightsquigarrow M(\lambda x.Mxx)(\lambda x.Mxx) \rightsquigarrow (\lambda x.Mxx)(\lambda x.Mxx) \rightsquigarrow ...\]

\[\{x \mid \neg x \in x\} \in \{x \mid \neg x \in x\} \to \neg \{x \mid \neg x \in x\} \in \{x \mid \neg x \in x\} \to \{x \mid \neg x \in x\} \in \{x \mid \neg x \in x\} \to ...\]

<p>Il faut prendre « $\in$ » pour l’application de deux $\lambda$-termes et « $\neg$ » pour le terme involutif $M$. On reconnaît ici le $\lambda$-terme $\Omega$ qui ne se normalise jamais. C’est un exemple frappant qui dégénère à cause de sa trop grande généralité, et de son manque de nécessité, ce qui accrédite la thèse selon laquelle le nécessaire ne sature pas l’universel (contraire de la thèse de corrélation).</p>

<h3 id="22-lambda-calcul">2.2 $\lambda$-calcul</h3>

<p>Le $\lambda$-calcul est un formalisme inventé par Alonzo Church à la suite des <em>Principia Mathematica</em> de Russell et Whitehead, dans lesquels l’abstraction de $x$ était notée « $\hat{x}$ », ce que Church notait « $\hat{\cdot}x$ » puis naturellement « $\lambda x$ », en toute généralité.</p>

<p>Comme nous l’avons vu, le $\lambda$-calcul, qui abstrait toute chose, est le lieu de la généralité, ce qui se traduit concrètement par l’existence de $\lambda$-termes paradoxaux, qui ne se réduisent jamais sous forme normale.</p>

<p>Tout comme les fonctions partielles récursives, le $\lambda$-calcul possède <em>mutatis mutandis</em> son équivalent générique, qui garantit sa terminaison. Ce qui est intéressant ici, c’est que concernant le $\lambda$-calcul, c’est directement la logique (le nécessaire) qui est utilisée pour éviter les boucles!</p>

<p>Ce $\lambda$-calcul générique est typé, c’est-à-dire empêché de boucler à l’infini par une sorte de surmoi logique. Ici, nous nous intéressons au $\lambda$-calcul simplement typé pour des raisons de concision.</p>

<p>Le système de types repose sur un unique jugement de typage, noté $\Gamma \vdash M : \tau$ (dans le contexte $\Gamma$, le terme $M$ a pour type $\tau$). Ce jugement se dérive à partir des trois règles suivantes :</p>

\[\frac{\Gamma, x : \tau \vdash M : \sigma}{\Gamma \vdash \lambda x : \tau . M : \tau \to \sigma} \text{ (abstraction)}\]

\[\frac{\Gamma \vdash M : \tau \to \sigma \quad \Gamma \vdash N : \tau}{\Gamma \vdash MN : \sigma} \text{ (application)}\]

\[\frac{}{\Gamma \vdash x : \tau} \text{ (jugement de typage)}\]

<p>Ces règles sont en fait des règles de construction de $\lambda$-termes. Elles garantissent la bonne construction et la bonne terminaison des calculs, grâce à la propriété de normalisation forte du $\lambda$-calcul typé. C’est ce formalisme qui va servir de base théorique aux langages de programmation (typés), qui ne peuvent pas se permettre de planter comme dans le cas général, qui renferme en lui des objets complètement dégénérés<sup id="fnref:5" role="doc-noteref"><a href="#fn:5" class="footnote" rel="footnote">5</a></sup>.</p>

<p>S’intéresser aux règles de construction des $\lambda$-termes, c’est en fait s’intéresser aux conditions de possibilité de la généricité, c’est-à-dire à comment restreindre un système trop général en lui ajoutant des règles logiques (nécessité). Ici, la nécessité est directement la logique, elle-même, car lorsqu’on enlève les $\lambda$-termes, (qualifiés de « décorations » en théorie de la démonstration) on obtient le système logique suivant :</p>

\[\frac{\Gamma, \tau \vdash \sigma}{\Gamma \vdash \tau \to \sigma} \text{ (introduction de l’implication)}\]

\[\frac{\Gamma \vdash \tau \to \sigma \quad \Gamma \vdash \tau}{\Gamma \vdash \sigma} \text{ (coupure (ou modus ponens))}\]

\[\frac{}{\Gamma \vdash \tau} \text{ (axiome)}\]

<p>On aura reconnu la logique minimale, que l’on peut étendre à d’autres systèmes logiques via l’ajout de règles.</p>

<h3 id="23-le-surmoi-du-calcul--la-logique">2.3 Le surmoi du calcul : la logique</h3>

<p>Dans le calcul, ce qui empêche la généricité de dégénérer en généralité absolue, c’est donc la nécessité, qui n’est nulle autre que la logique elle-même. Comme nous l’avons vu, c’est frappant dans le $\lambda$-calcul : le $\lambda$-calcul typé s’est doté d’un surmoi logique qui prévient le $\lambda$-inceste<sup id="fnref:6" role="doc-noteref"><a href="#fn:6" class="footnote" rel="footnote">6</a></sup>.</p>

<p>C’est à cet endroit que nous pouvons remarquer que dans les modèles de calcul également, l’universalité n’est pas saturée par la nécessité, car il existe des endroits (l’universalité générale) dans lesquels la nécessité logique n’est pas présente. Cependant, lorsque nous parlons de $\lambda$-calcul typé, nous parlons bien de généricité et de nécessité, puisque les types sont précisément issus de la logique.</p>

<p>Dans ce contexte, la logique acquiert un nouveau rôle : celui de la garantie mécanique de la terminaison du calcul, montrant que le calcul sans logique est chose risquée, soumise aux paradoxes et au plantage des ordinateurs.</p>

<h2 id="3-la-logique-comme-garante-de-la-généralité-du-calcul">3. La logique comme garante de la généralité du calcul</h2>

<h3 id="31-lisomorphisme-de-curry-howard--isomorphisme-du-général">3.1 L’isomorphisme de Curry-Howard : isomorphisme du général</h3>

<p>Nous avons vu que concernant le calcul, la logique était l’introduction du nécessaire dans un système trop général, ce qui avait pour conséquence de rendre le système générique, et donc de garantir la terminaison des calculs.</p>

<p>L’isomorphisme de Curry-Howard désigne le fait (dont nous avons discuté dans la section 2.2) que les $\lambda$-termes sont les « décorations » des formules logiques, et que réciproquement les formules logiques sont les « types » des $\lambda$-termes. Mais nous pouvons étendre plus loin cette correspondance et retrouver quelques concepts jumeaux de part et d’autre de la logique et du calcul :</p>

<table>
  <thead>
    <tr>
      <th>Logique</th>
      <th>$\lambda$-calcul (typé)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>formule</td>
      <td>type</td>
    </tr>
    <tr>
      <td>séquent</td>
      <td>jugement</td>
    </tr>
    <tr>
      <td>construction de terme</td>
      <td>terme</td>
    </tr>
    <tr>
      <td>$\beta$-réduction</td>
      <td>élimination des coupures</td>
    </tr>
    <tr>
      <td>$\eta$-expansion</td>
      <td>expansion des axiomes</td>
    </tr>
    <tr>
      <td>forme normale</td>
      <td>preuve sans coupure</td>
    </tr>
    <tr>
      <td>normalisation</td>
      <td>théorème d’élimination des coupures</td>
    </tr>
    <tr>
      <td>Church-Rosser</td>
      <td>confluence</td>
    </tr>
  </tbody>
</table>

<p>Ce tableau<sup id="fnref:7" role="doc-noteref"><a href="#fn:7" class="footnote" rel="footnote">7</a></sup> permet de remarquer l’étendue conceptuelle de l’isomorphisme de Curry-Howard. Cet isomorphisme est du domaine du générique, il ne permet que de parler de l’universel générique, c’est-à-dire l’universel guidé par la nécessité logique.</p>

<h3 id="32-la-logique-linéaire-ou-la-géométrisation-du-générique">3.2 La logique linéaire ou la géométrisation du générique</h3>

<p>La logique linéaire, émanant directement de l’isomorphisme de Curry-Howard, a été conçue dès ses origines en 1986 comme un système de typage pour les $\lambda$-termes. Elle se distingue par une approche originale des ressources calculatoires : une fois qu’une ressource est utilisée, elle ne peut plus être réutilisée. Cette caractéristique se manifeste pleinement dans le fragment vraiment linéaire MLL, et permet d’envisager les preuves, et donc les $\lambda$-termes bien construits, comme des graphes, dont les graphes de correction (induits pas les <code class="language-plaintext highlighter-rouge">&amp;</code>) sont connexes et acycliques, autrement dit, ayant une structure d’arbre.</p>

<p>L’élimination des coupures dans ce cadre peut être vue comme une transformation de graphes, simplifiée par deux règles fondamentales dans les réseaux de preuve :</p>

<p><strong>Première réduction :</strong></p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/generalite/proof-net-reduction-1-800.webp 800w, /assets/img/posts/generalite/proof-net-reduction-1-1600.webp 1600w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/generalite/proof-net-reduction-1-800.png" alt="Première réduction des réseaux de preuve" width="800" height="208" loading="lazy" decoding="async" />
</picture>

<p><em>(Axiome-coupure : la coupure avec un axiome se simplifie)</em></p>

<p><strong>Seconde réduction :</strong></p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/generalite/proof-net-reduction-2-800.webp 800w, /assets/img/posts/generalite/proof-net-reduction-2-1600.webp 1600w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/generalite/proof-net-reduction-2-800.png" alt="Seconde réduction des réseaux de preuve" width="800" height="159" loading="lazy" decoding="async" />
</picture>

<p><em>(Tenseur-Par : la coupure entre un tenseur et un par se décompose en deux coupures sur les sous-preuves)</em></p>

<p>Où $\pi_m, \pi_n, \pi_o$ et $\pi_p$ sont des preuves.</p>

<p>Gardant à l’esprit l’isomorphisme de Curry-Howard, nous pouvons établir un parallèle entre les $\lambda$-termes et les formules logiques, et entre la $\beta$-réduction (le calcul) et l’élimination des coupures. Cette perspective nous autorise également à considérer les « réseaux d’interaction » (étudiés par Yves Lafont) comme des représentations graphiques de la $\beta$-réduction.</p>

<p>Nous obtenons ainsi un modèle géométrique du calcul, observable de manière élégante dans des démonstrations dynamiques telles que celles des Interaction nets (Yves Lafont, 1995). Cette visualisation géométrique du calcul fait le lien avec la plus ancienne branche des mathématiques : la géométrie.</p>

<h3 id="33-le-point-aveugle-de-la-logique--la-convergence-statistique-ou-comment-atteindre-notre-but-avec-très-grande-probabilité">3.3 Le point aveugle de la logique : la convergence statistique, ou comment atteindre notre but avec très grande probabilité</h3>

<p>Mais il ne faudrait pas pour autant enterrer à jamais le projet leibnizien. Même si dans le monde de la certitude, le désir de concilier un système générique, pouvant parler de toute chose, avec un modèle de calcul terminant toujours est démontré vain (problème de l’arrêt, indécidabilité de l’Entscheidungsproblem, terme $\Omega$), il subsiste un monde dans lequel tout semble possible : celui des statistiques.</p>

<p>L’universalité n’est pas saturée par la nécessité comme nous l’avons vu, mais rien n’empêche une machine de décider avec grande probabilité de l’arrêt de n’importe quelle autre machine<sup id="fnref:8" role="doc-noteref"><a href="#fn:8" class="footnote" rel="footnote">8</a></sup>. Le <em>property testing</em> est une discipline post-logique dans laquelle plutôt que d’étudier si une propriété est vraie ou fausse avec certitude, on étudie si elle l’est avec grande probabilité (une probabilité arbitrairement grande que l’on peut atteindre avec certitude).</p>

<p>Aujourd’hui, la <em>characteristica universalis</em> et le <em>calculus ratiocinator</em> font bien rire les logiciens, mais il se peut que le problème soit aujourd’hui formulé en d’autres termes : existe-t-il une machine qui peut dire avec une probabilité arbitrairement grande si tout énoncé est vrai ou faux ? Il se peut que la <em>characteristica universalis</em> soit des vecteurs de grande dimension, et le <em>calculus ratiocinator</em> un réseau de neurones particulièrement vaste.</p>

<h2 id="conclusion">Conclusion</h2>

<p>Nous avons vu que dans les modèles de calculs que nous avons considérés, les fonctions totales récursives et le $\lambda$-calcul typé pouvaient être associés au concept de généricité, et les fonctions partielles récursives et le $\lambda$-calcul pur au concept de généralité absolue. Nous avons pu exploiter cette distinction avec profit en montrant que l’on obtient la généricité en introduisant la logique, c’est-à-dire la nécessité. Nous avons finalement exploré le nouveau paradigme interactionniste ou géométrique des modèles de calculs génériques, introduits par la logique linéaire et les réseaux d’interaction.</p>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>Problème de la décision. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>mais on a envie de répondre : et <em>a fortiori</em> en métaphysique et dans les sciences, même si ce n’est pas évident et discutable, ce que nous ne ferons pas ici. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:3" role="doc-endnote">
      <p>L’immense majorité de la littérature (analytique) sur la méréologie consiste aujourd’hui à déterminer si la méréologie est « ontologiquement neutre » et si la moustache de Tom lui appartient toujours lorsque Jerry l’arrache. <a href="#fnref:3" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:4" role="doc-endnote">
      <p>J’emprunte le terme à Jean-Yves Girard, qui par généralisation en fait l’endroit de la syntaxe où tout dégénère à cause de l’autoréférence (e.g. théorème de Gödel pour l’arithmétique, problème de l’arrêt pour les machines de Turing, $\Omega$ pour le $\lambda$-calcul, etc.). <a href="#fnref:4" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:5" role="doc-endnote">
      <p>même planter le système. <a href="#fnref:5" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:6" role="doc-endnote">
      <p>L’image est (une fois n’est pas coutume) de Jean-Yves Girard. <a href="#fnref:6" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:7" role="doc-endnote">
      <p>que je tire du cours de théorie de la démonstration d’Olivier Laurent. <a href="#fnref:7" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:8" role="doc-endnote">
      <p>Et c’est d’ailleurs ce qui se passe en pratique lorsqu’on exécute un programme sur nos machines modernes : un surmoi statistique est mis en place pour vérifier avec grande probabilité si le programme qu’on a lancé termine (d’où le message d’erreur en cas de boucle). <a href="#fnref:8" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><category term="Philosophie" /><category term="Logique" /><category term="Calculabilité" /><summary type="html"><![CDATA[Comment distinguer généralité absolue et généricité dans les modèles de calcul ? Le rôle de la logique comme garante de la terminaison.]]></summary></entry><entry xml:lang="en"><title type="html">Absolute Generality and Genericity in Models of Computability</title><link href="https://lucpommeret.com/2024/05/23/generalite-absolue-genericite.html" rel="alternate" type="text/html" title="Absolute Generality and Genericity in Models of Computability" /><published>2024-05-23T00:00:00+00:00</published><updated>2024-05-23T00:00:00+00:00</updated><id>https://lucpommeret.com/2024/05/23/generalite-absolue-genericite</id><content type="html" xml:base="https://lucpommeret.com/2024/05/23/generalite-absolue-genericite.html"><![CDATA[<p><em>This text was originally written in French and has been translated by AI. Original text by Luc Pommeret, submitted to Brice Halimi (Université Paris-Cité) in May 2024, as part of a philosophy of mathematics course.</em></p>

<h2 id="abstract">Abstract</h2>

<p>Here we wish to demonstrate that genericity and absolute generality are naturally distinct in models of computability, and particularly in the λ-calculus. We bring into dialogue two antagonistic desires: that of an integral formalism, enabling us to speak of all things, and that of an associated model of computation which always “terminates”. We observe that logic does not cover the entire domain of the computable (because of fixed points), and that logic (necessity) enables the guarantee of proper termination of calculations.</p>

<h2 id="1-the-computable-as-general">1. The Computable as General</h2>

<h3 id="11-calculemus-the-leibnizian-reduction-of-problems">1.1 Calculemus: the Leibnizian Reduction of Problems</h3>

<blockquote>
  <p>“To resolve a question or terminate a controversy, adversaries need only take up their pens, adjoining a friend as arbiter if necessary, and say: ‘Let us calculate!’”
— Couturat explaining Leibniz</p>
</blockquote>

<p>In our analysis of models of computation, we wish to begin with the Leibnizian dream of the <em>calculus ratiocinator</em> to explore the different modes that can be attributed to calculation. To this end, we rely on the concepts of genericity and absolute generality. Absolute generality is the act of speaking of all things in general by aiming at all objects (the science of things in general is called metaphysics), whilst genericity is the act of targeting any object in general.</p>

<p>We can here mobilise the <strong>Set-Theoretic Principle of Genericity</strong>:</p>

<blockquote>
  <p>Given a set, reference to any member of that set is guaranteed.</p>
</blockquote>

<p>This we can advantageously transpose into the world of types, in which variables live, and this is what we shall do in studying the typed λ-calculus. In this world, we can refer to any member of an inhabited type.</p>

<p>We shall first briefly explore the problems that presented themselves to logicians and mathematicians who wished to establish a <em>calculus ratiocinator</em> on a universal language, then we shall explore the question of degenerate objects of absolute generality, and finally we shall see that logic, that is to say necessity, is the guarantor of proper calculation, a calculation that terminates.</p>

<h3 id="12-hilbert-ackermann-and-the-entscheidungsproblem">1.2 Hilbert, Ackermann and the Entscheidungsproblem</h3>

<p>The mathematicians of the early 20th century attempted to find methods of calculation and to prove that the <em>Entscheidungsproblem</em><sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> was decidable, that is to say that any well-formed proposition in the language of a sufficiently powerful axiomatic theory (that of Peano, or even that of the <em>Principia Mathematica</em>), was decidable.</p>

<p>To this end, mathematicians gradually equipped themselves with a definition of computability, beginning with recursive functions, which can be traced back to Dedekind, but whose formalism is above all associated with Skolem, Ackermann, and then Gödel.</p>

<p>Primitive recursive functions are total functions, in the sense that their calculation terminates for any value. The counter-example of the Ackermann function shows, however, that there exists a function that is not primitive recursive, but which is nonetheless totally recursive, thus showing that the computable extended further than that.</p>

<p>The epigraph quotation shows that already in his time, Leibniz formulated the wish for a syntax that could express all things (whether the problem be mathematical, scientific or metaphysical), and a calculation procedure enabling the reduction of these problems. This desire necessitated two things:
— A <em>Characteristica universalis</em>, a syntax capable of expressing all things (also seen as an international language), which must therefore be associated with absolute generality;
— A <em>Calculus ratiocinator</em>, or calculation procedure enabling the reduction of all problems formulated in the <em>Characteristica universalis</em>.</p>

<p>The Leibnizian dream was shared by numerous philosophers at the beginning of the 20th century, including Bertrand Russell and Louis Couturat, who were both great readers of Leibniz, having published on him.</p>

<p>Already in his time, Leibniz considered reasoning as diagrammatic, even if his syntax sketches must be seen as a historical curiosity. We shall see in the coming sections that logicians of the early 20th century threw themselves body and soul into this Leibnizian quest for a universal language and a confluent and strongly normalising calculation, but that the diagrammatic model of calculation is an idea that would make its mark on numerous logicians and computer scientists. Kluge (1980) maintains that Frege’s <em>Begriffschrift</em> was inspired by this Leibnizian problem.</p>

<h3 id="13-end-game-gödels-theorems">1.3 End Game: Gödel’s Theorems</h3>

<p>Gödel’s first theorem marks, as we know, the end of the hope for a calculation on an absolutely general syntax, a <em>characteristica universalis</em> that always terminates. Certain problems are, as we know, undecidable, such that it is doomed to failure to construct a calculation founded on a universal language that has an answer to all things in general, at least in the domain of mathematics<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup>.</p>

<p>Gödel’s second theorem shows that in particular, the statement that proves the coherence of a system formalising arithmetic at minimum is also undecidable.</p>

<h2 id="2-exploration-absolute-generality-as-the-locus-of-antinomies">2. Exploration: Absolute Generality as the Locus of Antinomies</h2>

<h3 id="21-russells-paradox-punishment-of-absolute-generality">2.1 Russell’s Paradox: Punishment of Absolute Generality?</h3>

<p>A well-known episode of the crisis in the foundations of mathematics, Russell’s paradox brings down the overly general, overly logicist structure of naive set theory, which was developed (amongst others) by Gottlob Frege in <em>Grundgesetze der Arithmetik</em> at the end of the 19th century. The paradox is devastating: it consists in using all the generality of Frege’s syntax (a mad but impossible dream of making mathematics fit within a syntax, whose entities are what can be written in it) to write a degenerate set (called Russell’s set): $\{x \mid \neg x \in x\}$.</p>

<p>The solution adopted by logicians and mathematicians is always to introduce a hierarchy between the entities considered (which Russell does with ramified type theory in the <em>Principia Mathematica</em>), a hierarchy between sets and classes in ZF, by adding an axiom of foundation that forbids a set from belonging to itself, and by considering de facto only sets, and not classes, as the sole mathematical entity (although this is debatable, several important objects being classes, such as the class of ordinals, for example).</p>

<p>Another course taken was (for logician-philosophers) to invent a much less expressive formalism, which is not subject to Russell’s paradox, but which does not permit the expression of much: mereology. This latter formalism creates no hierarchy between types of objects, nor between individuals and predicates, but is not adequate for founding mathematics (except in a hyper-finitist perspective, in which one considers that mathematics stops at a certain integer, say three billion). It is for this reason that mereology is regularly adopted as an ontology by analytical philosophers (Lewis notably), because of its reputation for neutrality and simplicity<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup> with regard to the postulated entities, which conforms to Occam’s razor.</p>

<p>In short, Russell’s paradox is a fixed point<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup> that arises in general systems, that is to say systems that wish to say much without restraining themselves with a hierarchy of entities. The analogy between naive set theory and pure λ-calculus is moreover striking:</p>

<p>Let $M$ be an involutive term (such that $MMx = x$).</p>

\[(\lambda x.Mxx)(\lambda x.Mxx) \rightsquigarrow M(\lambda x.Mxx)(\lambda x.Mxx) \rightsquigarrow (\lambda x.Mxx)(\lambda x.Mxx) \rightsquigarrow ...\]

\[\{x \mid \neg x \in x\} \in \{x \mid \neg x \in x\} \to \neg \{x \mid \neg x \in x\} \in \{x \mid \neg x \in x\} \to \{x \mid \neg x \in x\} \in \{x \mid \neg x \in x\} \to ...\]

<p>One must take “$\in$” for the application of two λ-terms and “$\neg$” for the involutive term $M$. One recognises here the λ-term $\Omega$ which never normalises. This is a striking example that degenerates because of its excessive generality, and its lack of necessity, which lends credence to the thesis that the necessary does not saturate the universal (contrary to the correlation thesis).</p>

<h3 id="22-λ-calculus">2.2 λ-calculus</h3>

<p>The λ-calculus is a formalism invented by Alonzo Church following Russell and Whitehead’s <em>Principia Mathematica</em>, in which the abstraction of $x$ was noted “$\hat{x}$”, which Church noted “$\hat{\cdot}x$” and then naturally “$\lambda x$”, in all generality.</p>

<p>As we have seen, the λ-calculus, which abstracts all things, is the locus of generality, which is concretely translated by the existence of paradoxical λ-terms, which never reduce to normal form.</p>

<p>Just like partial recursive functions, the λ-calculus possesses <em>mutatis mutandis</em> its generic equivalent, which guarantees its termination. What is interesting here is that concerning the λ-calculus, it is directly logic (the necessary) that is used to avoid loops!</p>

<p>This generic λ-calculus is typed, that is to say prevented from looping infinitely by a sort of logical super-ego. Here, we are interested in the simply typed λ-calculus for reasons of concision.</p>

<p>The type system rests on a unique typing judgement, noted $\Gamma \vdash M : \tau$ (in the context $\Gamma$, the term $M$ has type $\tau$). This judgement is derived from the following three rules:</p>

\[\frac{\Gamma, x : \tau \vdash M : \sigma}{\Gamma \vdash \lambda x : \tau . M : \tau \to \sigma} \text{ (abstraction)}\]

\[\frac{\Gamma \vdash M : \tau \to \sigma \quad \Gamma \vdash N : \tau}{\Gamma \vdash MN : \sigma} \text{ (application)}\]

\[\frac{}{\Gamma \vdash x : \tau} \text{ (typing judgement)}\]

<p>These rules are in fact rules for the construction of λ-terms. They guarantee proper construction and proper termination of calculations, thanks to the strong normalisation property of typed λ-calculus. It is this formalism that will serve as a theoretical basis for (typed) programming languages, which cannot afford to crash as in the general case, which contains completely degenerate objects<sup id="fnref:5" role="doc-noteref"><a href="#fn:5" class="footnote" rel="footnote">5</a></sup>.</p>

<p>To take an interest in the rules of construction of λ-terms is in fact to take an interest in the conditions of possibility of genericity, that is to say in how to restrict an overly general system by adding logical rules (necessity) to it. Here, necessity is directly logic itself, because when one removes the λ-terms (qualified as “decorations” in proof theory), one obtains the following logical system:</p>

\[\frac{\Gamma, \tau \vdash \sigma}{\Gamma \vdash \tau \to \sigma} \text{ (introduction of implication)}\]

\[\frac{\Gamma \vdash \tau \to \sigma \quad \Gamma \vdash \tau}{\Gamma \vdash \sigma} \text{ (cut (or modus ponens))}\]

\[\frac{}{\Gamma \vdash \tau} \text{ (axiom)}\]

<p>One will have recognised minimal logic, which can be extended to other logical systems via the addition of rules.</p>

<h3 id="23-the-super-ego-of-calculation-logic">2.3 The Super-Ego of Calculation: Logic</h3>

<p>In calculation, what prevents genericity from degenerating into absolute generality is therefore necessity, which is none other than logic itself. As we have seen, this is striking in the λ-calculus: typed λ-calculus has equipped itself with a logical super-ego that prevents λ-incest<sup id="fnref:6" role="doc-noteref"><a href="#fn:6" class="footnote" rel="footnote">6</a></sup>.</p>

<p>It is at this point that we can observe that in models of computation also, universality is not saturated by necessity, for there exist places (general universality) in which logical necessity is not present. However, when we speak of typed λ-calculus, we are indeed speaking of genericity and necessity, since types are precisely derived from logic.</p>

<p>In this context, logic acquires a new role: that of the mechanical guarantee of calculation termination, showing that calculation without logic is a risky business, subject to paradoxes and computer crashes.</p>

<h2 id="3-logic-as-guarantor-of-the-generality-of-calculation">3. Logic as Guarantor of the Generality of Calculation</h2>

<h3 id="31-the-curry-howard-isomorphism-isomorphism-of-the-general">3.1 The Curry-Howard Isomorphism: Isomorphism of the General</h3>

<p>We have seen that concerning calculation, logic was the introduction of the necessary into an overly general system, which had the consequence of rendering the system generic, and therefore of guaranteeing the termination of calculations.</p>

<p>The Curry-Howard isomorphism designates the fact (which we discussed in section 2.2) that λ-terms are the “decorations” of logical formulae, and that reciprocally, logical formulae are the “types” of λ-terms. But we can extend this correspondence further and find some twin concepts on either side of logic and calculation:</p>

<table>
  <thead>
    <tr>
      <th>Logic</th>
      <th>λ-calculus (typed)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>formula</td>
      <td>type</td>
    </tr>
    <tr>
      <td>sequent</td>
      <td>judgement</td>
    </tr>
    <tr>
      <td>term construction</td>
      <td>term</td>
    </tr>
    <tr>
      <td>β-reduction</td>
      <td>cut elimination</td>
    </tr>
    <tr>
      <td>η-expansion</td>
      <td>axiom expansion</td>
    </tr>
    <tr>
      <td>normal form</td>
      <td>cut-free proof</td>
    </tr>
    <tr>
      <td>normalisation</td>
      <td>cut elimination theorem</td>
    </tr>
    <tr>
      <td>Church-Rosser</td>
      <td>confluence</td>
    </tr>
  </tbody>
</table>

<p>This table<sup id="fnref:7" role="doc-noteref"><a href="#fn:7" class="footnote" rel="footnote">7</a></sup> enables us to observe the conceptual extent of the Curry-Howard isomorphism. This isomorphism is of the domain of the generic; it only permits speaking of the generic universal, that is to say the universal guided by logical necessity.</p>

<h3 id="32-linear-logic-or-the-geometrisation-of-the-generic">3.2 Linear Logic or the Geometrisation of the Generic</h3>

<p>Linear logic, emanating directly from the Curry-Howard isomorphism, was conceived from its origins in 1986 as a typing system for λ-terms. It is distinguished by an original approach to computational resources: once a resource is used, it can no longer be reused. This characteristic manifests itself fully in the truly linear fragment MLL, and allows us to envisage proofs, and therefore well-constructed λ-terms, as graphs, whose correction graphs (induced by the <code class="language-plaintext highlighter-rouge">&amp;</code>s) are connected and acyclic, in other words, having a tree structure.</p>

<p>Cut elimination in this framework can be seen as a transformation of graphs, simplified by two fundamental rules in proof nets:</p>

<p><strong>First reduction:</strong></p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/generalite/proof-net-reduction-1-800.webp 800w, /assets/img/posts/generalite/proof-net-reduction-1-1600.webp 1600w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/generalite/proof-net-reduction-1-800.png" alt="First proof net reduction" width="800" height="208" loading="lazy" decoding="async" />
</picture>

<p><em>(Axiom-cut: the cut with an axiom is simplified)</em></p>

<p><strong>Second reduction:</strong></p>

<picture>
    <source type="image/webp" srcset="/assets/img/posts/generalite/proof-net-reduction-2-800.webp 800w, /assets/img/posts/generalite/proof-net-reduction-2-1600.webp 1600w" sizes="(max-width: 768px) calc(100vw - 52px), 700px" />
    <img src="/assets/img/posts/generalite/proof-net-reduction-2-800.png" alt="Second proof net reduction" width="800" height="159" loading="lazy" decoding="async" />
</picture>

<p><em>(Tensor-Par: the cut between a tensor and a par decomposes into two cuts on the sub-proofs)</em></p>

<p>Where $\pi_m, \pi_n, \pi_o$ and $\pi_p$ are proofs.</p>

<p>Bearing in mind the Curry-Howard isomorphism, we can establish a parallel between λ-terms and logical formulae, and between β-reduction (calculation) and cut elimination. This perspective also authorises us to consider “interaction nets” (studied by Yves Lafont) as graphical representations of β-reduction.</p>

<p>We thus obtain a geometric model of calculation, observable in an elegant manner in dynamic demonstrations such as those of Interaction nets (Yves Lafont, 1995). This geometric visualisation of calculation creates the link with the oldest branch of mathematics: geometry.</p>

<h3 id="33-the-blind-spot-of-logic-statistical-convergence-or-how-to-reach-our-goal-with-very-high-probability">3.3 The Blind Spot of Logic: Statistical Convergence, or How to Reach Our Goal with Very High Probability</h3>

<p>But one should not therefore bury the Leibnizian project for ever. Even if in the world of certainty, the desire to reconcile a generic system, capable of speaking of all things, with a model of computation that always terminates is proved vain (halting problem, undecidability of the Entscheidungsproblem, term $\Omega$), there subsists a world in which all seems possible: that of statistics.</p>

<p>Universality is not saturated by necessity as we have seen, but nothing prevents a machine from deciding with high probability the halting of any other machine<sup id="fnref:8" role="doc-noteref"><a href="#fn:8" class="footnote" rel="footnote">8</a></sup>. <em>Property testing</em> is a post-logical discipline in which rather than studying whether a property is true or false with certainty, one studies whether it is so with high probability (an arbitrarily high probability that one can reach with certainty).</p>

<p>Today, the <em>characteristica universalis</em> and the <em>calculus ratiocinator</em> raise a good laugh amongst logicians, but it may be that the problem is today formulated in other terms: does there exist a machine that can say with an arbitrarily high probability whether any statement is true or false? It may be that the <em>characteristica universalis</em> is vectors of high dimension, and the <em>calculus ratiocinator</em> a particularly vast neural network.</p>

<h2 id="conclusion">Conclusion</h2>

<p>We have seen that in the models of computation that we have considered, total recursive functions and typed λ-calculus could be associated with the concept of genericity, and partial recursive functions and pure λ-calculus with the concept of absolute generality. We have been able to exploit this distinction with profit by showing that one obtains genericity by introducing logic, that is to say necessity. We have finally explored the new interactionist or geometric paradigm of generic models of computation, introduced by linear logic and interaction nets.</p>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>Decision problem. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>but one wants to respond: and <em>a fortiori</em> in metaphysics and in the sciences, even if this is not obvious and is debatable, which we shall not do here. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:3" role="doc-endnote">
      <p>The vast majority of the (analytical) literature on mereology today consists in determining whether mereology is “ontologically neutral” and whether Tom’s moustache still belongs to him when Jerry tears it off. <a href="#fnref:3" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:4" role="doc-endnote">
      <p>I borrow the term from Jean-Yves Girard, who by generalisation makes it the place in syntax where everything degenerates because of self-reference (e.g. Gödel’s theorem for arithmetic, the halting problem for Turing machines, $\Omega$ for λ-calculus, etc.). <a href="#fnref:4" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:5" role="doc-endnote">
      <p>even crashing the system. <a href="#fnref:5" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:6" role="doc-endnote">
      <p>The image is (for once) Jean-Yves Girard’s. <a href="#fnref:6" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:7" role="doc-endnote">
      <p>which I draw from Olivier Laurent’s proof theory course. <a href="#fnref:7" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:8" role="doc-endnote">
      <p>And this is moreover what happens in practice when one executes a programme on our modern machines: a statistical super-ego is put in place to verify with high probability whether the programme one has launched terminates (hence the error message in case of a loop). <a href="#fnref:8" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><category term="Philosophie" /><category term="Logique" /><category term="Calculabilité" /><summary type="html"><![CDATA[How to distinguish absolute generality from genericity in models of computation? The role of logic as guarantor of termination.]]></summary></entry></feed>