Saturday, 30 May 2015

Is there any consistent algorithm for psychosis? Brainstorming to better understand mental illness

-Note: This article is not intended to disrespect any patients suffering from psychosis, as they are all respectable humans struggling from harsh trial. However, attempt to explain human mind in detail might be necessary to find possible cure-

One of the greatest mystery on Earth is probably about how our brain works. We already know how single nerve works, and how long term memory might be stored in prefrontal cortex, while recalling might involve hypocampus and amigdala. However, putting together those arrays of nerve and the whole interaction to create a real model of how human brain works still feels close to impossibility. Despite the advance of anatomical understanding of human brain, application of those findings for practical use is very limited.

Author believes that good algorithmical model of how human brain works might be easier to use in clinical setting. Obviously, our brain is completely different from a computer. But part of the working algorithm might be explainable like a computer program.

However, human thought as a whole is too complicated for a single article to cover. We're only going to discuss very small part of it, which is about how human brain works during psychotic disorders. It's one of the everlasting issue about human mind since the ancient time, and no definite cure has ever been found.

Psychosis or psychotic disorders are mental disorders which disallow the patient to differentiate reality from unreal materials. The most common symptoms are hallucination and delusion. Hallucination is a false perception of five sense, which means the patient feels something that doesn't exist. He might hear, see, smell, feel the touch, or taste something that doesn't exist. While delusion is false belief that is held very strongly and is very hard to debate. The patient might have full certainty that he's Napoleon reincarnation or that secret agent from Bermuda is implanting him with special chip. The interesting part of the whole concept is that both hallucination and delusion are not random blob of mass or simple mistake in logic. The perceived objects are often complex, like seeing human no one can see, or hearing ghostly whispers. It means that, if we see the disease as something more than organ damage, those hallucinations and delusions might result from a complex processing of objects within the patient's memory instead of random object that suddenly appeared because of partial brain defect.

The attempt to understand and correct the "bad program" in human brain is not a new idea. Cognitive behavioral therapy is a therapy comprising a series of consultation and tasks given to correct the mental problems that had existed for decades. This therapy was developed by understanding how our mind works during mental illness. For example, we already know that during depression, human mind tends to hide the actual feeling and mask it with made-up theory that serves to reduce damage. However, the masked feeling still produces continual damage and will not go away unless the masking is shed. One of the task that can be given in CBT to counter this mechanism is to write out everything the patient feels right away and write out how he/she should properly feel about the stressor. That way, the feeling can be overwritten gradually without being hidden inside.

However, CBT is more developed to handle neurotic disorders, which is a group of mental disorders that still allows the patient to differ reality from something unreal. The use to counter hallucination and delusion is hindered by the limited understanding of how it works. Countering delusion using normal logic may not work as efficient as if we truly grasp the concept of why the logic goes strangely and complicatedly wrong.

A. Hallucination

As previously mentioned, hallucination is perception of something that doesn't exist. But of course, something perceived doesn't appear out of thin air. Since the perception doesn't come from any current stimulus, it's most likely that it's taken from memory and mistakenly perceived as current stimulus. However, we need to know what might be wrong such that the memory is misperceived. Is the memory data damaged? Is it strengthened instead? Is it wrongly linked to something else? Or is it the recalling process that has error?

Usually, hallucination is labeled a 'positive' symptom, as it's an addition of something perceived. But is it really a memory that is overly plus, a minus that causes misperception, or something else entirely?

There are several possible algorithmical models which might produce hallucination. This article will describe them and some possible experiment that can be done to test each of them. Author believes there are plenty of algorithmical model author might miss, so useful feedback from anyone is greatly appreciated. Note that these models are deduced without much relation to anatomical findings that it might end up completely wrong when future findings give us better understanding of this abnormality.

1. Wrong labeling

Probably, datas are saved along with certain label which differentiates reality and unreality. Just like computer RAM, reality is kept as a quick memory to analyze before we finally recognize the whole surrounding. Some currently perceived memory is labeled as reality, while older memory is labeled as unreality.

Possibly, the data itself is fine but the labeling is wrong. Once recalled, the data is considered reality because of the reality label it has. If the data is recalled without much alteration, it might retain it's position relative to the subject. Which means, the hallucination follows wherever the subject moves. If it was three meter to his left in his memory, it might remain three meters to his left even if he runs or spins around. Also, possibly, if the damage happens to the certain memory, the hallucination might have a limited shape or sound and does not continue to change indefinitely as time progresses.

2. Damaged Memory

Probably, the memory itself is damaged such that it was recalled with confusing sense of reality. It might repeatedly change as the brain offers made up information to cover up the hole in the memory. It might repeatedly change in shape, quality, or distance. There might be some part of the memory that is unchanging that may be used to trace back it's source.

3. Assimilation with Certain Real Stimulus

Probably, some datas are strongly associated to certain real stimulus that it becomes inseparable. For example, whenever seeing chair, someone sees it as his dead wife. Actually, misperceived object is termed illusion. But it's possible that the person doesn't realize that the object he perceives is actually something else, and thus, thinking that it's a hallucination. In this case, the perceived hallucination would cling at certain location and doesn't move when the person moves. Also, it might disappear if the afflicted individual closes his eyes or covers his ears. This possibility is supported by the fact that there has been report about schizophrenia patient complaining about auditory hallucination triggered by actual noise.

4. Strengthened traumatizing memory

It was known that memories associated with strong emotion are easier to recall. In the case of post traumatic stress disorder, memories that are too stressful haunt the person and get recalled over and over again.

If we consider that similar mechanism may cause hallucination, probably the memory causing hallucination is too strongly emotional that it becomes undifferentiable from reality. It got recalled over and over again and might also show up as a nightmare. It might be that the memory itself was so traumatizing that it becomes a hallucination or the process of the memory gradually becoming more real is so traumatizing that it turns into hallucinatory trauma. After all, it's uncertain whether or not a traumatizing perception has to come from reality.

5. Overactive imagination

The first four possibilities are those considering the memory data as the source of the disorder. This possibility is considering the damaged recalling process as the culprit. Probably there are certain condition which causes the subject to suddenly perceive everything he tries to imagine. If this possibility is true, then subjects with hallucination may have strong capability or strong learning capability of something like mental arithmetic or blind chess. although this doesn't seem to likely, it's hard to deny the possibility as there might be problem in curriculum to teach individual with psychosis. This possibility is also supported by the fact that methylphenydate, a drug used to improve concentration for people with attention deficit disorder, can trigger hallucination. This possibility might suggest that hallucination might not be a 'minus', but something that is 'too plus to control'.

6. Defense Mechanism

This possibility also blames the recalling process. Probably, a certain memory or stimulus triggers an overt recall that brings anything recalled to reality. For example, the situation of extreme fear may cause the subject to defend himself by thinking of every single possible harm in his mind. Meanwhile, denial of the death of someone very close to the subject may trigger defensive recall of every possibility that he/she is alive. To prove this possibility, there needs to be a certain memory that might be rarely discussed but consistently trigger hallucination. This basically means that the memory that trigger hallucination is not necessarily the one the subject perceives, but it might be something else entirely that triggers extreme recall that causes hallucination.

7. Problem in perception of reality

Since recalling process may involve trigger, the process of recalling, and the recalled memory, author hypothesizes that hallucination might also involve any of those three. So basically, this possibility is discussing about the damaged sense of reality which serve as both a trigger and the actual real stimulus. There are times that even normal individual may feel hazy sense of reality. What if reality itself is perceived as something less real by individual with psychosis? Probably the subject doesn't notice any change because the consciousness is constantly more hazy than normal individual, which may harden the process of differentiating reality from memory. This theory is supported by some researches in EEG readings which claim that subject with schizophrenia often has problem mainly in auditory processing as well as perception in other sensory organs


B. Delusion

Delusion is false belief that is hard to argue despite availability of counter proof. As previously mentioned, someone with psychosis might believe that everyone is sending him supersonic wave to destroy his mind or that he was married to certain president. The subject will believe the delusion with certainty. Someone saying "probably, ...", or "I'm not sure but it's most likely...." are not considered having delusion. Delusions are self-centered and is hard to debate.

Author personally believes that human mind stores logic as memory just the way it stores other memories. It might be stored as a program that can be recalled when necessary, just like computer program. After all, other than advanced mathematician, nobody truly questions why one plus one equals two. The memory was just there, and it got recalled as is, instead of proven or validated. Although logic can be used to argue with another logic or validate another logic, in the end the mini-logics that comprise or validate the larger logic are simply recalled instead of proven.

So, the problems are as follows. Why does a certain logic the subject doesn't learn from childhood becomes something strongly believed? Why does the logic implanted from childhood fails to argue with the new logic? Why does something previously considered an alternate possibility ends up believed as reality?

Here are some possible algorithmical models about how delusion is produced

1. Damaged labeling for certain logic-related memory

Logic is not simply perceived and was probably made from processing memories gained from perception. So it's hard to imagine memories related to logic may be labeled to separate currently perceived one and older one. However, even normal individual also has memories related to strange logic. It's just that we don't believe it as reality. For example, a fan of Harry Potter novels might understand different magic spells from the book and the effects they produced when each one was chanted. However, none of them considered it reality.

Therefore, there might still be possibility that logics are stored with different label such as "reality" and "fantasy". Probably, the logic itself is fine, and can be expanded to analyze multiple different situations, but is wrongly labeled as reality. To test this theory, we might try to expand the logic of delusion by asking the subject about the situation related to the logic while changing the subject, time, or alternate the situation and observe whether or not the subject's processing for the situation is consistent.

2. Damaged memory of a certain logic

Probably, as with hallucination, there might be a certain logic-related memory that is damaged such that the subject has difficulty to decide whether or not the memory is real. If this theory is correct, there might be inconsistency with the logic as  it may continue to change to randomly fill the hole in the damaged memory.

3. Damaged memory of the correct logic

There is possibility that the right logic is the one damaged, that the patient seeks for alternate logic because there isn't any main logic. We can test this possibility by changing the subject or situation of the delusional setting, and see if there is any way the patient recalls the normal logic in different situation. However, it might be difficult to differentiate whether the right logic is damaged or the alternate logic is strengthened.

4. Traumatizing logic

Probably, a certain logic is so traumatizing that it gains emotional impact despite being untrue. As the memory strengthens because of the emotion, it's gradually considered a reality. This theory might especially be associated with a terrifying delusion or a very happy delusion. It can be tested by asking whether or not the delusion persistently recur or even repeatedly appear in the subject's dream, just like how it happens in PTSD patient. It might also help to ask the detail of the delusion, as traumatizing memory is often accompanied with difficulty of recalling in detail.

5. Certain situations that impair recalling

As with hallucination, it is possible that the recalling process is the culprit that causes delusion. Probably, there are certain periods of time, situation, or biological change that cause the patient to assume that any recalled logic is reality. However, this possibility might only be true if the delusions the patient have changes from time to time and the patient keeps getting newer strange logic which doesn't seem to follow any pattern when compared to his earlier delusion

6. Defense mechanism

Probably, there is a possibility that a certain memory, thought, or stimulus triggers overt recall of a certain logic-related data. For example, there might be a defensive denial of a certain logic recalled, which causes the patient to recall any other alternate logic very strongly and consider it reality. There might also be a case in which a patient overly afraid would try to defend himself by thinking of any possible logic related to anything that might cause harm to the point of considering any of the improbable situation as true.

To prove this theory, we might need to find the consistent trigger that might induce the recall of delusion. It might be a memory, something perceived, or even a logic previously learned. The example of a logic triggering a delusion is when someone unconsciously consider himself a great person and avoid any possible logic that explains why he is a normal person. He might unconsciously struggle to find any alternate logic and the overt recall turns it into something strongly believed.

7. Overactive imagination

Probably, the patient has a strong ability to imagine different possible logics to a certain situation, but get overwhelmed and fails to differ the possible logic and the impossible one. As with hallucination, it might be proven by having the subjects analyze different assumed situations and analyze his ability to quickly create multiple solutions, even if some of them are bizarre and impossible.

8. Decreased overall sense of reality

It's possible that the overall sense of reality is constantly or periodically turning hazy, which makes it hard for the patient to differ reality from fantasy. In this case, random unrelated delusions may appear from time to time. It might be hard to test as logic is not something perceived. But one of the possible way to analyze this possibility is by testing the patient about normal everyday logic. How strongly he can hold onto those beliefs and how easily he can be swayed might determine his ability to differ normal logic from fantasy-like logic. Of course, in this case, normal logic means something commonly believed and taught, instead of the absolute truth.



It's easy to see that those possibilities explained about hallucination and delusion are pretty much similar. However, author feels the need to describe each from both sides as there are possible differences about memory related to perceived object and memory related to logic. It's also possible that the resulting illness is a combination of some of those possibilities combined. For example, a strange logic appears because of defense mechanism and then re-labeled and stored as long term memory. Whichever the way it is, author hopes that this article would open a new possibility to understand human mind and to search for possible cure for mental illnesses.

Sunday, 30 November 2014

Understanding ECG in mathematical way: Is visualizing continuous axis something useful?

Electrocardiogram is a device to measure electrical activity in heart, and therefore, it was used to diagnose heart diseases affecting heart's electrical conduction. As heart function heavily relies on conduction of electrical impulses, many heart problems can be diagnosed with electrocardiogram (ECG).

ECG is strongly a mathematical concept, as the analysis of ECG result was originally done using analysis of the vectors in the heart. However, this is not practical for clinical settings, so most doctors would rely on memorization of various disease's shape on ECG paper. I personally believe that going back to understanding the vectors in ECG may give better understanding of the mechanism of our heart. However, as it's impractical for doctors, it may be practical to have programs to continuously measure the axis of the heart, which is another name for the conduction vectors. In this article, I will discuss the basic of ECG very briefly to make it easier for mathematician to grasp the concept. And after that, i will try to describe one of the possible program algorithm to analyze ECG vectors. I have zero knowledge of programming language, so this review is just a brain teaser for anyone interested in developing it.

Let's pretend that there is a (+) sign somewhere in your heart. The heart is located in a Cartesian diagram, such that the y-axis is in vertical position and the x axis in horizontal position. We have two devices recording the activity of this (+) sign with regards to x-axis and y-axis respectively.  If this (+) sign moves to the left side of our body, it can be assumed that it moves toward the positive side of x axis, and thus, the device monitoring the x-axis would show an increase in electrical potentials. While if this (+) sign moves toward the direction of our feet, it will be as if it moves to the negative side of y-axis, and thus, the device monitoring y-axis will show decrease in electrical potentials. That way, if the (+) sign moves to the top right, both of those device will record increases in potentials

Heart and ECG can be overly-simplified in such manner. There are two ways a single "area" can increase or decrease it's potentials. Those are depolarization and repolarization. Depolarization is an increase in a single area's potential, we can spare discussing the mechanism here. But other than the some special areas, any single area cannot depolarize itself automatically. It will wait for the signal given by the neighboring area, and will not depolarize until such signal is given. The signal is passed through nerves in a similar manner of a cable conducting electricity. As the "area" receiving the signal will turn positive, it will be similar to our analogy of moving (+) sign inside our heart.

However, there is also the mechanism of repolarization. Even when the signal isn't transmitted, the area with positive charge will eventually lose it's charge. It will produce the effect as if the (+) sign slowly return back to where it once started, as there will be potential decrease in both x-axis and y axis because of the vanishing (+) sign.

The two ECG recordings that most easily represent x-axis and y-axis are recordings in "lead I" and "lead aVF". However, lead aVF records the movement of potentials toward the negative y-axis such that the movement of potential to the direction of the feet will be considered positive instead of negative.



Axis analysis has been taught for a long time, although it's not given much regard. However, we only know about the mean axis, not the axis at any given time. The concept is that, by dividing the mean potential in aVF from mean potential in lead I, we can get -tan x, with x being the angle created by x-axis and the conduction vector. Different from the Cartesian diagram, during analysis of axis, a clockwise angle is considered positive, so in many text book we will find the formula such that x = arctan (aVF)/(lead I)

Many conditions can probably be described by understanding the vectors. For example, damage in cells responsible for heart conduction is usually seen as ST segment elevation. This "elevation" is actually the slowing of conduction because one or more of the nerve "cable" is damaged. As ST segment normally shows a sharp decrease, this slowing causes a sloping that makes it seem like the line gets elevated. If we can calculate the vector during this "slowing", theoretically, the vector will tilt toward the sides with more healthy "cables", as they contribute more to the change of potentials. Hopefully, we can understand more about pathophysiology of several heart diseases or screen individuals with "normal ECG shape but may end up having heart disease" by elaborating more into vectors.

To analyze vectors of heart conduction, we can use this following algorithm I made.

To analyze the axis during time t, we can use the formula:
x = -arctan g(t) = -arctan (((potential in lead aVF during time (t+h)) - (potential in lead aVF during time t))/((potential in lead I during time (t+h))-(potential in lead I during time time t)))
Ideally, h should be close to zero, but since we need actual numbers to calculate it, h can be written as smallest calculable unit the computer can analyze.

However, the result will be numbers that is hard to analyze with human eye, while heart disease requires quick diagnosis. To overcome that, we will need the program to create a new cartesian diagram that shows the movement of the vectors. We can convert the statement of "x is 30 degrees from time t until time t+n" into a diagram that shows a line 30 degree from x-axis appearing for n seconds.

The formula for this new diagram should be f(t) = tan x dt= -g(t)dt. This formula is of course faulty, as it's never meant to measure anything. The only purpose of the integral is just to create a new diagram easy for the eye, such that instead of seeing information stating that tanx = n for 5 seconds, we can see a line with gradient n appearing for 5 seconds, with x-axis representing time. As there is no clear formula for x, this calculation can only be done by computer program. We can use the fact that the value of such integral equals the area created by line g(t) = (((potential in lead aVF during time (t+h)) - (potential in lead aVF during time t))/((potential in lead I during time (t+h))-(potential in lead I during time time t))) and x-axis. Therefore, the formula of the new diagram is f(x)= -g(0) h - g(h)h -g(2h)h-g(3h)h-.........-g(x)h.



The limitation is that this diagram has undefined value when both aVF and lead I show 0 potential. To overcome this, it's better to have the program detects such situation. When g(t) is undefined, the program should replace g(t) with 0, such that the diagram show a horizontal line instead.

The other limitation is that this diagram always assumes that the vector moves to the left (toward positive x), while there are times the vector actually moves to the left, which is when the potential in lead I decreases. To overcome this, the program needs to be able to find all t such that potential in lead I during time (t+h) < potential in lead I during time t. During such situation happens for all t such that t1 < t < t2, we need to make the program mirror the direction of the vector to the complete opposite, such that the vector moving to bottom left should be changed into vector toward upper right. So we need a program that can also analyze image input.



The problem is that this method can only measure the vector 2-dimensionally. It can see abnormality in left, right, up, or down movement of the vector. However, damage to heart, or infarction can happen in anterior or posterior area. We need a measurement of anteroposterior axis (z-axis) for this purpose.

It's hard to determine this axis using traditional placement of 12 ECG leads. This is because the leads are placed close to the heart and the angle of each lead with z-axis is unclear and variable. It will be easier if we use posterior lead, as there are leads placed at the back mirroring another lead in it's frontal position.

The closest thing we can get to z-axis is the comparison of lead V2 and lead V9, because lead V2 is positioned at 4th intercostal space to the left of the sternum in the front, while lead V9 is placed in 5th intercostal space, left to the vertebral column at the back. If we can measure the potentials moving from V2 toward V9, we can get the estimated anteroposterior axis. Although this method is not fully accurate, reducing the potential in V9 with potential in V2 may give us the estimated value of potential in z-axis, such that potential in z-axis = potential in V9 lead - potential in V2 lead.



If we compare the z-axis and lead I in similar way we did to lead I and aVF, we can get the conduction vector of the heart seen from above. Seeing it this way is easier to the eye than making a three-dimensional model. We can analyze the angle of the vectors to determine what is normal and what is not.



As it needs extensive knowledge to create an ECG equipped with such program, it's much easier for research purpose to create a program capable of analyzing the vectors by reading the ECG recording printed on paper.

It is unknown whether this method will have any benefit at all, but hopefully, it can help us understanding heart pathology more, and hopefully it may detect diseases or risks unseen by normal ECG, such as angina pectoris during asymptomatic resting state.

  



-Afkar Aulia, MD-