Are beliefs or delusions characteristic of obsessive-compulsive disorder?

In the fourth edition of the Diagnostic and Statistical Manual of Mental Disorders (DSM-IV-TR), obsessive-compulsive disorder (OCD) can be diagnosed with a specifier of ‘with poor insight’ whenever the individual does not recognize that the obsessions or compulsions are excessive or unreasonable” (300.3). Yet some insight must have occurred, since by definition, adults with Obsessive-Compulsive Disorder have at some point recognized that the obsessions or compulsions are excessive or unreasonable” (Ibid.). That is, obsessions in OCD are meant to be ego-dystonic; they are seen to be a foreign presence to the patient.

This continues in DSM-5, where it is marked as important that “obsessions are not pleasurable or experienced as voluntary: they are intrusive and unwanted” (300.3, 238). In DSM-5, however, the poor-insight specifier is now accompanied by specifiers for “good or fair insight” and “absent insight/delusional beliefs”. These categories are now defined by how the individual views the beliefs over which they obsess, or to which they react with a compulsion. The good/fair insight specifier is to be applied when the “individual recognizes that obsessive-compulsive disorder beliefs are de finitely or probably not true or that they may or may not be true”. Individuals with poor insight are now said to think their relevant beliefs are “probably true”. Finally, the absent-insight/delusional specifier is for individuals who are “completely convinced that obsessive-compulsive disorder beliefs are true” (Ibid. ,237).

This change in the specifiers, which now classifies insight with respect to attitudes towards beliefs, is curious. In DSM-5, the diagnostic criteria for obsessive-compulsive disorder, outside of the specifiers, does not mention beliefs at all; obsessions are defined as “thoughts, urges or images” that the individual attempts to ignore or suppress (Ibid.). Beliefs are only applicable to the specifiers, where it is pointed out that many “individuals with [OCD] have dysfunctional beliefs” (Ibid., 238)

So, are obsessions beliefs? They seem to clearly be, on occasion, delusional. Are delusions beliefs?

The DSM-IV notes the difficulty in demarcating between delusions and OCD symptoms:

The boundary between Obsessive-Compulsive Disorder (especially With Poor Insight) and Delusional Disorder can sometimes be difficult to establish. The ability of individuals with Obsessive-Compulsive Disorder to recognize that the obsessions or compulsions are excessive or unreasonable occurs on a continuum. In some individuals, reality testing may be lost, and the obsession may reach delusional proportions (e.g., the belief that one has caused the death of another person by having willed it).   (DSM-IV-TR, 297.1)

The literature has some interesting comparisons between delusions and beliefs, namely in the goal of determining whether or not delusions are beliefs. G. E. Berrios, for instance,  argues that delusions are not beliefs. Instead, he says they are “empty speech acts” and calls them “epistemologically manqué”. He goes on:

They are not the symbolic expression of anything. Its ‘content’ is but a random fragment of information ‘trapped’ in the very moment of the delusion becomes crystallised. (Berrios, G. E., “Delusions as `Wrong Beliefs’: A Conceptual History”, British Journal of Psychiatry 159, suppl. 14 (1991)).

This seems incomplete; delusions are sometimes acted on through both verbal and non-linguistic behaviour, often for an extended period of time. A patient who has some delusion P acts as if P were true, just as one with the belief that P would. This seems to contradict Berrios’ implication that delusions lack propositional content. In fact, Berrios’ conclusion seems quite like behaviourism in general; the lack of access to the patient’s subjective thought has led to the conclusion that there is no such thought to speak of. The difference between Berrios’ conclusion and behaviourism generally is that Berrios’ subject has a more scattered, less coherent report of their internal thinking. To deny that such thinking is present might be an overly strong conclusion. We might argue, instead, that even though delusions are not beliefs, they are not devoid of content.

Karl Jaspers presents such a view. Jaspers identi ed four forms of belief: normal beliefs, overvalued ideas, delusion-like ideas and primary delusions. In General Psychopathology, he notes that delusions have three outwardly-visible characteristics:

  1. They are held with unusual conviction.
  2. They resist contradictory experience or argument.
  3. They are obviously absurd or erroneous to others.

Jaspers says that primary delusions are “ununderstanadable” in the context of the patient’s preceding experiences. But understanding is itself a continuum, not a binary notion. Hence, the less understandable an idea is, the more delusional it likely is. For Jaspers, delusions are irreducible to prior thinking; they are not the product of reflection.

This, too, makes delusions quite unlike other beliefs, and it leads Jaspers to conclude that delusions are not really beliefs at all, but rather experiences. They consist of immediate “intrusive knowledge of meaning”. Now, whether or not the idea that “knowledge” here implies some kind of belief is a topic for a whole industry of philosophical thought, but the idea here mirrors a take on beliefs that David Hume held: that beliefs themselves were feelings towards ideas. If we want to retain the idea that beliefs are ideas themselves (a belief can be true or false), we get the idea that delusions are not really beliefs, but a much more primitive feeling that a certain propositional idea is true.

This seems to suggest that, in OCD, any obsession, more broadly, is a feeling towards some propositional content. This gives us the spectrum of possible obsession as the intensity of feeling towards some “thought, urge or image” — not as the thought, urge or image itselfThis is where DSM-5 goes astray; the identification of an obsession with its focus gives the obsession itself propositional content, at least in the case of thoughts.

In the case of a thought, there is propositional content there, but it’s what the obsession is directed at.  A mild obsession is likely a worry that P might be true. A more severe obsession is a stronger feeling that P is true. In both cases, obsessions include some thought, but the obsession itself isn’t a proposition. Urges, on the other hand, are feelings, and so it seems that an obsession probably could be an urge, but an urge is an urge to do something. Just as with obsessions, it is directed at something. Finally, with images, the image would be the focus of the obsession; as with the propositional thought, an image is something that the patient is presented with and has some kind of feeling about, ranging from a mild unease to a more severe repulsion.

Is the DSM-5 wrong to call obsessions “beliefs”, then? If we listen to Hume, no: beliefs and delusions are both feelings, and so the obsession is a feeling about something, like a belief or a delusion is a feeling about some idea. If we listen to Jaspers and Berrios, there’s a more important distinction between beliefs and delusions, and so obsessions, while possibly delusional, are not really beliefs. We can quibble about that all day long, but a sloppy definition of an obsession in the DSM-5 is what leads to this sudden, odd appearance of “beliefs” in the specifiers. Tightening that up is likely to be clinically valuable, as it adds clarity to the issue. Thoughts and images occur to most of us, and there exists a wide spectrum of feelings we can associate with those thoughts or images. Those feelings are obsessional when they are feelings of worry or certainty, when the patient is unreasonably preoccupied with the object the feeling is directed towards, and when the feeling is unreasonably strong. #

Software Development

An exponential backoff is an algorithm that repeatedly attempts to execute some action until that action has succeeded, waiting an amount of time that grows exponentially between each attempt, up to some maximum number of attempts. This can be a useful way to manage network calls to external services, so that temporary errors or glitches don’t cause permanent failures.

The basic structure of an exponential backoff algorithm is a loop that may be implemented like this:

That is, you are creating a loop that’s going to run a set number of times (in this case up to 5 times). Within that loop, you have a try block which attempts to execute the main code you want to run. If that code succeeds, then the loop must immediately end. Otherwise, if an exception is thrown, it is caught and either thrown outside of the loop, if we’re on our last try, or the program waits for a little while before moving on to the next iteration of the loop and trying the code again.

We want the amount of time that the program waits between attempts to do two things. First, we want it to grow exponentially on each loop iteration; if multiple retries fail within a few seconds, we want the next try to wait a little longer before continuing. This is a safeguard against rate limiting, for example, where the main operation we’re making can only happen a certain number of times during some defined interval. Second, we want the retry to have some element of randomness to it. This helps if the program is running multiple times simultaneously; a conflict that resulted between them is all but guaranteed to happen again if both instances of the program try the action again at the same time, every time. It also helps with cases where you’re accessing an external web service that may have been down for a time: you don’t want to have everyone spamming requests at that server as soon as it’s back up, lest it be brought down again. Better to space them out.

Now, in many cases, you won’t need to directly implement an exponential backoff algorithm in your own code; many libraries come with the feature built in. For example, Google’s HTTP Client Library for Java comes with a configurable exponential backoff handler built in. For cases where you’re not using a library that supports it, you’ll likely want to build something for your application that implements an exponential backoff nicely, without having to explicitly write a loop every time you want to make an API call retry-able. Carlos Alexandro Becker wrote a nice little backoff algorithm for Java 8 using functional interfaces that does the trick, though the algorithm differs a bit from what I have above.

At any rate, there’s a look at a basic backoff algorithm that can be implemented in Java. #

Software Development

Just a quick one in case this saves someone some time. If you’re used to using Google Cloud Datastore with Google App Engine (in Java), then you know that large string values are passed into the App Engine Datastore API using the Text type. But, if you’re using the gcloud libraries instead (, you don’t have this option. Strings are passed into the entity builder as String objects, or as StringValue objects. E.g.:

So, what do you do when you need to store a String larger than 1500 bytes? It turns out that the Datastore itself sets the 1500-byte limit for indexed properties. You can add a String up to 1MB in size if you explicitly set the property to be unindexed. The Text type in the App Engine libraries is essentially a facade for an unindexed String value.

In order to set an unindexed property in your Java code, you need to define your String as a object, and set it to be excluded from indexes. Then, pass the StringValue into your entity builder, and you’re good to go:

I saw some answers on how to do this with Node.js, but I had to look up the javadoc for StringValue.Builder to sort this out in the Java libraries.

It’s worth noting that it’s a good practice to set properties as unindexed if you’re not actually going to use them in any Datastore queries, to improve performance and reduce Datastore-related costs. #

Philosophy, Science

Two ugly attitudes towards mental health

Diagnoses of mental disorders are on the way up. The DSM-IV task force, led by Allen Frances, sought to limit this inflation. The DSM-5 is expected by many (including Frances) to make it worse. If it does come to pass that nearly everyone can be diagnosed of a mental disorder of some sort, how should we think about what it means to have such a disorder?

Well, there are two attitudes that we shouldn’t have: we shouldn’t be afraid of apparent epidemics in mental health, nor should we take the other extreme and shrug off mental disorder entirely.

  1. For one, we can see the rise in diagnoses of certain disorders as a sign that all of the chemicals/”toxins”/technologies/radiation/whatever in our food/air/society or that the stresses and immoralities of our lives in the modern era are making us, well, crazy.
  2. We can, alternatively, reduce our thinking about mental health to “everybody’s got something”, meaning that we all fit on a spectrum of mental health somewhere and let’s not make a big deal about it.

The first position is a little big ignorant. I’m not saying that it can’t be that all the dangers of our world aren’t impacting our physical and mental health. They certainly are. But there are other social and psychological issues that are inflating our perception that things are going badly. One of them is the inflation caused by awareness of disorders and the diagnostic criteria of the DSM, in its various incarnations. If you become aware of these facts, you start to see that so-called epidemics are a product of our evolving classifications and not a change in the actual prevalence of certain conditions.

The second position is equally ignorant. Occasionally, people with severe mental health conditions are shrugged off by an individual because that individual knows someone else with a milder form of the same diagnosis. Mental disorders tend to exist on a variety of spectra, to be certain. But the fact that so many people can or are being diagnosed with mental disorders should not trivialize the experience of those who struggle through daily life because of them. To approach these people with a “so, what?” attitude isn’t helpful.

In general, I find our understanding of mental health lacking. We’re fearful that our children will have certain disorders, and in some cases we over-medicate them at the first sign of what might be perfectly normal distress. Yet, at the same time, we trivialize the plight of those who struggle with severe obstacles to mental health and have different mental abilities. There’s a middle ground between panic and apathy here. #


The prevailing view in North American philosophical writing seems to be that the phrase ‘just in case’ can be translated into the phrase ‘if and only if’. Consequently, this view holds that the phrase ‘just in case’ is best symbolized by the logical connective known as the biconditional (\leftrightarrow).

Now, this seems wrong to me for two reasons. One is the difference between ‘just in case’ in this sense and the sense it has in British English, as noted by Geoffrey K. Pullum:

  • British English: “We’ll bring an umbrella just in case it rains.”
  • American philosophers: “A formula is a tautology just in case it is true on all valuations.”

That’s a fine difference to note, but I also have a hard time grasping why ‘just in case’ should count as ‘if’ and ‘only if’ at all. That is, to me, ‘just in case’ sounds more like ‘only if’. It seems that it spells out a necessary condition but not necessarily a sufficient one. Consider:

  • Something is a tree just in case it is a plant.

Now, according to what seems to be the standard view, this is a false statement because something can be a plant and not a tree. That is, ‘if something is a plant then it is a tree’ is false, so this sentence, just like ‘something is a tree if and only if it is a plant’ is false.

But it seems to me that this sentence actually means ‘something is a tree only in the case that it is a plant’. That is, I’m more inclined to translate ‘just in case’ as ‘only if’. Under such a translation, the above sentence is true, because being a plant is a necessary condition for treehood.

The problem is that the lexical definition of ‘just’, as an adverb, spells out multiple meanings. One is ‘exactly’ or ‘precisely’, which supports the prevailing intuition that ‘if and only if’ best captures the meaning of ‘just in case’–that it means ‘exactly in the cases that’. But there is also the meaning ‘only’ or ‘simply’. This is the source of my intuition.

Meanwhile, it seems that a number of students in elementary logic classes agree with me, since I often see them translating ‘P just in case Q’ into something like ‘P\to Q‘. Officially their textbook and notes equate ‘just in case’ with ‘if and only if’, so I’m not meant to give them the marks for this, but I do empathize. #