# Semantics

## Compressed representations of reality for syntactic agents; which might be what meaning means

“ […] archetypes don’t exist; the body exists.
The belly inside is beautiful, because the baby grows there,
because your sweet cock, all bright and jolly, thrusts there,
and good, tasty food descends there,
and for this reason the cavern, the grotto, the tunnel
are beautiful and important, and the labyrinth, too,
which is made in the image of our wonderful intestines.
When somebody wants to invent something beautiful and important,
it has to come from there,
because you also came from there the day you were born,
because fertility always comes from inside a cavity,
where first something rots and then, lo and behold,
there’s a little man, a date, a baobab.

And high is better than low,
because feet stink and hair doesn’t stink as much,
because it’s better to climb a tree and pick fruit
than end up underground, food for worms,
and because you rarely hurt yourself hitting something above
— you really have to be in an attic —
while you often hurt yourself falling.
That’s why up is angelic and down devilish.”

Umberto Eco. Foucault’s Pendulum.

On the mapping between linguistic tokens and what they denote.

If I had time I would learn about: Wierzbicka’s semantic primes, Wittgenstein, probably Mark Johnson if the over-egging doesn’t kill me. Logic-and-language philosophers, toy axiomatic worlds. Classic AI symbolic reasoning approaches. Drop in via game theory and neurolinguistics? Ignore most of it, mention plausible models based on statistical learnability.

## Symbol grounding

Piantadosi and Hill (2022) on the Symbol grounding problem in transformers.

## As a classification problem

Eliezer Yudkowsky’s essay, How an algorithm feels from the inside, which inspired Scott Alexander’s The Categories Were Made For Man, Not Man For The Categories.

From a different direction, Microsoft argues that objects are a kind of anchor point in training cross-modal AI systems.

…objects can be naturally used as anchor points to ease the learning of semantic alignments between images and texts. This discovery leads to a novel VLP framework that creates new state-of-the-art performance on six well-established vision-and-language tasks. …. Though the observed data varies among different channels (modalities), we hypothesize that important factors tend to be shared among multiple channels (for example, dogs can be described visually and verbally), capturing channel-invariant (or modality-invariant) factors at the semantic level. In vision-and-language tasks, salient objects in an image can be mostly detected by modern object detectors, and such objects are often mentioned in the paired text.

Also does embodiment means for this stuff, in terms of priors?

## As an evolutionary phenomenon

Moved to Language games.

See simulacra.

## Neurology of

What does the MRI tell us about denotation in the brain?

is worth it for the tagline: “experimental semiotics”

How can we understand each other during communicative interactions? An influential suggestion holds that communicators are primed by each other’s behaviors, with associative mechanisms automatically coordinating the production of communicative signals and the comprehension of their meanings. An alternative suggestion posits that mutual understanding requires shared conceptualizations of a signal’s use, i.e., “conceptual pacts” that are abstracted away from specific experiences. Both accounts predict coherent neural dynamics across communicators, aligned either to the occurrence of a signal or to the dynamics of conceptual pacts. Using coherence spectral-density analysis of cerebral activity simultaneously measured in pairs of communicators, this study shows that establishing mutual understanding of novel signals synchronizes cerebral dynamics across communicators’ right temporal lobes. This interpersonal cerebral coherence occurred only within pairs with a shared communicative history, and at temporal scales independent from signals’ occurrences. These findings favor the notion that meaning emerges from shared conceptualizations of a signal’s use.

## Word vector models

Nearly-reversible, distributed representations of semantics via entity embeddings. Do these actually tell us anything about semantics?

As invented by and popularised/refined by Mikolov and Dean at Google, the skip-gram semantic vector spaces — definitely the hippest of the ways of defining String distances for natual language this season.

Technology Review, Mappings 1-5

• Christopher Olah discusses it from a neural network perspective with diagrams and commends for a rationale.

• Sanjeev Arora’s semantic word embeddings has an explanation of skipgrammish methods:

In all methods, the word vector is a succinct representation of the distribution of other words around this word. That this suffices to capture meaning is asserted by Firth’s hypothesis from 1957, “You shall know a word by the company it keeps.” To give an example, if I ask you to think of a word that tends to co-occur with cow, drink, babies, calcium, you would immediately answer: milk.

[…] Firth’s hypothesis does imply a very simple word embedding, albeit a very high-dimensional one.

Embedding 1: Suppose the dictionary has N distinct words (in practice, N=100,000). Take a very large text corpus (e.g., Wikipedia) and let Count5(w1,w2) be the number of times w1 and w2 occur within a distance 5 of each other in the corpus. Then the word embedding for a word w is a vector of dimension N, with one coordinate for each dictionary word. The coordinate corresponding to word w2 is Count5(w,w2). (Variants of this method involve considering cooccurence of w with various phrases or n-tuples.)

The obvious problem with Embedding 1 is that it uses extremely high-dimensional vectors. How can we compress them?

Embedding 2: Do dimension reduction by taking the rank-300 singular value decomposition (SVD) of the above vectors.

Using SVD to do dimension reduction seems an obvious idea these days but it actually is not. After all, it is unclear a priori why the above N×N matrix of cooccurance counts should be close to a rank-300 matrix. That this is the case was empirically discovered in the paper on Latent Semantic Indexing or LSI.

• For both descriptions below, we assume that the current word in a sentence is $$w_i.$$

CBOW: The input to the model could be $$w_{i-2}, w_{i-1}, w_{i+1}, w_{i+2},$$ the preceding and following words of the current word we are at. The output of the neural network will be $$w_i$$. Hence you can think of the task as “predicting the word given its context”. Note that the number of words we use depends on your setting for the window size.

Skip-gram: The input to the model is $$w_i$$, and the output could be $$w_{i-1}, w_{i-2}, w_{i+1}, w_{i+2}$$. So the task here is “predicting the context given a word”. Also, the context is not limited to its immediate context, training instances can be created by skipping a constant number of words in its context, so for example, $$w_{i-3}, w_{i-4}, w_{i+3}, w_{i+4}$$, hence the name skip-gram. Note that the window size determines how far forward and backward to look for context words to predict.

According to Mikolov:

Skip-gram: works well with small amount of the training data, represents well even rare words or phrases.

CBOW: several times faster to train than the skip-gram, slightly better accuracy for the frequent words.

This can get even a bit more complicated if you consider that there are two different ways how to train the models: the normalized hierarchical softmax, and the un-normalized negative sampling. Both work quite differently.

which makes sense since with skip gram, you can create a lot more training instances from limited amount of data, and for CBOW, you will need more since you are conditioning on context, which can get exponentially huge.

• Jeff Dean’s CIKM Keynote. (that’s “Conference on Information and Knowledge Management” to you and me.)

“Embedding vectors trained for the language modeling task have very interesting properties (especially the skip-gram model)”

$E(\text{hotter}) - E(\text{hot}) &≈ E(\text{bigger}) - E(\text{big}) \\ E(\text{Rome}) - E(\text{Italy}) &≈ E(\text{Berlin}) - E(\text{Germany})$

“Skip-gram model w/ 640 dimensions trained on 6B words of news text achieves 57% accuracy for analogy-solving test set.”

Sanjeev Aror aexplain that, more than that, the skip gram vectors for polysemic words are a weighted sum of their constituent meanings.

• We describe an approach for unsupervised learning of a generic, distributed sentence encoder. Using the continuity of text from books, we train an encoder/decoder model that tries to reconstruct the surrounding sentences of an encoded passage. Sentences that share semantic and syntactic properties are thus mapped to similar vector representations. […] The end result is an off-the-shelf encoder that can produce highly generic sentence representations that are robust and perform well in practice

Graph formulations, e.g. David McAllester, Deep Meaning Beyond Thought Vectors:

I want to complain at this point that you can’t cram the meaning of a bleeping sentence into a bleeping sequence of vectors. The graph structures on the positions in the sentence used in the above models should be exposed to the user of the semantic representation. I would take the position that the meaning should be an embedded knowledge graph — a graph on embedded entity nodes and typed relations (edges) between them. A node representing an event can be connected through edges to entities that fill the semantic roles of the event type

## Software

• word2vec

This tool provides an efficient implementation of the continuous bag-of-words and skip-gram architectures for computing vector representations of words. These representations can be subsequently used in many natural language processing applications and for further research.”

• fastText

fastText is a library for efficient learning of word representations and sentence classification.

## References

Abend, Omri, and Ari Rappoport. 2017. In, 77–89. Association for Computational Linguistics.
Arbib, Michael. 2002. “The Mirror System, Imitation, and the Evolution of Language.” In Imitation in Animals and Artifacts, edited by Chrystopher Nehaniv and Kerstin Dautenhahn. MIT Press.
Baronchelli, Andrea, Tao Gong, Andrea Puglisi, and Vittorio Loreto. 2010. Proceedings of the National Academy of Sciences of the United States of America 107 (6): 2403–7.
Bengio, Yoshua, Réjean Ducharme, Pascal Vincent, and Christian Jauvin. 2003. Journal of Machine Learning Research 3 (Feb): 1137–55.
Cancho, Ramon Ferrer i, and Ricard V. Solé. 2003. Proceedings of the National Academy of Sciences 100 (3): 788–91.
Cao, Hui, George Hripcsak, and Marianthi Markatou. 2007. Journal of Biomedical Informatics 40 (3): 343–52.
Christiansen, Morten H, and Nick Chater. 2008. Behavioral and Brain Sciences 31: 489–509.
Corominas-Murtra, Bernat, and Ricard V. Solé. 2010. Physical Review E 82 (1): 011102.
Deerwester, Scott, Susan T. Dumais, George W. Furnas, Thomas K. Landauer, and Richard Harshman. 1990.
Elman, Jeffrey L. 1990. Cognitive Science 14: 179–211.
———. 1993. Cognition 48: 71–99.
———. 1995. “Language as a Dynamical System,” 195.
Gärdenfors, Peter. 2014. Geometry of Meaning: Semantics Based on Conceptual Spaces. Cambridge, Massachusetts: The MIT Press.
Guthrie, David, Ben Allison, Wei Liu, Louise Guthrie, and Yorick Wilks. 2006. In.
Kiros, Ryan, Yukun Zhu, Ruslan Salakhutdinov, Richard S. Zemel, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. 2015. arXiv:1506.06726 [Cs], June.
Lazaridou, Angeliki, Dat Tien Nguyen, Raffaella Bernardi, and Marco Baroni. 2015. arXiv:1506.03500 [Cs], June.
Le, Quoc V., and Tomas Mikolov. 2014. In Proceedings of The 31st International Conference on Machine Learning, 1188–96.
Li, Xiujun, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, et al. 2020. May.
Loreto, Vittorio, Animesh Mukherjee, and Francesca Tria. 2012. Proceedings of the National Academy of Sciences of the United States of America 109 (18): 6819–24.
Mikolov, Tomas, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. arXiv:1301.3781 [Cs], January.
Mikolov, Tomas, Quoc V. Le, and Ilya Sutskever. 2013. arXiv:1309.4168 [Cs], September.
Mikolov, Tomas, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. In arXiv:1310.4546 [Cs, Stat], 3111–19. Curran Associates, Inc.
Mikolov, Tomas, Wen-tau Yih, and Geoffrey Zweig. 2013. In HLT-NAACL, 746–51. Citeseer.
Narayanan, Annamalai, Mahinthan Chandramohan, Rajasekar Venkatesan, Lihui Chen, Yang Liu, and Shantanu Jaiswal. 2017. arXiv:1707.05005 [Cs], July.
2020. Microsoft Research (blog).
Pennington, Jeffrey, Richard Socher, and Christopher D. Manning. 2014. Proceedings of the Empiricial Methods in Natural Language Processing (EMNLP 2014) 12.
Petersson, Karl-Magnus, Vasiliki Folia, and Peter Hagoort. 2012. Brain and Language, The Neurobiology of Syntax, 120 (2): 83–95.
Piantadosi, Steven T., and Felix Hill. 2022. arXiv.
Rizzolatti, Giacomo, and Laila Craighero. 2004. Annual Review of Neuroscience 27: 169–92.
Smith, Kenny, and Simon Kirby. 2008. Philosophical Transactions of the Royal Society B: Biological Sciences 363: 3591–3603.
Steyvers, Mark, and Joshua B. Tenenbaum. 2005. Cognitive Science 29 (1): 41–78.
Stolk, Arjen, Matthijs L. Noordzij, Lennart Verhagen, Inge Volman, Jan-Mathijs Schoffelen, Robert Oostenveld, Peter Hagoort, and Ivan Toni. 2014. Proceedings of the National Academy of Sciences 111 (51): 18183–88.
Zanette, Damiáan H. 2006. Musicae Scientiae 10 (1): 3–18.

### No comments yet. Why not leave one?

GitHub-flavored Markdown & a sane subset of HTML is supported.