<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nikolas Pitsillos on Medium]]></title>
        <description><![CDATA[Stories by Nikolas Pitsillos on Medium]]></description>
        <link>https://medium.com/@npitsillos?source=rss-e0bc0fdd91da------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7StUXgO9TQCazL3B</url>
            <title>Stories by Nikolas Pitsillos on Medium</title>
            <link>https://medium.com/@npitsillos?source=rss-e0bc0fdd91da------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 07:21:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@npitsillos/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[On The Chase for Self-Aware Robotics]]></title>
            <link>https://medium.com/cvas-uofg/on-the-chase-for-self-aware-robotics-fb66d4ad0aaf?source=rss-e0bc0fdd91da------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb66d4ad0aaf</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[self-awareness]]></category>
            <category><![CDATA[introspection]]></category>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Nikolas Pitsillos]]></dc:creator>
            <pubDate>Tue, 07 Jul 2020 15:17:28 GMT</pubDate>
            <atom:updated>2020-07-07T15:17:28.884Z</atom:updated>
            <content:encoded><![CDATA[<h4>Computational Introspection &amp; Self-Awareness</h4><h3>On The Chase for Introspection in Robotics</h3><h4>Could robots ever achieve self-awareness via computational introspection?</h4><p>While thinking about the topic of my PhD, I knew I wanted to work in Artificial Intelligence &amp; Robotics. Self-awareness did seem like an exciting goal, albeit an extremely ambitious one. Self-awareness is an important topic to investigate in robotics since it can enable robots to achieve a sense of self which in turn can increase their autonomy. In this article, I give an overview of the key papers the helped in initially shaping my view and the content of my proposal. From these papers, my idea of introspection as a component of robotic self-awareness took shape.</p><h3>Definition of Introspection</h3><p>Let us build up to the definition of introspection that I aim to implement in my work. In very simple terms introspection is:</p><blockquote>The ability to look within.</blockquote><p>Resources show, [1,2], that an introspective system also exhibits monitoring and optimisation of behaviour.</p><blockquote>Introspection is the observation and optimisation of behaviour.</blockquote><h4>The Context in which Introspection Exists</h4><p>The context in which introspection operates consists of three components. <em>Dehaene et al.</em> define these components and describe their respective responsibilities. Specifically, the authors argue that current deep neural networks only perform unconscious operations. That is operations that the brain carries out without us being aware of. For completeness, the following list comprises the components that <em>Dehaene et al.</em> defined to enable machines to exhibit “conscious” operations:</p><ol><li><strong>C0 </strong>— unconscious operations (what deep neural networks currently perform)</li><li><strong>C1</strong> — global availability of information</li><li><strong>C2</strong> — self-monitoring</li></ol><p>Fig. 1 below displays the context within which introspection operates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*M8jtgk4kg3mF4UsS0kosIQ.png" /><figcaption>Fig 1. A self-aware context within which introspection operates.</figcaption></figure><p><em>Dehaene at al.¹</em> ideas are in line with <em>Lewis et al.</em>²; in the sense that introspection is the ability of a system to monitor itself. For instance, we are not aware of the specific operations involved when recognising a face. Our brain’s neural structures may be actually computing edges and circles, in general, the features of a face. Still, we are not really conscious of this. What we are conscious of is that we see a person we know; the end result if you will. As humans, we are only aware of the high-level representations that are the result of multiple transformations of information. Introspection operates above the level of global availability. Self-monitoring operates in a reflexive manner, meaning it can refer back to itself to obtain information and monitor ongoing operations.</p><p>I think that by equipping robots with the components described above may be a step towards to elicit a form of self-awareness in robots.</p><p>My research will utilise neural networks to a great extent. Although extremely fascinating, current deep learning architectures are not aware of the operations they perform, which means that they can’t introspect on them. To introspect, we, therefore, need a mechanism that will allow us to collect all the information from the neural network and use it to improve its performance. However, to introspect, multi-modality of information will likely be critical. To further understand this, let’s examine Dahaene’s <strong>C1</strong> and <strong>C2</strong> definitions.</p><h3>C1 Consciousness — Global Availability</h3><blockquote>“The selection of information for global broadcasting which becomes flexibly available for computation and report.”¹</blockquote><p><em>Dehaene et al.</em> argue that there exists a relationship between the cognitive system and the specific object of thought whereby one can recall, act, and speak about that object. For example, when a car’s fuel tank is empty, we are immediately alerted to it by a light turning on. We are then able to understand the implications of this and act in a way to fill up our car; instead, the car is not aware of this and thus not able to act upon it.</p><p><strong>C1</strong> is where information is pooled over multiple sensory sources and memory cues are pulled to make a decision. Furthermore, a choice is made based on the globally available information, which the organism needs to stick to over time and coordinate all processes to achieve its goal. This decision will inhibit the short-term tendencies of the organism with the promise of a long-term reward. In the case of the fuel tank light, humans perceive the light and understand the steps necessary to fill the car up. Currently, machines have no such mechanisms and thus are not able to respond to changes that will likely affect them.</p><p>C1 type consciousness can be described as a global workspace where information can be pooled. This workspace, however, constitutes a limited capacity workspace because only one item can access it at any point in time. Given that our next component is self-monitoring which clearly corresponds to our definition of introspection so far, <strong>C1</strong> is an important mechanism to have in a system to allow for introspection to take place. A globally available workspace will likely enable a system to have a form of awareness over the whole of said system.</p><h3>C2 Consciousness — Self-Monitoring</h3><blockquote>“This constitutes a self-referential relationship whereby the cognitive system is able to monitor its own processing and obtain information about itself.”¹</blockquote><p>This is where a cognitive system can successfully convey whether it has made a mistake. Humans, for example, have a sort of confidence or probability of correctness, in general, and uncertainty, for a decision they have made. The analogy I use to explain this is with those verbal jokes where people trick you into a swift answer, and as soon as you answer wrong, you realise you have made a mistake. The authors attribute this ability to specific neural circuits in the prefrontal cortex that may have evolved to monitor the performance of others.</p><h3>Conclusion</h3><p>Well, how can we perform introspection in the case of Artificial Intelligence? The aim of my PhD is to answer this question by adopting the literal meaning of the word introspection in my research. The definition I am using in my research has been synthesised as a result of the papers I have read and is the following:</p><blockquote>Introspection is the observation of a system’s internal states, about which the system gathers information to improve and optimise its behaviour.</blockquote><p>What I learned by reading these papers, among others, is that a self-monitoring approach to robotics can help improve their autonomy. Therefore, I aim to develop separate neural network architectures that utilise information from the neural networks we aim to improve. This may be an exciting direction to follow while on the chase for introspection in robotics and in Artificial Intelligence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKXIPFxGfyIqH0tqhPVp7A.jpeg" /><figcaption>This is me.</figcaption></figure><p><em>My name is Nikolas Pitsillos and I am currently a member of the Computer Vision &amp; Autonomous Systems Group at the University of Glasgow. I am a PhD student investigating how to introduce computational introspection in robotic systems.</em></p><h3>References</h3><p>[1]: Stanislas Dehaene, Hakwan Lau, and Sid Kouider. What is consciousness, and could machines have it? Science, 358(6362):486–492, 2017. <a href="https://science.sciencemag.org/content/sci/358/6362/486.full.pdf">https://science.sciencemag.org/content/sci/358/6362/486.full.pdf</a></p><p>[2]: P. R. Lewis, A. Chandra, S. Parsons, E. Robinson, K. Glette, R. Bahsoon, J. Torresen, and X. Yao. A survey of self-awareness and its application in computing systems. In 2011 Fifth IEEE Conference on Self-Adaptive and Self-Organizing Systems Workshops, pages 102–107, Oct 2011. <a href="https://www.cs.bham.ac.uk/~xin/papers/LewisAWARE2011.pdf">https://www.cs.bham.ac.uk/~xin/papers/LewisAWARE2011.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb66d4ad0aaf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cvas-uofg/on-the-chase-for-self-aware-robotics-fb66d4ad0aaf">On The Chase for Self-Aware Robotics</a> was originally published in <a href="https://medium.com/cvas-uofg">On Computer Vision and Autonomous Systems</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visualising the Spread of Covid-19]]></title>
            <link>https://medium.com/analytics-vidhya/visualising-the-spread-of-covid-19-3d31772cc2ee?source=rss-e0bc0fdd91da------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d31772cc2ee</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[coronavirus]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Nikolas Pitsillos]]></dc:creator>
            <pubDate>Tue, 17 Mar 2020 16:53:42 GMT</pubDate>
            <atom:updated>2020-03-23T04:25:22.138Z</atom:updated>
            <content:encoded><![CDATA[<h4>Obtaining insights by visualising the pandemic spread</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y1Y93SOF3VmV4pApnxc8bw.jpeg" /><figcaption>Source: <a href="https://unsplash.com/@fusion_medical_animation">https://unsplash.com/@fusion_medical_animation</a></figcaption></figure><p>There is no doubt that Covid-19 has caused tremendous panic among the public. With social media constantly bombarding us with updates on the situation. Controversially, one of the good outcomes, was the rapid and ongoing cooperation between countries and organisations to share as much data as possible early on, to allow for a timely response by countries not yet affected by the virus.</p><p>This post was therefore inspired by the availability and ease of obtaining the necessary data. It is an attempt to understand how quickly the virus has spread among other insights. In this post, I will be explaining how I got the data and how it was pre-processed but I will also show several visualisations one can perform with the given data.</p><blockquote>Follow the link to this <a href="https://github.com/npitsillos/covid-19">repository</a> where you will find the starting code.</blockquote><p>To pre-process the data, I followed the instructions from this <a href="https://www.youtube.com/watch?v=tI7akX1hfXA">video</a>. But to make things easier, I’ll explain the process here. Initially, I am reading the three dataset files in the <em>data </em>directory (which can be downloaded from <a href="https://data.humdata.org/dataset/novel-coronavirus-2019-ncov-cases">here</a>, we only use the time-series data), loading them into a dictionary holding pandas Dataframes. I then pre-process the data as shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d362f90671c1c49e2ff136dbcfc643e1/href">https://medium.com/media/d362f90671c1c49e2ff136dbcfc643e1/href</a></iframe><p>Here I first fill all the NaN values in Province/State with the country name from Country/Region, then I unpivot the data so that instead of having every day as a column we get it as a row instead and finally I change the Date Series to a date-time object.</p><p>Let us now move on to combining the three files into a single Dataframe.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4eb2822e1d8e9817a24598bad28a762/href">https://medium.com/media/a4eb2822e1d8e9817a24598bad28a762/href</a></iframe><p>The above code will initially merge the data from all the three files in the data directory. This performs an outer merge on the dataframes’ common columns, namely “Province/State”, “Country/Region” &amp; “Date”. Further on, we create a copy of the whole dataset to keep the same data, however in the new dataframe we create a new column which holds the date of the next day, but named “Date-1”, for each day in our original dataframe and rename the columns “confirmed”, “deaths” and “recovered” by appending “-1” to the name.</p><p>In simple terms, a left merge between the original and the newly created dataframe will now match the Date with Date-1 bringing the previous day’s values along. In effect, for every day we offset the value for all case categories by one while holding those values in another column. I then subtract the values for every case category to get the new cases per day, and finally to provide a starting point for the new columns we simply provide the value of every category from the first recorded day.</p><h3>Visualisation</h3><p>Let us first get an overview of how the virus spread around the world. Initially I wanted to visualise how the total cumulative cases and the total new cases changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sMD2tQuw4B5trSSMUoooIw.png" /><figcaption>Total Cumulative Cases per Day</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-_tEqv1OQCBjEpJcqThHHQ.png" /><figcaption>Total New Cases per Day</figcaption></figure><p>In the first plot things seem a bit bad given the growth of the number of cases. However since this takes into account all the cases that came before it, we need to look into how the newly identified cases change per day, which is the second plot. Things don’t look so bad in the second plot however we can definitely identify the two spikes close to the 11th and 12th of February &amp; March respectively. According to CNN <a href="https://edition.cnn.com/asia/live-news/coronavirus-outbreak-02-13-20-intl-hnk/index.html">news</a> on the 13th of February many cases were reported pointing to the fact that maybe the virus spread to other countries also.</p><p>However this <a href="https://www.mercurynews.com/2020/03/10/coronavirus-map-shows-global-spread-of-disease-over-time/">resource</a> shows otherwise with most of the newly found cases mostly found in East Asia. About the second spike, however, it seems to be around the time when several countries identified many cases since it was around the time when strict measures were being taken.</p><p>In terms of total cases I wanted to plot a pie chart also to see the percentage of the different cases. This is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*HTobxBN0_GkCaERkCoVjTg.png" /><figcaption>Pie plot of ifected, deaths and recovered.</figcaption></figure><p>Finally since China managed to contain the virus spread I wanted to see how the curve looks like in that case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGJl_ikf-aUxucw5L6Crfg.png" /><figcaption>China Cumulative cases</figcaption></figure><p>Given that the virus was somewhat contained the curve has a logistic sigmoid shape to it since not many new cases are identified.</p><p>I finally wanted to see how my home country, Cyprus, and country of residence, UK, are doing. Below I plotted the curves for cumulative case per day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Niqlmx2SGTFCMGUhxa4m4Q.png" /><figcaption>Cyprus Cumulative Cases per Day</figcaption></figure><p>Fortunately, not many cases have been identified, however this does not mean there won’t be any. It could be just that Cyprus is still far behind in the pandemic spread but given government measures the situation will hopefully not worsen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZJeVI3jKKWEhVPi16P0vag.png" /><figcaption>UK Cumulative Cases</figcaption></figure><h3>Conclusion</h3><p>The data plotted above was until the 16th of March. I’ll try to keep the data updated every so often, hopefully not for long. It will be nice to have some other visualisations such as an animated map of the world possibly showing where and when the virus spread or a lineplot showing the change in number of cases over time for every country.</p><p>These are just some basic graphs to get an idea of how a virus can spread, so if people have any other visualisations in mind just add it on this repository.</p><p><a href="https://github.com/npitsillos/covid-19">npitsillos/covid-19</a></p><blockquote>Stay safe and contribute freely to the repository!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d31772cc2ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/visualising-the-spread-of-covid-19-3d31772cc2ee">Visualising the Spread of Covid-19</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PhD Life: Initial Steps]]></title>
            <link>https://medium.com/@npitsillos/phd-life-initial-steps-351fe2a0ef0f?source=rss-e0bc0fdd91da------2</link>
            <guid isPermaLink="false">https://medium.com/p/351fe2a0ef0f</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[habit-building]]></category>
            <category><![CDATA[habits]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[phd]]></category>
            <dc:creator><![CDATA[Nikolas Pitsillos]]></dc:creator>
            <pubDate>Sun, 20 Oct 2019 12:54:05 GMT</pubDate>
            <atom:updated>2019-10-20T12:55:02.469Z</atom:updated>
            <content:encoded><![CDATA[<h4>PhD Guide — A Computing Science Approach</h4><h4>What should you aim for to achieve in the first couple of months</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o09bIVC6wtPbrZRdZeyLTw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@joaosilas?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">João Silas</a> on <a href="https://unsplash.com/s/photos/research?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>We’ve All Been There..!</h3><p>I am pretty sure the majority of people undergoing a postgraduate research degree have been in the exact same situation as me in their current or previous projects. You have a meeting, you note everything down in your notebook and by the time you go home you don’t really feel like clearly writing it and end up not really remembering what it was that you discussed with your supervisor.</p><p>Additionally, you probably had a large number of papers you’ve read where you didn’t write a complete and thorough review or summary. Or worse, you come up with what you believe its an amazing idea before sleeping and feel like: <em>“Hey, I’ll definitely remember this tomorrow”. </em>This all finally culminates to the point where when you need to write up a literature review or come across a paper you’ve seen before you think to yourself: <em>“I should have probably written these stuff down…”. </em>This is one problem among others that can easily be fixed.</p><p>I came up with this blog post idea on October 16th 2019 when I felt like I was overwhelmed by the sheer amount of information I was presented on a daily basis. So this blog or series of blogs will aim to lay down some aspects which in my opinion are guaranteed to enable you to feel relaxed and on top of things during your PhD life. Also this is a way for me to think about my whole PhD process in retrospect, hopefully challenging me to really think about them and change them as necessary. Of course feedback is always welcome.</p><blockquote>A career in research is tough and very demanding. You are treading on completely uncharted areas where probably no one has ever tread before you. So like my supervisor says <em>“Embrace the uncertainty”.</em></blockquote><h3>Let’s Get To It</h3><p>In this post I’ll describe three things that to me are important habits to have when embarking on a PhD. Here goes!</p><h3>1) Always Take Notes! Always!! On Everything!!!</h3><p>This is a very important habit to have especially early on in your PhD. It is likely that you may not know much about your chosen field and even if you do, it is more likely that you don’t know much about the specific area you focus on. Therefore taking notes on every paper you read can be a huge help when you need to refer back to that paper since you won’t need to spend as much time on it.</p><p>The title however, mentions taking notes on everything and there is good reason for this. Even when an idea seems stupid write it down, those are probably things you may need to follow up on. Take notes in supervisor meetings as well and even a log of what you did each day. It can be difficult to do but it enables your brain to dump all the information and be prepared for more. Also having a log can help see your PhD progress but also identify parts on which you are lacking focus.</p><p>Whatever tool you use does not matter as long as it is comfortable for you to use. Finally remember to note down everything you did, said in meetings and have read.</p><h3>2) Establish a Reading System</h3><p>Reading papers is hard and extremely time-consuming. Also, nowadays there is a massive amount of information which is difficult to sift through. Establishing a reading system for papers can therefore help you to set a specific time and/or day to read papers but also a procedure to follow. You can’t possibly read completely everything even within your research area.</p><p>The way I do it is that I first identify a large number of papers through different tools. Initially I read the title and key terms and if this is related to my research then I keep it, otherwise I discard it.</p><blockquote>Note however that sometimes a paper does not directly relate to your research but can contain concepts that can be helpful to define your approach later on. Read such papers and write notes, you won’t remember them later.</blockquote><p>I then follow up on the papers I kept and read the abstracts. This will give me an idea of what they did and again if it is something interesting for my research I keep it. Finally I read the introduction and conclusion and look at the figures. This is an important point. You don’t have to read the whole paper early on. Initially what you are concerned with is gaining enough knowledge of what has already happened in order to correctly place you contribution within the established research.</p><p>I only fully read papers that are related directly to my research since those are the ones I need to be aware of when I am defining my hypothesis and research questions.</p><h3>3) Treat the PhD like work</h3><p>I initially kept hearing this advice a lot, however I didn’t realise it fully until I looked at my MSci experience in hindsight. During my MSci I had a very chaotic program, where due to the fact that I had very few classes, I stayed at home most of the time. I couldn’t therefore separate work from rest given that I was always working at home. This ended up in me burning out and feeling that I could no longer work. I would wake up at 11 am, watch a bunch of series or videos until 13 o’clock when I “woke” up. I would then work for 3–4 hours then stop and repeat.</p><p>Although working from home has its benefits it didn’t work for me since I am the kind of person that as soon as I start something I don’t stop until it’s finished. This resulted in me thinking about my work 24/7 which extremely unhealthy.</p><p>I decided that my PhD would be different by listening to the advice given to me. I go to work at around 9:30–10:00 am put in 7–8 hours of work and then leave and forget everything.</p><blockquote>“Forget everything” means not thinking about work when you leave the office so that you can relax. If however you take notes constantly you can indeed forget everything you did literally because you are smart and have a log of what you did every day.</blockquote><p>Treating your PhD like work frees your mind from constantly thinking or stressing about it which can then mean that you can think more clearly about it. I know work is important, and succeeding is as well, but more important is that you feel good while you are doing it.</p><h3>Conclusion</h3><p>To recap:</p><ul><li>take notes on everything you do so that you an refer back to it later in your PhD</li><li>establish a reading system so that you can read a lot of papers fast without spending too much time on the details in order to build a lot of knowledge about your area but also to be systematic in reading papers and being kept up to date</li><li>treat your PhD like work so you also focus on things that make you happy outside it</li></ul><p>The habits listed here are what I believe to be the most important and relevant ones to have when embarking on your PhD career. What a PhD narrows down to is to actually be comfortable with whatever system you choose. Experimenting with what suits you best is a large part of the PhD, as it is a test on whether you can do research. Since every one has a unique style when it comes to research, I advice that you experiment until you find a suitable process that you feel works best for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=351fe2a0ef0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[UUTCF 2019 WriteUps]]></title>
            <link>https://infosecwriteups.com/uutcf-2019-writeups-6c11ea3f9d22?source=rss-e0bc0fdd91da------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c11ea3f9d22</guid>
            <category><![CDATA[uutctf]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Nikolas Pitsillos]]></dc:creator>
            <pubDate>Thu, 02 May 2019 15:36:40 GMT</pubDate>
            <atom:updated>2019-05-05T14:59:48.794Z</atom:updated>
            <content:encoded><![CDATA[<h3>UUTCTF 2019 WriteUps</h3><p>In this post I am going to walk you through 3 CTF challenges from UUTCTF 2019, 2 Forensics and 1 Misc. I was so excited to solve these almost entirely on my own. Thank you <a href="https://medium.com/u/d468d7b1e1a9">Andreas Poyiatzis</a>!</p><h3>Forensics</h3><h4>Layers</h4><blockquote>Layers are here.</blockquote><p>In this challenge we are presented with the following image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*hfKltvq7HxHWb7i8ouA_pw.jpeg" /><figcaption>Layers.jpg</figcaption></figure><p>Downloading the image I inspected it with the <em>exiftool </em>as such:</p><pre>&gt;<em>exiftool</em> Layers.jpg</pre><p>We are presented with the information of the image file. With a bit of searching we can find the flag in the result returned by <em>exiftool.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*KSIfkMFQluYnswWnQIm4xg.png" /><figcaption>Exiftool result.</figcaption></figure><blockquote>Flag: uutctf{can_you_see_me}</blockquote><h4>Find the word flag</h4><blockquote>Where can the flag be hidden in an empty DOCX file? Find and submit!</blockquote><p>In this challenge we are given a Word.docx file. Opening it read the following text:</p><p><em>Mind the gaps inside the document</em></p><p>At first I thought it meant the spaces in the text but obviously that wasn’t the case. A bit of searching online for similar problems I found out that you can treat a docx like a zipped file. Using the command:</p><pre>&gt;<em>unzip Word.docx</em></pre><p>We can obtain the xml files representing the word document. Inspecting the resulting file document.xml within the word directory created we can see several long strips of spaces, hence gaps. My teammate quickly noticed that these were hex numbers where every two correspond to the value in the ASCII table. The first two numbers were 5 pointing to the letter U. This was the case for the case which clearly meant the flag.</p><p>All we have to do now is to ‘mind the gaps’ inside the document meaning removing the spaces in the xml file where they also appear in the .docx file. Having done so, the rest of the challenge reduced to implementing the following script to count the spaces and index a look up table.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/312a48a649ab50ac27cf1f7927a5c54f/href">https://medium.com/media/312a48a649ab50ac27cf1f7927a5c54f/href</a></iframe><p>This returned the following string of hex numbers:</p><p>5555544354467B4D65616E696E6766756C476158737D11111111</p><p>Ignoring the final string of 1s we can easily convert this to text which gives us the flag.</p><blockquote>UUTCTF{MeaningfulGaXs}</blockquote><h3>Misc</h3><h4>The Trouble Maker</h4><blockquote>Linus Torvalds is a trouble maker! He made a web page which hides the flag. Find and capture it!</blockquote><blockquote>Webpage is at: <a href="http://188.40.189.2:8001/">http://188.40.189.2:8001</a></blockquote><p>Pointing our browser to the IP address presents us with the following site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hUVZk4RitVgBfkmqy7ESkQ.png" /><figcaption>Website at <a href="http://188.40.189.2:8001/">http://188.40.189.2:8001</a></figcaption></figure><p>I immediately googled the name Linus Torvalds to check what tools he has created. I found out he created git also. Now this made me remember that you can access the .git directory from the URL path however this resulted in a Forbidden error.</p><p>The website does not offer any functionality so I used the git-dumper tool to download all files of the website.</p><pre>&gt;<em>git-dumper.py</em> <a href="http://188.40.189.2:8001/">http://188.40.189.2:8001/</a> out</pre><p>Considering he is the creator of git I went on to check the .git directory and more specifically the logs directory to check the commit messages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JvTeCqvSkbwWypiFTaCbzQ.png" /><figcaption>Commit messages on master.</figcaption></figure><p>As we can see there is a commit message saying: <em>this may help.</em> I thought that this should be a clue. So I used the following command to inspect the changes made in that commit.</p><pre>&gt;<em>git</em> show 24ad3f97738d5669e171ea4c3f280c62797dd21d</pre><p>This returned the following result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*Q2_5XwD4ysbVlE_wAlNjuw.png" /><figcaption>git show result</figcaption></figure><p>Inspecting the string variable we can infer that this is base64 encoding making it a very probable candidate for the flag.</p><p>Decoding the string returns the flag.</p><blockquote>Flag is: UUTCTF{VVe_ |_0Ve_L!n(_)$}</blockquote><h3>Conclusion</h3><p>So there you have it folks! These were exciting challenges and it was the first time I managed to solve several CTF challenges on my own (with very little help). So consistency and persistence are key skills to persevere.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c11ea3f9d22" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/uutcf-2019-writeups-6c11ea3f9d22">UUTCF 2019 WriteUps</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scratch Neural Net Implementation — Part 3 — Complete Neural Network with Backpropagation]]></title>
            <link>https://medium.com/@npitsillos/scratch-neural-net-implementation-part-3-complete-neural-network-with-backpropagation-c9e2bdae7152?source=rss-e0bc0fdd91da------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9e2bdae7152</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Nikolas Pitsillos]]></dc:creator>
            <pubDate>Sun, 03 Mar 2019 21:37:16 GMT</pubDate>
            <atom:updated>2019-03-03T21:37:16.115Z</atom:updated>
            <content:encoded><![CDATA[<h3>Scratch Neural Net Implementation — Part 3 — Complete Neural Network with Backpropagation</h3><p>This is the final part in implementing a complete neural network that can learn from data on its own.</p><h4>Sidenote</h4><p><em>The sigmoid function used for the outputs in the previous part does not constitute a probability distribution over all classes. It is merely a confidence score for that particular output. To represent a probability a different function needs to be used called the softmax which can be used in combination with a cross-entropy loss.</em></p><p>To understand how neural networks learn we first need to understand the famous backpropagation algorithm which is a method to propagate the changes we need to make to the weights and biases in a network. These are small changes that will drive the network closer to the correct output, across all outputs, as opposed to what we described in the first part.</p><h3>Notation</h3><p>Some notation that will be used throughout:</p><ul><li>y is the network’s output</li><li>t is the target, the ground truth</li><li>a is an activation value</li><li>w_kj denotes a weight from the hidden to the output layer</li><li>net denotes the net input</li><li>σ is the sigmoid function</li><li>z is the input to the sigmoid function</li><li>b is the bias</li></ul><h3>Backpropagation</h3><p>In our implementation we use the following loss function. The example I am going to show is the XOR function so we only have 1 output, in the multi-output case we divide by the number of output neurons so <em>1/2</em> becomes <em>1/2n</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/138/1*jTkYFJ3rSrmxzuIfG2xCLQ.png" /><figcaption>Mean Squared Loss</figcaption></figure><p>The <em>1/2 </em>term will come in handy later when we are differentiating. What we are trying to find out initially is the error in the output weights. To visualise stuff better lets look at the computational graph of a simple network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*rdhbzgzNIlXuU-ZsjCws1g.png" /><figcaption>Computational Graph of a single path in a neural network</figcaption></figure><p>To understand by how much we need to adjust <em>w </em>we need to find <em>dE/dw. </em>However we do not have an expression for it and we need to apply the <a href="https://en.wikipedia.org/wiki/Chain_rule">chain rule.</a></p><p>Applying the chain rule twice by incorporating derivatives we know and have the values to calculate we arrive at the following result. You can easily follow the computational graph to derive this as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/124/1*NFkWY6p2mv21bvABVF57Ww.png" /><figcaption>Application of the chain rule twice to obtain a general representation of the error. Deliberately missed the subscripts denoting layers.</figcaption></figure><p>One can also derive this by differentiating MSE with respect to the weight in consideration however here we will obtain every term separately. Although the result is the same, in my opinion going about it the way I am showing here is somewhat better. The reason is that implementing the backpropagation results in some values being reused and using the derivation shown here makes this clear. A naive implementation would result in recalculating values increasing the computational load. All in all what we will end up with is three separate values that can be implemented separately and reused.</p><h4><em>Sidenote</em></h4><p><em>During writing this post I needed to derive the different equations as shown below. I came to realise that having a single bias node in every layer is better than a bias term in every neuron. The reason for this is that I found it easier to back propagate the error in this way.</em></p><h4>Term 1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*Jp8wvOFGnLes0hs5henwsQ.png" /><figcaption>Derivative of error with respect to activation.</figcaption></figure><h4>Term 2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*2UnoTEtotLHoJnt9Usm-Kg.png" /><figcaption>Derivative of activation with respect to input to node. Sigmoid derivative found online.</figcaption></figure><h4>Term 3</h4><p>For this term we introduce a new notation for the weight as explained above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*0doaDmAflK3zhjOylsrx8Q.png" /><figcaption>Derivative of net input with respect to weight.</figcaption></figure><p>Why is the above equation only that!? Well the only weight that corresponds to this partial derivative is w_kj therefore all the others are 0. Thus we are left with the activation from the jth, previous, layer.</p><h3>Implementation</h3><p>I’ll only post the neural network python file, however you can find all files in my Github <a href="https://github.com/npitsillos/DeepLearning">repo</a> dedicated to contain everything I have worked on or played around with Deep Learning or Deep Reinforcement Learning.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c814bc985d63927b207d2c31a5337e9/href">https://medium.com/media/9c814bc985d63927b207d2c31a5337e9/href</a></iframe><h3>Conclusion</h3><p>So there you have it guys hope you learned something from this. I know I did. Also if you happen to find any errors in the code I probably have a lot of them but anyways in the end at least I learned a whole in the process and that’s what counts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9e2bdae7152" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scratch Neural Net Implementation — Part 2 — Neural Layer]]></title>
            <link>https://medium.com/@npitsillos/scratch-neural-net-implementation-part-2-neural-layer-f7afc73bcf8?source=rss-e0bc0fdd91da------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7afc73bcf8</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Nikolas Pitsillos]]></dc:creator>
            <pubDate>Sat, 22 Dec 2018 13:37:44 GMT</pubDate>
            <atom:updated>2018-12-22T14:00:41.951Z</atom:updated>
            <content:encoded><![CDATA[<h3>Scratch Neural Net Implementation — Part 2 — Neural Layer</h3><p>Here we are guys! To move forward we explore the Neural Layer. Here we have a number of neurons each belonging to a layer. The maximum number of neurons in a network’s layer is its width; the depth is the number of hidden and output layers.</p><p>Here we no longer think in scalars but instead think in vectors since the input to a neural layer is a vector. The implementation follows the well known example of MNIST but we do not use the images, yet…</p><p>This part is a very small one since we just use the same principle and our neural layer implementation just stacks a bunch of neurons which we have implemented already.</p><p>For this example lets assume we have a vector of size 10 corresponding to digits 0..9.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/23/1*PdxBpNyjrK5SC880mw_4kw.png" /><figcaption>Vector denoting 3.</figcaption></figure><p>Ok maybe you don’t really see how this vector arises. Let me explain. This is call one-hot-encoding and is method to vectorise categorical data which has a fixed number of values. We arrange all values in a vector and create as many vectors as there are values. To represent a value we place 0s everywhere except for the place where we wish to represent our value where we place a 1. Easy!!</p><h3>Code</h3><p>Now for the code. Already mentioned the code is not that difficult, yet… Here we simply ‘cook’ our values to get the results we need in a real situation Neural Networks have many parameters and we don’t know their correct values, or the problem is high-dimensional and there it is by no means feasible to set those parameters to get the results we want. Well, that is way we use learning algorithms in the first place!! So our Neural layer implementation is again an easy fixed one.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f724444fa506a13ab5b54bb9a369e150/href">https://medium.com/media/f724444fa506a13ab5b54bb9a369e150/href</a></iframe><p>Again fairly easy when things are simple!</p><p>And our working solution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*itgk1EFwjGnqjQJ2fDZD0A.png" /><figcaption>Correct output of layer that our input was 3.</figcaption></figure><h3>To be continued…</h3><p>Part 3 will show a full Neural Network implementation however this time we won’t be ‘cooking’ our results but instead will implement a learning algorithm to allow our network to learn on its own. So part 3 will show an implementation of the back-propagation algorithm as well and I’ll try to add an example with numbers well to get a better idea.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7afc73bcf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scratch Neural Net Implementation — Part 1 — The Neuron]]></title>
            <link>https://medium.com/@npitsillos/scratch-neural-net-implementation-part-1-the-neuron-38e1a5e33a45?source=rss-e0bc0fdd91da------2</link>
            <guid isPermaLink="false">https://medium.com/p/38e1a5e33a45</guid>
            <category><![CDATA[perceptron]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Nikolas Pitsillos]]></dc:creator>
            <pubDate>Fri, 30 Nov 2018 01:24:44 GMT</pubDate>
            <atom:updated>2018-11-30T01:24:44.774Z</atom:updated>
            <content:encoded><![CDATA[<h3>Scratch Neural Net Implementation — Part 1 — The Neuron</h3><p>Deep Learning has become the norm when it comes to implementing learning models. They also are the go to models when it comes to image classification, object detection etc. Deep Learning is an inherently difficult area of Artificial Intelligence to understand, possibly because it also makes heavy use of maths and as computer scientists we take it for granted and just use it!</p><p>Over the past year I became interested in Deep Learning and as with anything I am interested in I can’t rest unless I know what it does behind the scenes. So join me in my quest to improve my knowledge in Deep Learning.</p><p>It’s all good and perfect using a library and implementing a model fast, we are computer scientists/enthusiasts after all, re-usability and automation is what we bleed. But if you are like me you can’t be satisfied with this, you want to get into the nooks and crannies to fully understand and grasp what is going.</p><p>Let’s face it is also extremely satisfactory, when implementing something from scratch works.</p><h3>The Artificial Neuron</h3><p>Let’s start our journey with the Artificial Neuron. Inspired by the biological neuron the artificial neuron has inputs <em>x1…xN</em>, weights <em>w1…wN</em>, a threshold, an activation function or squashing function and an output <em>y</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*jBQ2nL2G4lWeBmdwQ9ceJw.png" /><figcaption>A Perceptron</figcaption></figure><p>You can read more about the Perceptron model <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.335.3398&amp;rep=rep1&amp;type=pdf">here</a>. What the picture shows is how to calculate the output of a neuron. We take the dot product of the weights and the inputs, check whether more or less than or equal to the threshold and then use our squashing function to get the final output or activation. Wow there… hold your horses, too much info!!! Let’s break it down.</p><p>Let’s look at a small example. To demonstrate what is going on here let us say we have an early morning lecture. We care about 2 things:</p><ul><li>Is the weather good?</li><li>Is the lecture important?</li></ul><h3>Inputs</h3><p>We represent these with x¹ , x². If the weather is good then x¹ = 1 and if the lecture is not important then x² = 0. Easy right?</p><h3>Weights</h3><p>Moving on to the weights let us say that you don’t really care what the weather is like that even if it is raining cats and dogs you still want to go. Weather has almost no impact on you, however you also care whether you’ll lose your time or not! So w¹, the weather’s weight, is small say w¹ = 2 and w²=4.</p><p>So weights show the importance of an input, in other words how much of that input do you take into account in order to affect your decision making in concluding weather you should go to the lecture or not.</p><h3>Threshold &amp; Output</h3><p>Now if your threshold is 3 then even if the weather is bad but the lecture is important you go since (0*2) + (1*4) &gt; 3. Ignoring the activation function for a while the output of the neuron is 1 since we overcame the threshold and thus decide to go the lecture. Thus the threshold allows the neuron to activate, that is give an output of 1 to demonstrate the choice made. Only when the lecture is important do we go.</p><h3>Bias</h3><p>The relationship between bias and threshold is that if there is a big bias on the neuron it is similar to having a very negative threshold. Basically we can fire up the neuron and output 1 very easily. The equation then becomes a check whether we are below or equal to 0, we don’t go, or above 1, we go.</p><p>(x¹ * w¹) + (x² * w²) + bias &gt; 0 -&gt; 1</p><p>(x¹ * w¹) + (x² * w²) + bias ≤ 0 -&gt; 0</p><h4>Sidenote</h4><p>Instead of a bias per neuron one can also add a bias node per layer except for the input layer. As long as the bias node per layer is fully connected to every node in the next layer it is effectively the same as adding the bias on a per neuron basis.</p><h3>Activation Function</h3><p>Finally, we want this to be able to learn. That is, making small changes to the weights we want the change in the output to be small as well. This is achieved with the activation function which effectively squashes the output to be between 0 and 1 or -1 and 1 depending on the choice of function. Many different activation functions can be used but here we use the logistic sigmoid function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/193/1*yVlveInmuZZaIfZXwEvPYw.png" /><figcaption>The logistic sigmoid function.</figcaption></figure><p>For example an input of 0 results in 0.5, you can do the math! Increasing the input, increases the output and decreasing the input decreases the output.</p><h3>Show me the Code</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3bb97e3794924161ef876285d30cce5a/href">https://medium.com/media/3bb97e3794924161ef876285d30cce5a/href</a></iframe><p>So there you have it folks!! A Neuron implementation from scratch!! And it works too!! Test it out, change the parameters or even better add your decision!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*KOKt4K2WLQsOHAmyKRTp8w.png" /></figure><p>As you can see the result, second value, is very close to 1. This is because the sigmoid outputs a probability, how confident it is that you decide to go!!</p><h3>To Be Continued…</h3><p>Part 2 will show an implementation of a Neuron Layer!! Follow along.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38e1a5e33a45" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>