# 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.

## 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.

Semantics and discourse and values — Scott Alexander’s The whole city is centre.

From a different direction, Microsoft argues that the idea of obects as a kind of cnachor 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.

## A an evolutionary problem

When do we need to use words? have a toy model for color words, which is a clever choice of domain.

: a connection to count model stochastics and other evolutionary models

Also what embodiment means for this stuff.

## As a collaborative endeavour

Zvi Moshowitz on simulacra and subjectivity with a side foray into power based on a taxonomy of (Baudrillardian?) simulacra.

Contrast that with the newer definition that’s based on what it means to say “There’s a lion across the river”[…]

Level 1: There’s a lion across the river.

Level 2: I do’t want to go (or have other people go) across the river.

Level 3: I’m with the popular kids who are too cool to go across the river.

Level 4: A firm stance against trans-river expansionism focus grouped well with undecided voters in my constituency.

Or alternatively, and isomorphic to the Lion definition, from my previous simulacra post:

“There’s a pandemic headed our way from China” means...

Level 1: “There’s a pandemic headed our way from China.”

Level 2: “I want you to act as if you think there might be a pandemic on our way from China” while hoping to still be interpreted by the listener as meaning “There’s a >pandemic headed our way from China.”

Level 3: “I wish to associate with the group that claims there is a pandemic headed our way from China.”

Level 4: “It is advantageous for me to say there is a pandemic headed our way from China.”

## 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.

• 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.

The rose has teeth in the mouth of the beast.

## References

Abend, Omri, and Ari Rappoport. 2017. “The State of the Art in Semantic Representation.” In, 77–89. Association for Computational Linguistics. https://doi.org/10.18653/v1/P17-1008.
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. “Modeling the Emergence of Universality in Color Naming Patterns.” Proceedings of the National Academy of Sciences of the United States of America 107 (6): 2403–7. https://doi.org/10.1073/pnas.0908533107.
Bengio, Yoshua, Réjean Ducharme, Pascal Vincent, and Christian Jauvin. 2003. “A Neural Probabilistic Language Model.” Journal of Machine Learning Research 3: 1137–55. http://www.jmlr.org/papers/v3/bengio03a.html.
Cancho, Ramon Ferrer i, and Ricard V. Solé. 2003. “Least Effort and the Origins of Scaling in Human Language.” Proceedings of the National Academy of Sciences 100 (3): 788–91. https://doi.org/10.1073/pnas.0335980100.
Cao, Hui, George Hripcsak, and Marianthi Markatou. 2007. “A Statistical Methodology for Analyzing Co-Occurrence Data from a Large Sample.” Journal of Biomedical Informatics 40 (3): 343–52. https://doi.org/10.1016/j.jbi.2006.11.003.
Christiansen, Morten H, and Nick Chater. 2008. “Language as Shaped by the Brain.” Behavioral and Brain Sciences 31: 489–509. https://doi.org/10.1017/S0140525X08004998.
Corominas-Murtra, Bernat, and Ricard V. Solé. 2010. “Universality of Zipf’s Law.” Physical Review E 82 (1): 011102. https://doi.org/10.1103/PhysRevE.82.011102.
Deerwester, Scott, Susan T. Dumais, George W. Furnas, Thomas K. Landauer, and Richard Harshman. 1990. “Indexing by Latent Semantic Analysis.” http://wwwusers.di.uniroma1.it/ estrinfo/basicpaperLSI.pdf.
Elman, Jeffrey L. 1990. “Finding Structure in Time.” Cognitive Science 14: 179–211. https://doi.org/10.1016/0364-0213(90)90002-E.
———. 1993. “Learning and Development in Neural Networks: The Importance of Starting Small.” Cognition 48: 71–99. https://doi.org/10.1016/0010-0277(93)90058-4.
———. 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. “A Closer Look at Skip-Gram Modelling.” In. http://lrec-conf.org/proceedings/lrec2006/pdf/357_pdf.pdf.
Kiros, Ryan, Yukun Zhu, Ruslan Salakhutdinov, Richard S. Zemel, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. 2015. “Skip-Thought Vectors.” June 22, 2015. http://arxiv.org/abs/1506.06726.
Lazaridou, Angeliki, Dat Tien Nguyen, Raffaella Bernardi, and Marco Baroni. 2015. “Unveiling the Dreams of Word Embeddings: Towards Language-Driven Image Generation.” June 10, 2015. http://arxiv.org/abs/1506.03500.
Le, Quoc V., and Tomas Mikolov. 2014. “Distributed Representations of Sentences and Documents.” In Proceedings of The 31st International Conference on Machine Learning, 1188–96. http://www.jmlr.org/proceedings/papers/v32/le14.html.
Li, Xiujun, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, et al. 2020. “Oscar: Object-Semantics Aligned Pre-Training for Vision-Language Tasks,” May. https://www.microsoft.com/en-us/research/publication/oscar-object-semantics-aligned-pre-training-for-vision-language-tasks/.
Loreto, Vittorio, Animesh Mukherjee, and Francesca Tria. 2012. “On the Origin of the Hierarchy of Color Names.” Proceedings of the National Academy of Sciences of the United States of America 109 (18): 6819–24. https://doi.org/10.1073/pnas.1113347109.
Mikolov, Tomas, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. “Efficient Estimation of Word Representations in Vector Space.” January 16, 2013. http://arxiv.org/abs/1301.3781.
Mikolov, Tomas, Quoc V. Le, and Ilya Sutskever. 2013. “Exploiting Similarities Among Languages for Machine Translation.” September 16, 2013. http://arxiv.org/abs/1309.4168.
Mikolov, Tomas, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. “Distributed Representations of Words and Phrases and Their Compositionality.” In, 3111–19. Curran Associates, Inc. http://papers.nips.cc/paper/5021-di.
Mikolov, Tomas, Wen-tau Yih, and Geoffrey Zweig. 2013. “Linguistic Regularities in Continuous Space Word Representations.” In HLT-NAACL, 746–51. Citeseer. https://www.aclweb.org/anthology/N13-1090.pdf.
Narayanan, Annamalai, Mahinthan Chandramohan, Rajasekar Venkatesan, Lihui Chen, Yang Liu, and Shantanu Jaiswal. 2017. “Graph2vec: Learning Distributed Representations of Graphs.” July 17, 2017. http://arxiv.org/abs/1707.05005.
“Oscar: Objects Are the Secret Key to Link Between Language and Vision.” 2020. Microsoft Research. May 15, 2020. https://www.microsoft.com/en-us/research/blog/objects-are-the-secret-key-to-revealing-the-world-between-vision-and-language/.
Pennington, Jeffrey, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global Vectors for Word Representation.” Proceedings of the Empiricial Methods in Natural Language Processing (EMNLP 2014) 12. http://nlp.stanford.edu/projects/glove/glove.pdf.
Petersson, Karl-Magnus, Vasiliki Folia, and Peter Hagoort. 2012. “What Artificial Grammar Learning Reveals about the Neurobiology of Syntax.” Brain and Language, The Neurobiology of Syntax, 120 (2): 83–95. https://doi.org/10.1016/j.bandl.2010.08.003.
Rizzolatti, Giacomo, and Laila Craighero. 2004. “The Mirror-Neuron System.” Annual Review of Neuroscience 27: 169–92. https://doi.org/10.1146/annurev.neuro.27.070203.144230.
Smith, Kenny, and Simon Kirby. 2008. “Cultural Evolution: Implications for Understanding the Human Language Faculty and Its Evolution.” Philosophical Transactions of the Royal Society B: Biological Sciences 363: 3591–3603. https://doi.org/10.1098/rstb.2008.0145.
Steyvers, Mark, and Joshua B. Tenenbaum. 2005. “The Large-Scale Structure of Semantic Networks: Statistical Analyses and a Model of Semantic Growth.” Cognitive Science 29 (1): 41–78. https://doi.org/10.1207/s15516709cog2901_3.
Stolk, Arjen, Matthijs L. Noordzij, Lennart Verhagen, Inge Volman, Jan-Mathijs Schoffelen, Robert Oostenveld, Peter Hagoort, and Ivan Toni. 2014. “Cerebral Coherence Between Communicators Marks the Emergence of Meaning.” Proceedings of the National Academy of Sciences 111 (51): 18183–88. https://doi.org/10.1073/pnas.1414886111.
Zanette, Damiáan H. 2006. “Zipf’s Law and the Creation of Musical Context.” Musicae Scientiae 10 (1): 3–18. https://doi.org/10.1177/102986490601000101.

Warning! Experimental comments system! If is does not work for you, let me know via the contact form.