SearcharxivSearch

arXiv subjects

Takahiro Sanada

Publications and source records attributed to Takahiro Sanada.

6 recordsLinked to original sources

Programming Backpropagation with Reverse Handlers for Arrows

We introduce a new programming language and its categorical semantics in order to design and implement neural networks within the framework of algebraic effects and handlers for arrows. Our language enables us to construct neural networks symbolically, in the same manner as algebraic effects, and to assign implementations -- such as backpropagation computations -- to them via handlers. The advantage of this language design is that network descriptions become abstract and high-level, while implementations can be flexibly assigned to networks. We establish a rigorous foundation for our language by developing a type system, an operational semantics, a categorical semantics, and soundness and adequacy theorems. The technical core is the introduction of reverse handlers, a novel handler mechanism for arrows for implementing backpropagation, together with new algebras of strong promonads on reverse differential restriction categories (RDRCs), whose string diagrams provide a formal graphical syntax and semantics for neural networks.

cs.PL

A Coalgebraic Dijkstra Algorithm

The Dijkstra algorithm is a classical method for solving the shortest path problem on weighted graphs. There are several variations of the Dijkstra algorithm, including algorithms for the widest path problem and for two-player games. In this paper, we introduce the coalgebraic shortest path problem (CSPP), a unifying framework for a broad class of optimization problems on state-transition systems. This framework encompasses not only the aforementioned problems but also new ones such as the shortest binary tree problem. We further present a coalgebraic Dijkstra algorithm for solving the CSPP efficiently under a suitable condition. Our condition is necessary and sufficient for the algorithm to return correct solutions, thereby providing a precise criterion for when Dijkstra-style acceleration is possible. We also show that the proposed algorithm achieves asymptotic complexity comparable to that of the classical Dijkstra algorithm.

cs.DS

Explicit Hopcroft's Trick in Categorical Partition Refinement

Algorithms for partition refinement are actively studied for a variety of systems, often with the optimisation called Hopcroft's trick. However, the low-level description of those algorithms in the literature often obscures the essence of Hopcroft's trick. Our contribution is twofold. Firstly, we present a novel formulation of Hopcroft's trick in terms of general trees with weights. This clean and explicit formulation -- we call it Hopcroft's inequality -- is crucially used in our second contribution, namely a general partition refinement algorithm that is functor-generic (i.e. it works for a variety of systems such as (non-)deterministic automata and Markov chains). Here we build on recent works on coalgebraic partition refinement but depart from them with the use of fibrations. In particular, our fibrational notion of $R$-partitioning exposes a concrete tree structure to which Hopcroft's inequality readily applies. It is notable that our fibrational framework accommodates such algorithmic analysis on the categorical level of abstraction.

cs.FL

Category-Graded Algebraic Theories and Effect Handlers

We provide an effect system CatEff based on a category-graded extension of algebraic theories that correspond to category-graded monads. CatEff has category-graded operations and handlers. Effects in CatEff are graded by morphisms of the grading category. Grading morphisms represent fine structures of effects such as dependencies or sorts of states. Handlers in CatEff are regarded as an implementation of category-graded effects. We define the notion of category-graded algebraic theory to give semantics of CatEff and prove soundness and adequacy. We also give an example using category-graded effects to express protocols for sending receiving typed data.

cs.PL

A Hydrodynamical Study on the Conversion of Hadronic Matter to Quark Matter: II. Diffusion-Induced Conversion

We study transitions of hadronic matter (HM) to 3-flavor quark matter (3QM), regarding the conversion processes as combustion and describing them hydrodynamically. Under the assumption that HM is metastable with their free energies being larger than those of 3QM but smaller than those of 2-flavor quark matter (2QM), we consider in this paper the conversion induced by diffusions of seed 3QM. This is a sequel to our previous paper, in which the shock-induced conversion was studied in the same frame work. We not only pay attention to the jump condition on both sides of the conversion front but the structures inside the front are also considered by taking into account what happens during the conversion processes on the time scale of weak interactions. We employ for HM the Shen's EOS, which is based on the relativistic mean field theory, and the bag model-based EOS for QM just as in the previous paper. We demonstrated in that paper that in this combination of EOS's the combustion will occur for a wide range of the bag constant and strong coupling constant in the so-called endothermic regime, in which the Hugoniot curve for combustion runs below the initial state. We find that weak deflagration nearly always occurs and that weak detonation is possible only when the diffusion constant is (unrealistically) large and the critical strange fraction is small. The velocities of the conversion front are ~ $10^3-10^7$ cm/s depending on the initial temperature and density as well as the parameters in the QM EOS and become particularly small when the final state is in the mixed phase. Finally we study linear stability of the laminar weak-deflagration front and find that it is unstable in the exothermic regime (Darrius-Landau instability) but stable in the endothermic regime, which is quite contrary to the ordinary combustions.

nucl-th

A Hydrodynamical Study on the Conversion of Hadronic Matter to Quark Matter: I. Shock-Induced Conversion

We study transitions of hadronic matter (HM) to 3-flavor quark matter (3QM) locally, regarding the conversion processes as combustion and describing them hydrodynamically. Not only the jump condition on both sides of the conversion front but the structures inside the front are also considered by taking into account what happens during the conversion processes on the time scale of weak interactions as well as equations of state (EOS's) in the mixed phase. Under the assumption that HM is metastable with their free energies being larger than those of 3QM but smaller than those of 2-flavor quark matter (2QM), we consider the transition via 2QM triggered by a rapid density rise in a shock wave. Based on the results, we discuss which combustion modes (strong/weak detonation) may be realized. HM is described by an EOS based on the relativistic mean field theory and 2, 3QM's are approximated by the MIT bag model. We demonstrate for a wide range of bag constant and strong coupling constant in this combination of EOS's that the combustion may occur in the so-called endothermic regime, in which the Hugoniot curve for combustion runs below the one for the shock wave in P-V plane, and which has no terrestrial counter part. We find that strong detonation always occurs. Depending on the EOS of quark matter (QM) as well as the density of HM and the Mach number of the detonation front, deconfinement from HM to 2QM is either completed or not completed in the shock wave. In the latter case, which is more likely if the EOS of QM ensures that deconfinement occurs above the nuclear saturation density and that the maximum mass of cold quark stars is larger than two solar mass, the conversion continues further via the mixing state of HM and 3QM on the time scale of weak interactions.

nucl-th