# [Question] What is abstraction?

I’m not clear on what the term ab­strac­tion re­ally means. It seems to mean differ­ent things in differ­ent con­texts.

I’m a pro­gram­mer, and when I think of ab­strac­tion, the first thing I think of is some­thing that feels like com­po­si­tion. Sup­pose you are a par­ent and want to teach your child how to brush their teeth. To do that, you break the task “brush your teeth” into sub­tasks like 1) pre­pare your tooth­brush, 2) ac­tu­ally brush your teeth, 3) rinse your mouth and 4) clean your tooth­brush. In pro­gram­ming, you would break the brushTeeth method into helper meth­ods like pre­pareTooth­brush, ac­tu­al­lyBrushTeeth, rinseMouth and cleanTooth­brush. And you would call brushTeeth an ab­strac­tion, be­cause it is com­posed of sub­tasks. My un­der­stand­ing is that this doesn’t just ap­ply to pro­gram­ming: in the real world, if you told your child “brush your teeth”, that would also be an ab­strac­tion for “pre­pare your tooth­brush, ac­tu­ally brush your teeth, rinse your mouth, and then clean your tooth­brush”.

But there’s some­thing else that I think of when I think of the term “ab­strac­tion”. Sup­pose I have a pro­gram that has peo­ple, dogs, and cats. All three have heights, weights and names, so I cre­ate an an­i­mal class, and I say that peo­ple, dogs and cats are more spe­cific ver­sions of an an­i­mal. My un­der­stand­ing is that this too would be an ab­strac­tion. In pro­gram­ming, and in the real world. My un­der­stand­ing is that the idea of an an­i­mal is an ab­strac­tion over the idea of a hu­man, dog or cat.

But there seems to be some­thing very differ­ent about each of the two situ­a­tions. In the first, we would say that the “brush your teeth” ab­strac­tion is com­posed of the sub­tasks, but we wouldn’t say that “an­i­mal” is com­posed of hu­mans, dogs and cats in the sec­ond. And we would say that the idea of an an­i­mal is a more gen­eral ver­sion of the idea of a hu­man, dog and cat, but we wouldn’t say that “brush your teeth” is a more gen­eral ver­sion of prepar­ing your tooth­brush or rins­ing your mouth.

The first ex­am­ple seems to be about com­po­si­tion, and the sec­ond about gen­er­al­ity, so I’m con­fused as to what ab­strac­tion re­ally is.

And if we look at yet more con­texts, there seems to be more in­con­sis­tency in how the term is used. In se­man­tics and philos­o­phy, “ab­stract” means some­thing that you can’t per­ceive with one of your five senses; the op­po­site of “con­crete”. A ten­nis ball is con­crete be­cause you can see it and touch it, but “ten­nis” is an ab­stract con­cept that you can’t see or touch. But this use of the word doesn’t dis­t­in­guish be­tween de­grees of ab­strac­tion. Ac­cord­ing to this use of the word, some­thing ei­ther is ab­stract, or it isn’t. But with the first two ex­am­ples, there’s clearly lev­els of ab­strac­tion.

And the se­man­tics and philos­o­phy ver­sion of ab­strac­tion seems like it matches the use of the term in the con­text of art. In the con­text of art, art is ab­stract when it doesn’t de­pict con­crete things. Eg. a paint­ing that tries to de­pict fear is ab­stract be­cause fear is an ab­stract con­cept, not a con­crete thing, whereas a por­trait of Lisa Gher­ar­dini (the Mona Lisa) is not ab­stract art, be­cause it de­picts a con­crete thing.

As for the term “ab­stract” in the con­text of aca­demic pa­pers, that seem­ings like it might just be a butcher­ing of the term. It’s a sum­mary. If you were to sum­ma­rize the task of brush­ing your teeth, you wouldn’t say “here’s a con­tainer that is com­posed of the sub­tasks”. If you were to sum­ma­rize the idea of an an­i­mal, that would just be a differ­ent thing than say­ing that it is a more gen­eral ver­sion of a hu­man, dog and cat.

In the con­text of math, ab­stract math is a field of study. I don’t know much about it, but from the googling I’ve done, it seems to be about, well, deal­ing with ques­tions that are more ab­stract. More ab­stract in the sense of gen­er­al­ness, like how an an­i­mal is more gen­eral than a hu­man. For ex­am­ple, alge­bra is more ab­stract than ar­ith­metic. Arith­metic says that 1 + 1 = 2, 2 + 2 = 4 , and 3 + 3 = 6. Alge­bra, says that n + n = 2n. n is more gen­eral than 1 in the same sense that “an­i­mal” is more gen­eral than “hu­man”. Well, it seems that way at least.

Bret Vic­tor has an es­say called Up and Down the Lad­der of Ab­strac­tion where he talks about ab­strac­tion as mov­ing away from the con­crete by re­mov­ing con­crete prop­er­ties. The more con­crete prop­er­ties you re­move, the more ab­stract it be­comes. He uses the ex­am­ple of a car mov­ing along a curved road ac­cord­ing to a cer­tain al­gorithm. The con­crete ver­sion of this is a given car on a given curved road pointed in a given di­rec­tion. You can make it more ab­stract by look­ing at the sys­tem not at a given point in time, but at all pos­si­ble points of time, and that will give you a line de­scribing where the car would be at all points in time.

This view of ab­strac­tion seems con­sis­tent with the idea of ab­strac­tion be­ing about mak­ing some­thing more gen­eral. We said “let’s not look at the car be­ing at this point in par­tic­u­lar, let’s look at all pos­si­ble points more gen­er­ally”. With the math ex­am­ple we said “let’s not look at the num­ber 1 in par­tic­u­lar, let’s look at any pos­si­ble num­ber more gen­er­ally”. With the an­i­mal ex­am­ple, we said “let’s not look at a hu­mans in par­tic­u­lar, let’s look at or­ganisms with any pos­si­ble [what­ever] more gen­er­ally”.

Th­ese us­ages of the term “ab­strac­tion” seem to be about how gen­eral a thing is, where some­thing that is more gen­eral has less prop­er­ties speci­fied, and some­thing that is more spe­cific has more prop­er­ties speci­fied. But if that is what ab­strac­tion is about, why call it ab­strac­tion? Why not call it gen­er­al­iza­tion? And if it is in­deed about spec­i­fy­ing less prop­er­ties, what word do we use to dis­t­in­guish be­tween con­crete things in the phys­i­cal world that we can de­tect with our senses, and things that we can’t de­tect with our senses, that we’d call ab­stract in the con­text of se­man­tics and philos­o­phy?

I don’t mean to im­ply that ab­strac­tion ac­tu­ally is used in­con­sis­tently. Just that it seems that way to me, and I definitely no­tice I am con­fused.

No nominations.
No reviews.
• I’ve thought a lot about this ex­act prob­lem, be­cause it’s cen­tral to a bunch of hard prob­lems in biol­ogy, ML/​AI, eco­nomics, and psy­chol­ogy/​neu­ro­science (in­clud­ing em­bed­ded agents). I don’t have a full an­swer yet, but I can at least give part of an an­swer.

First, the sort of ab­strac­tion used in pure math and CS is sort of an un­usual cor­ner case, be­cause it’s ex­act: it doesn’t deal with the sort of fuzzy bound­aries we see in the real world. “Ten­nis” is a fuzzy ab­strac­tion of many real-world ac­tivi­ties, and there are edge cases which are sort-of-ten­nis-but-maybe-not. Most of the in­ter­est­ing prob­lems in­volve non-ex­act ab­strac­tion, so I’ll mostly talk about that, with the un­der­stand­ing that math/​CS-style ab­strac­tion is just the case with zero fuzz.

I only know of one ex­ist­ing field which ex­plic­itly quan­tifies ab­strac­tion with­out need­ing hard edges: statis­ti­cal me­chan­ics. The heart of the field is things like “I have a huge num­ber of tiny par­ti­cles in a box, and I want to treat them as one ab­stract ob­ject which I’ll call “gas”. What prop­er­ties will the gas have?” Jaynes puts the tools of statis­ti­cal me­chan­ics on foun­da­tions which can, in prin­ci­ple, be used for quan­tify­ing ab­strac­tion more gen­er­ally. (I don’t think Jaynes had all the puz­zle pieces, but he had a lot more than any­one else I’ve read.) It’s rather difficult to find good sources for learn­ing stat mech the Jaynes way; Walter Grandy has a few great books, but they’re not ex­actly in­tro-level.

Any­way, (my read­ing of) Jaynes’ an­swer to the main ques­tion: ab­strac­tion is mainly about throw­ing away or ig­nor­ing in­for­ma­tion, in such away that we can still make strong pre­dic­tions about some as­pects of the un­der­ly­ing con­crete sys­tem. Ex­am­ples:

• We have a gas con­sist­ing of some huge num­ber of par­ti­cles. We throw away in­for­ma­tion about the par­ti­cles them­selves, in­stead keep­ing just a few sum­mary statis­tics: av­er­age en­ergy, num­ber of par­ti­cles, etc. We can then make highly pre­cise pre­dic­tions about things like e.g. pres­sure just based on the re­duced in­for­ma­tion we’ve kept, with­out hav­ing to think about each in­di­vi­d­ual par­ti­cle. That re­duced in­for­ma­tion is the “ab­stract layer”—the gas and its prop­er­ties.

• We have a bunch of tran­sis­tors and wires on a chip. We ar­range them to perform some log­i­cal op­er­a­tion, like maybe a NAND gate. Then, we throw away in­for­ma­tion about the un­der­ly­ing de­tails, and just treat it as an ab­stract log­i­cal NAND gate. Us­ing just the ab­stract layer, we can make pre­dic­tions about what out­puts will re­sult from what in­puts. Even in this case, there’s fuzz − 0.01 V and 0.02 V are both treated as log­i­cal zero, and in rare cases there will be enough noise in the wires to get an in­cor­rect out­put.

• I tell my friend that I’m go­ing to play ten­nis. I have ig­nored a huge amount of in­for­ma­tion about the de­tails of the ac­tivity—where, when, what racket, what ball, with whom, all the dis­tri­bu­tions of ev­ery micro­scopic par­ti­cle in­volved—yet my friend can still make some strong pre­dic­tions based on the ab­stract in­for­ma­tion I’ve pro­vided.

• When we ab­stract for­mu­las like “1+1=2” or “2+2=4″ into “n+n=2n”, we’re ob­vi­ously throw­ing out in­for­ma­tion about the value of n, while still mak­ing what­ever pre­dic­tions we can given the in­for­ma­tion we kept. This is what gen­er­al­iza­tion is all about in math and pro­gram­ming: throw out as much in­for­ma­tion as you can, while still main­tain­ing the core “pre­dic­tion”.

• Fi­nally, ab­stract art. IMO, the quintessen­tial ab­stract art pieces con­vey the idea of some thing with­out show­ing the thing it­self—I re­mem­ber one piece at SF’s MOMA which looks like writ­ing on a black­board but con­tains no ac­tual let­ters/​num­bers. In some sense, that piece is anti-ab­stract: it’s throw­ing away in­for­ma­tion about our usual ab­strac­tion—the let­ters/​num­bers—but re­tain­ing the rest of the vi­sual info of writ­ing on a chalk­board. By do­ing so, it forces us to no­tice the ab­strac­tion pro­cess it­self.

• Ab­strac­tion can be un­der­stood as a re­la­tion­ship be­tween mod­els. You can have a model of what it means to “brush your teeth”, and you can have mod­els of what it means to “pre­pare tooth­brush”, etc… The mod­els of the sub­tasks can be com­posed into a model of the whole se­quence, and the ab­strac­tion re­la­tion­ship tells you how this model is a re­al­iza­tion of the ab­stract “brush your teeth” model. Similarly, we can have a model of what an “an­i­mal” is, and mod­els for “dogs”, “hu­mans”, “cats”. The ab­strac­tion re­la­tion­ship tells you how each of these mod­els are re­al­iza­tions of the “an­i­mal” model. Re­mov­ing prop­er­ties is an easy way to cre­ate mod­els with this re­la­tion­ship, but it’s not the only way. For ex­am­ple, you can also re­place con­tin­u­ous time with dis­crete time.

You can chain this re­la­tion­ship to cre­ate a hi­er­ar­chy, and for hu­mans, the most con­crete mod­els we typ­i­cally use are the ones that are “mod­el­ing” our raw sen­sory ex­pe­riences. I think that ad­e­quately ex­plains why peo­ple use it this way, but that this isn’t what ab­strac­tion is.

• I tackle this ques­tion in de­tails in my NoUML es­say.

You can think of an ab­strac­tion as an in­di­visi­ble atom, a dot on some big­ger di­a­gram that on its own has no in­ner struc­ture. So ab­strac­tions have no in­ter­nal struc­ture but they are rather use­ful in terms of their re­la­tions to other ab­strac­tions. In your ex­am­ples there are 4 out­go­ing com­po­si­tion ar­rows go­ing from “brushTeeth” to 4 other ab­strac­tions: “pre­pareTooth­brush”, “ac­tu­al­lyBrushTeeth”, “rinseMouth” and “cleanTooth­brush” and 3 in­com­ing gen­er­al­iza­tion ar­rows go­ing from “peo­ple”, “dogs” and “cats” ab­strac­tions to “an­i­mal”.

Now imag­ine you have this huge di­a­gram with all the ab­strac­tions in your pro­gram­ming sys­tem and their re­la­tions to each other. Imag­ine also that “brushTeeth” and “an­i­mal” ab­strac­tions on this di­a­gram are both un­la­beled for some rea­son. You would be able to in­fer their names eas­ily just by look­ing at how these anony­mous ab­strac­tions re­late to the rest of the uni­verse.

• Every­one seems to have a slightly differ­ent idea about what the term ab­strac­tion means, so here is mine.

As agents, we try to un­der­stand (and pre­dict) the world by build­ing men­tal mod­els of it. But given that the world is vast and our brains are puny, we have to make do with ex­tremely sim­plified mod­els which also ap­ply to as many facets of the world as pos­si­ble. In math­e­mat­ics some­thing like the cat­e­gory the­ory or alge­braic ge­om­e­try gives you the level of ab­strac­tion that en­com­passes in very few sym­bols/​con­cepts/​ideas a large chunk of the un­der­ly­ing math. In pro­gram­ming poly­mor­phism is one way to ab­stract things, but in gen­eral any idea that lets you ac­com­plish more with less is a good can­di­date for an ab­strac­tion. That’s how pro­gram­ming lan­guages (and hu­man lan­guages be­fore that), data struc­tures and op­ti­mal al­gorithms got in­vented, and they are all ab­strac­tions. Of course, this can go meta mul­ti­ple lev­els, with pro­gres­sively more power.

Edit: we tend to pro­ject hu­man ideas on the world all the time, and iden­ti­fy­ing ab­stract ideas with re­al­ity hap­pens al­most au­to­mat­i­cally, e.g. “num­bers are a real thing!” with­out re­al­iz­ing that a differ­ently built mind might use a com­pletely differ­ent ap­proach to solv­ing the same prob­lem. Does AlphaZero use the ab­strac­tions of be­gin­ning/​mid­dlegame/​end­ing or at­tack/​defense when learn­ing to play chess bet­ter than any hu­man? I don’t know, but likely not in the same way. More­over, a slightly differ­ent neu­ral net­work, or even the same one ex­posed to a differ­ent se­quence of stim­uli might de­velop a differ­ent set of ab­strac­tions in­ter­nally.

• I think there is no rea­son to ex­pect a sin­gle mean­ing of the word. You did a good job in enu­mer­at­ing uses of ‘ab­strac­tion’ and find­ing its theme (re­moved from spe­cific). I don’t un­der­stand what con­fu­sion re­mains though.

• I’m not sure whether or not there ac­tu­ally is a sin­gle mean­ing of the word or not. I get the im­pres­sion from hear­ing other peo­ple talk about it that there is a sin­gle mean­ing, and that I’m not un­der­stand­ing what that sin­gle mean­ing is. But if it is the case that there is in fact no sin­gle mean­ing, I in­deed wouldn’t have any con­fu­sion re­main­ing, aside from maybe not hav­ing as good an un­der­stand­ing of how the differ­ent mean­ings re­late as I would like.

• I get the im­pres­sion from hear­ing other peo­ple talk about it that there is a sin­gle mean­ing, and that I’m not un­der­stand­ing what that sin­gle mean­ing is

Peo­ple are of­ten wrong about that.

A per­son who un­der­stands this effect can use it to ex­ploit peo­ple, and when they do it is called “equiv­o­ca­tion”, to use two differ­ent senses of the same word in quick enough suc­ces­sion that no­body no­tices the words aren’t re­ally point­ing at the same thing, to then use the in­con­sis­ten­cies be­tween the word senses to ap­proach im­pos­si­ble con­clu­sions.

I wish I could drop a load of ex­am­ples but I’ve never been good at that. This de­serves a post. This de­serves a pa­per, there are prob­a­bly whole philo­soph­i­cal pro­jects that are based on the pur­suit of im­pos­si­ble chimeras held up by pro­longed, en­trenched equiv­o­ca­tion...

• One such es­say about a con­cept that is ei­ther iden­ti­cal to equiv­o­ca­tion, or some­where in the vicinity (I’ve never quite been able to figure out which, but I think it’s sup­posed to be sub­tly differ­ent) is Scott’s post about Motte and Bailey, which in­cludes lots of examples

• Re­gard­ing the first two ex­am­ples: “brush your teeth” and “an­i­mal” are also in an­other as­pect quite differ­ent: The first ex­am­ple is a task, a in­struc­tion, or a com­mand. “an­i­mal” on the other hand is the name of a con­cept, and it can be used to form the monadic pred­i­cate “is an an­i­mal”. Which names a prop­erty which mem­bers of a set (the set of an­i­mals) satisfy. Maybe the differ­ence be­tween com­po­si­tion and gen­er­al­iza­tion be­comes clearer (or dis­ap­pears) if we com­pare com­pos­ite/​gen­er­al­ized pred­i­cates only or com­pos­ite/​gen­er­al­ized in­struc­tions only.

An ad­di­tional point re­gard­ing the as­pect of touch­a­bil­ity: Gram­mat­i­cally, the main differ­ence be­tween the terms “ten­nis” and “ten­nis ball”, seems to be the fact that the former is not countable, while the lat­ter is. Be­cause of this, you can eas­ily make a pred­i­cate out of the later by ap­ply­ing the cop­ula “is a”: “is a ten­nis ball”. This is not pos­si­ble for “ten­nis”: “is a ten­nis” doesn’t make sense. So you can’t as­so­ci­ate ten­nis with a par­tic­u­lar set of things which you could touch. Similar point holds for “fear”. This seems to hold for most “ab­stract” prop­er­ties: They are ex­pressed by non-countable nouns.

(An in­ter­est­ing ex­cep­tion is the con­cept of a num­ber. “Num­ber” is a countable noun, but the con­cept may be called ab­stract nonethe­less. This could hint at yet a differ­ent sense of ab­stract­ness.)

Similar to un­countable nouns, ad­jec­tives, like “large”, are gen­er­ally also not countable. They seem in­tu­itively also to be judged ab­stract, es­pe­cially when you con­vert them into prop­er­ties by nam­ing them via a (un­countable) noun: “Lar­ge­ness” is not a thing you could touch.

How­ever, the case is not so clear for verbs: “walks” can be con­verted to a noun by speak­ing of a “walk”, which seems to be a countable prop­erty of a pro­cess. As a con­se­quence, it seems not par­tic­u­larly ab­stract. In con­clu­sion, ab­stract­ness in the “philo­soph­i­cal” sense seems to be closely re­lated to un­countable nouns.

• Just a quick, pedan­tic note.

But there seems to be some­thing very differ­ent about each of the two situ­a­tions. In the first, we would say that the “brush your teeth” ab­strac­tion is com­posed of the sub­tasks, but we wouldn’t say that “an­i­mal” is com­posed of hu­mans, dogs and cats in the sec­ond.

Ac­tu­ally, from an ex­ten­sive point of view, that is ex­actly how you would define “an­i­mal”: as the set of all things that are an­i­mals. So it is in fact com­posed of hu­mans, dogs and cats—but only partly, as there are lots of other things that are an­i­mals.

This is just a pedan­tic point since it doesn’t cut to the heart of the prob­lem. As john­swent­worth noted, man-made cat­e­gories are fuzzy, they are not as­so­ci­ated with true or false but with prob­a­bil­ities, so “an­i­mal” is more like a test, i.e. a func­tion or as­so­ci­a­tion be­tween some set of pos­si­ble things and . So “an­i­mals” isn’t a set, the sets would be “things that are an­i­mals with prob­a­bil­ity ” for ev­ery .

• Mov­ing from an­i­mals to an­other ex­am­ple: If you are a half-bald per­son you do not be­long to the set of bald peo­ple with prob­a­bil­ity 0.5. Prob­a­bil­ity is a epistemic con­cept, but the vague­ness (fuzzy­ness) of the con­cept of bald­ness is not epistemic, but se­man­tic. No amount of in­for­ma­tion makes you more or less bald. There­fore, for fuzzy con­cepts, there is no prob­a­bil­ity of mem­ber­ship of a set, but a de­gree of mem­ber­ship of a set. Which is again a num­ber be­tween 0 and 1, but it is not a prob­a­bil­ity. There is ac­tu­ally a very un­pop­u­lar logic which is based on this no­tion of fuzzy sets: Fuzzy logic. It’s log­i­cal con­stants be­have differ­ent from their equiv­a­lents in prob­a­bil­ity the­ory. E.g. com­monly: A and B = MIN(A, B); A or B = MAX(A, B).