Pavlov’s Dog & Foucault’s Panopticon: Hacking My Anxiety With Open-Source Technology

0 0

Thank you. Hello. So yes. My name is Jessica Tran. I am from Montreal. I'm currently a student studying computer science and physics. And today I'm going to talk to you about my anxiety and selfmonitoring through technology. So I want to preface this by saying that me and my anxiety are not friends. In the very least. To get a sense of our relationship, imagine you have an ex, and you guys are on good terms. But you share a lot of the same friends and end up at a lot of the social gatherings. You want to avoid them, but to have fun, you can't. That's a metaphor if I anxiety. My palms get sweaty, my heart races and my brain shuts down all processes. And in fact, this is not special at all. It's a universal symptom if you have a healthy brain and body. So to get a longitudinal sense of how long I have been dealing with anxiety. Let's address my biggest childhood fear. This is a big therapy talk for all of us. One of my biggest fears was that I might forget how to breathe. And this sounds really, really dumb. But I was like 5 or 7 or 9 or some odd number and I would spend hours concentrating really hard on my breathing just in case the little guy in my head would forget to pull the lever. You all thought about this guy when you were young. But, of course, I eventual learned and breathing is an automatic physiological function. I hope all of you have. It lies in the same domain as blinking, hunger, exhaustion. It's just a way that our body automatically regulates so that cognitive resources can be spent towards higher thinking, problem solving. Nonetheless, even at my ripe old age of 23, I still worry about my breath and overintellectualize it. To the point it becomes really irregular. And that's, again, very natural. If I were to ask you right now it pay attention to your breath, you would also probably get into an a-rhythm. So we can try it out. Please pay attention to your breath. Are you inhaling? What about exhaling? Are you on tempo? Did you remember to inhale? Okay. So that was a dumb exercise, but now imagine me doing that to you constantly all the time at any moment. That's what my anxiety is like. And this is my life. But I really, really love to problem solve. Which is one of my greatest strengths. And I tried to address this problem in the best way I know how, which is through a mix of psychology, philosophy, and JavaScript. So starting with psychology. There's some studies that show a correlation between breath and mood. Basically, when you're in a heightened state like fear or anxiety, your breath rate is going to quicken. And studies have shown in more recent years that this is a bidirectional mechanism. Meaning while a mood can change your rate of breath, your rate of breath can also change your mood. Which is really, really cool. But we'll get more into that a bit later. So qualitatively, I wanted to parse out the distinctions of my mood. So I just wrote out things that when I'm anxious and when I'm happy. And about last year� late last year, my anxiety was getting really difficult to manage. I had moved to a new city, I wasn't fitting in, the bills were surmounting, a few strands of stress I can deal with like most people. But eventual it compounded and got in the way of simple functions like eating, sleeping, being able to leave my house, and ultimately being productive. And it blocked all these things� these small things that made me happy and led you to depression. Which is what I like to call the anxiety/depression cycle. Can't do things you ought to be doing, and you feel sad. And to address it real quick, this is one of the hardest parts about dealing with mental health. And one of the factors I really tried to address in this experiment. Secondly, I don't want to simplify mental health. I recognize there are a ton of intersectional, biological, environmental and sociologic forces that harm and continue it harm people. I myself am affected by factors, nonetheless, I carved out this particular aspect because it was the easiest to delineate and target. Because I'm a� back together, I figured this was the right way to start. And my next step was to figure out the mechanism behind this and what it means to be productive. So that bring us to the panopticon. If you don't or do know what it is, and haven't read �Discipline and Punishment� by Michel Foucault, you probably have the idea wrong. Which I only point out not to be a dick, but before I had it pointed out that it was not correct. Unlike the way that I'm doing now. So there's a common misconception with the panopticon presented through mainstream media that makes it an analogy towards surveillance society. You have seen the sensational articles, the government is watching you, this is the panopticon. And one of the great analogies is Sauron from the Lord of the Rings. They match with the originally, but it's a quality in which humans attribute characteristics such as villainy, evilness� which I want to very much frame right now that that is not the case. And for Foucault himself in the very beginning of his novel writes that we should not view power and surveillance as a negative thing. It was first introduced as a humane way to have social order as opposed to torture and violence. While now it is arguably invisible and silence, if we should view it as a mutual and malleable mechanism, we can use it for our own positive production of reality. So here's my very quick crash course on panopticonism. It's named after Jeremy Bentham's ideal prison. It's a cylindrical structure, a prison. And around the cells we have openfaced cells. And in the very center we have a guard. Just one single guard in this tower. It's protected by trick glass so the guard can see out, but the prisoners cannot see in. And this mechanism, this is the most ideal and efficient use of this power. Because this possibility of always being watched will imbue the prisoner with an anxiousness to behave well. Which should, by the power of the panopticon, lead to the development of our own selfmonitoring for good behavior. The panopticon is polyvalent. Means that the guard could be changed for anybody. Your school teacher, your parents, your sibling, your friend, that guy on Twitter. Anyone. And it would still function without interruption. Each node in this network can be swapped out and replaced at any given time, which is what makes it so pervasive and powerful. With the perception that everyone or anyone could be watching you, you must fulfill your social contract. And the panopticon rests on this power of observation to form good habits. So by definition, Foucault's panopticon is just a way to enforce a specific behavior. It can take many forms. So, for example, school welcomes hospitals, prisons, the new language, ten ways to make yourself more productive, social networks, et cetera. It sounds a little scary, but it's not. It's actually meant to condition onesself for selfdiscipline. So using this and combining it with Pavlov's dog, which I'm sure all of you know the classical conditioning mechanism. It's just the saliva and the trigger and the response. You have a really good recipe to improve one's life. And combining this with� with heart rate variability, it's a very nice slide� I created an app. Anyways. So the panopticon itself is just an amplifier for things that already exist. It's not scary. It's not so much like Sauron, but Cerebro from XMen. It can be exploitative, but also used for good. Which is what we're going to do. Getting into the technical stuff. Heart rate variability. When you inhale, your heart rate increases, and while you exhale, your heart rate decreases. And if you plot this on a time function you get a really nice line. And it's very distinct. And just an FYI, the Y axis is your interbeat interval, the time in between each beat. This is not to be mistaken for BPM which is beats per minute. And it's just an approximation. So one of the reasons why I got started with this project was, A, my anxiety got pretty bad. B, I was actually doing an internship through Node with Outreachy, and we were working on Node's serial port. So I wanted to do a fun little project to figure out how this code base worked at all. And I settled on something that was beneficial for me. I wanted to do a live demo, but my pulse sensor didn't work really well, so in short what I did was I just used Node serial port, a bunch of npm node packages and I designed this little heart rate monitor on my CLI. And read in my heart rate. So I'm sorry if you can't see that line really well, but this is me breathing at a resting heart rate. So this is� this is me not doing anything at all. And you can kind of see, naturally, as we know, as you breathe in and exhale, your heart rate goes up and down, plot that, it goes up and down. It's not really predictable. And there's no way to really put this into an equation. However, if you breathe really deeply and regularly, you can increase� you can create these really beautiful sinusoidal wave lines. And this increase in amplitude and the consistency of the graph is sort of the heart of this project. And this is called heart rate variability. You can see the heart rate is higher than before. The greater the heart rate variability, the greater the physical health, and leads to psychological well-being, stress management, anxiety management, cardiac health. So this is just a video of me� whoops� doing some breathing exercises. As you can see here, with a metronome. This is six cycles per minute which is what is called a resonance frequency. Resonance frequency is basically just the most efficient rate that you can breathe to really flex your breathing systems. Also known as your autonomic nervous system. This is a simple graph. You can determine your resonance frequency by going through different cycles. You can breathe at 4 cycles a minute, 4.5, 5, 5.5, 6. And you can see on the plot line, 6 is the highest. It just dipped before 5.5. Just a really beautiful, beautiful graph. So the best amplitude it your greatest HRV. For most people, it is 6 cycles per minute, or .1 hertz if you throw it through a pass function. And even if you're at like 5.5 or 6.5, you could still do around 6 and still get the same results. So what can we do with this? We can basically just exercise our breathing mechanism to really flex our A and S or automatic nervous system. If you do this� this has been done multiple times through a lot of different studies through different groups. Healthy functioning athletes to depressed individual. Do this resonance frequency breathing 20 minutes a day, maybe 40 minutes a day with some intermittent biofeedback training and it can improve your mood regulation, your anxiety, et cetera, et cetera. Very, very cool. But one of the biggest and most important factors, I find, is that through this training, the effects are chronic. And persistent. So say you do this for a few weeks. You stop. The effects will be long lasting. I'm not too sure what the TK is, that hasn't been studied. But it still works even if you're not doing these breathing exercises. Which I really found cool. The regimen, 20 minutes daily. Relaxed breathing. Which is just you watch the visual graph of your IBI coming in, the one that I showed earlier. And you just inhale as the line is coming up, and when it reaches the crest, you just exhale. And that's relaxed breathing and you this very regularly. And this changes your A and S. So I tried to couple this with a monitoring system by setting this up with a Bluetooth Arduino to calculate my average rolling heart rate, which worked really well despite integrating values. Full resting heart rate and resonance training. But it was really, really hard to calculate in realworld scenarios. The reason being, as your breath quickens, the variance of your heart rate actually begins to plateau from lack of variability. It becomes algorithmically very hard to determine your breath cycles per minute without a huge margin of error. One accurate way to measure this is to have purchased a respiration device that connected to your chest or to your nose. But I didn't. So instead I used the principles of the panopticon because, of course, it is polyvalent. It can be used in any way and I designed this experiment to get my controls. I would do different things to exasperate my anxiety. Typical psychology things, pinch myself. Post things online that I wouldn't normally do. Things that make me nervous inherently. So here's a few examples. This is just a recreation that I did. But I did do things like this. It was just message people that I liked. And measured in my heart rate. This didn't go anywhere, just so you guys know. [ Laughter ] And so, I also tried to program� or I did program my own panopticon. Meaning, well, it was more so what you could call yet another productivity tool. So remember the panopticon does not necessitate constant observation, it's merely perceived constant observation. So, again, leveraging my social anxiety, I used a bunch of npm packages to program a Cron job, to check if I was doing my daily logs. And I described a set of punishments for myself if I didn't do it by a set amount of time. The first tier, I wrote out all these things to send myself. When you're not doing the things you are supposed to be doing and you're angry. I would call myself an awful human being. Which wasn't very nice. But that was the punishment. I would send out inane Tweets to Twitterland. Although I recognize this is just how Twitter it, so it wasn't really a punishment. [ Laughter ] Tier three I had a bunch of, like, embarrassing things to send to like crushes or exes. And thankfully I never reached here, but that would have been pretty much the worst for many reasons. [ Laughter ] So ultimately the experiment was a redundancy of a lot of different methods. So, A, I used the exercise that had been tested to show improvements of mood regulation. I experimented with my anxiety coming in and measured it, which was a form of exposure therapy, or rejection therapy. I built this accountability mechanism to watch over me, or my own personal panopticon. And also, the act of writing down those thoughts that I had was a bit therapeutic. So I asked the question here, was it successful? I did go from a 24 resting heart rate� or 24 breaths per minute to like 22. But I don't know if that's like really important to note. But essentially part of the experiment. I selfobserved that I have an improved control of my thoughts and ruminated a lot less. I can� I feel that I can distinguish when I'm getting anxious or am in a state of anxiety. And instead of using selfcoping mechanisms that didn't really solve the problem, I just employed this breathing technique, which is what I was doing before this talk, actually. And a bit of less social anxiety. And ultimately improved my feelings of efficacy across all areas. I wanted to note, though, that before you try this at home, and if you do plan to, there are some really important factors that could have contributed to all these positive effects. Which was� tada. So I got used to the new city. I built some meaningful relationships. I began therapy for the first time. I exercised and I decreased a lot of my stressors from school and work ending. So, again, with mental health, it's hard to parse through and figure out what's� which factors are the main ones. And what has the alchemy to improve. So in conclusion, I wanted to wrap this up meaningfully. But I didn't want to end up saying something like, me and my anxiety are now best pals. Because I feel like that's a false optimism. And frankly, just not true. If I could choose a physiology in which I didn't experience debilitating anxiety, I didn't have to think about it this hard, and didn't have to do so many things to manage it, ten times out of ten, no question, I would definitely choose that body. But nonetheless, this is just who I am. And so what I have in closing for you instead is this clip from Star Trek. Because I feel like that show just says things that I wish I could say all the time and says it so much better. And if you're unfamiliar with the show well, first, familiarize yourself. And all you need to know about this is that it features Data, an android who is perfect in every way except that he's not human. And in this particular clip, he is speaking to his android daughter who also shares this flaw. So here we go. >> You, but I'm� >> This is a limitation. >> Then why do you still try to� what purpose does it serve except [inaudible] that you are in� >> I have been there many times. Trying to be more human. Until I realized that it is� that is most important. Striving to be more than� it does not matter that we will never reach our ultimate goal. >> All right. And that's the end of my talk. [ Applause ] Thank you for listening. [ Applause ] >> Thank you so, so much. That was absolutely fantastic. Please, another round of applause there. That was absolutely wonderful. >> Thank you. [ Applause ] >> So if you go for lunch now, lunch is ready for you. And please don't forget, there's some community talks� some lightning talks in the community lounge. So go over there for talks on UX and other things like that. See you back here at� well, after lunch. >> Thank you. Thank you very much.